From f051c0ba72b52bc88868b7f0a43c2b91b3e9a001 Mon Sep 17 00:00:00 2001 From: Noxdor Date: Mon, 17 Oct 2022 13:54:44 +0200 Subject: [PATCH 1/7] Implements a "warn" prop for "Input.vue" that warns instead of errors when the regex is not valid. Uses it for the username to allow for uncommon usernames that are currently not accounted for with teh regex. --- .../settings/components/Input.vue | 107 ++++++++++++------ .../settings/composables/logins.ts | 40 +++---- .../onboardingPages/04_LoginAccept.vue | 65 ++++++----- .../settings/settingPages/AutoLogin.vue | 104 +++++++++-------- 4 files changed, 178 insertions(+), 138 deletions(-) diff --git a/src/freshContent/settings/components/Input.vue b/src/freshContent/settings/components/Input.vue index 1984c7b4..011c9d8c 100644 --- a/src/freshContent/settings/components/Input.vue +++ b/src/freshContent/settings/components/Input.vue @@ -7,90 +7,123 @@ :type="type" :placeholder="placeholder" @input="emitState" - > + /> {{ errorMessage }} + :style="`opacity: ${(!valid || warn) && modelValue.length > 0 ? 1 : 0}`" + >{{ errorMessage }}