🌐 Adds translations for Guest Access

This commit is contained in:
Alicia Sykes
2021-08-18 21:52:47 +01:00
parent a95c91a380
commit edf941229c
3 changed files with 26 additions and 11 deletions

View File

@@ -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 '';
},
},