add full screen view for task description

This commit is contained in:
marlon-erler
2026-09-22 21:33:20 +02:00
parent 3a2569b24e
commit d92a13dadb
11 changed files with 87 additions and 22 deletions
+22 -14
View File
@@ -1274,7 +1274,7 @@
this.connectionModel = connectionModel2;
this.chatListModel = chatListModel2;
this.fileTransferModel = fileTransferModel2;
this.BUILD = "Build 26.09.21.C";
this.BUILD = "Build 26.09.22.A";
// CONTEXT
this.contextStack = /* @__PURE__ */ new Map();
this.closeContext = (contextId, fromHistoryEvent = false) => {
@@ -1289,7 +1289,9 @@
}
};
this.handleKeyDown = (e) => {
if (!(e instanceof KeyboardEvent)) return console.trace("NOT A KEY EVENT");
if (_CoreViewModel.checkIsKeystroke(e) == false) return;
console.log(e.key);
e.preventDefault();
const contexts = this.contexts;
while (contexts.length > 0) {
@@ -1313,10 +1315,6 @@
};
// DRAG & DROP
this.draggedObject = new State(void 0);
// SUGGESTIONS
// boards & tasks
this.taskCategorySuggestions = new ListState();
this.taskStatusSuggestions = new ListState();
this.translations = allTranslations[settingsModel2.language] || allTranslations.en;
document.body.addEventListener("keydown", this.handleKeyDown);
window.onpopstate = () => {
@@ -2345,8 +2343,15 @@
this.handleFileContent = (fileContent) => {
const didStore = this.storeFileContent(fileContent);
if (didStore == false) return;
switch (fileContent.type) {
case "board-info":
case "task":
this.boardsAndTasksModel.handleFileContent(fileContent);
break;
case "reaction":
this.chatModel.handleReaction(fileContent);
break;
}
};
// methods
this.addFileContentAndSend = (fileContent) => {
@@ -2839,15 +2844,15 @@
this.index.value = index;
};
this.updateSuggestions = () => {
if (this.coreViewModel.taskCategorySuggestions.value.has(
if (this.containingViewModel.taskCategorySuggestions.value.has(
this.category.value
) == false) {
this.coreViewModel.taskCategorySuggestions.add(this.category.value);
this.containingViewModel.taskCategorySuggestions.add(this.category.value);
}
if (this.coreViewModel.taskStatusSuggestions.value.has(
if (this.containingViewModel.taskStatusSuggestions.value.has(
this.status.value
) == false) {
this.coreViewModel.taskStatusSuggestions.add(this.status.value);
this.containingViewModel.taskStatusSuggestions.add(this.status.value);
}
};
// settings
@@ -2964,6 +2969,8 @@
);
this.selectedTaskViewModel = new State(void 0);
this.taskViewModels = new MapState();
this.taskCategorySuggestions = new ListState();
this.taskStatusSuggestions = new ListState();
// methods
this.createTaskFromBoardId = (boardId) => {
const taskFileContent = this.boardsAndTasksModel.createTask(boardId);
@@ -3180,6 +3187,7 @@
this,
taskFileContent
);
console.log("STILL HERE", taskFileContent.fileId);
this.taskViewModels.set(taskFileContent.fileId, taskViewModel);
};
this.removeTaskFromView = (taskFileContent) => {
@@ -3303,7 +3311,7 @@
this.registerKeyStroke("backspace" /* CloseOrCancel */, this.hideFilterModal);
this.registerKeyStroke("," /* Settings */, this.showSettings);
this.registerKeyStroke("enter" /* Apply */, this.hideSettings);
this.registerKeyStroke(";" /* Create */, this.createTask);
this.registerKeyStroke("a" /* Create */, this.createTask);
this.registerKeyStroke(
"j",
() => this.selectedPage.value = "list" /* List */
@@ -4277,7 +4285,7 @@
}
});
this.registerKeyStroke("-" /* Reset */, this.resetFilter);
this.registerKeyStroke(";" /* Create */, this.setFocus);
this.registerKeyStroke("a" /* Create */, this.setFocus);
this.chatViewModel.registerContext("messages" /* Messages */, this);
}
};
@@ -4444,7 +4452,7 @@
this.registerKeyStroke("-" /* Reset */, this.showToday);
this.registerKeyStroke("k", this.showPreviousMonth);
this.registerKeyStroke("l", this.showNextMonth);
this.registerKeyStroke(";" /* Create */, this.createEvent);
this.registerKeyStroke("a" /* Create */, this.createEvent);
this.chatViewModel.registerContext("calendar" /* Calendar */, this);
}
// data
@@ -5445,7 +5453,7 @@
hidden: true,
id: categorySuggestionId,
"children:append": [
taskViewModel.coreViewModel.taskCategorySuggestions,
taskViewModel.containingViewModel.taskCategorySuggestions,
StringToOption
]
}
@@ -5461,7 +5469,7 @@
hidden: true,
id: statusSuggestionId,
"children:append": [
taskViewModel.coreViewModel.taskStatusSuggestions,
taskViewModel.containingViewModel.taskStatusSuggestions,
StringToOption
]
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
+37 -4
View File
@@ -25,9 +25,9 @@ export function TaskSettingsModal(
};
return (
<div class="modal task-settings" open>
<div class="modal task-settings" open toggle:full-description={taskViewModel.isPresentingFullScreenDescription}>
<div>
<main>
<main id="standard-main">
<h2>
{
coreViewModel.translations.chatPage.task
@@ -89,6 +89,18 @@ export function TaskSettingsModal(
></textarea>
</div>
</label>
<div class="flex-row justify-end">
<button
class="width-50"
on:click={taskViewModel.openFullscreenDecription}
>
{
coreViewModel.translations.chatPage.task.taskDescriptionExpandButton
}
<span class="icon">fullscreen</span>
</button>
</div>
</div>
<hr class="mobile-only"></hr>
@@ -228,7 +240,28 @@ export function TaskSettingsModal(
)}
</div>
</main>
<div class="flex-row width-100">
<main id="fullscreen-main">
<textarea
style="height: 100%; width: 100%; max-width: unset"
bind:value={taskViewModel.description}
></textarea>
</main>
<div
class="flex-row width-100"
id="fullscreen-exit"
>
<button
class="flex"
on:click={taskViewModel.closeFullscreenDecription}
>
{coreViewModel.translations.general.exitButton}
<span class="icon">fullscreen_exit</span>
</button>
</div>
<div
class="flex-row width-100"
id="controls"
>
<button
class="flex"
on:click={taskViewModel.closeAndDiscard}
@@ -245,5 +278,5 @@ export function TaskSettingsModal(
</div>
</div>
</div>
);
);
}
+12
View File
@@ -266,3 +266,15 @@ button
flex: 1;
}
}
.modal.task-settings:not([full-description]) :is(#fullscreen-exit, #fullscreen-main) {
display: none;
}
.modal.task-settings[full-description] :is(#controls, #standard-main) {
display: none;
}
.modal.task-settings[full-description] > div {
height: 100%;
}
+2
View File
@@ -14,6 +14,7 @@ const englishTranslations = {
cancelButton: "Cancel",
closeButton: "Close",
deleteButton: "Delete",
exitButton: "Exit",
continueButton: "Continue",
confirmButton: "Confirm",
@@ -285,6 +286,7 @@ const englishTranslations = {
taskPriorityLabel: "Priority",
taskDescriptionLabel: "Description",
taskDescriptionExpandButton: "Fullscreen",
taskDateLabel: "Date",
taskTimeLabel: "Time",
+1 -1
View File
@@ -9,7 +9,7 @@ import ConnectionModel from "../../Model/Global/connectionModel";
import ChatListModel from "../../Model/Chat/chatListModel";
export default class CoreViewModel {
readonly BUILD = "Build 26.09.21.C";
readonly BUILD = "Build 26.09.22.A";
translations: Translations;
Binary file not shown.
+10
View File
@@ -58,6 +58,8 @@ export default class TaskViewModel extends Context {
selectedVersionId: React.State<string> = new React.State("");
versionIds: React.ListState<string> = new React.ListState();
isPresentingFullScreenDescription: React.State<boolean> = new React.State(false);
// methods
dragStart = (event: DragEvent): void => {
ViewController.allowDrag(event);
@@ -96,6 +98,14 @@ export default class TaskViewModel extends Context {
this.save();
};
openFullscreenDecription = (): void => {
this.isPresentingFullScreenDescription.value = true;
}
closeFullscreenDecription = (): void => {
this.isPresentingFullScreenDescription.value = false;
}
updateIndex = (): void => {
const index: number =
this.containingViewModel.taskIndexManager.getIndex(this);