mirror of
https://github.com/hpware/news-analyze.git
synced 2025-06-23 07:41:02 +08:00
Add translations into the login system (Also commiting the settings
window to test in prod)
This commit is contained in:
parent
af92b7c573
commit
78bead88cf
@ -174,7 +174,39 @@ const submitUserPassword = async () => {
|
||||
};
|
||||
</script>
|
||||
<template>
|
||||
<div class="justify-center align-center text-center">
|
||||
<div class="justify-center align-center text-center" v-if="!isLoggedIn">
|
||||
<form
|
||||
class="flex flex-col items-center justify-center h-full"
|
||||
@submit.prevent="submitUserPassword"
|
||||
v-if="!success"
|
||||
>
|
||||
<span class="text-2xl text-bold mb-0">{{ t("settings.login") }}</span>
|
||||
<span class="mb-4 text-sm mt-0"> {{ t("settings.loginmessage") }}</span>
|
||||
<div class="">
|
||||
<Input
|
||||
type="text"
|
||||
placeholder="Username"
|
||||
class="mb-2 p-2 border rounded"
|
||||
v-model="userAccount"
|
||||
required
|
||||
/>
|
||||
<Input
|
||||
type="password"
|
||||
placeholder="Password"
|
||||
class="p-2 border rounded mb-2"
|
||||
v-model="userPassword"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
<span v-if="error" class="text-red-600 text-xs m-2"
|
||||
>Error: {{ errormsg }}</span
|
||||
>
|
||||
<button class="bg-black text-white p-2 rounded transition duration-200">
|
||||
Log In
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="justify-center align-center text-center" v-else>
|
||||
<h1 class="text-3xl text-bold p-2">
|
||||
{{ t("settings.greet")
|
||||
}}{{ user || userData.userAccount || t("settings.defaultname") }}
|
||||
|
@ -86,7 +86,9 @@
|
||||
"dangerzone": "DANGER ZONE",
|
||||
"submit": "Submit",
|
||||
"greet": "Greetings, ",
|
||||
"defaultname": "User"
|
||||
"defaultname": "User",
|
||||
"login": "Login / Register",
|
||||
"loginmessage": "We will create a account for you if you don't have one."
|
||||
},
|
||||
"popuptext": {
|
||||
"logout": "Are you sure you want to logout?",
|
||||
|
@ -86,7 +86,9 @@
|
||||
"dangerzone": "DANGER ZONE",
|
||||
"submit": "送出",
|
||||
"greet": "嗨, ",
|
||||
"defaultname": "使用者"
|
||||
"defaultname": "使用者",
|
||||
"login": "登入 / 註冊",
|
||||
"loginmessage": "如果妳沒有帳號的話,我們會幫你註冊一個。"
|
||||
},
|
||||
"popup": {
|
||||
"cancel": "取消",
|
||||
|
Loading…
x
Reference in New Issue
Block a user