refactor login page and add user avatar to header
This commit is contained in:
@@ -33,7 +33,7 @@ export default {
|
||||
return {
|
||||
isOpenForm: false,
|
||||
updatedClients: false,
|
||||
url: "https://astra-dev.dopcore.com",
|
||||
url: "https://astra-dev.dopcore.com/api/store/",
|
||||
createdClientId: "",
|
||||
};
|
||||
},
|
||||
|
||||
@@ -34,9 +34,9 @@
|
||||
padding="0",
|
||||
style="color: var(--font-grey-color)"
|
||||
)
|
||||
base-avatar(:size="36", :color="userData?.color", v-if="!userData?.photo") {{changeName}}
|
||||
base-avatar(:size="36", :color="userData?.color", v-if="!userData?.avatar") {{changeName}}
|
||||
base-avatar(:size="32", v-else)
|
||||
img.h-full.object-cover(:src="url + userData?.photo", alt="Avatar")
|
||||
img.h-full.object-cover(:src="url + userData?.avatar", alt="Avatar")
|
||||
.h-6.w-6.flex.items-center.justify-center.ml-1.pt-1
|
||||
q-icon.arrow(name="app:down-arrow", size="24px")
|
||||
q-menu(
|
||||
@@ -104,8 +104,8 @@ export default {
|
||||
redirectHomePage() {
|
||||
this.$router.push("/calendar");
|
||||
},
|
||||
logout() {
|
||||
localStorage.removeItem("tokenAccess");
|
||||
async logout() {
|
||||
await fetchWrapper.post("auth/logout");
|
||||
this.$router.go("/login");
|
||||
},
|
||||
openPopup() {
|
||||
|
||||
@@ -24,11 +24,14 @@
|
||||
:shadow-text="shadowText",
|
||||
:autofocus="autofocus",
|
||||
hide-bottom-space
|
||||
:error="error"
|
||||
)
|
||||
template(v-slot:prepend, v-if="iconLeft")
|
||||
slot(name="iconLeft")
|
||||
template(v-slot:append, v-if="iconRight")
|
||||
slot(name="iconRight")
|
||||
template(#error v-if="error")
|
||||
slot(name="error")
|
||||
slot(v-if="!iconLeft && !iconRight")
|
||||
</template>
|
||||
|
||||
@@ -80,6 +83,7 @@ export default {
|
||||
size: String,
|
||||
circle: Boolean,
|
||||
height: String,
|
||||
error: Boolean,
|
||||
},
|
||||
emits: ["update:modelValue"],
|
||||
computed: {
|
||||
|
||||
Reference in New Issue
Block a user