diff --git a/src/assets/no-auth-image.jpg b/src/assets/no-auth-image.jpg new file mode 100644 index 00000000..66e90f5d Binary files /dev/null and b/src/assets/no-auth-image.jpg differ diff --git a/src/components/misc/api-config.vue b/src/components/misc/api-config.vue index c0e542f3..3ad14e18 100644 --- a/src/components/misc/api-config.vue +++ b/src/components/misc/api-config.vue @@ -23,7 +23,7 @@
- + {{ apiDomain }}
@@ -101,7 +101,7 @@ export default { // Set it + save it to local storage to save us the hoops this.errorMsg = '' - this.successMsg = this.$t('apiConfig.success', {domain: this.apiDomain}) + this.$message.success({message: this.$t('apiConfig.success', {domain: this.apiDomain})}) this.configureApi = false this.apiUrl = url this.$emit('foundApi', this.apiUrl) diff --git a/src/components/misc/message.vue b/src/components/misc/message.vue index 672c9e73..df60cc38 100644 --- a/src/components/misc/message.vue +++ b/src/components/misc/message.vue @@ -1,6 +1,8 @@ @@ -14,6 +16,11 @@ defineProps({ diff --git a/src/i18n/lang/en.json b/src/i18n/lang/en.json index 09714acd..56a4bd11 100644 --- a/src/i18n/lang/en.json +++ b/src/i18n/lang/en.json @@ -36,6 +36,7 @@ "password": "Password", "passwordRepeat": "Retype your password", "passwordPlaceholder": "e.g. •••••••••••", + "forgotPassword": "Forgot your password?", "resetPassword": "Reset your password", "resetPasswordAction": "Send me a password reset link", "resetPasswordSuccess": "Check your inbox! You should have an e-mail with instructions on how to reset your password.", @@ -473,7 +474,8 @@ "download": "Download", "showMenu": "Show the menu", "hideMenu": "Hide the menu", - "forExample": "For example:" + "forExample": "For example:", + "welcomeBack": "Welcome Back!" }, "input": { "resetColor": "Reset Color", @@ -811,7 +813,7 @@ "url": "Vikunja URL", "urlPlaceholder": "eg. https://localhost:3456", "change": "change", - "signInOn": "Sign in to your Vikunja account on {0}", + "use": "Using Vikunja installation at {0}", "error": "Could not find or use Vikunja installation at \"{domain}\". Please try a different url.", "success": "Using Vikunja installation at \"{domain}\".", "urlRequired": "A url is required." diff --git a/src/router/index.js b/src/router/index.js index 1f876f88..cb049928 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -105,21 +105,33 @@ const router = createRouter({ path: '/login', name: 'user.login', component: LoginComponent, + meta: { + title: 'user.auth.login', + }, }, { path: '/get-password-reset', name: 'user.password-reset.request', component: GetPasswordResetComponent, + meta: { + title: 'user.auth.resetPassword', + }, }, { path: '/password-reset', name: 'user.password-reset.reset', component: PasswordResetComponent, + meta: { + title: 'user.auth.resetPassword', + }, }, { path: '/register', name: 'user.register', component: RegisterComponent, + meta: { + title: 'user.auth.register', + }, }, { path: '/user/settings', diff --git a/src/views/user/Login.vue b/src/views/user/Login.vue index f3562d70..10ed12d7 100644 --- a/src/views/user/Login.vue +++ b/src/views/user/Login.vue @@ -1,103 +1,97 @@ @@ -107,8 +101,6 @@ import {mapState} from 'vuex' import {HTTPFactory} from '@/http-common' import {LOADING} from '@/store/mutation-types' -import legal from '../../components/misc/legal' -import ApiConfig from '@/components/misc/api-config.vue' import {getErrorText} from '@/message' import Message from '@/components/misc/message' import {redirectToProvider} from '../../helpers/redirectToProvider' @@ -117,13 +109,10 @@ import {getLastVisited, clearLastVisited} from '../../helpers/saveLastVisited' export default { components: { Message, - ApiConfig, - legal, }, data() { return { confirmedEmailSuccess: false, - hasApiUrl: false, errorMessage: '', } }, @@ -161,13 +150,11 @@ export default { } }, created() { - this.hasApiUrl = window.API_URL !== '' this.setTitle(this.$t('user.auth.login')) }, computed: { hasOpenIdProviders() { - return this.hasApiUrl && - this.openidConnect.enabled && + return this.openidConnect.enabled && this.openidConnect.providers && this.openidConnect.providers.length > 0 }, diff --git a/src/views/user/PasswordReset.vue b/src/views/user/PasswordReset.vue index fbd8ffb9..a721f84d 100644 --- a/src/views/user/PasswordReset.vue +++ b/src/views/user/PasswordReset.vue @@ -1,67 +1,60 @@ @@ -69,14 +62,11 @@ import {ref, reactive} from 'vue' import {useI18n} from 'vue-i18n' -import Legal from '@/components/misc/legal' import PasswordResetModel from '@/models/passwordReset' import PasswordResetService from '@/services/passwordReset' -import {useTitle} from '@/composables/useTitle' import Message from '@/components/misc/message' const {t} = useI18n() -useTitle(() => t('user.auth.resetPassword')) const credentials = reactive({ password: '', diff --git a/src/views/user/Register.vue b/src/views/user/Register.vue index 68552038..ef9f4a15 100644 --- a/src/views/user/Register.vue +++ b/src/views/user/Register.vue @@ -1,97 +1,90 @@ @@ -101,8 +94,6 @@ import {useI18n} from 'vue-i18n' import router from '@/router' import {store} from '@/store' -import {useTitle} from '@/composables/useTitle' -import Legal from '@/components/misc/legal' import Message from '@/components/misc/message' // FIXME: use the `beforeEnter` hook of vue-router @@ -114,7 +105,6 @@ onBeforeMount(() => { }) const {t} = useI18n() -useTitle(() => t('user.auth.register')) const credentials = reactive({ username: '', diff --git a/src/views/user/RequestPasswordReset.vue b/src/views/user/RequestPasswordReset.vue index 3559f3f8..f721df70 100644 --- a/src/views/user/RequestPasswordReset.vue +++ b/src/views/user/RequestPasswordReset.vue @@ -1,67 +1,56 @@