Skip to content

Commit

Permalink
Fix #7744, make logout screen nicer
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalwengerter committed Oct 6, 2022
1 parent d04c4f9 commit 1cbfb8f
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 51 deletions.
6 changes: 6 additions & 0 deletions changelog/unreleased/enhancement-friendlier-logout-screen
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Enhancement: Friendlier logout screen

We have updated the message and layout of the logout screen to make it a more pleasant user experience.

https://github.com/owncloud/web/pull/7748
https://github.com/owncloud/web/issues/7744
78 changes: 31 additions & 47 deletions packages/web-runtime/src/pages/accessDenied.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,77 +3,61 @@
class="oc-login oc-height-viewport"
:style="{ backgroundImage: 'url(' + backgroundImg + ')' }"
>
<h1 class="oc-invisible-sr">{{ pageTitle }}</h1>
<div class="oc-login-card oc-position-center">
<img class="oc-login-logo" :src="logoImg" alt="" :aria-hidden="true" />
<div class="oc-login-card-body oc-width-large">
<h3 class="oc-login-card-title">
<span v-translate>Login Error</span>
</h3>
<h4 v-translate class="oc-mb-m">Your user session is invalid or has expired.</h4>
<div v-translate class="oc-mb-m">
If you like to login with a different user please proceed to
<router-link id="exitAnchor" :to="{ name: 'login' }">exit</router-link>
<h1 class="oc-invisible-sr" v-text="pageTitle" />
<div class="oc-login-card-wrapper oc-height-viewport oc-flex oc-flex-center oc-flex-middle">
<div class="oc-login-card">
<img class="oc-login-logo" :src="logoImg" alt="" :aria-hidden="true" />
<div class="oc-login-card-body oc-width-large">
<h2 class="oc-login-card-title" v-text="cardTitle" />
<p v-text="cardHint" />
</div>
<div v-translate class="oc-m-rm">
<strong>Attention:</strong> this will log you out from all applications you are running in
this browser with your current user.
</div>
</div>
<div class="oc-login-card-footer oc-width-large">
<p>
{{ helpDeskText }}
<a v-if="helpDeskLink" :href="helpDeskLink" v-text="helpDeskLinkText" />
</p>
</div>
<oc-button
id="exitAnchor"
type="router-link"
class="oc-mt-m"
:to="{ name: 'login' }"
size="large"
appearance="filled"
variation="primary"
v-text="navigateToLoginText"
/>
</div>
</div>
</template>

<script lang="ts">
import { defineComponent } from '@vue/runtime-core'
import { mapGetters } from 'vuex'
export default defineComponent({
name: 'AccessDeniedPage',
computed: {
...mapGetters(['configuration']),
pageTitle() {
return this.$gettext(this.$route.meta.title)
},
helpDeskText() {
if (
this.configuration.currentTheme.general.helpDeskText &&
this.configuration.currentTheme.general.helpDeskText.en
) {
const lang = this.$language.current
if (this.configuration.currentTheme.general.helpDeskText[lang]) {
return this.configuration.currentTheme.general.helpDeskText[lang]
}
return this.configuration.currentTheme.general.helpDeskText.en
}
return this.$gettext(
'Please contact your administrator if you think this message shows up in error.'
)
cardTitle() {
return this.$gettext('Logged out')
},
helpDeskLink() {
if (this.configuration.currentTheme.general.helpDeskLink) {
return this.configuration.currentTheme.general.helpDeskLink
}
return ''
cardHint() {
return this.$gettext('You were automatically logged out for security reasons.')
},
helpDeskLinkText() {
if (this.configuration.currentTheme.general.helpDeskLinkText) {
return this.configuration.currentTheme.general.helpDeskLinkText
}
return ''
navigateToLoginText() {
return this.$gettext('Log in again')
},
logoImg() {
return this.configuration.currentTheme.logo.login
},
backgroundImg() {
return this.configuration.currentTheme.loginPage.backgroundImg
}
}
})
</script>

<style lang="scss" scoped>
.oc-login-card-wrapper {
flex-flow: column;
}
</style>
5 changes: 1 addition & 4 deletions packages/web-runtime/src/store/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ const state = {
currentTheme: {
general: {
name: '',
slogan: '',
helpDeskText: '',
helpDeskLink: '',
helpDeskLinkText: 'ownCloud Central'
slogan: ''
},
logo: {
topbar: '',
Expand Down

0 comments on commit 1cbfb8f

Please sign in to comment.