Tuning the host app.
This commit is contained in:
@@ -6,10 +6,6 @@
|
|||||||
<header class="view-header">
|
<header class="view-header">
|
||||||
<h1>{{ headingTitle }}</h1>
|
<h1>{{ headingTitle }}</h1>
|
||||||
<p class="view-lede">{{ subheading }}</p>
|
<p class="view-lede">{{ subheading }}</p>
|
||||||
<p v-if="authSiteUrl" class="view-hint">
|
|
||||||
Manage your full profile on
|
|
||||||
<a :href="authSiteUrl">{{ authSiteHost }}</a> (you may need to login again).
|
|
||||||
</p>
|
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<section class="section-block">
|
<section class="section-block">
|
||||||
@@ -34,13 +30,20 @@
|
|||||||
<div class="section-body host-actions">
|
<div class="section-body host-actions">
|
||||||
<div class="button-row">
|
<div class="button-row">
|
||||||
<button
|
<button
|
||||||
v-if="authSiteUrl"
|
|
||||||
type="button"
|
type="button"
|
||||||
class="btn-secondary"
|
class="btn-secondary"
|
||||||
|
@click="goBack"
|
||||||
|
>
|
||||||
|
Back
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
v-if="authSiteUrl"
|
||||||
|
type="button"
|
||||||
|
class="btn-primary"
|
||||||
:disabled="authStore.isLoading"
|
:disabled="authStore.isLoading"
|
||||||
@click="goToAuthSite"
|
@click="goToAuthSite"
|
||||||
>
|
>
|
||||||
Open full profile
|
Full Profile
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
@@ -51,7 +54,7 @@
|
|||||||
{{ authStore.isLoading ? 'Signing out…' : 'Logout' }}
|
{{ authStore.isLoading ? 'Signing out…' : 'Logout' }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<p class="note">Signed in on <strong>{{ currentHost }}</strong>.</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>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
@@ -80,7 +83,7 @@ const headingTitle = computed(() => {
|
|||||||
|
|
||||||
const subheading = computed(() => {
|
const subheading = computed(() => {
|
||||||
const service = authStore.settings?.rp_name || 'this service'
|
const service = authStore.settings?.rp_name || 'this service'
|
||||||
return `You\u2019re signed in via ${service} on ${currentHost}.`
|
return `You're signed in to ${currentHost}.`
|
||||||
})
|
})
|
||||||
|
|
||||||
const authSiteHost = computed(() => authStore.settings?.auth_host || '')
|
const authSiteHost = computed(() => authStore.settings?.auth_host || '')
|
||||||
@@ -99,6 +102,10 @@ 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