current state

This commit is contained in:
2026-03-06 14:42:47 -05:00
parent c675430fb9
commit b25222cc82
10 changed files with 88 additions and 19 deletions

View File

@@ -28,11 +28,20 @@
<input
id="password"
v-model="password"
type="password"
:type="showPassword ? 'text' : 'password'"
autocomplete="current-password"
placeholder="Your password"
required
/>
<button
type="button"
class="password-toggle"
:aria-label="showPassword ? 'Hide password' : 'Show password'"
:aria-pressed="showPassword"
@click="showPassword = !showPassword"
>
{{ showPassword ? 'Hide' : 'Show' }}
</button>
</div>
<div v-if="authStore.error" class="error-message">
@@ -68,6 +77,8 @@ const authStore = useAuthStore();
const email = ref('');
const password = ref('');
const showPassword = ref(false);
const handleSubmit = async () => {
const success = await authStore.login(email.value, password.value);
if (success) {
@@ -207,4 +218,33 @@ const handleSubmit = async () => {
color: var(--accent);
font-weight: 500;
}
.password-field {
position: relative;
display: flex;
align-items: center;
}
.password-field input {
width: 100%;
padding-right: 72px; /* space for the button */
}
.password-toggle {
position: absolute;
right: 10px;
height: 32px;
padding: 0 10px;
border: 1px solid var(--line);
border-radius: 10px;
background: var(--surface);
color: var(--muted);
font-size: 0.85rem;
cursor: pointer;
}
.password-toggle:hover {
color: var(--accent);
border-color: var(--accent);
}
</style>

View File

@@ -162,7 +162,6 @@
</div>
<div v-else class="empty-state">
<p>No geographic data yet</p>
<p class="hint">Country detection requires a GeoIP database</p>
</div>
</section>
</div>

View File

@@ -4,11 +4,13 @@ import vue from "@vitejs/plugin-vue";
export default defineConfig({
plugins: [vue()],
server: {
host: '0.0.0.0',
port: 5173,
proxy: {
'/api': {
target: 'http://localhost:42001',
target: 'https://localhost:42001',
changeOrigin: true,
secure: false,
rewrite: (path) => path.replace(/^\/api/, '')
}
}