diff --git a/.gitignore b/.gitignore index eadfb2d..26d2be1 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ main *.out *.zst *.gzip +*.env bin/ diff --git a/app/src/assets/style/style.css.zst b/app/src/assets/style/style.css.zst deleted file mode 100644 index 3fe1c4e..0000000 Binary files a/app/src/assets/style/style.css.zst and /dev/null differ diff --git a/app/src/database/db.v b/app/src/database/db.v index f4740a0..5fa8c2e 100644 --- a/app/src/database/db.v +++ b/app/src/database/db.v @@ -14,3 +14,25 @@ pub fn Crypto.hash_password(password string) !string { pub fn Crypto.hash_verify(password string, hash string) !bool { return argon2.verify(hash, password.bytes()) or { return error('argon2 verify failed: ${err}') } } + +// db structure +// +// users +// CREATE TABLE users ( +// id SERIAL PRIMARY KEY, +// name TEXT UNIQUE NOT NULL, +// password_hash TEXT NOT NULL +// ); +// +// logins +// CREATE TABLE login_attempts ( +// id SERIAL PRIMARY KEY, +// username TEXT NOT NULL, +// ip TEXT NOT NULL, +// success BOOLEAN NOT NULL, +// attempt_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP +// ); +// +// files +// +// diff --git a/app/src/main.v b/app/src/main.v index 88b57b7..d2bde07 100644 --- a/app/src/main.v +++ b/app/src/main.v @@ -127,8 +127,8 @@ fn populate() (&util.Config, &util.Embedded) { } } }, &util.Embedded{ - style_css: $embed_file('assets/style/style.css', .zlib).to_string() - error_css: $embed_file('assets/style/error.css', .zlib).to_string() + style_css: $embed_file('template/assets/style.css', .zlib).to_string() + error_css: $embed_file('template/assets/error.css', .zlib).to_string() } } diff --git a/app/src/assets/style/error.css b/app/src/template/assets/error.css similarity index 100% rename from app/src/assets/style/error.css rename to app/src/template/assets/error.css diff --git a/app/src/assets/style/style.css b/app/src/template/assets/style.css similarity index 99% rename from app/src/assets/style/style.css rename to app/src/template/assets/style.css index 68ecb4f..9d618d0 100644 --- a/app/src/assets/style/style.css +++ b/app/src/template/assets/style.css @@ -170,7 +170,6 @@ body { border-bottom: 1px solid var(--border-color); background-color: var(--bg-secondary); transition: background-color 0.3s ease, border-color 0.3s ease; - overflow: scroll; height: 100%; } @@ -244,6 +243,10 @@ body { -webkit-tap-highlight-color: transparent; } +.icon svg { + fill: var(--text-secondary); +} + .file-list { display: flex; flex-direction: column; diff --git a/app/src/template/dashboard.html b/app/src/template/dashboard.html index f4e8859..60a783f 100644 --- a/app/src/template/dashboard.html +++ b/app/src/template/dashboard.html @@ -12,6 +12,7 @@