mirror of
https://github.com/Lissy93/dashy.git
synced 2024-12-26 10:24:40 +03:00
🌐 Adds translations for Guest Access
This commit is contained in:
parent
a95c91a380
commit
edf941229c
@ -23,7 +23,12 @@
|
||||
"error-incorrect-username": "User not found",
|
||||
"error-incorrect-password": "Incorrect Password",
|
||||
"success-message": "Logging in...",
|
||||
"logout-message": "Logged Out"
|
||||
"logout-message": "Logged Out",
|
||||
"already-logged-in-title": "Already Logged In",
|
||||
"already-logged-in-text": "You're logged in as",
|
||||
"proceed-to-dashboard": "Proceed to Dashboard",
|
||||
"log-out-button": "Logout",
|
||||
"proceed-guest-button": "Proceed as Guest"
|
||||
},
|
||||
"config": {
|
||||
"main-tab": "Main Menu",
|
||||
@ -67,7 +72,9 @@
|
||||
"item-size-large": "Large",
|
||||
"config-launcher-label": "Config",
|
||||
"config-launcher-tooltip": "Update Configuration",
|
||||
"sign-out-tooltip": "Sign Out"
|
||||
"sign-out-tooltip": "Sign Out",
|
||||
"sign-in-tooltip": "Log In",
|
||||
"sign-in-welcome": "Hello {username}!"
|
||||
},
|
||||
"updates": {
|
||||
"app-version-note": "Dashy version",
|
||||
@ -154,4 +161,4 @@
|
||||
"modal": "Open in Pop-Up Modal",
|
||||
"workspace": "Open in Workspace View"
|
||||
}
|
||||
}
|
||||
}
|
@ -14,7 +14,7 @@
|
||||
<IconLogout
|
||||
v-if="userType == userStateEnum.guestAccess"
|
||||
@click="goToLogin()"
|
||||
v-tooltip="tooltip('Login')"
|
||||
v-tooltip="tooltip($t('settings.sign-in-tooltip'))"
|
||||
class="layout-icon" tabindex="-2"
|
||||
/>
|
||||
</div>
|
||||
@ -55,8 +55,13 @@ export default {
|
||||
return { content, trigger: 'hover focus', delay: 250 };
|
||||
},
|
||||
makeText() {
|
||||
if (this.userType === userStateEnum.loggedIn) return `Hello ${localStorage[localStorageKeys.USERNAME]}!`;
|
||||
if (this.userType === userStateEnum.guestAccess) return 'Log In';
|
||||
if (this.userType === userStateEnum.loggedIn) {
|
||||
const username = localStorage[localStorageKeys.USERNAME];
|
||||
return this.$t('settings.sign-in-welcome', { username });
|
||||
}
|
||||
if (this.userType === userStateEnum.guestAccess) {
|
||||
return this.$t('settings.sign-in-tooltip');
|
||||
}
|
||||
return '';
|
||||
},
|
||||
},
|
||||
|
@ -2,12 +2,15 @@
|
||||
<div class="login-page">
|
||||
<!-- User is already logged in -->
|
||||
<div v-if="isUserAlreadyLoggedIn" class="already-logged-in">
|
||||
<h2>Already Logged In</h2>
|
||||
<h2>{{ $t('login.already-logged-in-title') }}</h2>
|
||||
<p class="already-logged-in">
|
||||
You're logged in as <span class="username">{{ existingUsername }}</span>
|
||||
{{ $t('login.already-logged-in-text') }}
|
||||
<span class="username">{{ existingUsername }}</span>
|
||||
</p>
|
||||
<Button class="login-button" :click="stayLoggedIn">Proceed to Dashboard</Button>
|
||||
<Button class="login-button" :click="getOut">Logout</Button>
|
||||
<Button class="login-button" :click="stayLoggedIn">
|
||||
{{ $t('login.proceed-to-dashboard') }}
|
||||
</Button>
|
||||
<Button class="login-button" :click="getOut">{{ $t('login.log-out-button') }}</Button>
|
||||
<span class="already-logged-in-note">
|
||||
You need to log out, in order to proceed as a different user.
|
||||
</span>
|
||||
@ -49,7 +52,7 @@
|
||||
v-if="appConfig.enableGuestAccess && !isUserAlreadyLoggedIn && isAuthenticationEnabled">
|
||||
<h2 class="login-title">Guest Access</h2>
|
||||
<Button class="login-button" :click="guestLogin">
|
||||
Proceed as Guest
|
||||
{{ $t('login.proceed-guest-button') }}
|
||||
</Button>
|
||||
<p class="guest-intro">
|
||||
This instance has guest access enabled.<br>
|
||||
|
Loading…
Reference in New Issue
Block a user