Skip to content

πŸ“š The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.

Update signup.vue

louloudev59099ddd44abb7
diff --git a/frontend/app/pages/(public)/signup.vue b/frontend/app/pages/(public)/signup.vue
index 6d9a413e..758b4099 100644
--- a/frontend/app/pages/(public)/signup.vue
+++ b/frontend/app/pages/(public)/signup.vue
@@ -18,16 +18,38 @@
<div class="form-group">
<label for="password">Password</label>
<div class="password-input">
- <input :type="showPassword ? 'text' : 'password'" id="password" v-model="password" :class="{ 'is-invalid': errors.password }" />
- <button type="button" class="password-toggle" @click="showPassword = !showPassword">{{ showPassword ? 'Hide' : 'Show' }}</button>
+ <input
+ :key="`password-${showPassword}`"
+ :type="showPassword ? 'text' : 'password'"
+ id="password"
+ v-model="password"
+ :class="{ 'is-invalid': errors.password }"
+ />
+ <button type="button" class="password-toggle" @click="togglePassword">
+ <div class="eye-icon" :class="{ 'show': showPassword }">
+ <Icon v-if="showPassword" name="eye" />
+ <Icon v-else name="eye_off" />
+ </div>
+ </button>
</div>
<p v-if="errors.password" class="invalid-feedback">{{ errors.password }}</p>
</div>
<div class="form-group">
<label for="confirmPassword">Confirm Password</label>
<div class="password-input">
- <input :type="showConfirmPassword ? 'text' : 'password'" id="confirmPassword" v-model="confirmPassword" :class="{ 'is-invalid': errors.confirmPassword }" />
- <button type="button" class="password-toggle" @click="showConfirmPassword = !showConfirmPassword">{{ showConfirmPassword ? 'Hide' : 'Show' }}</button>
+ <input
+ :key="`confirmPassword-${showConfirmPassword}`"
+ :type="showConfirmPassword ? 'text' : 'password'"
+ id="confirmPassword"
+ v-model="confirmPassword"
+ :class="{ 'is-invalid': errors.confirmPassword }"
+ />
+ <button type="button" class="password-toggle" @click="toggleConfirmPassword">
+ <div class="eye-icon" :class="{ 'show': showConfirmPassword }">
+ <Icon v-if="showConfirmPassword" name="eye" />
+ <Icon v-else name="eye_off" />
+ </div>
+ </button>
</div>
<p v-if="errors.confirmPassword" class="invalid-feedback">{{ errors.confirmPassword }}</p>
</div>
@@ -60,6 +82,14 @@ const errors = ref({
});
const userStore = useUserStore();
+function togglePassword() {
+ showPassword.value = !showPassword.value;
+}
+
+function toggleConfirmPassword() {
+ showConfirmPassword.value = !showConfirmPassword.value;
+}
+
function register() {
let valid = true;
@@ -142,14 +172,32 @@ form {
.form-group {
display: flex;
flex-direction: column;
- gap: 6px;
+ gap: 8px;
width: 100%;
+ margin-bottom: 1.2rem;
+
+ label {
+ font-weight: 600;
+ color: var(--text-color);
+ font-size: 0.95rem;
+ }
}
input {
width: 100%;
- padding: 0.6rem;
+ padding: 0.8rem;
border-radius: 8px;
+ border: 2px solid var(--border-color);
+ background: var(--bg-color);
+ color: var(--text-color);
+ font-size: 1rem;
+ transition: all 0.2s ease;
+
+ &:focus {
+ outline: none;
+ border-color: var(--primary);
+ box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
+ }
}
input,
input:-webkit-autofill,
@@ -168,39 +216,85 @@ input:-webkit-autofill:focus {
.password-toggle {
position: absolute;
top: 50%;
- right: 5px;
+ right: 8px;
transform: translateY(-50%);
- font-size: 0.8rem;
- padding: 0.2rem;
background: transparent;
border: none;
cursor: pointer;
+ padding: 8px;
+ border-radius: 50%;
+ transition: all 0.2s ease;
+ display: flex;
+ align-items: center;
+ justify-content: center;
&:hover {
- text-decoration: underline;
+ background: rgba(0, 0, 0, 0.05);
+ }
+
+ &:active {
+ transform: translateY(-50%) scale(0.95);
+ }
+}
+
+.eye-icon {
+ width: 20px;
+ height: 20px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ transition: all 0.3s ease;
+
+ &.show {
+ transform: scale(1.1);
+ }
+
+ svg {
+ width: 18px;
+ height: 18px;
+ transition: all 0.3s ease;
}
}
/* ===== Liens ===== */
.login-link {
display: block;
- margin-bottom: 1rem;
+ margin: 1.5rem 0;
text-align: center;
color: var(--primary);
text-decoration: none;
font-weight: 500;
+ transition: all 0.2s ease;
+
+ &:hover {
+ color: $primary-dark;
+ text-decoration: underline;
+ }
}
/* ===== Boutons ===== */
.btn {
- font-size: 1.2rem;
- border-radius: 50px;
+ font-size: 1.1rem;
+ font-weight: 600;
+ border-radius: 12px;
width: 100%;
background-color: var(--primary);
color: white;
+ border: none;
+ padding: 0.9rem;
+ cursor: pointer;
+ transition: all 0.2s ease;
+ margin-top: 1rem;
&:hover {
background: $primary-dark;
+ transform: translateY(-1px);
+ box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
+ }
+
+ &:active {
+ transform: translateY(0);
+ box-shadow: 0 2px 6px rgba(var(--primary-rgb), 0.3);
}
}