[O] Remove unnecessary public

This commit is contained in:
Hykilpikonna
2019-12-21 12:32:36 -05:00
parent 4d7b41bf2a
commit e26decd77d
+21 -19
View File
@@ -17,39 +17,41 @@ import LoginUser from '@/logic/login-user';
export default class App extends Vue export default class App extends Vue
{ {
// Is the login panel shown // Is the login panel shown
public showLogin: boolean = true; showLogin: boolean = true;
// List of course that the student takes // List of course that the student takes
public courses: Course[] = []; courses: Course[] = [];
// List of course that should be displayed // List of course that should be displayed
public filteredCourses: Course[] = []; filteredCourses: Course[] = [];
// The currently selected tab // The currently selected tab
public selectedTab: string = 'overall'; selectedTab: string = 'overall';
// Are the course assignments loaded from the server. // Are the course assignments loaded from the server.
public assignmentsReady: boolean = false; assignmentsReady: boolean = false;
// Token // Token
public user: LoginUser = null as any; user: LoginUser = null as any;
// Loading text // Loading text
public loading: string = ''; loading: string = '';
// Loading error // Loading error
public loadingError: boolean = false; loadingError: boolean = false;
// Http Client // Http Client
public static http: HttpUtils = new HttpUtils(); static http: HttpUtils = new HttpUtils();
// Instance // Instance
public static instance: App; static instance: App;
/** /**
* This is called when the instance is created. * This is called when the instance is created.
*/ */
public created() created()
{ {
// Show splash // Show splash
console.log(Constants.SPLASH); console.log(Constants.SPLASH);
@@ -63,7 +65,7 @@ export default class App extends Vue
* *
* @param user Authorization user * @param user Authorization user
*/ */
public onLogin(user: LoginUser) onLogin(user: LoginUser)
{ {
// Hide login bar // Hide login bar
this.showLogin = false; this.showLogin = false;
@@ -84,7 +86,7 @@ export default class App extends Vue
/** /**
* Load courses data after logging in. * Load courses data after logging in.
*/ */
public loadCoursesAfterLogin() loadCoursesAfterLogin()
{ {
// Show loading message // Show loading message
this.logLoading('2. Loading courses...'); this.logLoading('2. Loading courses...');
@@ -109,7 +111,7 @@ export default class App extends Vue
/** /**
* Load the assignments of the courses * Load the assignments of the courses
*/ */
public loadAssignments() loadAssignments()
{ {
// Show loading message // Show loading message
this.logLoading('3. Loading assignments...'); this.logLoading('3. Loading assignments...');
@@ -144,7 +146,7 @@ export default class App extends Vue
/** /**
* Check the courses' grading algorithms. (Total-mean or percent-type) * Check the courses' grading algorithms. (Total-mean or percent-type)
*/ */
private checkGradingAlgorithms() checkGradingAlgorithms()
{ {
// Show loading message // Show loading message
this.logLoading('4. Checking grading algorithms...'); this.logLoading('4. Checking grading algorithms...');
@@ -201,7 +203,7 @@ export default class App extends Vue
* *
* @param message Message * @param message Message
*/ */
private logLoading(message: string) logLoading(message: string)
{ {
if (message == '') this.loading = ''; if (message == '') this.loading = '';
else this.loading += '\n' + message; else this.loading += '\n' + message;
@@ -212,7 +214,7 @@ export default class App extends Vue
* *
* @param message Error message * @param message Error message
*/ */
private showError(message: string) showError(message: string)
{ {
this.loadingError = true; this.loadingError = true;
this.loading = message; this.loading = message;
@@ -221,7 +223,7 @@ export default class App extends Vue
/** /**
* Sign out * Sign out
*/ */
public signOut() signOut()
{ {
// Clear all cookies // Clear all cookies
this.$cookies.keys().forEach(key => this.$cookies.remove(key)); this.$cookies.keys().forEach(key => this.$cookies.remove(key));
@@ -235,7 +237,7 @@ export default class App extends Vue
* *
* @param code * @param code
*/ */
public selectTime(code: number) selectTime(code: number)
{ {
// TODO: Optimize // TODO: Optimize
window.location.reload(); window.location.reload();