diff --git a/src/App.vue b/src/App.vue index 6fe1f74..80efa91 100644 --- a/src/App.vue +++ b/src/App.vue @@ -8,7 +8,11 @@ fluid fill-height style=" - position: absolute; + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; z-index: 20; background-color: rgba(255, 255, 255, 1); " diff --git a/src/assets/icons/edit.vue b/src/assets/icons/edit.vue new file mode 100644 index 0000000..29e25fe --- /dev/null +++ b/src/assets/icons/edit.vue @@ -0,0 +1,14 @@ + diff --git a/src/assets/icons/globe.vue b/src/assets/icons/globe.vue new file mode 100644 index 0000000..94cdc07 --- /dev/null +++ b/src/assets/icons/globe.vue @@ -0,0 +1,14 @@ + diff --git a/src/assets/icons/password.vue b/src/assets/icons/password.vue new file mode 100644 index 0000000..a223221 --- /dev/null +++ b/src/assets/icons/password.vue @@ -0,0 +1,45 @@ + diff --git a/src/assets/icons/user.vue b/src/assets/icons/user.vue new file mode 100644 index 0000000..0b249bb --- /dev/null +++ b/src/assets/icons/user.vue @@ -0,0 +1,15 @@ + diff --git a/src/assets/translations/en.json b/src/assets/translations/en.json index 93512d8..94fa0a8 100644 --- a/src/assets/translations/en.json +++ b/src/assets/translations/en.json @@ -103,8 +103,8 @@ }, "login": { "title": "Login", - "username": "Username", - "password": "Password", + "username": "Username (ex: marta)", + "password": "Enter Password", "username_required": "Username is required", "password_required": "Password is required", "login": "Login" @@ -134,7 +134,7 @@ "join": { "title": "Welcome to {roomName}", "user_name_label": "User name", - "shared_computer": "Using a shared computer", + "shared_computer": "This is a shared device", "joining_as": "You are joining as:", "join": "Join room", "join_guest": "Join as guest", diff --git a/src/components/Login.vue b/src/components/Login.vue index a63ddec..698413f 100644 --- a/src/components/Login.vue +++ b/src/components/Login.vue @@ -4,34 +4,34 @@ - + -
{{ $t("login.title") }}
+
{{ $t("login.title") }}
- - close - + + close +
- -
- {{$t('login.login')}} + + {{ $t("login.login") }}
@@ -92,11 +100,25 @@ export default { }, showCloseButton() { return this.$navigation && this.$navigation.canPop(); - } + }, + sharedComputer: { + get: function () { + return !this.$store.state.useLocalStorage; + }, + set: function (sharedComputer) { + this.$store.commit("setUseLocalStorage", !sharedComputer); + }, + }, }, created() { if (this.loggedIn) { - this.$navigation.push({name: "Chat", params: { roomId: util.sanitizeRoomId(this.$matrix.currentRoomId) }}, -1); + this.$navigation.push( + { + name: "Chat", + params: { roomId: util.sanitizeRoomId(this.$matrix.currentRoomId) }, + }, + -1 + ); } }, watch: { @@ -109,18 +131,12 @@ export default { deep: true, }, message() { - if ( - this.message && - this.message.toLowerCase().includes("user") - ) { + if (this.message && this.message.toLowerCase().includes("user")) { this.userErrorMessage = this.message; } else { this.userErrorMessage = null; } - if ( - this.message && - this.message.toLowerCase().includes("pass") - ) { + if (this.message && this.message.toLowerCase().includes("pass")) { this.passErrorMessage = this.message; } else { this.passErrorMessage = null; @@ -130,9 +146,8 @@ export default { methods: { handleLogin() { if (this.user.user_id && this.user.password) { - - // Reset errors - this.message = null; + // Reset errors + this.message = null; // Is it a full matrix user id? Modify a copy, so that the UI will still show the full ID. var user = Object.assign({}, this.user); @@ -142,9 +157,17 @@ export default { this.$store.dispatch("login", user).then( () => { if (this.$matrix.currentRoomId) { - this.$navigation.push({name: "Chat", params: { roomId: util.sanitizeRoomId(this.$matrix.currentRoomId) }}, -1); + this.$navigation.push( + { + name: "Chat", + params: { + roomId: util.sanitizeRoomId(this.$matrix.currentRoomId), + }, + }, + -1 + ); } else { - this.$navigation.push({name: "Home"}, -1); + this.$navigation.push({ name: "Home" }, -1); } }, (error) => { diff --git a/src/components/Profile.vue b/src/components/Profile.vue index 3d7fe06..b0887f3 100644 --- a/src/components/Profile.vue +++ b/src/components/Profile.vue @@ -2,7 +2,7 @@
-
{{ $t("profile.title") }}
+
{{ $t("profile.title") }}
{{ displayName }}
{{ $matrix.currentUser.user_id }}
-
+ {{ $t("menu.logout") }} @@ -51,7 +51,7 @@ diff --git a/src/plugins/vuetify.js b/src/plugins/vuetify.js index ec41343..96f47f7 100644 --- a/src/plugins/vuetify.js +++ b/src/plugins/vuetify.js @@ -1,10 +1,29 @@ import Vue from 'vue'; import Vuetify from 'vuetify/lib'; +import icUser from '@/assets/icons/user.vue'; +import icPassword from '@/assets/icons/password.vue'; +import icEdit from '@/assets/icons/edit.vue'; +import icGlobe from '@/assets/icons/globe.vue'; Vue.use(Vuetify); export default new Vuetify({ icons: { iconfont: 'md', + values: { + user: { + component: icUser + }, + password: { + component: icPassword + }, + edit: { + component: icEdit + }, + globe: { + component: icGlobe + }, + }, + user: icUser }, });