Compare commits

..

No commits in common. "4569930a816b620722b748b3d1b3c49f849c18bd" and "82ff813225f9561bac75b7fdbadb28397f8f2065" have entirely different histories.

4 changed files with 7 additions and 19 deletions

4
package-lock.json generated
View File

@ -1,11 +1,11 @@
{
"name": "traxxx-web",
"version": "0.43.1",
"version": "0.43.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"version": "0.43.1",
"version": "0.43.0",
"dependencies": {
"@brillout/json-serializer": "^0.5.8",
"@dicebear/collection": "^7.0.5",

View File

@ -89,7 +89,7 @@
"overrides": {
"vite": "$vite"
},
"version": "0.43.1",
"version": "0.43.0",
"imports": {
"#/*": "./*.js"
}

View File

@ -70,10 +70,7 @@
</div>
</div>
<button
class="button button-submit"
:disabled="submitted"
>Log in</button>
<button class="button button-submit">Log in</button>
<a
v-if="allowSignup"
@ -97,13 +94,11 @@ const allowSignup = pageContext.env.allowSignup;
const username = ref('');
const password = ref('');
const submitted = ref(false);
const errorMsg = ref(null);
const userInput = ref(null);
const showPassword = ref(false);
async function login() {
submitted.value = true;
errorMsg.value = null;
try {
@ -116,8 +111,6 @@ async function login() {
navigate(pageContext.urlParsed.search.r ? decodeURIComponent(pageContext.urlParsed.search.r) : `/user/${loginUser.username}`, null, { redirect: true });
} catch (error) {
errorMsg.value = error.message;
} finally {
submitted.value = true;
}
}

View File

@ -120,10 +120,7 @@
@expired="captcha = null"
/>
<button
class="button button-submit"
:disabled="submitted"
>Sign up</button>
<button class="button button-submit">Sign up</button>
<a
href="/login"
@ -149,24 +146,24 @@ const password = ref('');
const passwordConfirm = ref('');
const errorMsg = ref(null);
const submitted = ref(false);
const userInput = ref(null);
const showPassword = ref(false);
const captcha = ref(null);
async function signup() {
errorMsg.value = null;
submitted.value = true;
if (password.value !== passwordConfirm.value) {
errorMsg.value = 'Passwords do not match';
return;
}
/*
if (env.captcha.enabled && !captcha.value) {
errorMsg.value = 'Please complete the CAPTCHA';
return;
}
*/
try {
const newUser = await post('/users', {
@ -180,8 +177,6 @@ async function signup() {
navigate(`/user/${newUser.username}`, null, { redirect: true });
} catch (error) {
errorMsg.value = error.message;
} finally {
submitted.value = true;
}
}