diff --git a/src/assets/locales/en.json b/src/assets/locales/en.json index 0132e315..f62e397a 100644 --- a/src/assets/locales/en.json +++ b/src/assets/locales/en.json @@ -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" } -} +} \ No newline at end of file diff --git a/src/components/Settings/AuthButtons.vue b/src/components/Settings/AuthButtons.vue index 50653102..29e082cb 100644 --- a/src/components/Settings/AuthButtons.vue +++ b/src/components/Settings/AuthButtons.vue @@ -14,7 +14,7 @@ @@ -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 ''; }, }, diff --git a/src/views/Login.vue b/src/views/Login.vue index dfc2b2db..3e287a6c 100644 --- a/src/views/Login.vue +++ b/src/views/Login.vue @@ -2,12 +2,15 @@
-

Already Logged In

+

{{ $t('login.already-logged-in-title') }}

- You're logged in as {{ existingUsername }} + {{ $t('login.already-logged-in-text') }} + {{ existingUsername }}

- - + + You need to log out, in order to proceed as a different user. @@ -49,7 +52,7 @@ v-if="appConfig.enableGuestAccess && !isUserAlreadyLoggedIn && isAuthenticationEnabled">

This instance has guest access enabled.