From fff0f4344c9210254b873232c349cf859e12f50c Mon Sep 17 00:00:00 2001 From: zebrapurring <103900164+zebrapurring@users.noreply.github.com> Date: Fri, 28 Jun 2024 20:27:02 +0200 Subject: [PATCH 1/2] Fix overflow caused by long URL tooltips (#73) * Fix overflow caused by long URL tooltips * Break URL tooltips to prevent horizontal page overflows --------- Co-authored-by: zebrapurring <> Co-authored-by: Matt Kilgore --- frontend/assets/css/main.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/assets/css/main.css b/frontend/assets/css/main.css index 89b2e1cf7..7fad72750 100644 --- a/frontend/assets/css/main.css +++ b/frontend/assets/css/main.css @@ -6,6 +6,10 @@ text-transform: none !important; } +.tooltip { + overflow-wrap: break-word; +} + /* transparent subtle scrollbar */ ::-webkit-scrollbar { width: 0.2em; From 6a1ffd7700ec3b5dc69e908e5e2a31d1a18fda65 Mon Sep 17 00:00:00 2001 From: Harrison Conlin Date: Sat, 29 Jun 2024 23:02:23 +1000 Subject: [PATCH 2/2] Add redirect functionality after login (#76) Gone is the frustration of scanning a qr code to only be sent to the homepage --- frontend/middleware/auth.ts | 3 +++ frontend/pages/index.vue | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/middleware/auth.ts b/frontend/middleware/auth.ts index 97a99203c..e9f0b3753 100644 --- a/frontend/middleware/auth.ts +++ b/frontend/middleware/auth.ts @@ -1,10 +1,12 @@ export default defineNuxtRouteMiddleware(async () => { const ctx = useAuthContext(); const api = useUserApi(); + const redirectTo = useState("authRedirect"); if (!ctx.isAuthorized()) { if (window.location.pathname !== "/") { console.debug("[middleware/auth] isAuthorized returned false, redirecting to /"); + redirectTo.value = window.location.pathname; return navigateTo("/"); } } @@ -15,6 +17,7 @@ export default defineNuxtRouteMiddleware(async () => { if (error) { if (window.location.pathname !== "/") { console.debug("[middleware/user] user is null and fetch failed, redirecting to /"); + redirectTo.value = window.location.pathname; return navigateTo("/"); } } diff --git a/frontend/pages/index.vue b/frontend/pages/index.vue index 22fffc57d..bffc979f0 100644 --- a/frontend/pages/index.vue +++ b/frontend/pages/index.vue @@ -103,6 +103,7 @@ const loading = ref(false); const loginPassword = ref(""); + const redirectTo = useState("authRedirect"); async function login() { loading.value = true; @@ -116,7 +117,8 @@ toast.success("Logged in successfully"); - navigateTo("/home"); + navigateTo(redirectTo.value || "/home"); + redirectTo.value = null; loading.value = false; }