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 87afb0d..9b9d101 100644 Binary files a/src-tauri/database/vault.db and b/src-tauri/database/vault.db differ diff --git a/src-tauri/gen/android/app/src/main/assets/database/vault.db b/src-tauri/gen/android/app/src/main/assets/database/vault.db index 7dfe673..8e9d1b4 100644 Binary files a/src-tauri/gen/android/app/src/main/assets/database/vault.db and b/src-tauri/gen/android/app/src/main/assets/database/vault.db differ diff --git a/src-tauri/src/database/mod.rs b/src-tauri/src/database/mod.rs index 585e755..bed79a2 100644 --- a/src-tauri/src/database/mod.rs +++ b/src-tauri/src/database/mod.rs @@ -1,19 +1,15 @@ // database/mod.rs pub mod core; -use rusqlite::{Connection, OpenFlags, Result as RusqliteResult}; +use rusqlite::Connection; use serde_json::Value as JsonValue; use std::fs; -use std::io::Read; use std::path::{Path, PathBuf}; use std::sync::Mutex; -use tauri::utils::resources::Resource; use tauri::{path::BaseDirectory, AppHandle, Manager, State, Wry}; -use tauri_plugin_fs::FsExt; pub struct DbConnection(pub Mutex>); -// Ö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 @@