From 18fee933ecbb0346446f17bccda0e4b53bb3be88 Mon Sep 17 00:00:00 2001 From: haex Date: Sun, 8 Jun 2025 00:08:55 +0200 Subject: [PATCH] mobile menu --- nuxt.config.ts | 6 + package.json | 3 + pnpm-lock.yaml | 38 ++ .../migrations/0004_wooden_lockheed.sql | 1 + .../database/migrations/0005_wooden_nuke.sql | 50 ++ .../migrations/0006_complete_martin_li.sql | 5 + .../database/migrations/0007_daffy_tusk.sql | 1 + .../migrations/meta/0004_snapshot.json | 253 +++++++ .../migrations/meta/0005_snapshot.json | 583 ++++++++++++++++ .../migrations/meta/0006_snapshot.json | 620 +++++++++++++++++ .../migrations/meta/0007_snapshot.json | 627 ++++++++++++++++++ .../database/migrations/meta/_journal.json | 28 + src-tauri/database/schemas/vault.ts | 111 +++- src-tauri/database/vault.db | Bin 49152 -> 94208 bytes .../app/src/main/assets/database/vault.db | Bin 49152 -> 94208 bytes src-tauri/src/database/mod.rs | 38 +- src-tauri/tauri.conf.json | 2 +- src/assets/css/tailwind.css | 2 + src/components/haex/menu/main.vue | 2 +- src/components/haex/pass/group/index.vue | 1 + .../haex/pass/mobile/menu/group.vue | 33 + .../haex/pass/mobile/menu/index.vue | 78 +++ src/components/haex/pass/mobile/menu/item.vue | 13 + .../haex/pass/mobile/menu/types.d.ts | 5 + src/components/haex/pass/sidebar/index.vue | 137 ++-- src/components/haex/sidebar/link.vue | 41 +- src/components/ui/button/action.vue | 105 +++ src/components/ui/button/types.d.ts | 8 + src/components/ui/card/index.vue | 63 ++ src/components/ui/dialog/confirm.vue | 4 +- src/components/ui/dialog/index.vue | 10 +- src/components/ui/input/index.vue | 155 +++-- src/components/ui/select/color.vue | 54 ++ src/components/ui/select/icon.vue | 37 ++ src/components/ui/select/index.vue | 84 +++ src/components/ui/text/gradient.vue | 6 +- src/components/vault/button/create.vue | 6 +- src/components/vault/button/open.vue | 12 +- src/components/vault/card/edit.vue | 5 +- src/components/vault/card/index.vue | 72 +- src/components/vault/group/index.vue | 45 +- src/layouts/app.vue | 56 +- src/layouts/default.vue | 2 +- src/pages/index.vue | 3 +- src/pages/vault.vue | 2 +- .../vault/[vaultId]/extensions/index.vue | 25 + src/pages/vault/[vaultId]/haexpass.vue | 8 - src/pages/vault/[vaultId]/haexpass/index.vue | 9 - src/pages/vault/[vaultId]/notifications.vue | 148 +++++ src/pages/vault/[vaultId]/passwords.vue | 13 + .../passwords/[[groupId]]/create.vue | 147 ++++ .../[vaultId]/passwords/[[groupId]]/edit.vue | 150 +++++ .../[vaultId]/passwords/[[groupId]]/index.vue | 40 ++ .../passwords/[[groupId]]/item/[itemId].vue | 3 + .../passwords/[[groupId]]/item/create.vue | 1 + src/pages/vault/[vaultId]/settings.vue | 14 +- src/plugins/flyonui.client.ts | 2 + src/stores/browser/extensions.ts | 91 --- src/stores/browser/index.ts | 0 src/stores/passwords/actionMenu/de.json | 8 + src/stores/passwords/actionMenu/en.json | 8 + src/stores/passwords/actionMenu/index.ts | 44 ++ src/stores/passwords/groups.ts | 188 ++++++ src/stores/passwords/history.ts | 28 + src/stores/passwords/items.ts | 120 ++++ src/stores/ui/sidebar.ts | 2 +- src/stores/vault/index.ts | 1 + src/stores/vault/notifications.ts | 71 +- 68 files changed, 4112 insertions(+), 416 deletions(-) create mode 100644 src-tauri/database/migrations/0004_wooden_lockheed.sql create mode 100644 src-tauri/database/migrations/0005_wooden_nuke.sql create mode 100644 src-tauri/database/migrations/0006_complete_martin_li.sql create mode 100644 src-tauri/database/migrations/0007_daffy_tusk.sql create mode 100644 src-tauri/database/migrations/meta/0004_snapshot.json create mode 100644 src-tauri/database/migrations/meta/0005_snapshot.json create mode 100644 src-tauri/database/migrations/meta/0006_snapshot.json create mode 100644 src-tauri/database/migrations/meta/0007_snapshot.json create mode 100644 src/components/haex/pass/group/index.vue create mode 100644 src/components/haex/pass/mobile/menu/group.vue create mode 100644 src/components/haex/pass/mobile/menu/index.vue create mode 100644 src/components/haex/pass/mobile/menu/item.vue create mode 100644 src/components/haex/pass/mobile/menu/types.d.ts create mode 100644 src/components/ui/button/action.vue create mode 100644 src/components/ui/button/types.d.ts create mode 100644 src/components/ui/card/index.vue create mode 100644 src/components/ui/select/color.vue create mode 100644 src/components/ui/select/icon.vue create mode 100644 src/components/ui/select/index.vue delete mode 100644 src/pages/vault/[vaultId]/haexpass.vue delete mode 100644 src/pages/vault/[vaultId]/haexpass/index.vue create mode 100644 src/pages/vault/[vaultId]/notifications.vue create mode 100644 src/pages/vault/[vaultId]/passwords.vue create mode 100644 src/pages/vault/[vaultId]/passwords/[[groupId]]/create.vue create mode 100644 src/pages/vault/[vaultId]/passwords/[[groupId]]/edit.vue create mode 100644 src/pages/vault/[vaultId]/passwords/[[groupId]]/index.vue create mode 100644 src/pages/vault/[vaultId]/passwords/[[groupId]]/item/[itemId].vue create mode 100644 src/pages/vault/[vaultId]/passwords/[[groupId]]/item/create.vue delete mode 100644 src/stores/browser/extensions.ts delete mode 100644 src/stores/browser/index.ts create mode 100644 src/stores/passwords/actionMenu/de.json create mode 100644 src/stores/passwords/actionMenu/en.json create mode 100644 src/stores/passwords/actionMenu/index.ts create mode 100644 src/stores/passwords/groups.ts create mode 100644 src/stores/passwords/history.ts create mode 100644 src/stores/passwords/items.ts diff --git a/nuxt.config.ts b/nuxt.config.ts index 1a72906..63487dd 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -2,6 +2,11 @@ import tailwindcss from '@tailwindcss/vite' // https://nuxt.com/docs/api/configuration/nuxt-config export default defineNuxtConfig({ + app: { + pageTransition: { + name: 'fade', + }, + }, modules: [ 'nuxt-zod-i18n', '@nuxtjs/i18n', @@ -91,6 +96,7 @@ export default defineNuxtConfig({ // Enables the development server to be discoverable by other devices when running on iOS physical devices devServer: { host: process.env.TAURI_DEV_HOST || 'localhost', + port: 3003, }, vite: { diff --git a/package.json b/package.json index 4504dec..8a3fea3 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "@tauri-apps/plugin-os": "^2.2.1", "@tauri-apps/plugin-sql": "~2.2.0", "@tauri-apps/plugin-store": "^2.2.0", + "@vueuse/components": "^13.3.0", "@vueuse/core": "^13.3.0", "@vueuse/nuxt": "^13.3.0", "drizzle-orm": "^0.43.1", @@ -40,6 +41,8 @@ "nuxt-snackbar": "1.3.0", "nuxt-zod-i18n": "^1.11.5", "tailwindcss": "^4.1.8", + "tailwindcss-intersect": "^2.2.0", + "tailwindcss-motion": "^1.1.0", "vue": "^3.5.16", "vue-router": "^4.5.1", "zod": "^3.25.42" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 15a0d4a..11fdaee 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -53,6 +53,9 @@ importers: '@tauri-apps/plugin-store': specifier: ^2.2.0 version: 2.2.0 + '@vueuse/components': + specifier: ^13.3.0 + version: 13.3.0(vue@3.5.16(typescript@5.8.3)) '@vueuse/core': specifier: ^13.3.0 version: 13.3.0(vue@3.5.16(typescript@5.8.3)) @@ -80,6 +83,12 @@ importers: tailwindcss: specifier: ^4.1.8 version: 4.1.8 + tailwindcss-intersect: + specifier: ^2.2.0 + version: 2.2.0(tailwindcss@4.1.8) + tailwindcss-motion: + specifier: ^1.1.0 + version: 1.1.0(tailwindcss@4.1.8) vue: specifier: ^3.5.16 version: 3.5.16(typescript@5.8.3) @@ -2133,6 +2142,11 @@ packages: '@vue/shared@3.5.16': resolution: {integrity: sha512-c/0fWy3Jw6Z8L9FmTyYfkpM5zklnqqa9+a6dz3DvONRKW2NEbh46BP0FHuLFSWi2TnQEtp91Z6zOWNrU6QiyPg==} + '@vueuse/components@13.3.0': + resolution: {integrity: sha512-ZnJiVknPtlWyeE4qwIXkDOlHM3W4bgMCxgeXj1Dec/aF/+8N+yAj+7rRdRUWUnqr8uKRin368RjG1FPKsF2erA==} + peerDependencies: + vue: ^3.5.0 + '@vueuse/core@13.3.0': resolution: {integrity: sha512-uYRz5oEfebHCoRhK4moXFM3NSCd5vu2XMLOq/Riz5FdqZMy2RvBtazdtL3gEcmDyqkztDe9ZP/zymObMIbiYSg==} peerDependencies: @@ -4782,6 +4796,16 @@ packages: resolution: {integrity: sha512-ulAk51I9UVUyJgxlv9M6lFot2WP3e7t8Kz9+IS6D4rVba1tR9kON+Ey69f+1R4Q8cd45Lod6a4IcJIxnzGc/zA==} engines: {node: '>=18'} + tailwindcss-intersect@2.2.0: + resolution: {integrity: sha512-LnOQ/iU44jNQ8k3OExa7Ccv/y5NlzAN574jjDnX5gLCdlqoeUT5ADtTznF92oAdon3NZA69b+JLknahbwsqxDA==} + peerDependencies: + tailwindcss: '>=3.2.0 || >=4.0.0' + + tailwindcss-motion@1.1.0: + resolution: {integrity: sha512-0lK6rA4+367ffJdi1TtB72GlMCxJi2TP/xRiHc6An5pZSlU6WfIHhSvLxpcGilGZfBrOqc2q4woH1DEP/lCNbQ==} + peerDependencies: + tailwindcss: '>=3.0.0 || insiders' + tailwindcss@4.1.8: resolution: {integrity: sha512-kjeW8gjdxasbmFKpVGrGd5T4i40mV5J2Rasw48QARfYeQ8YS9x02ON9SFWax3Qf616rt4Cp3nVNIj6Hd1mP3og==} @@ -7469,6 +7493,12 @@ snapshots: '@vue/shared@3.5.16': {} + '@vueuse/components@13.3.0(vue@3.5.16(typescript@5.8.3))': + dependencies: + '@vueuse/core': 13.3.0(vue@3.5.16(typescript@5.8.3)) + '@vueuse/shared': 13.3.0(vue@3.5.16(typescript@5.8.3)) + vue: 3.5.16(typescript@5.8.3) + '@vueuse/core@13.3.0(vue@3.5.16(typescript@5.8.3))': dependencies: '@types/web-bluetooth': 0.0.21 @@ -10328,6 +10358,14 @@ snapshots: system-architecture@0.1.0: {} + tailwindcss-intersect@2.2.0(tailwindcss@4.1.8): + dependencies: + tailwindcss: 4.1.8 + + tailwindcss-motion@1.1.0(tailwindcss@4.1.8): + dependencies: + tailwindcss: 4.1.8 + tailwindcss@4.1.8: {} tapable@2.2.2: {} diff --git a/src-tauri/database/migrations/0004_wooden_lockheed.sql b/src-tauri/database/migrations/0004_wooden_lockheed.sql new file mode 100644 index 0000000..6f5131b --- /dev/null +++ b/src-tauri/database/migrations/0004_wooden_lockheed.sql @@ -0,0 +1 @@ +ALTER TABLE `haex_notofications` RENAME TO `haex_notifications`; \ No newline at end of file diff --git a/src-tauri/database/migrations/0005_wooden_nuke.sql b/src-tauri/database/migrations/0005_wooden_nuke.sql new file mode 100644 index 0000000..30805d2 --- /dev/null +++ b/src-tauri/database/migrations/0005_wooden_nuke.sql @@ -0,0 +1,50 @@ +CREATE TABLE `haex_passwords_group_items` ( + `group_id` text, + `item_id` text, + PRIMARY KEY(`item_id`, `group_id`), + FOREIGN KEY (`group_id`) REFERENCES `haex_passwords_groups`(`id`) ON UPDATE no action ON DELETE no action, + FOREIGN KEY (`item_id`) REFERENCES `haex_passwords_items`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE TABLE `haex_passwords_groups` ( + `id` text PRIMARY KEY NOT NULL, + `name` text, + `icon` text, + `order` integer, + `color` text, + `parent_id` text, + FOREIGN KEY (`parent_id`) REFERENCES `haex_passwords_groups`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE TABLE `haex_passwords_item_history` ( + `id` text PRIMARY KEY NOT NULL, + `item_id` text, + `changed_property` text, + `old_value` text, + `new_value` text, + `created_at` text DEFAULT (CURRENT_TIMESTAMP), + FOREIGN KEY (`item_id`) REFERENCES `haex_passwords_items`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE TABLE `haex_passwords_items` ( + `id` text PRIMARY KEY NOT NULL, + `title` text, + `username` text, + `password` text, + `note` text, + `icon` text, + `tags` text, + `url` text, + `created_at` text DEFAULT (CURRENT_TIMESTAMP), + `updated_at` integer +); +--> statement-breakpoint +CREATE TABLE `haex_passwords_items_key_values` ( + `id` text PRIMARY KEY NOT NULL, + `item_id` text, + `key` text, + `value` text, + FOREIGN KEY (`item_id`) REFERENCES `haex_passwords_items`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +ALTER TABLE `haex_notifications` ADD `source` text; \ No newline at end of file diff --git a/src-tauri/database/migrations/0006_complete_martin_li.sql b/src-tauri/database/migrations/0006_complete_martin_li.sql new file mode 100644 index 0000000..1be4a32 --- /dev/null +++ b/src-tauri/database/migrations/0006_complete_martin_li.sql @@ -0,0 +1,5 @@ +ALTER TABLE `haex_extensions_permissions` ADD `created_at` text DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint +ALTER TABLE `haex_extensions_permissions` ADD `updated_at` integer;--> statement-breakpoint +ALTER TABLE `haex_passwords_groups` ADD `created_at` text DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint +ALTER TABLE `haex_passwords_groups` ADD `updated_at` integer;--> statement-breakpoint +ALTER TABLE `haex_passwords_items_key_values` ADD `updated_at` integer; \ No newline at end of file diff --git a/src-tauri/database/migrations/0007_daffy_tusk.sql b/src-tauri/database/migrations/0007_daffy_tusk.sql new file mode 100644 index 0000000..032e08d --- /dev/null +++ b/src-tauri/database/migrations/0007_daffy_tusk.sql @@ -0,0 +1 @@ +ALTER TABLE `haex_passwords_groups` ADD `description` text; \ No newline at end of file diff --git a/src-tauri/database/migrations/meta/0004_snapshot.json b/src-tauri/database/migrations/meta/0004_snapshot.json new file mode 100644 index 0000000..fbeb0fc --- /dev/null +++ b/src-tauri/database/migrations/meta/0004_snapshot.json @@ -0,0 +1,253 @@ +{ + "version": "6", + "dialect": "sqlite", + "id": "7aaac460-00b5-4387-bef9-b189297cefb3", + "prevId": "5f413421-18a5-4c1b-9c5b-99f574b10126", + "tables": { + "haex_extensions": { + "name": "haex_extensions", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "author": { + "name": "author", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "enabled": { + "name": "enabled", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "icon": { + "name": "icon", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version": { + "name": "version", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "haex_extensions_permissions": { + "name": "haex_extensions_permissions", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "extension_id": { + "name": "extension_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "resource": { + "name": "resource", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "operation": { + "name": "operation", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "path": { + "name": "path", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "haex_extensions_permissions_extension_id_resource_operation_path_unique": { + "name": "haex_extensions_permissions_extension_id_resource_operation_path_unique", + "columns": [ + "extension_id", + "resource", + "operation", + "path" + ], + "isUnique": true + } + }, + "foreignKeys": { + "haex_extensions_permissions_extension_id_haex_extensions_id_fk": { + "name": "haex_extensions_permissions_extension_id_haex_extensions_id_fk", + "tableFrom": "haex_extensions_permissions", + "tableTo": "haex_extensions", + "columnsFrom": [ + "extension_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "haex_notifications": { + "name": "haex_notifications", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "alt": { + "name": "alt", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "date": { + "name": "date", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "icon": { + "name": "icon", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "image": { + "name": "image", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "read": { + "name": "read", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "text": { + "name": "text", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "haex_settings": { + "name": "haex_settings", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + } + }, + "views": {}, + "enums": {}, + "_meta": { + "schemas": {}, + "tables": { + "\"haex_notofications\"": "\"haex_notifications\"" + }, + "columns": {} + }, + "internal": { + "indexes": {} + } +} \ No newline at end of file diff --git a/src-tauri/database/migrations/meta/0005_snapshot.json b/src-tauri/database/migrations/meta/0005_snapshot.json new file mode 100644 index 0000000..9b105ba --- /dev/null +++ b/src-tauri/database/migrations/meta/0005_snapshot.json @@ -0,0 +1,583 @@ +{ + "version": "6", + "dialect": "sqlite", + "id": "fd079acd-3b5f-4fb7-97e2-d6641620f393", + "prevId": "7aaac460-00b5-4387-bef9-b189297cefb3", + "tables": { + "haex_extensions": { + "name": "haex_extensions", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "author": { + "name": "author", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "enabled": { + "name": "enabled", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "icon": { + "name": "icon", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version": { + "name": "version", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "haex_extensions_permissions": { + "name": "haex_extensions_permissions", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "extension_id": { + "name": "extension_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "resource": { + "name": "resource", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "operation": { + "name": "operation", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "path": { + "name": "path", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "haex_extensions_permissions_extension_id_resource_operation_path_unique": { + "name": "haex_extensions_permissions_extension_id_resource_operation_path_unique", + "columns": [ + "extension_id", + "resource", + "operation", + "path" + ], + "isUnique": true + } + }, + "foreignKeys": { + "haex_extensions_permissions_extension_id_haex_extensions_id_fk": { + "name": "haex_extensions_permissions_extension_id_haex_extensions_id_fk", + "tableFrom": "haex_extensions_permissions", + "tableTo": "haex_extensions", + "columnsFrom": [ + "extension_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "haex_notifications": { + "name": "haex_notifications", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "alt": { + "name": "alt", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "date": { + "name": "date", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "icon": { + "name": "icon", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "image": { + "name": "image", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "read": { + "name": "read", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "source": { + "name": "source", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "text": { + "name": "text", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "haex_passwords_group_items": { + "name": "haex_passwords_group_items", + "columns": { + "group_id": { + "name": "group_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "item_id": { + "name": "item_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": { + "haex_passwords_group_items_group_id_haex_passwords_groups_id_fk": { + "name": "haex_passwords_group_items_group_id_haex_passwords_groups_id_fk", + "tableFrom": "haex_passwords_group_items", + "tableTo": "haex_passwords_groups", + "columnsFrom": [ + "group_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "haex_passwords_group_items_item_id_haex_passwords_items_id_fk": { + "name": "haex_passwords_group_items_item_id_haex_passwords_items_id_fk", + "tableFrom": "haex_passwords_group_items", + "tableTo": "haex_passwords_items", + "columnsFrom": [ + "item_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "haex_passwords_group_items_item_id_group_id_pk": { + "columns": [ + "item_id", + "group_id" + ], + "name": "haex_passwords_group_items_item_id_group_id_pk" + } + }, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "haex_passwords_groups": { + "name": "haex_passwords_groups", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "icon": { + "name": "icon", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "color": { + "name": "color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": { + "haex_passwords_groups_parent_id_haex_passwords_groups_id_fk": { + "name": "haex_passwords_groups_parent_id_haex_passwords_groups_id_fk", + "tableFrom": "haex_passwords_groups", + "tableTo": "haex_passwords_groups", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "haex_passwords_item_history": { + "name": "haex_passwords_item_history", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "item_id": { + "name": "item_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "changed_property": { + "name": "changed_property", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "old_value": { + "name": "old_value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "new_value": { + "name": "new_value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": {}, + "foreignKeys": { + "haex_passwords_item_history_item_id_haex_passwords_items_id_fk": { + "name": "haex_passwords_item_history_item_id_haex_passwords_items_id_fk", + "tableFrom": "haex_passwords_item_history", + "tableTo": "haex_passwords_items", + "columnsFrom": [ + "item_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "haex_passwords_items": { + "name": "haex_passwords_items", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "password": { + "name": "password", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "note": { + "name": "note", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "icon": { + "name": "icon", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "tags": { + "name": "tags", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "updated_at": { + "name": "updated_at", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "haex_passwords_items_key_values": { + "name": "haex_passwords_items_key_values", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "item_id": { + "name": "item_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": { + "haex_passwords_items_key_values_item_id_haex_passwords_items_id_fk": { + "name": "haex_passwords_items_key_values_item_id_haex_passwords_items_id_fk", + "tableFrom": "haex_passwords_items_key_values", + "tableTo": "haex_passwords_items", + "columnsFrom": [ + "item_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "haex_settings": { + "name": "haex_settings", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + } + }, + "views": {}, + "enums": {}, + "_meta": { + "schemas": {}, + "tables": {}, + "columns": {} + }, + "internal": { + "indexes": {} + } +} \ No newline at end of file diff --git a/src-tauri/database/migrations/meta/0006_snapshot.json b/src-tauri/database/migrations/meta/0006_snapshot.json new file mode 100644 index 0000000..91eff78 --- /dev/null +++ b/src-tauri/database/migrations/meta/0006_snapshot.json @@ -0,0 +1,620 @@ +{ + "version": "6", + "dialect": "sqlite", + "id": "76878f8b-9a30-4fd2-9a7b-d1a85874b1ab", + "prevId": "fd079acd-3b5f-4fb7-97e2-d6641620f393", + "tables": { + "haex_extensions": { + "name": "haex_extensions", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "author": { + "name": "author", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "enabled": { + "name": "enabled", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "icon": { + "name": "icon", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version": { + "name": "version", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "haex_extensions_permissions": { + "name": "haex_extensions_permissions", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "extension_id": { + "name": "extension_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "resource": { + "name": "resource", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "operation": { + "name": "operation", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "path": { + "name": "path", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "updated_at": { + "name": "updated_at", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "haex_extensions_permissions_extension_id_resource_operation_path_unique": { + "name": "haex_extensions_permissions_extension_id_resource_operation_path_unique", + "columns": [ + "extension_id", + "resource", + "operation", + "path" + ], + "isUnique": true + } + }, + "foreignKeys": { + "haex_extensions_permissions_extension_id_haex_extensions_id_fk": { + "name": "haex_extensions_permissions_extension_id_haex_extensions_id_fk", + "tableFrom": "haex_extensions_permissions", + "tableTo": "haex_extensions", + "columnsFrom": [ + "extension_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "haex_notifications": { + "name": "haex_notifications", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "alt": { + "name": "alt", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "date": { + "name": "date", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "icon": { + "name": "icon", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "image": { + "name": "image", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "read": { + "name": "read", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "source": { + "name": "source", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "text": { + "name": "text", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "haex_passwords_group_items": { + "name": "haex_passwords_group_items", + "columns": { + "group_id": { + "name": "group_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "item_id": { + "name": "item_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": { + "haex_passwords_group_items_group_id_haex_passwords_groups_id_fk": { + "name": "haex_passwords_group_items_group_id_haex_passwords_groups_id_fk", + "tableFrom": "haex_passwords_group_items", + "tableTo": "haex_passwords_groups", + "columnsFrom": [ + "group_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "haex_passwords_group_items_item_id_haex_passwords_items_id_fk": { + "name": "haex_passwords_group_items_item_id_haex_passwords_items_id_fk", + "tableFrom": "haex_passwords_group_items", + "tableTo": "haex_passwords_items", + "columnsFrom": [ + "item_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "haex_passwords_group_items_item_id_group_id_pk": { + "columns": [ + "item_id", + "group_id" + ], + "name": "haex_passwords_group_items_item_id_group_id_pk" + } + }, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "haex_passwords_groups": { + "name": "haex_passwords_groups", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "icon": { + "name": "icon", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "color": { + "name": "color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "updated_at": { + "name": "updated_at", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": { + "haex_passwords_groups_parent_id_haex_passwords_groups_id_fk": { + "name": "haex_passwords_groups_parent_id_haex_passwords_groups_id_fk", + "tableFrom": "haex_passwords_groups", + "tableTo": "haex_passwords_groups", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "haex_passwords_item_history": { + "name": "haex_passwords_item_history", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "item_id": { + "name": "item_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "changed_property": { + "name": "changed_property", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "old_value": { + "name": "old_value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "new_value": { + "name": "new_value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": {}, + "foreignKeys": { + "haex_passwords_item_history_item_id_haex_passwords_items_id_fk": { + "name": "haex_passwords_item_history_item_id_haex_passwords_items_id_fk", + "tableFrom": "haex_passwords_item_history", + "tableTo": "haex_passwords_items", + "columnsFrom": [ + "item_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "haex_passwords_items": { + "name": "haex_passwords_items", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "password": { + "name": "password", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "note": { + "name": "note", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "icon": { + "name": "icon", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "tags": { + "name": "tags", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "updated_at": { + "name": "updated_at", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "haex_passwords_items_key_values": { + "name": "haex_passwords_items_key_values", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "item_id": { + "name": "item_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": { + "haex_passwords_items_key_values_item_id_haex_passwords_items_id_fk": { + "name": "haex_passwords_items_key_values_item_id_haex_passwords_items_id_fk", + "tableFrom": "haex_passwords_items_key_values", + "tableTo": "haex_passwords_items", + "columnsFrom": [ + "item_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "haex_settings": { + "name": "haex_settings", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + } + }, + "views": {}, + "enums": {}, + "_meta": { + "schemas": {}, + "tables": {}, + "columns": {} + }, + "internal": { + "indexes": {} + } +} \ No newline at end of file diff --git a/src-tauri/database/migrations/meta/0007_snapshot.json b/src-tauri/database/migrations/meta/0007_snapshot.json new file mode 100644 index 0000000..6bd7da0 --- /dev/null +++ b/src-tauri/database/migrations/meta/0007_snapshot.json @@ -0,0 +1,627 @@ +{ + "version": "6", + "dialect": "sqlite", + "id": "47f309cf-dabd-4f19-b87a-ed73d0e97781", + "prevId": "76878f8b-9a30-4fd2-9a7b-d1a85874b1ab", + "tables": { + "haex_extensions": { + "name": "haex_extensions", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "author": { + "name": "author", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "enabled": { + "name": "enabled", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "icon": { + "name": "icon", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version": { + "name": "version", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "haex_extensions_permissions": { + "name": "haex_extensions_permissions", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "extension_id": { + "name": "extension_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "resource": { + "name": "resource", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "operation": { + "name": "operation", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "path": { + "name": "path", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "updated_at": { + "name": "updated_at", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "haex_extensions_permissions_extension_id_resource_operation_path_unique": { + "name": "haex_extensions_permissions_extension_id_resource_operation_path_unique", + "columns": [ + "extension_id", + "resource", + "operation", + "path" + ], + "isUnique": true + } + }, + "foreignKeys": { + "haex_extensions_permissions_extension_id_haex_extensions_id_fk": { + "name": "haex_extensions_permissions_extension_id_haex_extensions_id_fk", + "tableFrom": "haex_extensions_permissions", + "tableTo": "haex_extensions", + "columnsFrom": [ + "extension_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "haex_notifications": { + "name": "haex_notifications", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "alt": { + "name": "alt", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "date": { + "name": "date", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "icon": { + "name": "icon", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "image": { + "name": "image", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "read": { + "name": "read", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "source": { + "name": "source", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "text": { + "name": "text", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "haex_passwords_group_items": { + "name": "haex_passwords_group_items", + "columns": { + "group_id": { + "name": "group_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "item_id": { + "name": "item_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": { + "haex_passwords_group_items_group_id_haex_passwords_groups_id_fk": { + "name": "haex_passwords_group_items_group_id_haex_passwords_groups_id_fk", + "tableFrom": "haex_passwords_group_items", + "tableTo": "haex_passwords_groups", + "columnsFrom": [ + "group_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "haex_passwords_group_items_item_id_haex_passwords_items_id_fk": { + "name": "haex_passwords_group_items_item_id_haex_passwords_items_id_fk", + "tableFrom": "haex_passwords_group_items", + "tableTo": "haex_passwords_items", + "columnsFrom": [ + "item_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "haex_passwords_group_items_item_id_group_id_pk": { + "columns": [ + "item_id", + "group_id" + ], + "name": "haex_passwords_group_items_item_id_group_id_pk" + } + }, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "haex_passwords_groups": { + "name": "haex_passwords_groups", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "icon": { + "name": "icon", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "color": { + "name": "color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "updated_at": { + "name": "updated_at", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": { + "haex_passwords_groups_parent_id_haex_passwords_groups_id_fk": { + "name": "haex_passwords_groups_parent_id_haex_passwords_groups_id_fk", + "tableFrom": "haex_passwords_groups", + "tableTo": "haex_passwords_groups", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "haex_passwords_item_history": { + "name": "haex_passwords_item_history", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "item_id": { + "name": "item_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "changed_property": { + "name": "changed_property", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "old_value": { + "name": "old_value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "new_value": { + "name": "new_value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": {}, + "foreignKeys": { + "haex_passwords_item_history_item_id_haex_passwords_items_id_fk": { + "name": "haex_passwords_item_history_item_id_haex_passwords_items_id_fk", + "tableFrom": "haex_passwords_item_history", + "tableTo": "haex_passwords_items", + "columnsFrom": [ + "item_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "haex_passwords_items": { + "name": "haex_passwords_items", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "password": { + "name": "password", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "note": { + "name": "note", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "icon": { + "name": "icon", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "tags": { + "name": "tags", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "updated_at": { + "name": "updated_at", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "haex_passwords_items_key_values": { + "name": "haex_passwords_items_key_values", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "item_id": { + "name": "item_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": { + "haex_passwords_items_key_values_item_id_haex_passwords_items_id_fk": { + "name": "haex_passwords_items_key_values_item_id_haex_passwords_items_id_fk", + "tableFrom": "haex_passwords_items_key_values", + "tableTo": "haex_passwords_items", + "columnsFrom": [ + "item_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "haex_settings": { + "name": "haex_settings", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + } + }, + "views": {}, + "enums": {}, + "_meta": { + "schemas": {}, + "tables": {}, + "columns": {} + }, + "internal": { + "indexes": {} + } +} \ No newline at end of file diff --git a/src-tauri/database/migrations/meta/_journal.json b/src-tauri/database/migrations/meta/_journal.json index 026f0dc..eb2c927 100644 --- a/src-tauri/database/migrations/meta/_journal.json +++ b/src-tauri/database/migrations/meta/_journal.json @@ -29,6 +29,34 @@ "when": 1748873820060, "tag": "0003_familiar_doctor_faustus", "breakpoints": true + }, + { + "idx": 4, + "version": "6", + "when": 1748982377354, + "tag": "0004_wooden_lockheed", + "breakpoints": true + }, + { + "idx": 5, + "version": "6", + "when": 1749073296353, + "tag": "0005_wooden_nuke", + "breakpoints": true + }, + { + "idx": 6, + "version": "6", + "when": 1749128243104, + "tag": "0006_complete_martin_li", + "breakpoints": true + }, + { + "idx": 7, + "version": "6", + "when": 1749244165094, + "tag": "0007_daffy_tusk", + "breakpoints": true } ] } \ No newline at end of file diff --git a/src-tauri/database/schemas/vault.ts b/src-tauri/database/schemas/vault.ts index 59be7ac..77d31fb 100644 --- a/src-tauri/database/schemas/vault.ts +++ b/src-tauri/database/schemas/vault.ts @@ -1,5 +1,7 @@ +import { sql } from 'drizzle-orm' import { integer, + primaryKey, sqliteTable, text, unique, @@ -16,10 +18,10 @@ export type SelectHaexSettings = typeof haexSettings.$inferSelect export const haexExtensions = sqliteTable('haex_extensions', { id: text().primaryKey(), - name: text(), author: text(), enabled: integer({ mode: 'boolean' }), icon: text(), + name: text(), url: text(), version: text(), }) @@ -36,6 +38,10 @@ export const haexExtensionsPermissions = sqliteTable( resource: text({ enum: ['fs', 'http', 'db', 'shell'] }), operation: text({ enum: ['read', 'write', 'create'] }), path: text(), + createdAt: text('created_at').default(sql`(CURRENT_TIMESTAMP)`), + updateAt: integer('updated_at', { mode: 'timestamp' }).$onUpdate( + () => new Date(), + ), }, (table) => [ unique().on(table.extensionId, table.resource, table.operation, table.path), @@ -46,16 +52,105 @@ export type InsertHaexExtensionsPermissions = export type SelectHaexExtensionsPermissions = typeof haexExtensionsPermissions.$inferSelect -export const haexNotifications = sqliteTable('haex_notofications', { +export const haexNotifications = sqliteTable('haex_notifications', { id: text().primaryKey(), - title: text(), - text: text(), - type: text({ enum: ['error', 'success', 'warning', 'info'] }).notNull(), - read: integer({ mode: 'boolean' }), - date: text(), - image: text(), alt: text(), + date: text(), icon: text(), + image: text(), + read: integer({ mode: 'boolean' }), + source: text(), + text: text(), + title: text(), + type: text({ + enum: ['error', 'success', 'warning', 'info', 'log'], + }).notNull(), }) export type InsertHaexNotifications = typeof haexNotifications.$inferInsert export type SelectHaexNotifications = typeof haexNotifications.$inferSelect + +export const haexPasswordsItems = sqliteTable('haex_passwords_items', { + id: text().primaryKey(), + title: text(), + username: text(), + password: text(), + note: text(), + icon: text(), + tags: text(), + url: text(), + createdAt: text('created_at').default(sql`(CURRENT_TIMESTAMP)`), + updateAt: integer('updated_at', { mode: 'timestamp' }).$onUpdate( + () => new Date(), + ), +}) +export type InsertHaexPasswordsItems = typeof haexPasswordsItems.$inferInsert +export type SelectHaexPasswordsItems = typeof haexPasswordsItems.$inferSelect + +export const haexPasswordsItemsKeyValues = sqliteTable( + 'haex_passwords_items_key_values', + { + id: text().primaryKey(), + itemId: text('item_id').references( + (): AnySQLiteColumn => haexPasswordsItems.id, + ), + key: text(), + value: text(), + updateAt: integer('updated_at', { mode: 'timestamp' }).$onUpdate( + () => new Date(), + ), + }, +) +export type InsertHaexPasswordsItemsKeyValues = + typeof haexPasswordsItemsKeyValues.$inferInsert +export type SelectHaexPasswordsItemsKeyValues = + typeof haexPasswordsItemsKeyValues.$inferSelect + +export const haexPasswordsItemHistory = sqliteTable( + 'haex_passwords_item_history', + { + id: text().primaryKey(), + itemId: text('item_id').references( + (): AnySQLiteColumn => haexPasswordsItems.id, + ), + changedProperty: + text('changed_property').$type(), + oldValue: text('old_value'), + newValue: text('new_value'), + createdAt: text('created_at').default(sql`(CURRENT_TIMESTAMP)`), + }, +) + +export const haexPasswordsGroups = sqliteTable('haex_passwords_groups', { + id: text().primaryKey(), + name: text(), + description: text(), + icon: text(), + order: integer(), + color: text(), + parentId: text('parent_id').references( + (): AnySQLiteColumn => haexPasswordsGroups.id, + ), + createdAt: text('created_at').default(sql`(CURRENT_TIMESTAMP)`), + updateAt: integer('updated_at', { mode: 'timestamp' }).$onUpdate( + () => new Date(), + ), +}) +export type InsertHaexPasswordsGroups = typeof haexPasswordsGroups.$inferInsert +export type SelectHaexPasswordsGroups = typeof haexPasswordsGroups.$inferSelect + +export const haexPasswordsGroupItems = sqliteTable( + 'haex_passwords_group_items', + { + groupId: text('group_id').references( + (): AnySQLiteColumn => haexPasswordsGroups.id, + ), + itemId: text('item_id').references( + (): AnySQLiteColumn => haexPasswordsItems.id, + ), + }, + (table) => [primaryKey({ columns: [table.itemId, table.groupId] })], +) +export type InsertHaexPasswordsGroupItems = + typeof haexPasswordsGroupItems.$inferInsert +export type SelectHaexPasswordsGroupItems = + typeof haexPasswordsGroupItems.$inferSelect diff --git a/src-tauri/database/vault.db b/src-tauri/database/vault.db index 87afb0d1d0148d618f515cc24bdb6280c6b09a22..9b9d10136310a3a274f9a342aa53f9be04854c63 100644 GIT binary patch literal 94208 zcmeI&%a7a0odix(b;k=Nha7U;+a7YrEtdq?>vWZ1}uwJKNd@$UsbUPdjIjZVN*fxo5#c!iizt9j!V2P2#G`@#s2c_um9&Q z_GQUGVE=NV@0Wc|CI0H^-!40~*WD0){hjs2#821$>Du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iw(sa}(O# L9ja>zYn=EW<;#px delta 399 zcmZp8z}nEjJV9EJiGhKE2Z}*#?uk0a%1jJ;Wu3g7D;YRB?lADP^RMT)!*_xwi+3Zp z7grZIKbH!Z%4S7@C=RYhFJ^XeZEeOT@9B*>j3Sd0_|{wSaWFiTmuGBrEJ;ktNi9h& zE(t+la61RNI)=C^gg83+xGE&T6-?g1tUh@QpMVfZBtfAhwW5Se(~z4@+*N+^MHUGU zxWaftIFkox8LN1s0SCLdx;kT%JlM*N#MFxTMj41$V>v>sIJKlCGjDoz7Gvvlhb%_x zZP|&WtVmAU|B1Y{n@teMK%~^mK(B#&9nF9}EY;J~V{+aN%^OJVwXK zk^IXi^YeR(0mF;~h#7c+n3-Rafqyf98o%UbMFnpD$&&J~xtRGsG4TK4|IYtuv!KBf a{>`8C`5Gn$u(L7()pG-d-t$ikU>); -// Öffentliche Funktionen für direkten Datenbankzugriff #[tauri::command] pub async fn sql_select( sql: String, @@ -32,7 +28,6 @@ pub async fn sql_execute( core::execute(sql, params, &state).await } -// remember to call `.manage(MyState::default())` #[tauri::command] pub fn test(app_handle: AppHandle) -> Result { let resource_path = app_handle @@ -44,7 +39,7 @@ pub fn test(app_handle: AppHandle) -> Result { /* std::fs::exists(String::from(resource_path.unwrap().to_string_lossy())) .map_err(|e| format!("Fehler: {}", e)) */ } -/// Erstellt eine verschlüsselte Datenbank + #[tauri::command] pub fn create_encrypted_database( app_handle: AppHandle, @@ -81,6 +76,18 @@ pub fn create_encrypted_database( } } + let target = Path::new(&path); + if target.exists() & target.is_file() { + println!( + "Datei '{}' existiert bereits. Sie wird gelöscht.", + target.display() + ); + + fs::remove_file(target) + .map_err(|e| format!("Kann Vault {} nicht löschen. \n {}", target.display(), e))?; + } else { + println!("Datei '{}' existiert nicht.", target.display()); + } //core::copy_file(&resource_path, &path)?; println!( @@ -235,7 +242,6 @@ pub fn create_encrypted_database( )) } -/// Öffnet eine verschlüsselte Datenbank #[tauri::command] pub fn open_encrypted_database( path: String, @@ -254,22 +260,6 @@ pub fn open_encrypted_database( Ok(format!("success")) } -// Notwendige Imports an den Anfang des Moduls stellen -//use tauri::{AppHandle, Manager, State, path::BaseDirectory, Wry}; -//use rusqlite::{Connection, OpenFlags, Result as RusqliteResult}; -//use std::fs; -//use std::path::{Path, PathBuf}; -//use std::sync::Mutex; // Für den State - -// Stelle sicher, dass dein DbConnection-Typ hier bekannt ist. -// z.B. durch pub struct DbConnection(pub Mutex>); -// oder wenn es in einem anderen Modul ist: use crate::path_to::DbConnection; -// Für dieses Beispiel gehe ich davon aus, dass es in crate::DbConnection liegt. -// Ersetze `crate::DbConnection` mit dem korrekten Pfad zu deiner Definition. -//type SharedDbConnectionState = State<'_, crate::DbConnection>; - -/// Hilfsfunktion: Lädt ein Asset und kopiert es in eine temporäre Datei. -/// Gibt den Pfad zur temporären Datei zurück. fn prepare_temporary_asset_db( app_handle: &AppHandle, asset_name: &str, diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 896ab50..ef982a3 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -5,7 +5,7 @@ "identifier": "space.haex.hub", "build": { "beforeDevCommand": "pnpm dev", - "devUrl": "http://localhost:3000", + "devUrl": "http://localhost:3003", "beforeBuildCommand": "pnpm generate", "frontendDist": "../dist" }, diff --git a/src/assets/css/tailwind.css b/src/assets/css/tailwind.css index def5d4b..9a0771f 100644 --- a/src/assets/css/tailwind.css +++ b/src/assets/css/tailwind.css @@ -1,6 +1,8 @@ @import 'tailwindcss'; @import 'flyonui/variants.css'; +@import 'tailwindcss-intersect'; +@plugin "tailwindcss-motion"; @plugin "@iconify/tailwind4"; @plugin "flyonui" { themes: all; diff --git a/src/components/haex/menu/main.vue b/src/components/haex/menu/main.vue index 8ed0f89..c609be9 100644 --- a/src/components/haex/menu/main.vue +++ b/src/components/haex/menu/main.vue @@ -18,7 +18,7 @@
  • {{ t('settings') }} diff --git a/src/components/haex/pass/group/index.vue b/src/components/haex/pass/group/index.vue new file mode 100644 index 0000000..cc340bc --- /dev/null +++ b/src/components/haex/pass/group/index.vue @@ -0,0 +1 @@ + diff --git a/src/components/haex/pass/mobile/menu/group.vue b/src/components/haex/pass/mobile/menu/group.vue new file mode 100644 index 0000000..9c87478 --- /dev/null +++ b/src/components/haex/pass/mobile/menu/group.vue @@ -0,0 +1,33 @@ + + + diff --git a/src/components/haex/pass/mobile/menu/index.vue b/src/components/haex/pass/mobile/menu/index.vue new file mode 100644 index 0000000..34ff3a3 --- /dev/null +++ b/src/components/haex/pass/mobile/menu/index.vue @@ -0,0 +1,78 @@ + + + diff --git a/src/components/haex/pass/mobile/menu/item.vue b/src/components/haex/pass/mobile/menu/item.vue new file mode 100644 index 0000000..d0404e8 --- /dev/null +++ b/src/components/haex/pass/mobile/menu/item.vue @@ -0,0 +1,13 @@ + + + diff --git a/src/components/haex/pass/mobile/menu/types.d.ts b/src/components/haex/pass/mobile/menu/types.d.ts new file mode 100644 index 0000000..2b9c1f6 --- /dev/null +++ b/src/components/haex/pass/mobile/menu/types.d.ts @@ -0,0 +1,5 @@ +export interface IPassMenuItem { + name: string + type: 'group' | 'item' + id: string +} diff --git a/src/components/haex/pass/sidebar/index.vue b/src/components/haex/pass/sidebar/index.vue index 02c59d0..da5b48d 100644 --- a/src/components/haex/pass/sidebar/index.vue +++ b/src/components/haex/pass/sidebar/index.vue @@ -1,77 +1,96 @@ - de: - close: Schließen - - en: - close: Close - \ No newline at end of file +de: + close: Schließen + +en: + close: Close + diff --git a/src/components/haex/sidebar/link.vue b/src/components/haex/sidebar/link.vue index 58b3651..a995517 100644 --- a/src/components/haex/sidebar/link.vue +++ b/src/components/haex/sidebar/link.vue @@ -1,11 +1,30 @@