Skip to content

Commit

Permalink
feat: create types
Browse files Browse the repository at this point in the history
This was commited on flight VA541 :)
  • Loading branch information
0PandaDEV committed Dec 5, 2024
1 parent 2f88644 commit 163b298
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src-tauri/src/utils/types.rs
Original file line number Diff line number Diff line change
@@ -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,
}
21 changes: 21 additions & 0 deletions types/types.ts
Original file line number Diff line number Diff line change
@@ -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,
}

0 comments on commit 163b298

Please sign in to comment.