From 163b298783f4fa8c9d3d2c336dcea9bb1943d8ce Mon Sep 17 00:00:00 2001 From: PandaDEV <70103896+0PandaDEV@users.noreply.github.com> Date: Thu, 5 Dec 2024 19:43:13 +1100 Subject: [PATCH] feat: create types This was commited on flight VA541 :) --- src-tauri/src/utils/types.rs | 23 +++++++++++++++++++++++ types/types.ts | 21 +++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 src-tauri/src/utils/types.rs create mode 100644 types/types.ts diff --git a/src-tauri/src/utils/types.rs b/src-tauri/src/utils/types.rs new file mode 100644 index 0000000..5b84d87 --- /dev/null +++ b/src-tauri/src/utils/types.rs @@ -0,0 +1,23 @@ +#[derive(Deserialize, Serialize)] +struct HistoryItem { + id: String, + content_type: ContentType, + content: String, + favicon: String, + timestamp: DATETIME, +} + +#[derive(Deserialize, Serialize)] +struct Settings { + key: String, + value: String, +} + +enum ContentType { + TEXT, + IMAGE, + FILE, + LINK, + COLOR, + CODE, +} diff --git a/types/types.ts b/types/types.ts new file mode 100644 index 0000000..f923c37 --- /dev/null +++ b/types/types.ts @@ -0,0 +1,21 @@ +export interface HistoryItem { + id: string; + content_type: ContentType; + content: string; + favicon: string; + timestamp: Date; +} + +export interface Settings { + key: string; + value: string; +} + +export enum ContentType { + TEXT, + IMAGE, + FILE, + LINK, + COLOR, + CODE, +}