[+] Create function to find title
This commit is contained in:
@@ -89,6 +89,23 @@ export default class Navigation extends Vue
|
||||
window.history.pushState({lastTab: newIndex}, '', url);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get title for index
|
||||
*
|
||||
* @param index Index
|
||||
*/
|
||||
public getTitle(index: string)
|
||||
{
|
||||
// Course
|
||||
if (index.startsWith('course'))
|
||||
{
|
||||
return this.findCourse(index.split('/')[1], 0).name;
|
||||
}
|
||||
|
||||
// Others
|
||||
return FormatUtils.toTitleCase(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* Move to the next course
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user