Add working password update

Signed-off-by: Marcel Müller <neikos@neikos.email>
This commit is contained in:
Marcel Müller 2026-01-25 18:03:39 +01:00
parent a80ad57ca9
commit 7a5233e385
25 changed files with 221 additions and 60 deletions

View file

@ -0,0 +1 @@
@import "tailwindcss";

View file

@ -4,7 +4,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
<link rel="stylesheet" href="/assets/style.css" />
<script type="module" src="https://cdn.jsdelivr.net/gh/starfederation/datastar@1.0.0-RC.7/bundles/datastar.js"></script>
{% block head %}
<title>{% block title %}{% endblock title%} - Nixie CI</title>
@ -12,7 +12,7 @@
</head>
<body class="min-h-screen flex flex-col">
<nav class="bg-orange-300 px-2 py-2 inset-shadow-2xs border-b-2 border-orange-900">
<nav class="bg-orange-200 px-2 py-2 inset-shadow-2xs border-b-2 border-orange-900">
<div class="mx-auto container flex select-none space-x-4">
<a href="/" class="outline-2 outline-gray-800 bg-gray-700 rounded text-white p-2">
<span class="text-green-200">>_</span>
@ -27,13 +27,13 @@
<a href="/register" class="outline-2 hover:outline-emerald-900 outline-blue-700 p-2 select-none rounded-r bg-blue-600 text-white">Register</a>
{% else %}
<div class="relative flex" data-on:click__outside="$openProfileDropdown = false">
<a href="/users/{{ current_user.id }}" class="inline-block border-2 border-r-1 hover:border-emerald-900 border-emerald-700 p-2 select-none rounded-l bg-emerald-600 text-white">
<a href="/users/{{ current_user.id }}" class="inline-block border-2 border-r hover:border-emerald-900 border-emerald-700 p-2 select-none rounded-l bg-emerald-600 text-white">
{{ current_user.username }}
</a>
<button data-on:click="$openProfileDropdown = !$openProfileDropdown"
class="border-2 border-l-1 hover:border-emerald-900 border-emerald-700 p-2 select-none rounded-r bg-emerald-600 text-white cursor-pointer">&#9660;</button>
<div data-class:hidden="!$openProfileDropdown"
class="hidden absolute top-[calc(100%+0.4rem)] right-0 bg-orange-300 p-2 rounded-b border border-orange-800 shadow-lg md:min-w-40 flex flex-col divide-y divide-orange-800">
class="border-2 border-l hover:border-emerald-900 border-emerald-700 p-2 select-none rounded-r bg-emerald-600 text-white cursor-pointer">&#9660;</button>
<div data-class:flex="$openProfileDropdown" data-class:hidden="!$openProfileDropdown"
class="hidden absolute top-[calc(100%+0.4rem)] right-0 bg-orange-300 p-2 rounded-b border border-orange-800 shadow-lg md:min-w-40 flex-col divide-y divide-orange-800">
<a class="block p-2 hover:bg-orange-800 hover:text-white" href="/users/{{ current_user.id }}">Profile</a>
<a class="block p-2 hover:bg-orange-800 hover:text-white" href="/logout">Logout</a>
</div>

View file

@ -1,5 +1,5 @@
{% extends "base.tera.html" %}
{% import "inputs.tera.html" as inputs %}
{% extends "base.html.tera" %}
{% import "inputs.html.tera" as inputs %}
{% block title %}
Home

View file

@ -1,5 +1,5 @@
{% extends "base.tera.html" %}
{% import "inputs.tera.html" as inputs %}
{% extends "base.html.tera" %}
{% import "inputs.html.tera" as inputs %}
{% block title %}
Home

View file

@ -1,4 +1,4 @@
{% extends "base.tera.html" %}
{% extends "base.html.tera" %}
{% block title %}
Protected Page

View file

@ -1,5 +1,5 @@
{% extends "base.tera.html" %}
{% import "inputs.tera.html" as inputs %}
{% extends "base.html.tera" %}
{% import "inputs.html.tera" as inputs %}
{% block title %}
API Keys - {{ current_user.username }}
@ -8,7 +8,7 @@ API Keys - {{ current_user.username }}
{% block content %}
<div class="flex flex-col md:flex-row grow">
<div class="basis-1/4 p-4 m-4 space-y-4">
{% include "settings/sidebar.tera.html" %}
{% include "settings/sidebar.html.tera" %}
</div>
<div class="basis-3/4 p-4">
<h1 class="font-bold text-3xl">API Keys</h1>

View file

@ -1,5 +1,5 @@
{% extends "base.tera.html" %}
{% import "inputs.tera.html" as inputs %}
{% extends "base.html.tera" %}
{% import "inputs.html.tera" as inputs %}
{% block title %}
Change Password - {{ current_user.username }}
@ -8,7 +8,7 @@ Change Password - {{ current_user.username }}
{% block content %}
<div class="flex flex-col md:flex-row grow">
<div class="basis-1/4 p-4 m-4 space-y-4">
{% include "settings/sidebar.tera.html" %}
{% include "settings/sidebar.html.tera" %}
</div>
<div class="basis-3/4 p-4">
<h1 class="font-bold text-3xl">Change Password</h1>

View file

@ -1,5 +1,5 @@
{% extends "base.tera.html" %}
{% import "inputs.tera.html" as inputs %}
{% extends "base.html.tera" %}
{% import "inputs.html.tera" as inputs %}
{% block title %}
Settings - {{ current_user.username }}
@ -8,7 +8,7 @@ Settings - {{ current_user.username }}
{% block content %}
<div class="flex flex-col md:flex-row grow">
<div class="basis-1/4 p-4 m-4 space-y-4">
{% include "settings/sidebar.tera.html" %}
{% include "settings/sidebar.html.tera" %}
</div>
<div class="basis-3/4 p-4">
<p>THIS IS YOUR MAIN SETTINGS WOOHOOOO</p>

View file

@ -1,5 +1,5 @@
{% extends "base.tera.html" %}
{% import "inputs.tera.html" as inputs %}
{% extends "base.html.tera" %}
{% import "inputs.html.tera" as inputs %}
{% block title %}
Login
@ -10,7 +10,7 @@ Login
<div class="border-2 border-zinc-300 sm:rounded-2xl lg:rounded-4xl my-2 px-20 pb-14 pt-10 sm:shadow-lg space-y-4">
<h1 class="font-bold text-3xl">Login</h1>
<form action="/login" method="POST" class="space-y-4">
{{ inputs::text_input(label="Username", name="username", id="username") }}
{{ inputs::text_input(label="Username", name="username", id="username", value=form.username | default(value="")) }}
{{ inputs::text_input(label="Password", name="password", id="password", type="password") }}
<div class="flex flex-col">
<button type="submit" class="bg-blue-500 p-2 rounded-lg text-white">

View file

@ -1,5 +1,5 @@
{% extends "base.tera.html" %}
{% import "inputs.tera.html" as inputs %}
{% extends "base.html.tera" %}
{% import "inputs.html.tera" as inputs %}
{% block title %}
Register