clean model (A)
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
import * as React from "bloatless-react";
|
||||
|
||||
import ChatModel from "../../Model/Chat/chatModel";
|
||||
import ChatViewModel from "./chatViewModel";
|
||||
import CoreViewModel from "../Global/coreViewModel";
|
||||
import { IndexManager } from "../../Model/Utility/utility";
|
||||
import SettingsViewModel from "../Global/settingsViewModel";
|
||||
import ConnectionViewModel from "../Global/connectionViewModel";
|
||||
import NotificationViewModel from "../Global/notificationViewModel";
|
||||
import CoreViewModel from "../Global/coreViewModel";
|
||||
import ConnectionViewModel from "../Global/connectionViewModel";
|
||||
import { IndexManager } from "../../Model/Utility/utility";
|
||||
import ChatModel from "../../Model/Chat/chatModel";
|
||||
|
||||
export default class ChatListViewModel {
|
||||
notificationViewModel: NotificationViewModel;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import * as React from "bloatless-react";
|
||||
|
||||
import MessagePageViewModel from "../Pages/messagePageViewModel";
|
||||
import CoreViewModel from "../Global/coreViewModel";
|
||||
import {
|
||||
ChatMessage,
|
||||
ChatMessageReaction,
|
||||
@@ -7,9 +8,6 @@ import {
|
||||
ReactionSymbols,
|
||||
} from "../../Model/Chat/chatModel";
|
||||
|
||||
import CoreViewModel from "../Global/coreViewModel";
|
||||
import MessagePageViewModel from "../Pages/messagePageViewModel";
|
||||
|
||||
export default class ChatMessageViewModel {
|
||||
// data
|
||||
chatMessage: ChatMessage;
|
||||
|
||||
@@ -1,29 +1,26 @@
|
||||
import * as React from "bloatless-react";
|
||||
|
||||
import ChatListViewModel from "./chatListViewModel";
|
||||
import TaskPageViewModel from "../Pages/taskPageViewModel";
|
||||
import SettingsPageViewModel from "../Pages/settingsPageViewModel";
|
||||
import MessagePageViewModel from "../Pages/messagePageViewModel";
|
||||
import CalendarPageViewModel, {
|
||||
CALENDAR_EVENT_BOARD_ID,
|
||||
} from "../Pages/calendarPageViewModel";
|
||||
import ChatModel, {
|
||||
ChatMessage,
|
||||
ChatMessageReaction,
|
||||
} from "../../Model/Chat/chatModel";
|
||||
import SettingsViewModel from "../Global/settingsViewModel";
|
||||
import NotificationViewModel from "../Global/notificationViewModel";
|
||||
import CoreViewModel, { Context, ContextHost } from "../Global/coreViewModel";
|
||||
import ConnectionViewModel from "../Global/connectionViewModel";
|
||||
import { Colors } from "../../colors";
|
||||
import { CommonKeys } from "../../View/keystrokes";
|
||||
import { Entry } from "../../View/Components/option";
|
||||
import StorageModel, {
|
||||
StorageModelSubPaths,
|
||||
filePaths,
|
||||
} from "../../Model/Global/storageModel";
|
||||
|
||||
import ChatListViewModel from "./chatListViewModel";
|
||||
import { Colors } from "../../colors";
|
||||
import CoreViewModel, { Context, ContextHost } from "../Global/coreViewModel";
|
||||
import { Entry } from "../../View/Components/option";
|
||||
import MessagePageViewModel from "../Pages/messagePageViewModel";
|
||||
import SettingsPageViewModel from "../Pages/settingsPageViewModel";
|
||||
import SettingsViewModel from "../Global/settingsViewModel";
|
||||
import TaskPageViewModel from "../Pages/taskPageViewModel";
|
||||
import ConnectionViewModel from "../Global/connectionViewModel";
|
||||
import NotificationViewModel from "../Global/notificationViewModel";
|
||||
import { v4 } from "uuid";
|
||||
import { CommonKeys } from "../../View/keystrokes";
|
||||
import ChatModel, {
|
||||
ChatMessage,
|
||||
ChatMessageReaction,
|
||||
} from "../../Model/Chat/chatModel";
|
||||
|
||||
export default class ChatViewModel extends ContextHost<ChatPageTypes> {
|
||||
calendarViewModel: CalendarPageViewModel;
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
import * as React from "bloatless-react";
|
||||
|
||||
import ConnectionModel from "../../Model/Global/connectionModel";
|
||||
import CoreViewModel from "./coreViewModel";
|
||||
|
||||
export default class ConnectionViewModel {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { v4 } from "uuid";
|
||||
import * as React from "bloatless-react";
|
||||
import SettingsModel from "../../Model/Global/settingsModel";
|
||||
import { allTranslations, Translations } from "../../View/translations";
|
||||
import { HandlerManager } from "../../Model/Utility/utility";
|
||||
import StorageModel from "../../Model/Global/storageModel";
|
||||
import SettingsModel from "../../Model/Global/settingsModel";
|
||||
import FileTransferModel from "../../Model/Global/fileTransferModel";
|
||||
import ConnectionModel from "../../Model/Global/connectionModel";
|
||||
import ChatListModel from "../../Model/Chat/chatListModel";
|
||||
import FileTransferModel from "../../Model/Global/fileTransferModel";
|
||||
import { v4 } from "uuid";
|
||||
import { HandlerManager } from "../../Model/Utility/utility";
|
||||
|
||||
export default class CoreViewModel {
|
||||
readonly BUILD = "Build 26.04.16.A";
|
||||
@@ -72,7 +72,8 @@ export default class CoreViewModel {
|
||||
|
||||
handleChron = (): void => {
|
||||
const newDate = new Date();
|
||||
if (this.unwrappedTodayDate.toDateString() == newDate.toDateString()) return;
|
||||
if (this.unwrappedTodayDate.toDateString() == newDate.toDateString())
|
||||
return;
|
||||
this.todayDate.value = new Date();
|
||||
};
|
||||
|
||||
|
||||
@@ -1,16 +1,12 @@
|
||||
import * as React from "bloatless-react";
|
||||
|
||||
import FileTransferModel, {
|
||||
TransferData,
|
||||
} from "../../Model/Global/fileTransferModel";
|
||||
import CoreViewModel, { Context } from "./coreViewModel";
|
||||
import { CommonKeys } from "../../View/keystrokes";
|
||||
import StorageModel, {
|
||||
StorageModelSubPaths,
|
||||
filePaths,
|
||||
} from "../../Model/Global/storageModel";
|
||||
|
||||
import { TransferData } from "../../Model/Global/fileTransferModel";
|
||||
import ChatModel from "../../Model/Chat/chatModel";
|
||||
import CoreViewModel, { Context } from "./coreViewModel";
|
||||
import { CommonKeys } from "../../View/keystrokes";
|
||||
|
||||
export default class FileTransferViewModel extends Context {
|
||||
// state
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as React from "bloatless-react";
|
||||
import ChatModel, { ChatMessage } from "../../Model/Chat/chatModel";
|
||||
import ChatListViewModel from "../Chat/chatListViewModel";
|
||||
import { ChatPageTypes } from "../Chat/chatViewModel";
|
||||
import ChatListViewModel from "../Chat/chatListViewModel";
|
||||
import ChatModel, { ChatMessage } from "../../Model/Chat/chatModel";
|
||||
|
||||
export default class NotificationViewModel {
|
||||
// data
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import * as React from "bloatless-react";
|
||||
|
||||
import CoreViewModel, { Context } from "./coreViewModel";
|
||||
import { Languages, ThemeSettings } from "../../Model/Global/settingsModel";
|
||||
import { CommonKeys } from "../../View/keystrokes";
|
||||
import { Languages, ThemeSettings } from "../../Model/Global/settingsModel";
|
||||
|
||||
export default class SettingsViewModel extends Context {
|
||||
// state
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
import * as React from "bloatless-react";
|
||||
|
||||
import CoreViewModel, { Context } from "./coreViewModel";
|
||||
import { CommonKeys } from "../../View/keystrokes";
|
||||
import StorageModel, {
|
||||
PATH_COMPONENT_SEPARATOR,
|
||||
} from "../../Model/Global/storageModel";
|
||||
|
||||
import CoreViewModel, { Context } from "./coreViewModel";
|
||||
import { CommonKeys } from "../../View/keystrokes";
|
||||
|
||||
export default class StorageViewModel extends Context {
|
||||
// state
|
||||
isShowingStorageModal: React.State<boolean> = new React.State(false);
|
||||
|
||||
@@ -1,19 +1,17 @@
|
||||
import * as React from "bloatless-react";
|
||||
|
||||
import TaskViewModel from "./taskViewModel";
|
||||
import TaskPageViewModel from "./taskPageViewModel";
|
||||
import TaskContainingPageViewModel from "./taskContainingPageViewModel";
|
||||
import SearchViewModel from "../Utility/searchViewModel";
|
||||
import CoreViewModel from "../Global/coreViewModel";
|
||||
import ChatViewModel, { ChatPageTypes } from "../Chat/chatViewModel";
|
||||
import { Colors } from "../../colors";
|
||||
import { CommonKeys } from "../../View/keystrokes";
|
||||
import BoardsAndTasksModel, {
|
||||
BoardInfoFileContent,
|
||||
TaskFileContent,
|
||||
} from "../../Model/Files/boardsAndTasksModel";
|
||||
|
||||
import ChatViewModel, { ChatPageTypes } from "../Chat/chatViewModel";
|
||||
import { Colors } from "../../colors";
|
||||
import CoreViewModel from "../Global/coreViewModel";
|
||||
import SearchViewModel from "../Utility/searchViewModel";
|
||||
import TaskContainingPageViewModel from "./taskContainingPageViewModel";
|
||||
import TaskPageViewModel from "./taskPageViewModel";
|
||||
import TaskViewModel from "./taskViewModel";
|
||||
import { CommonKeys } from "../../View/keystrokes";
|
||||
|
||||
export default class BoardViewModel extends TaskContainingPageViewModel {
|
||||
// state
|
||||
name: React.State<string> = new React.State("");
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
import * as React from "bloatless-react";
|
||||
|
||||
import TaskViewModel from "./taskViewModel";
|
||||
import TaskContainingPageViewModel from "./taskContainingPageViewModel";
|
||||
import CoreViewModel from "../Global/coreViewModel";
|
||||
import ChatViewModel, { ChatPageTypes } from "../Chat/chatViewModel";
|
||||
import { CommonKeys } from "../../View/keystrokes";
|
||||
import CalendarModel, { MonthGrid } from "../../Model/Files/calendarModel";
|
||||
import BoardsAndTasksModel, {
|
||||
TaskFileContent,
|
||||
} from "../../Model/Files/boardsAndTasksModel";
|
||||
import CalendarModel, { MonthGrid } from "../../Model/Files/calendarModel";
|
||||
|
||||
import ChatViewModel, { ChatPageTypes } from "../Chat/chatViewModel";
|
||||
import CoreViewModel from "../Global/coreViewModel";
|
||||
import TaskContainingPageViewModel from "./taskContainingPageViewModel";
|
||||
import TaskViewModel from "./taskViewModel";
|
||||
import { CommonKeys } from "../../View/keystrokes";
|
||||
|
||||
export const CALENDAR_EVENT_BOARD_ID = "events";
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { CommonKeys } from "../../View/keystrokes";
|
||||
import ConnectionViewModel from "../Global/connectionViewModel";
|
||||
import CoreViewModel, { Context } from "../Global/coreViewModel";
|
||||
import FileTransferViewModel from "../Global/fileTransferViewModel";
|
||||
import SettingsViewModel from "../Global/settingsViewModel";
|
||||
import StorageViewModel from "../Global/storageViewModel";
|
||||
import SettingsViewModel from "../Global/settingsViewModel";
|
||||
import FileTransferViewModel from "../Global/fileTransferViewModel";
|
||||
import CoreViewModel, { Context } from "../Global/coreViewModel";
|
||||
import ConnectionViewModel from "../Global/connectionViewModel";
|
||||
import { CommonKeys } from "../../View/keystrokes";
|
||||
|
||||
export default class HomeViewModel extends Context {
|
||||
constructor(
|
||||
|
||||
@@ -1,16 +1,14 @@
|
||||
import * as React from "bloatless-react";
|
||||
|
||||
import SearchViewModel from "../Utility/searchViewModel";
|
||||
import CoreViewModel, { Context } from "../Global/coreViewModel";
|
||||
import ChatViewModel, { ChatPageTypes } from "../Chat/chatViewModel";
|
||||
import ChatMessageViewModel from "../Chat/chatMessageViewModel";
|
||||
import { CommonKeys } from "../../View/keystrokes";
|
||||
import {
|
||||
ChatMessage,
|
||||
ChatMessageReaction,
|
||||
ReactionSymbols,
|
||||
} from "../../Model/Chat/chatModel";
|
||||
import ChatMessageViewModel from "../Chat/chatMessageViewModel";
|
||||
import ChatViewModel, { ChatPageTypes } from "../Chat/chatViewModel";
|
||||
import CoreViewModel, { Context } from "../Global/coreViewModel";
|
||||
import SearchViewModel from "../Utility/searchViewModel";
|
||||
import { v4 } from "uuid";
|
||||
import { CommonKeys } from "../../View/keystrokes";
|
||||
|
||||
export default class MessagePageViewModel extends Context {
|
||||
// state
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import * as React from "bloatless-react";
|
||||
|
||||
import CoreViewModel, { Context } from "../Global/coreViewModel";
|
||||
import ChatViewModel, { ChatPageTypes } from "../Chat/chatViewModel";
|
||||
import { Colors } from "../../colors";
|
||||
import CoreViewModel, { Context } from "../Global/coreViewModel";
|
||||
|
||||
export default class SettingsPageViewModel extends Context {
|
||||
// state
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
import * as React from "bloatless-react";
|
||||
|
||||
import TaskViewModel from "./taskViewModel";
|
||||
import CoreViewModel, { Context } from "../Global/coreViewModel";
|
||||
import ChatViewModel from "../Chat/chatViewModel";
|
||||
import { IndexManager } from "../../Model/Utility/utility";
|
||||
import BoardsAndTasksModel, {
|
||||
TaskFileContent,
|
||||
} from "../../Model/Files/boardsAndTasksModel";
|
||||
|
||||
import ChatViewModel from "../Chat/chatViewModel";
|
||||
import CoreViewModel, { Context } from "../Global/coreViewModel";
|
||||
import { IndexManager } from "../../Model/Utility/utility";
|
||||
import TaskViewModel from "./taskViewModel";
|
||||
|
||||
export default class TaskContainingPageViewModel extends Context {
|
||||
// state
|
||||
readonly taskIndexManager = new IndexManager<TaskViewModel>(
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
import * as React from "bloatless-react";
|
||||
|
||||
import BoardViewModel from "./boardViewModel";
|
||||
import CoreViewModel, { ContextHost } from "../Global/coreViewModel";
|
||||
import ChatViewModel, { ChatPageTypes } from "../Chat/chatViewModel";
|
||||
import { CommonKeys } from "../../View/keystrokes";
|
||||
import { IndexManager } from "../../Model/Utility/utility";
|
||||
import BoardsAndTasksModel, {
|
||||
BoardInfoFileContent,
|
||||
} from "../../Model/Files/boardsAndTasksModel";
|
||||
|
||||
import BoardViewModel, { BoardPageTypes } from "./boardViewModel";
|
||||
import ChatViewModel, { ChatPageTypes } from "../Chat/chatViewModel";
|
||||
import CoreViewModel, { Context, ContextHost } from "../Global/coreViewModel";
|
||||
import { IndexManager } from "../../Model/Utility/utility";
|
||||
import { CommonKeys } from "../../View/keystrokes";
|
||||
|
||||
export default class TaskPageViewModel extends ContextHost<string> {
|
||||
// data
|
||||
readonly boardIndexManager = new IndexManager<BoardViewModel>(
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
import * as React from "bloatless-react";
|
||||
|
||||
import TaskContainingPageViewModel from "./taskContainingPageViewModel";
|
||||
import CoreViewModel, { Context } from "../Global/coreViewModel";
|
||||
import ChatViewModel from "../Chat/chatViewModel";
|
||||
import { ViewController } from "../../View/viewController";
|
||||
import { CommonKeys } from "../../View/keystrokes";
|
||||
import { localeCompare, padZero } from "../../Model/Utility/utility";
|
||||
import BoardsAndTasksModel, {
|
||||
TaskFileContent,
|
||||
} from "../../Model/Files/boardsAndTasksModel";
|
||||
import { localeCompare, padZero } from "../../Model/Utility/utility";
|
||||
|
||||
import ChatViewModel from "../Chat/chatViewModel";
|
||||
import CoreViewModel, { Context } from "../Global/coreViewModel";
|
||||
import TaskContainingPageViewModel from "./taskContainingPageViewModel";
|
||||
import { CommonKeys } from "../../View/keystrokes";
|
||||
import { ViewController } from "../../View/viewController";
|
||||
|
||||
export default class TaskViewModel extends Context {
|
||||
// util
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import * as React from "bloatless-react";
|
||||
|
||||
import { checkDoesObjectMatchSearch } from "../../Model/Utility/utility";
|
||||
|
||||
export default class SearchViewModel<T> {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import * as React from "bloatless-react";
|
||||
|
||||
import TaskViewModel from "../Pages/taskViewModel";
|
||||
|
||||
export default class TaskPropertyBulkChangeViewModel {
|
||||
|
||||
Reference in New Issue
Block a user