From 872abd7f733832509df1935b0f18a806109bff8b Mon Sep 17 00:00:00 2001 From: Flummi Date: Sat, 7 May 2022 19:08:55 +0200 Subject: [PATCH 1/4] cfg: change psql schema --- src/inc/sql.mjs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/inc/sql.mjs b/src/inc/sql.mjs index ffacf9d..cb805f7 100644 --- a/src/inc/sql.mjs +++ b/src/inc/sql.mjs @@ -2,4 +2,9 @@ import postgres from "postgres"; import cfg from "./config.mjs"; -export default postgres(cfg.sql); +const db = postgres(cfg.sql); + +if(cfg.sql.schema) + await db.unsafe(`set schema '${cfg.sql.schema}';`); + +export default db; From 3731d1d785a01d36d7dee2e96afc22f5ea808605 Mon Sep 17 00:00:00 2001 From: schrumpel Date: Sun, 8 May 2022 01:13:23 +0200 Subject: [PATCH 2/4] adding search description for mobile view --- public/s/css/f0ck.css | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/public/s/css/f0ck.css b/public/s/css/f0ck.css index a851442..16ac2d5 100644 --- a/public/s/css/f0ck.css +++ b/public/s/css/f0ck.css @@ -1790,6 +1790,11 @@ table img { .results { padding: 5px; } + +.mview_desc { + visibility: hidden; +} + /* fix for mobile table view in search! */ @media screen and (max-width: 650px) { table { @@ -1822,4 +1827,7 @@ table img { position: relative; width: 100%; } + .mview_desc { + visibility: visible; + } } \ No newline at end of file From 46d8bd45a8f5c28a1376e902fdf4b8f943280b8e Mon Sep 17 00:00:00 2001 From: schrumpel Date: Sun, 8 May 2022 01:14:13 +0200 Subject: [PATCH 3/4] adding search description for mobile view --- views/search.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/views/search.html b/views/search.html index 187d9c1..2e7b9e1 100644 --- a/views/search.html +++ b/views/search.html @@ -21,11 +21,11 @@ @each(result as line) - {{ line.id }} - {!! line.tag !!} - {{ line.mime }} - {!! line.username !!} - {{ line.score?.toFixed(2) }} + ID:{{ line.id }} + Tag:{!! line.tag !!} + Mime:{{ line.mime }} + User:{!! line.username !!} + Score:{{ line.score?.toFixed(2) }} @endeach From 659adca258b90b401c30ed0f7aaea3d4634f37ea Mon Sep 17 00:00:00 2001 From: schrumpel Date: Sun, 8 May 2022 01:14:43 +0200 Subject: [PATCH 4/4] making the admin page a bit better --- views/admin.html | 9 ++++++++- views/snippets/navbar_admin.html | 13 ++----------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/views/admin.html b/views/admin.html index fda528e..607fbe1 100644 --- a/views/admin.html +++ b/views/admin.html @@ -1,3 +1,10 @@ @include(snippets/header_admin) - +
+

Henlo, {{ session.user }}

+

Hier entsteht eine Internetpräsenz!

+ f0ck bash +

@if(typeof totals !== "undefined") + total: {{ totals.total }} | tagged: {{ totals.tagged }} | untagged: {{ totals.untagged }} | sfw: {{ totals.sfw }} | nsfw: {{ totals.nsfw }} + @endif

+
@include(snippets/footer) \ No newline at end of file diff --git a/views/snippets/navbar_admin.html b/views/snippets/navbar_admin.html index 62b140b..7a1bbcd 100644 --- a/views/snippets/navbar_admin.html +++ b/views/snippets/navbar_admin.html @@ -20,18 +20,9 @@ Log - @if(typeof totals !== "undefined") - - @endif - \ No newline at end of file