standardize use of public keyword

This commit is contained in:
marlon-erler
2026-04-09 16:54:56 +00:00
parent 78672afc40
commit 74ef30ea79
13 changed files with 47 additions and 115 deletions
+24 -22
View File
@@ -1662,9 +1662,12 @@
// src/ViewModel/Pages/taskViewModel.ts // src/ViewModel/Pages/taskViewModel.ts
var TaskViewModel = class { var TaskViewModel = class {
// init // init
constructor(coreViewModel2, chatViewModel, boardsAndTasksModel, containingModel, taskFileContent) { constructor(coreViewModel2, chatViewModel, boardsAndTasksModel, containingModel, task) {
this.coreViewModel = coreViewModel2; this.coreViewModel = coreViewModel2;
this.chatViewModel = chatViewModel; this.chatViewModel = chatViewModel;
this.boardsAndTasksModel = boardsAndTasksModel;
this.containingModel = containingModel;
this.task = task;
// paths // paths
this.getFilePath = () => { this.getFilePath = () => {
return this.boardsAndTasksModel.getTaskFilePath(this.task.fileId); return this.boardsAndTasksModel.getTaskFilePath(this.task.fileId);
@@ -1790,9 +1793,6 @@
this.selectedVersionId.value = this.task.fileContentId; this.selectedVersionId.value = this.task.fileContentId;
this.updateSuggestions(); this.updateSuggestions();
}; };
this.boardsAndTasksModel = boardsAndTasksModel;
this.containingModel = containingModel;
this.task = taskFileContent;
this.loadAllData(); this.loadAllData();
this.selectedVersionId.subscribeSilent((selectedVersionId) => { this.selectedVersionId.subscribeSilent((selectedVersionId) => {
this.switchVersion(selectedVersionId); this.switchVersion(selectedVersionId);
@@ -1831,6 +1831,7 @@
constructor(coreViewModel2, chatViewModel, boardsAndTasksModel) { constructor(coreViewModel2, chatViewModel, boardsAndTasksModel) {
this.coreViewModel = coreViewModel2; this.coreViewModel = coreViewModel2;
this.chatViewModel = chatViewModel; this.chatViewModel = chatViewModel;
this.boardsAndTasksModel = boardsAndTasksModel;
// state // state
this.taskIndexManager = new IndexManager( this.taskIndexManager = new IndexManager(
(taskViewModel) => taskViewModel.sortingString (taskViewModel) => taskViewModel.sortingString
@@ -1867,7 +1868,6 @@
taskViewModel.updateIndex(); taskViewModel.updateIndex();
} }
}; };
this.boardsAndTasksModel = boardsAndTasksModel;
} }
}; };
@@ -1879,6 +1879,8 @@
super(coreViewModel2, chatViewModel, boardsAndTasksModel); super(coreViewModel2, chatViewModel, boardsAndTasksModel);
this.coreViewModel = coreViewModel2; this.coreViewModel = coreViewModel2;
this.chatViewModel = chatViewModel; this.chatViewModel = chatViewModel;
this.calendarModel = calendarModel;
this.boardsAndTasksModel = boardsAndTasksModel;
// paths // paths
this.getBasePath = () => { this.getBasePath = () => {
return [...this.calendarModel.getViewPath()]; return [...this.calendarModel.getViewPath()];
@@ -2030,6 +2032,7 @@
// init // init
constructor(coreViewModel2, messagePageViewModel, chatMessage, sentByUser) { constructor(coreViewModel2, messagePageViewModel, chatMessage, sentByUser) {
this.coreViewModel = coreViewModel2; this.coreViewModel = coreViewModel2;
this.messagePageViewModel = messagePageViewModel;
this.body = new State(""); this.body = new State("");
this.status = new State( this.status = new State(
void 0 void 0
@@ -2122,7 +2125,6 @@
this.body.value = this.chatMessage.body; this.body.value = this.chatMessage.body;
this.status.value = this.chatMessage.status; this.status.value = this.chatMessage.status;
}; };
this.messagePageViewModel = messagePageViewModel;
this.chatMessage = chatMessage; this.chatMessage = chatMessage;
this.sentByUser = sentByUser; this.sentByUser = sentByUser;
this.loadData(); this.loadData();
@@ -2134,6 +2136,7 @@
// init // init
constructor(coreViewModel2, chatViewModel) { constructor(coreViewModel2, chatViewModel) {
this.coreViewModel = coreViewModel2; this.coreViewModel = coreViewModel2;
this.chatViewModel = chatViewModel;
// state // state
this.chatMessageViewModels = new MapState(); this.chatMessageViewModels = new MapState();
this.composingMessage = new State(""); this.composingMessage = new State("");
@@ -2193,7 +2196,6 @@
this.handleReaction(reaction); this.handleReaction(reaction);
} }
}; };
this.chatViewModel = chatViewModel;
this.cannotSendMessage = createProxyState( this.cannotSendMessage = createProxyState(
[ [
this.chatViewModel.settingsViewModel.username, this.chatViewModel.settingsViewModel.username,
@@ -2209,6 +2211,7 @@
// init // init
constructor(coreViewModel2, chatViewModel) { constructor(coreViewModel2, chatViewModel) {
this.coreViewModel = coreViewModel2; this.coreViewModel = coreViewModel2;
this.chatViewModel = chatViewModel;
// state // state
this.primaryChannel = new State(""); this.primaryChannel = new State("");
this.primaryChannelInput = new State(""); this.primaryChannelInput = new State("");
@@ -2283,7 +2286,6 @@
this.secondaryChannels.add(secondaryChannel); this.secondaryChannels.add(secondaryChannel);
} }
}; };
this.chatViewModel = chatViewModel;
this.loadListRelevantData(); this.loadListRelevantData();
this.cannotSetEncryptionKey = createProxyState( this.cannotSetEncryptionKey = createProxyState(
[this.encryptionKeyInput], [this.encryptionKeyInput],
@@ -2355,6 +2357,9 @@
super(coreViewModel2, chatViewModel, boardsAndTasksModel); super(coreViewModel2, chatViewModel, boardsAndTasksModel);
this.coreViewModel = coreViewModel2; this.coreViewModel = coreViewModel2;
this.chatViewModel = chatViewModel; this.chatViewModel = chatViewModel;
this.boardsAndTasksModel = boardsAndTasksModel;
this.taskPageViewModel = taskPageViewModel;
this.boardInfo = boardInfo;
// state // state
this.name = new State(""); this.name = new State("");
this.color = new State("standard" /* Standard */); this.color = new State("standard" /* Standard */);
@@ -2527,9 +2532,6 @@
this.loadTasks(); this.loadTasks();
this.loadSearchSuggestions(); this.loadSearchSuggestions();
}; };
this.boardsAndTasksModel = boardsAndTasksModel;
this.taskPageViewModel = taskPageViewModel;
this.boardInfo = boardInfo;
this.loadListRelevantData(); this.loadListRelevantData();
this.isSelected = createProxyState( this.isSelected = createProxyState(
[this.taskPageViewModel.selectedBoardId], [this.taskPageViewModel.selectedBoardId],
@@ -2567,9 +2569,10 @@
// src/ViewModel/Pages/taskPageViewModel.ts // src/ViewModel/Pages/taskPageViewModel.ts
var TaskPageViewModel = class { var TaskPageViewModel = class {
// init // init
constructor(coreViewModel2, chatViewModel, boardModel) { constructor(coreViewModel2, chatViewModel, boardsAndTasksModel) {
this.coreViewModel = coreViewModel2; this.coreViewModel = coreViewModel2;
this.chatViewModel = chatViewModel; this.chatViewModel = chatViewModel;
this.boardsAndTasksModel = boardsAndTasksModel;
// data // data
this.boardIndexManager = new IndexManager( this.boardIndexManager = new IndexManager(
(boardViewModel) => boardViewModel.name.value (boardViewModel) => boardViewModel.name.value
@@ -2674,10 +2677,9 @@
this.updateBoardIndices(); this.updateBoardIndices();
this.openLastUsedBoard(); this.openLastUsedBoard();
}; };
this.boardsAndTasksModel = boardModel;
this.chatViewModel = chatViewModel; this.chatViewModel = chatViewModel;
this.loadData(); this.loadData();
boardModel.boardHandlerManager.addHandler( boardsAndTasksModel.boardHandlerManager.addHandler(
(boardInfoFileContent) => { (boardInfoFileContent) => {
this.showBoardInList(boardInfoFileContent); this.showBoardInList(boardInfoFileContent);
this.updateBoardIndices(); this.updateBoardIndices();
@@ -2691,6 +2693,11 @@
// init // init
constructor(coreViewModel2, chatModel, settingsViewModel2, notificationViewModel, connectionViewModel2, chatListViewModel2) { constructor(coreViewModel2, chatModel, settingsViewModel2, notificationViewModel, connectionViewModel2, chatListViewModel2) {
this.coreViewModel = coreViewModel2; this.coreViewModel = coreViewModel2;
this.chatModel = chatModel;
this.settingsViewModel = settingsViewModel2;
this.notificationViewModel = notificationViewModel;
this.connectionViewModel = connectionViewModel2;
this.chatListViewModel = chatListViewModel2;
// state // state
this.displayedColor = new State("standard" /* Standard */); this.displayedColor = new State("standard" /* Standard */);
this.selectedPage = new State( this.selectedPage = new State(
@@ -2764,11 +2771,6 @@
} }
); );
}; };
this.chatModel = chatModel;
this.settingsViewModel = settingsViewModel2;
this.connectionViewModel = connectionViewModel2;
this.notificationViewModel = notificationViewModel;
this.chatListViewModel = chatListViewModel2;
this.calendarViewModel = new CalendarPageViewModel( this.calendarViewModel = new CalendarPageViewModel(
coreViewModel2, coreViewModel2,
this, this,
@@ -2811,6 +2813,7 @@
var NotificationViewModel = class _NotificationViewModel { var NotificationViewModel = class _NotificationViewModel {
// init // init
constructor(chatListViewModel2) { constructor(chatListViewModel2) {
this.chatListViewModel = chatListViewModel2;
// data // data
this.seenMessageIds = /* @__PURE__ */ new Set(); this.seenMessageIds = /* @__PURE__ */ new Set();
this.messagesInMarquee = []; this.messagesInMarquee = [];
@@ -2864,7 +2867,6 @@
this.stopLoop(); this.stopLoop();
this.startLoop(); this.startLoop();
}; };
this.chatListViewModel = chatListViewModel2;
} }
// util // util
static createNotification(message) { static createNotification(message) {
@@ -2882,6 +2884,8 @@
// init // init
constructor(coreViewModel2, settingsViewModel2, connectionViewModel2) { constructor(coreViewModel2, settingsViewModel2, connectionViewModel2) {
this.coreViewModel = coreViewModel2; this.coreViewModel = coreViewModel2;
this.settingsViewModel = settingsViewModel2;
this.connectionViewModel = connectionViewModel2;
// data // data
this.chatIndexManager = new IndexManager( this.chatIndexManager = new IndexManager(
(chatViewModel) => chatViewModel.settingsPageViewModel.primaryChannel.value (chatViewModel) => chatViewModel.settingsPageViewModel.primaryChannel.value
@@ -2947,9 +2951,7 @@
} }
this.updateIndices(); this.updateIndices();
}; };
this.settingsViewModel = settingsViewModel2;
this.notificationViewModel = new NotificationViewModel(this); this.notificationViewModel = new NotificationViewModel(this);
this.connectionViewModel = connectionViewModel2;
this.loadChats(); this.loadChats();
} }
}; };
+2 -6
View File
@@ -11,9 +11,7 @@ import ConnectionViewModel from "../Global/connectionViewModel";
import NotificationViewModel from "../Global/notificationViewModel"; import NotificationViewModel from "../Global/notificationViewModel";
export default class ChatListViewModel { export default class ChatListViewModel {
settingsViewModel: SettingsViewModel;
notificationViewModel: NotificationViewModel; notificationViewModel: NotificationViewModel;
connectionViewModel: ConnectionViewModel;
// data // data
chatIndexManager: IndexManager<ChatViewModel> = new IndexManager( chatIndexManager: IndexManager<ChatViewModel> = new IndexManager(
@@ -99,12 +97,10 @@ export default class ChatListViewModel {
// init // init
constructor( constructor(
public coreViewModel: CoreViewModel, public coreViewModel: CoreViewModel,
settingsViewModel: SettingsViewModel, public settingsViewModel: SettingsViewModel,
connectionViewModel: ConnectionViewModel, public connectionViewModel: ConnectionViewModel,
) { ) {
this.settingsViewModel = settingsViewModel;
this.notificationViewModel = new NotificationViewModel(this); this.notificationViewModel = new NotificationViewModel(this);
this.connectionViewModel = connectionViewModel;
this.loadChats(); this.loadChats();
} }
+1 -5
View File
@@ -12,8 +12,6 @@ import CoreViewModel from "../Global/coreViewModel";
import MessagePageViewModel from "../Pages/messagePageViewModel"; import MessagePageViewModel from "../Pages/messagePageViewModel";
export default class ChatMessageViewModel { export default class ChatMessageViewModel {
messagePageViewModel: MessagePageViewModel;
// data // data
chatMessage: ChatMessage; chatMessage: ChatMessage;
channel: string; channel: string;
@@ -126,12 +124,10 @@ export default class ChatMessageViewModel {
// init // init
constructor( constructor(
public coreViewModel: CoreViewModel, public coreViewModel: CoreViewModel,
messagePageViewModel: MessagePageViewModel, public messagePageViewModel: MessagePageViewModel,
chatMessage: ChatMessage, chatMessage: ChatMessage,
sentByUser: boolean, sentByUser: boolean,
) { ) {
this.messagePageViewModel = messagePageViewModel;
this.chatMessage = chatMessage; this.chatMessage = chatMessage;
this.sentByUser = sentByUser; this.sentByUser = sentByUser;
this.loadData(); this.loadData();
+5 -19
View File
@@ -24,13 +24,6 @@ import ConnectionViewModel from "../Global/connectionViewModel";
import NotificationViewModel from "../Global/notificationViewModel"; import NotificationViewModel from "../Global/notificationViewModel";
export default class ChatViewModel { export default class ChatViewModel {
chatModel: ChatModel;
settingsViewModel: SettingsViewModel;
notificationViewModel: NotificationViewModel;
connectionViewModel: ConnectionViewModel;
chatListViewModel: ChatListViewModel;
calendarViewModel: CalendarPageViewModel; calendarViewModel: CalendarPageViewModel;
taskPageViewModel: TaskPageViewModel; taskPageViewModel: TaskPageViewModel;
messagePageViewModel: MessagePageViewModel; messagePageViewModel: MessagePageViewModel;
@@ -132,19 +125,12 @@ export default class ChatViewModel {
// init // init
constructor( constructor(
public coreViewModel: CoreViewModel, public coreViewModel: CoreViewModel,
chatModel: ChatModel, public chatModel: ChatModel,
settingsViewModel: SettingsViewModel, public settingsViewModel: SettingsViewModel,
notificationViewModel: NotificationViewModel, public notificationViewModel: NotificationViewModel,
connectionViewModel: ConnectionViewModel, public connectionViewModel: ConnectionViewModel,
chatListViewModel: ChatListViewModel, public chatListViewModel: ChatListViewModel,
) { ) {
// models
this.chatModel = chatModel;
this.settingsViewModel = settingsViewModel;
this.connectionViewModel = connectionViewModel;
this.notificationViewModel = notificationViewModel;
this.chatListViewModel = chatListViewModel;
// page viewModels // page viewModels
this.calendarViewModel = new CalendarPageViewModel( this.calendarViewModel = new CalendarPageViewModel(
coreViewModel, coreViewModel,
@@ -8,7 +8,6 @@ import StorageModel, {
filePaths, filePaths,
} from "../../Model/Global/storageModel"; } from "../../Model/Global/storageModel";
import ChatListModel from "../../Model/Chat/chatListModel";
import ChatModel from "../../Model/Chat/chatModel"; import ChatModel from "../../Model/Chat/chatModel";
import CoreViewModel from "./coreViewModel"; import CoreViewModel from "./coreViewModel";
@@ -4,8 +4,6 @@ import ChatListViewModel from "../Chat/chatListViewModel";
import { ChatPageTypes } from "../Chat/chatViewModel"; import { ChatPageTypes } from "../Chat/chatViewModel";
export default class NotificationViewModel { export default class NotificationViewModel {
chatListViewModel: ChatListViewModel;
// data // data
seenMessageIds = new Set<string>(); seenMessageIds = new Set<string>();
messagesInMarquee: Notification[] = []; messagesInMarquee: Notification[] = [];
@@ -78,9 +76,7 @@ export default class NotificationViewModel {
}; };
// init // init
constructor(chatListViewModel: ChatListViewModel) { constructor(public chatListViewModel: ChatListViewModel) {}
this.chatListViewModel = chatListViewModel;
}
// util // util
static createNotification(message: ChatMessage): Notification { static createNotification(message: ChatMessage): Notification {
+3 -15
View File
@@ -15,13 +15,6 @@ import TaskPageViewModel from "./taskPageViewModel";
import TaskViewModel from "./taskViewModel"; import TaskViewModel from "./taskViewModel";
export default class BoardViewModel extends TaskContainingPageViewModel { export default class BoardViewModel extends TaskContainingPageViewModel {
boardsAndTasksModel: BoardsAndTasksModel;
taskPageViewModel: TaskPageViewModel;
// data
boardInfo: BoardInfoFileContent;
// state // state
name: React.State<string> = new React.State(""); name: React.State<string> = new React.State("");
color: React.State<Colors> = new React.State<any>(Colors.Standard); color: React.State<Colors> = new React.State<any>(Colors.Standard);
@@ -248,17 +241,12 @@ export default class BoardViewModel extends TaskContainingPageViewModel {
constructor( constructor(
public coreViewModel: CoreViewModel, public coreViewModel: CoreViewModel,
public chatViewModel: ChatViewModel, public chatViewModel: ChatViewModel,
boardsAndTasksModel: BoardsAndTasksModel, public boardsAndTasksModel: BoardsAndTasksModel,
taskPageViewModel: TaskPageViewModel, public taskPageViewModel: TaskPageViewModel,
boardInfo: BoardInfoFileContent, public boardInfo: BoardInfoFileContent,
) { ) {
super(coreViewModel, chatViewModel, boardsAndTasksModel); super(coreViewModel, chatViewModel, boardsAndTasksModel);
// set
this.boardsAndTasksModel = boardsAndTasksModel;
this.taskPageViewModel = taskPageViewModel;
this.boardInfo = boardInfo;
// load // load
this.loadListRelevantData(); this.loadListRelevantData();
+2 -5
View File
@@ -14,9 +14,6 @@ import TaskViewModel from "./taskViewModel";
export const CALENDAR_EVENT_BOARD_ID = "events"; export const CALENDAR_EVENT_BOARD_ID = "events";
export default class CalendarPageViewModel extends TaskContainingPageViewModel { export default class CalendarPageViewModel extends TaskContainingPageViewModel {
calendarModel: CalendarModel;
boardsAndTasksModel: BoardsAndTasksModel;
// data // data
get monthString(): string { get monthString(): string {
return CalendarModel.getMonthString( return CalendarModel.getMonthString(
@@ -188,8 +185,8 @@ export default class CalendarPageViewModel extends TaskContainingPageViewModel {
constructor( constructor(
public coreViewModel: CoreViewModel, public coreViewModel: CoreViewModel,
public chatViewModel: ChatViewModel, public chatViewModel: ChatViewModel,
calendarModel: CalendarModel, public calendarModel: CalendarModel,
boardsAndTasksModel: BoardsAndTasksModel, public boardsAndTasksModel: BoardsAndTasksModel,
) { ) {
super(coreViewModel, chatViewModel, boardsAndTasksModel); super(coreViewModel, chatViewModel, boardsAndTasksModel);
+1 -5
View File
@@ -10,8 +10,6 @@ import ChatViewModel from "../Chat/chatViewModel";
import CoreViewModel from "../Global/coreViewModel"; import CoreViewModel from "../Global/coreViewModel";
export default class MessagePageViewModel { export default class MessagePageViewModel {
chatViewModel: ChatViewModel;
// state // state
chatMessageViewModels: React.MapState<ChatMessageViewModel> = chatMessageViewModels: React.MapState<ChatMessageViewModel> =
new React.MapState(); new React.MapState();
@@ -97,10 +95,8 @@ export default class MessagePageViewModel {
// init // init
constructor( constructor(
public coreViewModel: CoreViewModel, public coreViewModel: CoreViewModel,
chatViewModel: ChatViewModel, public chatViewModel: ChatViewModel,
) { ) {
this.chatViewModel = chatViewModel;
this.cannotSendMessage = React.createProxyState( this.cannotSendMessage = React.createProxyState(
[ [
this.chatViewModel.settingsViewModel.username, this.chatViewModel.settingsViewModel.username,
+1 -4
View File
@@ -5,8 +5,6 @@ import { Colors } from "../../colors";
import CoreViewModel from "../Global/coreViewModel"; import CoreViewModel from "../Global/coreViewModel";
export default class SettingsPageViewModel { export default class SettingsPageViewModel {
chatViewModel: ChatViewModel;
// state // state
primaryChannel: React.State<string> = new React.State(""); primaryChannel: React.State<string> = new React.State("");
primaryChannelInput: React.State<string> = new React.State(""); primaryChannelInput: React.State<string> = new React.State("");
@@ -113,9 +111,8 @@ export default class SettingsPageViewModel {
// init // init
constructor( constructor(
public coreViewModel: CoreViewModel, public coreViewModel: CoreViewModel,
chatViewModel: ChatViewModel, public chatViewModel: ChatViewModel,
) { ) {
this.chatViewModel = chatViewModel;
this.loadListRelevantData(); this.loadListRelevantData();
this.cannotSetEncryptionKey = React.createProxyState( this.cannotSetEncryptionKey = React.createProxyState(
@@ -10,8 +10,6 @@ import { IndexManager } from "../../Model/Utility/utility";
import TaskViewModel from "./taskViewModel"; import TaskViewModel from "./taskViewModel";
export default class TaskContainingPageViewModel { export default class TaskContainingPageViewModel {
boardsAndTasksModel: BoardsAndTasksModel;
// state // state
taskIndexManager: IndexManager<TaskViewModel> = new IndexManager( taskIndexManager: IndexManager<TaskViewModel> = new IndexManager(
(taskViewModel: TaskViewModel) => taskViewModel.sortingString, (taskViewModel: TaskViewModel) => taskViewModel.sortingString,
@@ -60,8 +58,6 @@ export default class TaskContainingPageViewModel {
constructor( constructor(
public coreViewModel: CoreViewModel, public coreViewModel: CoreViewModel,
public chatViewModel: ChatViewModel, public chatViewModel: ChatViewModel,
boardsAndTasksModel: BoardsAndTasksModel, public boardsAndTasksModel: BoardsAndTasksModel,
) { ) {}
this.boardsAndTasksModel = boardsAndTasksModel;
}
} }
+2 -7
View File
@@ -8,11 +8,8 @@ import BoardViewModel from "./boardViewModel";
import ChatViewModel from "../Chat/chatViewModel"; import ChatViewModel from "../Chat/chatViewModel";
import CoreViewModel from "../Global/coreViewModel"; import CoreViewModel from "../Global/coreViewModel";
import { IndexManager } from "../../Model/Utility/utility"; import { IndexManager } from "../../Model/Utility/utility";
import StorageModel from "../../Model/Global/storageModel";
export default class TaskPageViewModel { export default class TaskPageViewModel {
boardsAndTasksModel: BoardsAndTasksModel;
// data // data
boardIndexManager: IndexManager<BoardViewModel> = new IndexManager( boardIndexManager: IndexManager<BoardViewModel> = new IndexManager(
(boardViewModel: BoardViewModel) => boardViewModel.name.value, (boardViewModel: BoardViewModel) => boardViewModel.name.value,
@@ -155,16 +152,14 @@ export default class TaskPageViewModel {
constructor( constructor(
public coreViewModel: CoreViewModel, public coreViewModel: CoreViewModel,
public chatViewModel: ChatViewModel, public chatViewModel: ChatViewModel,
boardModel: BoardsAndTasksModel, public boardsAndTasksModel: BoardsAndTasksModel,
) { ) {
this.boardsAndTasksModel = boardModel;
this.chatViewModel = chatViewModel; this.chatViewModel = chatViewModel;
this.loadData(); this.loadData();
// handlers // handlers
boardModel.boardHandlerManager.addHandler( boardsAndTasksModel.boardHandlerManager.addHandler(
(boardInfoFileContent: BoardInfoFileContent) => { (boardInfoFileContent: BoardInfoFileContent) => {
this.showBoardInList(boardInfoFileContent); this.showBoardInList(boardInfoFileContent);
this.updateBoardIndices(); this.updateBoardIndices();
+3 -15
View File
@@ -11,13 +11,6 @@ import TaskContainingPageViewModel from "./taskContainingPageViewModel";
import { allowDrag } from "../../View/utility"; import { allowDrag } from "../../View/utility";
export default class TaskViewModel { export default class TaskViewModel {
boardsAndTasksModel: BoardsAndTasksModel;
containingModel: TaskContainingPageViewModel;
// data
task: TaskFileContent;
get sortingString(): string { get sortingString(): string {
const splitDate: string[] = this.date.value.split("-"); const splitDate: string[] = this.date.value.split("-");
const year = padZero(splitDate[0], 4); const year = padZero(splitDate[0], 4);
@@ -213,15 +206,10 @@ export default class TaskViewModel {
constructor( constructor(
public coreViewModel: CoreViewModel, public coreViewModel: CoreViewModel,
public chatViewModel: ChatViewModel, public chatViewModel: ChatViewModel,
boardsAndTasksModel: BoardsAndTasksModel, public boardsAndTasksModel: BoardsAndTasksModel,
containingModel: TaskContainingPageViewModel, public containingModel: TaskContainingPageViewModel,
taskFileContent: TaskFileContent, public task: TaskFileContent,
) { ) {
this.boardsAndTasksModel = boardsAndTasksModel;
this.containingModel = containingModel;
this.task = taskFileContent;
// load // load
this.loadAllData(); this.loadAllData();