Skip to content

Commit

Permalink
Merge pull request #522 from AudiovisualMetadataPlatform/AMP-3079_act…
Browse files Browse the repository at this point in the history
…ivate

AMP-3079/3267
  • Loading branch information
yingfeng-iu authored Jun 27, 2024
2 parents 6e29436 + 313f169 commit dbb6778
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
15 changes: 12 additions & 3 deletions src/components/account/Login.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<div class="col-12">
<loader :show="loading" />
<!-- <AmpHeader/> -->
<main>
<div class="container">
Expand Down Expand Up @@ -80,11 +81,13 @@ import { accountService } from "@/service/account-service";
import { sync } from "vuex-pathify";
import AccessControlService from "@/service/access-control-service";
import SharedService from "@/service/shared-service";
import Loader from "@/components/shared/Loader.vue";
export default {
name: "LoginComponent",
components: {
AmpHeader,
Loader
},
data() {
return {
Expand All @@ -97,6 +100,7 @@ export default {
pswd: null,
auth_status: false,
activate_status: false,
loading: false,
id: null,
token: null,
accessControlService: new AccessControlService(),
Expand All @@ -113,11 +117,13 @@ export default {
acActions: sync("acActions"),
},
created() {
async created() {
if (this.$route.params.token) {
console.log("The token is:" + this.$route.params.token);
this.token = this.$route.params.token;
this.activateNewUser();
this.loading = true;
await this.activateNewUser();
this.loading = false;
console.log("activation result is:" + this.activate_status);
}
},
Expand All @@ -128,7 +134,10 @@ export default {
.sendActivateUserRequest(this.token)
.then((response) => {
self.activate_status = response.success;
self.errors.other_errors = response.errors;
if (self.activate_status)
self.errors.other_errors = "Your account has been successfully activated. You may now login.";
else
self.errors.other_errors = response.errors;
})
.catch((e) => {
console.log(e);
Expand Down
2 changes: 0 additions & 2 deletions src/components/dashboard/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,6 @@ import SearchFilter from "@/components/dashboard/DashboardFilters/SearchFilter";
import Logout from "@/components/shared/Logout.vue";
import Search from "@/components/shared/Search.vue";
import WorkflowResultService from "../../service/workflow-result-service";
import Loader from "@/components/shared/Loader.vue";
import SharedService from "@/service/shared-service";
export default {
Expand All @@ -752,7 +751,6 @@ export default {
SearchFilter,
Logout,
Search,
Loader,
},
data() {
return {
Expand Down
7 changes: 2 additions & 5 deletions src/components/entity/EntityList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@
v-if="baseUrl === 'file'"
class="media-player"
>
<!-- showLoader is {{ showLoader }}, mediaSource is {{ entity.mediaSource }} -->
<div v-if="entity.mediaSource">
<!-- MediaElement -->
<mediaelement
ref="vPlay"
:type="entity.mediaType"
Expand Down Expand Up @@ -81,7 +79,8 @@
name="unitForm"
class="form"
:class="{
'w-100': !accessControl._primaryfile_media._read,
'w-50': baseUrl === 'file',
'w-100': baseUrl !== 'file',
}"
>
<div v-if="baseUrl === 'file'">
Expand Down Expand Up @@ -1362,7 +1361,6 @@ export default {
}
} else if (self.baseUrl === "file") {
self.showLoader = true;
// console.log("EntityList.getEntityData: before get media, showLoader = " + self.showLoader);
self.entity = self.selectedFile;
if (self.accessControl._primaryfile_media._read) {
let mediaSourceUrl = await self.workflowResultService.getMediaSymlink(
Expand All @@ -1378,7 +1376,6 @@ export default {
self.entity["mediaType"] = mediaSourceType.mimeType.substring(0, 5);
console.log("EntityList.getEntityData: mediaType = " + self.entity.mediaType);
self.showLoader = false;
// console.log("EntityList.getEntityData: after get media, showLoader = " + self.showLoader);
}
},
async getUnitCollections() {
Expand Down

0 comments on commit dbb6778

Please sign in to comment.