[+] Create function to find title

This commit is contained in:
Hykilpikonna
2019-10-20 21:55:39 -04:00
parent f69e2617d4
commit 8b01428208
+17
View File
@@ -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
*