Harmonise ProfileView and HostApp.
This commit is contained in:
@@ -62,13 +62,20 @@
|
|||||||
|
|
||||||
<section class="section-block">
|
<section class="section-block">
|
||||||
<div class="button-row logout-row" :class="{ single: !hasMultipleSessions }">
|
<div class="button-row logout-row" :class="{ single: !hasMultipleSessions }">
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="btn-secondary"
|
||||||
|
@click="history.back()"
|
||||||
|
>
|
||||||
|
Back
|
||||||
|
</button>
|
||||||
<button v-if="!hasMultipleSessions" @click="logoutEverywhere" class="btn-danger logout-button" :disabled="authStore.isLoading">Logout</button>
|
<button v-if="!hasMultipleSessions" @click="logoutEverywhere" class="btn-danger logout-button" :disabled="authStore.isLoading">Logout</button>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<button @click="logout" class="btn-danger logout-button" :disabled="authStore.isLoading">Logout</button>
|
<button @click="logout" class="btn-danger logout-button" :disabled="authStore.isLoading">Logout</button>
|
||||||
<button @click="logoutEverywhere" class="btn-danger logout-button" :disabled="authStore.isLoading">All</button>
|
<button @click="logoutEverywhere" class="btn-danger logout-button" :disabled="authStore.isLoading">All</button>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<p class="logout-note" v-if="!hasMultipleSessions">End your current session on {{ currentSessionHost }}.</p>
|
<p class="logout-note" v-if="!hasMultipleSessions"><strong>Logout</strong> from {{ currentSessionHost }}.</p>
|
||||||
<p class="logout-note" v-else><strong>Logout</strong> this session on {{ currentSessionHost }}, or <strong>All</strong> sessions across all sites and devices for {{ rpName }}. You'll need to log in again with your passkey afterwards.</p>
|
<p class="logout-note" v-else><strong>Logout</strong> this session on {{ currentSessionHost }}, or <strong>All</strong> sessions across all sites and devices for {{ rpName }}. You'll need to log in again with your passkey afterwards.</p>
|
||||||
</section>
|
</section>
|
||||||
<RegistrationLinkModal
|
<RegistrationLinkModal
|
||||||
|
|||||||
@@ -32,10 +32,18 @@
|
|||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="btn-secondary"
|
class="btn-secondary"
|
||||||
@click="goBack"
|
@click="history.back()"
|
||||||
>
|
>
|
||||||
Back
|
Back
|
||||||
</button>
|
</button>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="btn-danger"
|
||||||
|
:disabled="authStore.isLoading"
|
||||||
|
@click="logout"
|
||||||
|
>
|
||||||
|
{{ authStore.isLoading ? 'Signing out…' : 'Logout' }}
|
||||||
|
</button>
|
||||||
<button
|
<button
|
||||||
v-if="authSiteUrl"
|
v-if="authSiteUrl"
|
||||||
type="button"
|
type="button"
|
||||||
@@ -45,14 +53,6 @@
|
|||||||
>
|
>
|
||||||
Full Profile
|
Full Profile
|
||||||
</button>
|
</button>
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
class="btn-danger"
|
|
||||||
:disabled="authStore.isLoading"
|
|
||||||
@click="logout"
|
|
||||||
>
|
|
||||||
{{ authStore.isLoading ? 'Signing out…' : 'Logout' }}
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
<p class="note"><strong>Logout</strong> from {{ currentHost }}, or access your <strong>Full Profile</strong> at {{ authSiteHost }} (you may need to sign in again).</p>
|
<p class="note"><strong>Logout</strong> from {{ currentHost }}, or access your <strong>Full Profile</strong> at {{ authSiteHost }} (you may need to sign in again).</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -102,10 +102,6 @@ const goToAuthSite = () => {
|
|||||||
window.location.href = authSiteUrl.value
|
window.location.href = authSiteUrl.value
|
||||||
}
|
}
|
||||||
|
|
||||||
const goBack = () => {
|
|
||||||
window.history.back()
|
|
||||||
}
|
|
||||||
|
|
||||||
const logout = async () => {
|
const logout = async () => {
|
||||||
await authStore.logout()
|
await authStore.logout()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user