Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #7744, make logout screen nicer #7747

Merged
merged 1 commit into from
Oct 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/7747
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">
JammingBen marked this conversation as resolved.
Show resolved Hide resolved
<img class="oc-login-logo" :src="logoImg" alt="" :aria-hidden="true" />
<div class="oc-login-card-body oc-width-medium">
<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 oc-width-medium"
: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
2 changes: 1 addition & 1 deletion tests/acceptance/pageObjects/loginErrorPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
body: 'body',
loginErrorMessage: {
locateStrategy: 'xpath',
selector: '//span[@data-msgid="Login Error"]'
selector: '//h2[text()="Logged out"]'
},
exitButton: {
selector: '#exitAnchor'
Expand Down