[U] Update usage
This commit is contained in:
@@ -32,7 +32,7 @@ export default class App extends Vue
|
||||
// Loading error
|
||||
loadingError: boolean = false;
|
||||
|
||||
navigator: NavController = new NavController();
|
||||
nav: NavController = new NavController();
|
||||
|
||||
// Http Client
|
||||
static http: HttpUtils = new HttpUtils();
|
||||
|
||||
@@ -4,16 +4,16 @@
|
||||
<navigation v-if="user != null"
|
||||
:courses="gradedCourses"
|
||||
:user="user"
|
||||
:nav="navigator"
|
||||
:nav="nav"
|
||||
@sign-out="signOut" @select-time="selectTime">
|
||||
</navigation>
|
||||
|
||||
<div id="app-content" v-if="assignmentsReady && loading === ''">
|
||||
<overall v-if="selectedTab === 'overall'"
|
||||
<overall v-if="nav.id === 'overall'"
|
||||
:courses="gradedCourses">
|
||||
</overall>
|
||||
<course-page v-if="selectedTab.split('/')[0] === 'course'"
|
||||
:course="gradedCourses.find(c => +c.id === +selectedTab.split('/')[1])">
|
||||
<course-page v-if="nav.id === 'course'"
|
||||
:course="gradedCourses.find(c => +c.id === +nav.info.id)">
|
||||
</course-page>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ export default class Navigation extends Vue
|
||||
*/
|
||||
findNextCourse(indexOffset: number)
|
||||
{
|
||||
return this.findCourse(this.nav.activeIndex.hash.split('/')[1], indexOffset);
|
||||
return this.findCourse(this.nav.info.id, indexOffset);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
redirect()
|
||||
{
|
||||
if (!this.clickable) return;
|
||||
App.instance.navigator.updateIndex(this.course.urlIndex);
|
||||
App.instance.nav.updateIndex(this.course.urlIndex);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user