From 3f28cfcfd8220a528fd85ebcda87ba9f03a98ad7 Mon Sep 17 00:00:00 2001 From: Ashhhleyyy Date: Tue, 26 Jul 2022 22:02:44 +0100 Subject: [PATCH] feat: auditing for bubble edits --- components/Button.tsx | 2 +- components/NavBar.tsx | 2 - next-auth.d.ts | 11 + package.json | 3 + pages/api/auth/[...nextauth].ts | 6 + pages/api/submit-page-bubbles.ts | 25 ++- pnpm-lock.yaml | 189 +++++++++++++++++- .../migration.sql | 22 ++ prisma/schema.prisma | 37 ++-- src/audit.ts | 46 +++++ 10 files changed, 320 insertions(+), 23 deletions(-) create mode 100644 next-auth.d.ts create mode 100644 prisma/migrations/20220726195831_add_last_edited_by_to_comic_page/migration.sql create mode 100644 src/audit.ts diff --git a/components/Button.tsx b/components/Button.tsx index d7ea6ac..da29868 100644 --- a/components/Button.tsx +++ b/components/Button.tsx @@ -28,7 +28,7 @@ export default function Button({ 'transition-colors' ); if (!noDefaultColous) { - classes.push('bg-slate-600', 'text-slate-50', 'hover:bg-slate-500'); + classes.push('bg-slate-600', 'text-slate-50', 'hover:bg-slate-500', 'disabled:bg-slate-900', 'disabled:text-slate-200'); } return