mirror of
https://github.com/0PandaDEV/Qopy.git
synced 2025-06-16 11:57:38 +02:00
chore: system
This commit is contained in:
parent
aa928f7094
commit
97c023df91
78 changed files with 15225 additions and 15225 deletions
52
types/keyboard.d.ts
vendored
52
types/keyboard.d.ts
vendored
|
@ -1,27 +1,27 @@
|
|||
import type { Key as WaraduKey, useKeyboard } from '@waradu/keyboard';
|
||||
|
||||
declare module '#app' {
|
||||
interface NuxtApp {
|
||||
$keyboard: {
|
||||
listen: ReturnType<typeof useKeyboard>['listen'];
|
||||
init: ReturnType<typeof useKeyboard>['init'];
|
||||
Key: typeof WaraduKey;
|
||||
currentOS: string;
|
||||
clearAll: () => void;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
declare module 'vue' {
|
||||
interface ComponentCustomProperties {
|
||||
$keyboard: {
|
||||
listen: ReturnType<typeof useKeyboard>['listen'];
|
||||
init: ReturnType<typeof useKeyboard>['init'];
|
||||
Key: typeof WaraduKey;
|
||||
currentOS: string;
|
||||
clearAll: () => void;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
import type { Key as WaraduKey, useKeyboard } from '@waradu/keyboard';
|
||||
|
||||
declare module '#app' {
|
||||
interface NuxtApp {
|
||||
$keyboard: {
|
||||
listen: ReturnType<typeof useKeyboard>['listen'];
|
||||
init: ReturnType<typeof useKeyboard>['init'];
|
||||
Key: typeof WaraduKey;
|
||||
currentOS: string;
|
||||
clearAll: () => void;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
declare module 'vue' {
|
||||
interface ComponentCustomProperties {
|
||||
$keyboard: {
|
||||
listen: ReturnType<typeof useKeyboard>['listen'];
|
||||
init: ReturnType<typeof useKeyboard>['init'];
|
||||
Key: typeof WaraduKey;
|
||||
currentOS: string;
|
||||
clearAll: () => void;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export {};
|
432
types/keys.ts
432
types/keys.ts
|
@ -1,217 +1,217 @@
|
|||
export enum KeyValues {
|
||||
Backquote = 'Backquote',
|
||||
Backslash = 'Backslash',
|
||||
BracketLeft = 'BracketLeft',
|
||||
BracketRight = 'BracketRight',
|
||||
Comma = 'Comma',
|
||||
Digit0 = 'Digit0',
|
||||
Digit1 = 'Digit1',
|
||||
Digit2 = 'Digit2',
|
||||
Digit3 = 'Digit3',
|
||||
Digit4 = 'Digit4',
|
||||
Digit5 = 'Digit5',
|
||||
Digit6 = 'Digit6',
|
||||
Digit7 = 'Digit7',
|
||||
Digit8 = 'Digit8',
|
||||
Digit9 = 'Digit9',
|
||||
Equal = 'Equal',
|
||||
KeyA = 'KeyA',
|
||||
KeyB = 'KeyB',
|
||||
KeyC = 'KeyC',
|
||||
KeyD = 'KeyD',
|
||||
KeyE = 'KeyE',
|
||||
KeyF = 'KeyF',
|
||||
KeyG = 'KeyG',
|
||||
KeyH = 'KeyH',
|
||||
KeyI = 'KeyI',
|
||||
KeyJ = 'KeyJ',
|
||||
KeyK = 'KeyK',
|
||||
KeyL = 'KeyL',
|
||||
KeyM = 'KeyM',
|
||||
KeyN = 'KeyN',
|
||||
KeyO = 'KeyO',
|
||||
KeyP = 'KeyP',
|
||||
KeyQ = 'KeyQ',
|
||||
KeyR = 'KeyR',
|
||||
KeyS = 'KeyS',
|
||||
KeyT = 'KeyT',
|
||||
KeyU = 'KeyU',
|
||||
KeyV = 'KeyV',
|
||||
KeyW = 'KeyW',
|
||||
KeyX = 'KeyX',
|
||||
KeyY = 'KeyY',
|
||||
KeyZ = 'KeyZ',
|
||||
Minus = 'Minus',
|
||||
Period = 'Period',
|
||||
Quote = 'Quote',
|
||||
Semicolon = 'Semicolon',
|
||||
Slash = 'Slash',
|
||||
AltLeft = 'AltLeft',
|
||||
AltRight = 'AltRight',
|
||||
Backspace = 'Backspace',
|
||||
CapsLock = 'CapsLock',
|
||||
ContextMenu = 'ContextMenu',
|
||||
ControlLeft = 'ControlLeft',
|
||||
ControlRight = 'ControlRight',
|
||||
Enter = 'Enter',
|
||||
MetaLeft = 'MetaLeft',
|
||||
MetaRight = 'MetaRight',
|
||||
ShiftLeft = 'ShiftLeft',
|
||||
ShiftRight = 'ShiftRight',
|
||||
Space = 'Space',
|
||||
Tab = 'Tab',
|
||||
Delete = 'Delete',
|
||||
End = 'End',
|
||||
Home = 'Home',
|
||||
Insert = 'Insert',
|
||||
PageDown = 'PageDown',
|
||||
PageUp = 'PageUp',
|
||||
ArrowDown = 'ArrowDown',
|
||||
ArrowLeft = 'ArrowLeft',
|
||||
ArrowRight = 'ArrowRight',
|
||||
ArrowUp = 'ArrowUp',
|
||||
NumLock = 'NumLock',
|
||||
Numpad0 = 'Numpad0',
|
||||
Numpad1 = 'Numpad1',
|
||||
Numpad2 = 'Numpad2',
|
||||
Numpad3 = 'Numpad3',
|
||||
Numpad4 = 'Numpad4',
|
||||
Numpad5 = 'Numpad5',
|
||||
Numpad6 = 'Numpad6',
|
||||
Numpad7 = 'Numpad7',
|
||||
Numpad8 = 'Numpad8',
|
||||
Numpad9 = 'Numpad9',
|
||||
NumpadAdd = 'NumpadAdd',
|
||||
NumpadDecimal = 'NumpadDecimal',
|
||||
NumpadDivide = 'NumpadDivide',
|
||||
NumpadMultiply = 'NumpadMultiply',
|
||||
NumpadSubtract = 'NumpadSubtract',
|
||||
Escape = 'Escape',
|
||||
PrintScreen = 'PrintScreen',
|
||||
ScrollLock = 'ScrollLock',
|
||||
Pause = 'Pause',
|
||||
AudioVolumeDown = 'AudioVolumeDown',
|
||||
AudioVolumeMute = 'AudioVolumeMute',
|
||||
AudioVolumeUp = 'AudioVolumeUp',
|
||||
F1 = 'F1',
|
||||
F2 = 'F2',
|
||||
F3 = 'F3',
|
||||
F4 = 'F4',
|
||||
F5 = 'F5',
|
||||
F6 = 'F6',
|
||||
F7 = 'F7',
|
||||
F8 = 'F8',
|
||||
F9 = 'F9',
|
||||
F10 = 'F10',
|
||||
F11 = 'F11',
|
||||
F12 = 'F12',
|
||||
}
|
||||
|
||||
export enum KeyLabels {
|
||||
Backquote = '`',
|
||||
Backslash = '\\',
|
||||
BracketLeft = '[',
|
||||
BracketRight = ']',
|
||||
Comma = ',',
|
||||
Digit0 = '0',
|
||||
Digit1 = '1',
|
||||
Digit2 = '2',
|
||||
Digit3 = '3',
|
||||
Digit4 = '4',
|
||||
Digit5 = '5',
|
||||
Digit6 = '6',
|
||||
Digit7 = '7',
|
||||
Digit8 = '8',
|
||||
Digit9 = '9',
|
||||
Equal = '=',
|
||||
KeyA = 'A',
|
||||
KeyB = 'B',
|
||||
KeyC = 'C',
|
||||
KeyD = 'D',
|
||||
KeyE = 'E',
|
||||
KeyF = 'F',
|
||||
KeyG = 'G',
|
||||
KeyH = 'H',
|
||||
KeyI = 'I',
|
||||
KeyJ = 'J',
|
||||
KeyK = 'K',
|
||||
KeyL = 'L',
|
||||
KeyM = 'M',
|
||||
KeyN = 'N',
|
||||
KeyO = 'O',
|
||||
KeyP = 'P',
|
||||
KeyQ = 'Q',
|
||||
KeyR = 'R',
|
||||
KeyS = 'S',
|
||||
KeyT = 'T',
|
||||
KeyU = 'U',
|
||||
KeyV = 'V',
|
||||
KeyW = 'W',
|
||||
KeyX = 'X',
|
||||
KeyY = 'Y',
|
||||
KeyZ = 'Z',
|
||||
Minus = '-',
|
||||
Period = '.',
|
||||
Quote = "'",
|
||||
Semicolon = ';',
|
||||
Slash = '/',
|
||||
AltLeft = 'Alt',
|
||||
AltRight = 'Alt (Right)',
|
||||
Backspace = 'Backspace',
|
||||
CapsLock = 'Caps Lock',
|
||||
ContextMenu = 'Context Menu',
|
||||
ControlLeft = 'Ctrl',
|
||||
ControlRight = 'Ctrl (Right)',
|
||||
Enter = 'Enter',
|
||||
MetaLeft = 'Meta',
|
||||
MetaRight = 'Meta (Right)',
|
||||
ShiftLeft = 'Shift',
|
||||
ShiftRight = 'Shift (Right)',
|
||||
Space = 'Space',
|
||||
Tab = 'Tab',
|
||||
Delete = 'Delete',
|
||||
End = 'End',
|
||||
Home = 'Home',
|
||||
Insert = 'Insert',
|
||||
PageDown = 'Page Down',
|
||||
PageUp = 'Page Up',
|
||||
ArrowDown = '↓',
|
||||
ArrowLeft = '←',
|
||||
ArrowRight = '→',
|
||||
ArrowUp = '↑',
|
||||
NumLock = 'Num Lock',
|
||||
Numpad0 = 'Numpad 0',
|
||||
Numpad1 = 'Numpad 1',
|
||||
Numpad2 = 'Numpad 2',
|
||||
Numpad3 = 'Numpad 3',
|
||||
Numpad4 = 'Numpad 4',
|
||||
Numpad5 = 'Numpad 5',
|
||||
Numpad6 = 'Numpad 6',
|
||||
Numpad7 = 'Numpad 7',
|
||||
Numpad8 = 'Numpad 8',
|
||||
Numpad9 = 'Numpad 9',
|
||||
NumpadAdd = 'Numpad +',
|
||||
NumpadDecimal = 'Numpad .',
|
||||
NumpadDivide = 'Numpad /',
|
||||
NumpadMultiply = 'Numpad *',
|
||||
NumpadSubtract = 'Numpad -',
|
||||
Escape = 'Esc',
|
||||
PrintScreen = 'Print Screen',
|
||||
ScrollLock = 'Scroll Lock',
|
||||
Pause = 'Pause',
|
||||
AudioVolumeDown = 'Volume Down',
|
||||
AudioVolumeMute = 'Volume Mute',
|
||||
AudioVolumeUp = 'Volume Up',
|
||||
F1 = 'F1',
|
||||
F2 = 'F2',
|
||||
F3 = 'F3',
|
||||
F4 = 'F4',
|
||||
F5 = 'F5',
|
||||
F6 = 'F6',
|
||||
F7 = 'F7',
|
||||
F8 = 'F8',
|
||||
F9 = 'F9',
|
||||
F10 = 'F10',
|
||||
F11 = 'F11',
|
||||
F12 = 'F12',
|
||||
export enum KeyValues {
|
||||
Backquote = 'Backquote',
|
||||
Backslash = 'Backslash',
|
||||
BracketLeft = 'BracketLeft',
|
||||
BracketRight = 'BracketRight',
|
||||
Comma = 'Comma',
|
||||
Digit0 = 'Digit0',
|
||||
Digit1 = 'Digit1',
|
||||
Digit2 = 'Digit2',
|
||||
Digit3 = 'Digit3',
|
||||
Digit4 = 'Digit4',
|
||||
Digit5 = 'Digit5',
|
||||
Digit6 = 'Digit6',
|
||||
Digit7 = 'Digit7',
|
||||
Digit8 = 'Digit8',
|
||||
Digit9 = 'Digit9',
|
||||
Equal = 'Equal',
|
||||
KeyA = 'KeyA',
|
||||
KeyB = 'KeyB',
|
||||
KeyC = 'KeyC',
|
||||
KeyD = 'KeyD',
|
||||
KeyE = 'KeyE',
|
||||
KeyF = 'KeyF',
|
||||
KeyG = 'KeyG',
|
||||
KeyH = 'KeyH',
|
||||
KeyI = 'KeyI',
|
||||
KeyJ = 'KeyJ',
|
||||
KeyK = 'KeyK',
|
||||
KeyL = 'KeyL',
|
||||
KeyM = 'KeyM',
|
||||
KeyN = 'KeyN',
|
||||
KeyO = 'KeyO',
|
||||
KeyP = 'KeyP',
|
||||
KeyQ = 'KeyQ',
|
||||
KeyR = 'KeyR',
|
||||
KeyS = 'KeyS',
|
||||
KeyT = 'KeyT',
|
||||
KeyU = 'KeyU',
|
||||
KeyV = 'KeyV',
|
||||
KeyW = 'KeyW',
|
||||
KeyX = 'KeyX',
|
||||
KeyY = 'KeyY',
|
||||
KeyZ = 'KeyZ',
|
||||
Minus = 'Minus',
|
||||
Period = 'Period',
|
||||
Quote = 'Quote',
|
||||
Semicolon = 'Semicolon',
|
||||
Slash = 'Slash',
|
||||
AltLeft = 'AltLeft',
|
||||
AltRight = 'AltRight',
|
||||
Backspace = 'Backspace',
|
||||
CapsLock = 'CapsLock',
|
||||
ContextMenu = 'ContextMenu',
|
||||
ControlLeft = 'ControlLeft',
|
||||
ControlRight = 'ControlRight',
|
||||
Enter = 'Enter',
|
||||
MetaLeft = 'MetaLeft',
|
||||
MetaRight = 'MetaRight',
|
||||
ShiftLeft = 'ShiftLeft',
|
||||
ShiftRight = 'ShiftRight',
|
||||
Space = 'Space',
|
||||
Tab = 'Tab',
|
||||
Delete = 'Delete',
|
||||
End = 'End',
|
||||
Home = 'Home',
|
||||
Insert = 'Insert',
|
||||
PageDown = 'PageDown',
|
||||
PageUp = 'PageUp',
|
||||
ArrowDown = 'ArrowDown',
|
||||
ArrowLeft = 'ArrowLeft',
|
||||
ArrowRight = 'ArrowRight',
|
||||
ArrowUp = 'ArrowUp',
|
||||
NumLock = 'NumLock',
|
||||
Numpad0 = 'Numpad0',
|
||||
Numpad1 = 'Numpad1',
|
||||
Numpad2 = 'Numpad2',
|
||||
Numpad3 = 'Numpad3',
|
||||
Numpad4 = 'Numpad4',
|
||||
Numpad5 = 'Numpad5',
|
||||
Numpad6 = 'Numpad6',
|
||||
Numpad7 = 'Numpad7',
|
||||
Numpad8 = 'Numpad8',
|
||||
Numpad9 = 'Numpad9',
|
||||
NumpadAdd = 'NumpadAdd',
|
||||
NumpadDecimal = 'NumpadDecimal',
|
||||
NumpadDivide = 'NumpadDivide',
|
||||
NumpadMultiply = 'NumpadMultiply',
|
||||
NumpadSubtract = 'NumpadSubtract',
|
||||
Escape = 'Escape',
|
||||
PrintScreen = 'PrintScreen',
|
||||
ScrollLock = 'ScrollLock',
|
||||
Pause = 'Pause',
|
||||
AudioVolumeDown = 'AudioVolumeDown',
|
||||
AudioVolumeMute = 'AudioVolumeMute',
|
||||
AudioVolumeUp = 'AudioVolumeUp',
|
||||
F1 = 'F1',
|
||||
F2 = 'F2',
|
||||
F3 = 'F3',
|
||||
F4 = 'F4',
|
||||
F5 = 'F5',
|
||||
F6 = 'F6',
|
||||
F7 = 'F7',
|
||||
F8 = 'F8',
|
||||
F9 = 'F9',
|
||||
F10 = 'F10',
|
||||
F11 = 'F11',
|
||||
F12 = 'F12',
|
||||
}
|
||||
|
||||
export enum KeyLabels {
|
||||
Backquote = '`',
|
||||
Backslash = '\\',
|
||||
BracketLeft = '[',
|
||||
BracketRight = ']',
|
||||
Comma = ',',
|
||||
Digit0 = '0',
|
||||
Digit1 = '1',
|
||||
Digit2 = '2',
|
||||
Digit3 = '3',
|
||||
Digit4 = '4',
|
||||
Digit5 = '5',
|
||||
Digit6 = '6',
|
||||
Digit7 = '7',
|
||||
Digit8 = '8',
|
||||
Digit9 = '9',
|
||||
Equal = '=',
|
||||
KeyA = 'A',
|
||||
KeyB = 'B',
|
||||
KeyC = 'C',
|
||||
KeyD = 'D',
|
||||
KeyE = 'E',
|
||||
KeyF = 'F',
|
||||
KeyG = 'G',
|
||||
KeyH = 'H',
|
||||
KeyI = 'I',
|
||||
KeyJ = 'J',
|
||||
KeyK = 'K',
|
||||
KeyL = 'L',
|
||||
KeyM = 'M',
|
||||
KeyN = 'N',
|
||||
KeyO = 'O',
|
||||
KeyP = 'P',
|
||||
KeyQ = 'Q',
|
||||
KeyR = 'R',
|
||||
KeyS = 'S',
|
||||
KeyT = 'T',
|
||||
KeyU = 'U',
|
||||
KeyV = 'V',
|
||||
KeyW = 'W',
|
||||
KeyX = 'X',
|
||||
KeyY = 'Y',
|
||||
KeyZ = 'Z',
|
||||
Minus = '-',
|
||||
Period = '.',
|
||||
Quote = "'",
|
||||
Semicolon = ';',
|
||||
Slash = '/',
|
||||
AltLeft = 'Alt',
|
||||
AltRight = 'Alt (Right)',
|
||||
Backspace = 'Backspace',
|
||||
CapsLock = 'Caps Lock',
|
||||
ContextMenu = 'Context Menu',
|
||||
ControlLeft = 'Ctrl',
|
||||
ControlRight = 'Ctrl (Right)',
|
||||
Enter = 'Enter',
|
||||
MetaLeft = 'Meta',
|
||||
MetaRight = 'Meta (Right)',
|
||||
ShiftLeft = 'Shift',
|
||||
ShiftRight = 'Shift (Right)',
|
||||
Space = 'Space',
|
||||
Tab = 'Tab',
|
||||
Delete = 'Delete',
|
||||
End = 'End',
|
||||
Home = 'Home',
|
||||
Insert = 'Insert',
|
||||
PageDown = 'Page Down',
|
||||
PageUp = 'Page Up',
|
||||
ArrowDown = '↓',
|
||||
ArrowLeft = '←',
|
||||
ArrowRight = '→',
|
||||
ArrowUp = '↑',
|
||||
NumLock = 'Num Lock',
|
||||
Numpad0 = 'Numpad 0',
|
||||
Numpad1 = 'Numpad 1',
|
||||
Numpad2 = 'Numpad 2',
|
||||
Numpad3 = 'Numpad 3',
|
||||
Numpad4 = 'Numpad 4',
|
||||
Numpad5 = 'Numpad 5',
|
||||
Numpad6 = 'Numpad 6',
|
||||
Numpad7 = 'Numpad 7',
|
||||
Numpad8 = 'Numpad 8',
|
||||
Numpad9 = 'Numpad 9',
|
||||
NumpadAdd = 'Numpad +',
|
||||
NumpadDecimal = 'Numpad .',
|
||||
NumpadDivide = 'Numpad /',
|
||||
NumpadMultiply = 'Numpad *',
|
||||
NumpadSubtract = 'Numpad -',
|
||||
Escape = 'Esc',
|
||||
PrintScreen = 'Print Screen',
|
||||
ScrollLock = 'Scroll Lock',
|
||||
Pause = 'Pause',
|
||||
AudioVolumeDown = 'Volume Down',
|
||||
AudioVolumeMute = 'Volume Mute',
|
||||
AudioVolumeUp = 'Volume Up',
|
||||
F1 = 'F1',
|
||||
F2 = 'F2',
|
||||
F3 = 'F3',
|
||||
F4 = 'F4',
|
||||
F5 = 'F5',
|
||||
F6 = 'F6',
|
||||
F7 = 'F7',
|
||||
F8 = 'F8',
|
||||
F9 = 'F9',
|
||||
F10 = 'F10',
|
||||
F11 = 'F11',
|
||||
F12 = 'F12',
|
||||
}
|
232
types/types.ts
232
types/types.ts
|
@ -1,116 +1,116 @@
|
|||
import { v4 as uuidv4 } from "uuid";
|
||||
|
||||
export enum ContentType {
|
||||
Text = "text",
|
||||
Image = "image",
|
||||
File = "file",
|
||||
Link = "link",
|
||||
Color = "color",
|
||||
Code = "code",
|
||||
}
|
||||
|
||||
export class HistoryItem {
|
||||
id: string;
|
||||
source: string;
|
||||
source_icon?: string;
|
||||
content_type: ContentType;
|
||||
content: string;
|
||||
favicon?: string;
|
||||
timestamp: Date;
|
||||
language?: string;
|
||||
|
||||
constructor(
|
||||
source: string,
|
||||
content_type: ContentType,
|
||||
content: string,
|
||||
favicon?: string,
|
||||
source_icon?: string,
|
||||
language?: string
|
||||
) {
|
||||
this.id = uuidv4();
|
||||
this.source = source;
|
||||
this.source_icon = source_icon;
|
||||
this.content_type = content_type;
|
||||
this.content = content;
|
||||
this.favicon = favicon;
|
||||
this.timestamp = new Date();
|
||||
this.language = language;
|
||||
}
|
||||
|
||||
toRow(): [
|
||||
string,
|
||||
string,
|
||||
string | undefined,
|
||||
string,
|
||||
string,
|
||||
string | undefined,
|
||||
Date,
|
||||
string | undefined
|
||||
] {
|
||||
return [
|
||||
this.id,
|
||||
this.source,
|
||||
this.source_icon,
|
||||
this.content_type,
|
||||
this.content,
|
||||
this.favicon,
|
||||
this.timestamp,
|
||||
this.language,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
export interface Settings {
|
||||
key: string;
|
||||
value: string;
|
||||
}
|
||||
|
||||
export interface InfoText {
|
||||
source: string;
|
||||
content_type: ContentType.Text;
|
||||
characters: number;
|
||||
words: number;
|
||||
copied: Date;
|
||||
}
|
||||
|
||||
export interface InfoImage {
|
||||
source: string;
|
||||
content_type: ContentType.Image;
|
||||
dimensions: string;
|
||||
size: number;
|
||||
copied: Date;
|
||||
}
|
||||
|
||||
export interface InfoFile {
|
||||
source: string;
|
||||
content_type: ContentType.File;
|
||||
path: string;
|
||||
filesize: number;
|
||||
copied: Date;
|
||||
}
|
||||
|
||||
export interface InfoLink {
|
||||
source: string;
|
||||
content_type: ContentType.Link;
|
||||
title?: string;
|
||||
url: string;
|
||||
characters: number;
|
||||
copied: Date;
|
||||
}
|
||||
|
||||
export interface InfoColor {
|
||||
source: string;
|
||||
content_type: ContentType.Color;
|
||||
hex: string;
|
||||
rgb: string;
|
||||
hsl: string;
|
||||
copied: Date;
|
||||
}
|
||||
|
||||
export interface InfoCode {
|
||||
source: string;
|
||||
content_type: ContentType.Code;
|
||||
language: string;
|
||||
lines: number;
|
||||
copied: Date;
|
||||
}
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
|
||||
export enum ContentType {
|
||||
Text = "text",
|
||||
Image = "image",
|
||||
File = "file",
|
||||
Link = "link",
|
||||
Color = "color",
|
||||
Code = "code",
|
||||
}
|
||||
|
||||
export class HistoryItem {
|
||||
id: string;
|
||||
source: string;
|
||||
source_icon?: string;
|
||||
content_type: ContentType;
|
||||
content: string;
|
||||
favicon?: string;
|
||||
timestamp: Date;
|
||||
language?: string;
|
||||
|
||||
constructor(
|
||||
source: string,
|
||||
content_type: ContentType,
|
||||
content: string,
|
||||
favicon?: string,
|
||||
source_icon?: string,
|
||||
language?: string
|
||||
) {
|
||||
this.id = uuidv4();
|
||||
this.source = source;
|
||||
this.source_icon = source_icon;
|
||||
this.content_type = content_type;
|
||||
this.content = content;
|
||||
this.favicon = favicon;
|
||||
this.timestamp = new Date();
|
||||
this.language = language;
|
||||
}
|
||||
|
||||
toRow(): [
|
||||
string,
|
||||
string,
|
||||
string | undefined,
|
||||
string,
|
||||
string,
|
||||
string | undefined,
|
||||
Date,
|
||||
string | undefined
|
||||
] {
|
||||
return [
|
||||
this.id,
|
||||
this.source,
|
||||
this.source_icon,
|
||||
this.content_type,
|
||||
this.content,
|
||||
this.favicon,
|
||||
this.timestamp,
|
||||
this.language,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
export interface Settings {
|
||||
key: string;
|
||||
value: string;
|
||||
}
|
||||
|
||||
export interface InfoText {
|
||||
source: string;
|
||||
content_type: ContentType.Text;
|
||||
characters: number;
|
||||
words: number;
|
||||
copied: Date;
|
||||
}
|
||||
|
||||
export interface InfoImage {
|
||||
source: string;
|
||||
content_type: ContentType.Image;
|
||||
dimensions: string;
|
||||
size: number;
|
||||
copied: Date;
|
||||
}
|
||||
|
||||
export interface InfoFile {
|
||||
source: string;
|
||||
content_type: ContentType.File;
|
||||
path: string;
|
||||
filesize: number;
|
||||
copied: Date;
|
||||
}
|
||||
|
||||
export interface InfoLink {
|
||||
source: string;
|
||||
content_type: ContentType.Link;
|
||||
title?: string;
|
||||
url: string;
|
||||
characters: number;
|
||||
copied: Date;
|
||||
}
|
||||
|
||||
export interface InfoColor {
|
||||
source: string;
|
||||
content_type: ContentType.Color;
|
||||
hex: string;
|
||||
rgb: string;
|
||||
hsl: string;
|
||||
copied: Date;
|
||||
}
|
||||
|
||||
export interface InfoCode {
|
||||
source: string;
|
||||
content_type: ContentType.Code;
|
||||
language: string;
|
||||
lines: number;
|
||||
copied: Date;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue