From 3e17e58c9ab49ab2337722a2c391aa9b322ac5bd Mon Sep 17 00:00:00 2001 From: Atridad Lahiji Date: Thu, 12 Feb 2026 16:19:59 -0700 Subject: [PATCH] Strengthened CRF, added more vue, and removed viewtransitions --- astro.config.mjs | 8 +- src/components/AutoSubmit.vue | 12 ++ src/components/ColorDot.vue | 16 +++ src/components/ConfirmForm.vue | 26 +++++ src/components/ModalButton.vue | 34 ++++++ src/layouts/DashboardLayout.astro | 15 ++- src/layouts/Layout.astro | 4 +- src/pages/dashboard/clients/[id]/edit.astro | 9 +- src/pages/dashboard/clients/[id]/index.astro | 8 +- src/pages/dashboard/index.astro | 5 +- src/pages/dashboard/invoices/[id].astro | 18 +-- src/pages/dashboard/invoices/index.astro | 70 +++++++----- src/pages/dashboard/reports.astro | 114 ++++++++++--------- src/pages/dashboard/team/settings.astro | 25 ++-- src/pages/dashboard/tracker.astro | 63 +++++----- 15 files changed, 282 insertions(+), 145 deletions(-) create mode 100644 src/components/AutoSubmit.vue create mode 100644 src/components/ColorDot.vue create mode 100644 src/components/ConfirmForm.vue create mode 100644 src/components/ModalButton.vue diff --git a/astro.config.mjs b/astro.config.mjs index 637a6a0..90c8601 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -9,7 +9,13 @@ export default defineConfig({ output: "server", integrations: [vue()], security: { - csp: process.env.NODE_ENV === "production", + csp: process.env.NODE_ENV === "production" + ? { + scriptDirective: { + strictDynamic: true, + }, + } + : false, }, vite: { plugins: [tailwindcss()], diff --git a/src/components/AutoSubmit.vue b/src/components/AutoSubmit.vue new file mode 100644 index 0000000..9fb6215 --- /dev/null +++ b/src/components/AutoSubmit.vue @@ -0,0 +1,12 @@ + + + diff --git a/src/components/ColorDot.vue b/src/components/ColorDot.vue new file mode 100644 index 0000000..b6d28b6 --- /dev/null +++ b/src/components/ColorDot.vue @@ -0,0 +1,16 @@ + + + diff --git a/src/components/ConfirmForm.vue b/src/components/ConfirmForm.vue new file mode 100644 index 0000000..a91a020 --- /dev/null +++ b/src/components/ConfirmForm.vue @@ -0,0 +1,26 @@ + + + diff --git a/src/components/ModalButton.vue b/src/components/ModalButton.vue new file mode 100644 index 0000000..a72ebc1 --- /dev/null +++ b/src/components/ModalButton.vue @@ -0,0 +1,34 @@ + + + diff --git a/src/layouts/DashboardLayout.astro b/src/layouts/DashboardLayout.astro index 0660456..d3bc186 100644 --- a/src/layouts/DashboardLayout.astro +++ b/src/layouts/DashboardLayout.astro @@ -6,7 +6,6 @@ import { members, organizations } from '../db/schema'; import { eq } from 'drizzle-orm'; import Avatar from '../components/Avatar.astro'; import ThemeToggle from '../components/ThemeToggle.vue'; -import { ClientRouter } from "astro:transitions"; interface Props { title: string; @@ -55,8 +54,7 @@ function isActive(item: { href: string; exact?: boolean }) { {title} - - @@ -105,7 +103,6 @@ function isActive(item: { href: string; exact?: boolean }) { class="select select-sm w-full bg-base-300/40 border-base-300/60 focus:border-primary/50 focus:outline-none text-sm font-medium" id="team-switcher" aria-label="Switch team" - onchange="document.cookie = 'currentTeamId=' + this.value + '; path=/'; window.location.reload();" > {userMemberships.map(({ membership, organization }) => (