reorganize models
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import StorageModel, { storageKeys } from "./storageModel";
|
||||
import StorageModel, { storageKeys } from "../Global/storageModel";
|
||||
|
||||
import ChatModel from "./chatModel";
|
||||
import ConnectionModel from "./connectionModel";
|
||||
import ConnectionModel from "../Global/connectionModel";
|
||||
import { Message } from "udn-frontend";
|
||||
import SettingsModel from "./settingsModel";
|
||||
import { localeCompare } from "./Utility/utility";
|
||||
import SettingsModel from "../Global/settingsModel";
|
||||
import { localeCompare } from "../Utility/utility";
|
||||
import { v4 } from "uuid";
|
||||
|
||||
export default class ChatListModel {
|
||||
@@ -1,19 +1,19 @@
|
||||
// this file is responsible for managing chats.
|
||||
|
||||
import { DATA_VERSION, ValidObject } from "./Utility/typeSafety";
|
||||
import FileModel, { File } from "./fileModel";
|
||||
import StorageModel, { storageKeys } from "./storageModel";
|
||||
import { DATA_VERSION, ValidObject } from "../Utility/typeSafety";
|
||||
import FileModel, { File } from "../Files/fileModel";
|
||||
import StorageModel, { storageKeys } from "../Global/storageModel";
|
||||
import {
|
||||
createTimestamp,
|
||||
parseValidObject,
|
||||
stringify,
|
||||
} from "./Utility/utility";
|
||||
import { decryptString, encryptString } from "./Utility/crypto";
|
||||
} from "../Utility/utility";
|
||||
import { decryptString, encryptString } from "../Utility/crypto";
|
||||
|
||||
import ChatListModel from "./chatListModel";
|
||||
import { Color } from "../ViewModel/colors";
|
||||
import ConnectionModel from "./connectionModel";
|
||||
import SettingsModel from "./settingsModel";
|
||||
import { Color } from "../../ViewModel/colors";
|
||||
import ConnectionModel from "../Global/connectionModel";
|
||||
import SettingsModel from "../Global/settingsModel";
|
||||
import { v4 } from "uuid";
|
||||
|
||||
export default class ChatModel {
|
||||
@@ -1,10 +1,10 @@
|
||||
// this file is responsible for managing files within chats.
|
||||
|
||||
import { DATA_VERSION, ValidObject } from "./Utility/typeSafety";
|
||||
import StorageModel, { storageKeys } from "./storageModel";
|
||||
import { parseValidObject, stringify } from "./Utility/utility";
|
||||
import { DATA_VERSION, ValidObject } from "../Utility/typeSafety";
|
||||
import StorageModel, { storageKeys } from "../Global/storageModel";
|
||||
import { parseValidObject, stringify } from "../Utility/utility";
|
||||
|
||||
import ChatModel from "./chatModel";
|
||||
import ChatModel from "../Chat/chatModel";
|
||||
import { v4 } from "uuid";
|
||||
|
||||
export default class FileModel {
|
||||
@@ -0,0 +1,20 @@
|
||||
// thile file is responsible for managing task files within chats.
|
||||
|
||||
import { FileContent } from "./fileModel";
|
||||
|
||||
export default class TaskFileModel {}
|
||||
|
||||
// types
|
||||
export interface TaskFileContent extends FileContent {
|
||||
type: "task",
|
||||
|
||||
board: string;
|
||||
category?: string;
|
||||
status?: string;
|
||||
|
||||
description?: string;
|
||||
|
||||
priority?: number;
|
||||
date?: string;
|
||||
time?: string;
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
// this file is responsible for managing UDN connections.
|
||||
|
||||
import { ChatMessage, ChatMessageReference } from "./chatModel";
|
||||
import { ChatMessage, ChatMessageReference } from "../Chat/chatModel";
|
||||
import StorageModel, { storageKeys } from "./storageModel";
|
||||
import UDNFrontend, { Message } from "udn-frontend";
|
||||
|
||||
import { stringify } from "./Utility/utility";
|
||||
import { stringify } from "../Utility/utility";
|
||||
|
||||
export default class ConnectionModel {
|
||||
udn: UDNFrontend;
|
||||
@@ -4,8 +4,8 @@ import {
|
||||
DATA_VERSION,
|
||||
ValidObject,
|
||||
checkMatchesObjectStructure,
|
||||
} from "./Utility/typeSafety";
|
||||
import { localeCompare, parseValidObject, stringify } from "./Utility/utility";
|
||||
} from "../Utility/typeSafety";
|
||||
import { localeCompare, parseValidObject, stringify } from "../Utility/utility";
|
||||
|
||||
export const PATH_COMPONENT_SEPARATOR = "\\";
|
||||
|
||||
Reference in New Issue
Block a user