mirror of
https://github.com/0PandaDEV/Qopy.git
synced 2025-04-21 13:14:04 +02:00
feat: create types
This was commited on flight VA541 :)
This commit is contained in:
parent
2f88644005
commit
163b298783
2 changed files with 44 additions and 0 deletions
23
src-tauri/src/utils/types.rs
Normal file
23
src-tauri/src/utils/types.rs
Normal file
|
@ -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
types/types.ts
Normal file
21
types/types.ts
Normal file
|
@ -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,
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue