Merge branch 'UI'

This commit is contained in:
Hykilpikonna
2019-08-21 14:58:20 +08:00
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -12,6 +12,8 @@ export default class Login extends Vue
public username: any = ''; public username: any = '';
public password: any = ''; public password: any = '';
public loading: boolean = false;
/** /**
* On click, sends username and password to the server. * On click, sends username and password to the server.
*/ */
@@ -20,6 +22,9 @@ export default class Login extends Vue
// Call custom event // Call custom event
this.$emit('login:click', this.username, this.password); this.$emit('login:click', this.username, this.password);
// Make login button loading
this.loading = true;
// Fetch request TODO: Add username and password when the https server is ready. // Fetch request TODO: Add username and password when the https server is ready.
fetch(`${Constants.API_URL}/veracross/courses`).then(res => fetch(`${Constants.API_URL}/veracross/courses`).then(res =>
{ {
+1 -1
View File
@@ -5,7 +5,7 @@
<h1>Veracross Analyzer</h1> <h1>Veracross Analyzer</h1>
<el-input v-model="username" placeholder="School Username"></el-input> <el-input v-model="username" placeholder="School Username"></el-input>
<el-input v-model="password" placeholder="Veracross Password" show-password=""></el-input> <el-input v-model="password" placeholder="Veracross Password" show-password=""></el-input>
<el-button plain type="primary" @click="onLoginClick">Login</el-button> <el-button plain type="primary" @click="onLoginClick" :loading="loading">Login</el-button>
</div> </div>
</div> </div>
</template> </template>