From e4d5ad00eed64be8cb87b1bb6f3461d8ce65f60e Mon Sep 17 00:00:00 2001 From: Pontus Abrahamsson Date: Sat, 16 Dec 2023 15:24:17 +0100 Subject: [PATCH] Vault --- apps/dashboard/package.json | 2 +- apps/dashboard/src/components/attachments.tsx | 37 +- .../src/components/charts/spending-list.tsx | 15 +- .../dashboard/src/components/file-preview.tsx | 57 +- .../src/components/modals/file-modal.tsx | 17 + .../tables/vault/data-table-row.tsx | 1 + apps/dashboard/src/utils/format.ts | 4 +- apps/desktop/.gitignore | 24 - apps/desktop/README.md | 7 - apps/desktop/app-icon.png | Bin 122989 -> 0 bytes apps/desktop/index.html | 30 - apps/desktop/package.json | 25 - apps/desktop/public/tauri.svg | 6 - apps/desktop/public/vite.svg | 1 - apps/desktop/src-tauri/.gitignore | 3 - apps/desktop/src-tauri/Cargo.lock | 3638 ----------------- apps/desktop/src-tauri/Cargo.toml | 26 - apps/desktop/src-tauri/build.rs | 3 - apps/desktop/src-tauri/icons/128x128.png | Bin 7186 -> 0 bytes apps/desktop/src-tauri/icons/128x128@2x.png | Bin 16106 -> 0 bytes apps/desktop/src-tauri/icons/32x32.png | Bin 1429 -> 0 bytes .../src-tauri/icons/Square107x107Logo.png | Bin 5739 -> 0 bytes .../src-tauri/icons/Square142x142Logo.png | Bin 8232 -> 0 bytes .../src-tauri/icons/Square150x150Logo.png | Bin 8715 -> 0 bytes .../src-tauri/icons/Square284x284Logo.png | Bin 18268 -> 0 bytes .../src-tauri/icons/Square30x30Logo.png | Bin 1401 -> 0 bytes .../src-tauri/icons/Square310x310Logo.png | Bin 20101 -> 0 bytes .../src-tauri/icons/Square44x44Logo.png | Bin 2005 -> 0 bytes .../src-tauri/icons/Square71x71Logo.png | Bin 3538 -> 0 bytes .../src-tauri/icons/Square89x89Logo.png | Bin 4591 -> 0 bytes apps/desktop/src-tauri/icons/StoreLogo.png | Bin 2357 -> 0 bytes apps/desktop/src-tauri/icons/icon.icns | Bin 201123 -> 0 bytes apps/desktop/src-tauri/icons/icon.ico | Bin 29122 -> 0 bytes apps/desktop/src-tauri/icons/icon.png | Bin 35634 -> 0 bytes apps/desktop/src-tauri/src/main.rs | 8 - apps/desktop/src-tauri/tauri.conf.json | 77 - apps/desktop/src/vite-env.d.ts | 1 - apps/desktop/tsconfig.json | 25 - apps/desktop/tsconfig.node.json | 10 - apps/desktop/vite.config.ts | 20 - apps/website/package.json | 2 +- packages/supabase/src/queries/index.ts | 9 +- packages/ui/src/components/icons.tsx | 2 + packages/ui/src/components/textarea.tsx | 2 +- 44 files changed, 100 insertions(+), 3952 deletions(-) create mode 100644 apps/dashboard/src/components/modals/file-modal.tsx delete mode 100644 apps/desktop/.gitignore delete mode 100644 apps/desktop/app-icon.png delete mode 100644 apps/desktop/index.html delete mode 100644 apps/desktop/package.json delete mode 100644 apps/desktop/public/tauri.svg delete mode 100644 apps/desktop/public/vite.svg delete mode 100644 apps/desktop/src-tauri/.gitignore delete mode 100644 apps/desktop/src-tauri/Cargo.lock delete mode 100644 apps/desktop/src-tauri/Cargo.toml delete mode 100644 apps/desktop/src-tauri/build.rs delete mode 100644 apps/desktop/src-tauri/icons/128x128.png delete mode 100644 apps/desktop/src-tauri/icons/128x128@2x.png delete mode 100644 apps/desktop/src-tauri/icons/32x32.png delete mode 100644 apps/desktop/src-tauri/icons/Square107x107Logo.png delete mode 100644 apps/desktop/src-tauri/icons/Square142x142Logo.png delete mode 100644 apps/desktop/src-tauri/icons/Square150x150Logo.png delete mode 100644 apps/desktop/src-tauri/icons/Square284x284Logo.png delete mode 100644 apps/desktop/src-tauri/icons/Square30x30Logo.png delete mode 100644 apps/desktop/src-tauri/icons/Square310x310Logo.png delete mode 100644 apps/desktop/src-tauri/icons/Square44x44Logo.png delete mode 100644 apps/desktop/src-tauri/icons/Square71x71Logo.png delete mode 100644 apps/desktop/src-tauri/icons/Square89x89Logo.png delete mode 100644 apps/desktop/src-tauri/icons/StoreLogo.png delete mode 100644 apps/desktop/src-tauri/icons/icon.icns delete mode 100644 apps/desktop/src-tauri/icons/icon.ico delete mode 100644 apps/desktop/src-tauri/icons/icon.png delete mode 100644 apps/desktop/src-tauri/src/main.rs delete mode 100644 apps/desktop/src-tauri/tauri.conf.json delete mode 100644 apps/desktop/src/vite-env.d.ts delete mode 100644 apps/desktop/tsconfig.json delete mode 100644 apps/desktop/tsconfig.node.json delete mode 100644 apps/desktop/vite.config.ts diff --git a/apps/dashboard/package.json b/apps/dashboard/package.json index 8f903fb5e9..b14438d54b 100644 --- a/apps/dashboard/package.json +++ b/apps/dashboard/package.json @@ -52,7 +52,7 @@ "@t3-oss/env-nextjs": "^0.7.1", "@types/node": "^20.10.4", "@types/react": "^18.2.45", - "@types/react-dom": "^18.2.17", + "@types/react-dom": "^18.2.18", "typescript": "^5.3.3" } } \ No newline at end of file diff --git a/apps/dashboard/src/components/attachments.tsx b/apps/dashboard/src/components/attachments.tsx index 463d7509f1..ac979e3c99 100644 --- a/apps/dashboard/src/components/attachments.tsx +++ b/apps/dashboard/src/components/attachments.tsx @@ -16,9 +16,11 @@ import { cn } from "@midday/ui/utils"; import { X } from "lucide-react"; import { useEffect, useState } from "react"; import { useDropzone } from "react-dropzone"; -import { FilePreview } from "./file-preview"; +import { FilePreview, isSupportedFilePreview } from "./file-preview"; const Item = ({ file, onDelete, id }) => { + const filePreviewSupported = isSupportedFilePreview(file.type); + return (
@@ -34,27 +36,24 @@ const Item = ({ file, onDelete, id }) => { />
- - - + {filePreviewSupported && ( + + + + )}
- - {file.name} - + {file.name} {file.size && formatSize(file.size)} diff --git a/apps/dashboard/src/components/charts/spending-list.tsx b/apps/dashboard/src/components/charts/spending-list.tsx index 0065383ce0..8fa27663d5 100644 --- a/apps/dashboard/src/components/charts/spending-list.tsx +++ b/apps/dashboard/src/components/charts/spending-list.tsx @@ -1,18 +1,21 @@ import { getSpending } from "@midday/supabase/cached-queries"; +import Link from "next/link"; import { Category } from "../category"; import { spendingData } from "./data"; import { SpendingChart } from "./spending-chart"; function SpendingCategoryList({ categories }) { return ( -