AGPL-3.0-only, a source link in the app, and everything on dev since #5 #6

Merged
bvandeusen merged 214 commits from dev into main 2026-10-21 21:40:00 -04:00
3 changed files with 13 additions and 10 deletions
Showing only changes of commit a0249564e2 - Show all commits
+9
View File
@@ -73,6 +73,14 @@ export const useConfigStore = defineStore("config", () => {
const minPasswordLength = ref(8);
const loaded = ref(false);
// Why the server would refuse this password, said before asking it; null when it
// would take it. The server checks again (auth._password_refusal).
function passwordRefusal(password: string): string | null {
return password.length < minPasswordLength.value
? `Password must be at least ${minPasswordLength.value} characters.`
: null;
}
async function load(): Promise<void> {
if (loaded.value) return;
try {
@@ -106,6 +114,7 @@ export const useConfigStore = defineStore("config", () => {
clients,
passwordResetByEmail,
minPasswordLength,
passwordRefusal,
loaded,
load,
reload,
+2 -5
View File
@@ -24,11 +24,8 @@ const error = ref("");
const loading = ref(false);
async function submit() {
error.value = "";
if (password.value.length < config.minPasswordLength) {
error.value = `Password must be at least ${config.minPasswordLength} characters.`;
return;
}
error.value = config.passwordRefusal(password.value) ?? "";
if (error.value) return;
loading.value = true;
try {
await session.register(email.value, password.value, displayName.value, invite.value || undefined);
+2 -5
View File
@@ -25,11 +25,8 @@ const error = ref("");
const loading = ref(false);
async function submit() {
error.value = "";
if (password.value.length < config.minPasswordLength) {
error.value = `Password must be at least ${config.minPasswordLength} characters.`;
return;
}
error.value = config.passwordRefusal(password.value) ?? "";
if (error.value) return;
if (password.value !== confirm.value) {
error.value = "The two passwords don't match.";
return;