implement task version history
This commit is contained in:
@@ -13,3 +13,12 @@ export const StringToOption: React.StateItemConverter<string> = (
|
||||
) => {
|
||||
return Option(string, string, false);
|
||||
};
|
||||
|
||||
export const VersionIdToOption: React.StateItemConverter<string> = (
|
||||
versionId: string
|
||||
) => {
|
||||
const [date, rest] = versionId.split("T");
|
||||
const [time] = rest.split(".");
|
||||
const readableName = `${date} ${time}`;
|
||||
return Option(readableName, versionId, false);
|
||||
};
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import * as React from "bloatless-react";
|
||||
|
||||
import { StringToOption, VersionIdToOption } from "../Components/option";
|
||||
|
||||
import { DangerousActionButton } from "../Components/dangerousActionButton";
|
||||
import TaskViewModel from "../../ViewModel/Pages/taskViewModel";
|
||||
import { translations } from "../translations";
|
||||
@@ -11,6 +13,20 @@ export function TaskSettingsModal(taskViewModel: TaskViewModel) {
|
||||
<main>
|
||||
<h2>{translations.chatPage.task.taskSettingsHeadline}</h2>
|
||||
|
||||
<label class="tile flex-no">
|
||||
<span class="icon">history</span>
|
||||
<div>
|
||||
<span>{translations.general.fileVersionLabel}</span>
|
||||
<select
|
||||
bind:value={taskViewModel.selectedVersionId}
|
||||
children:append={[taskViewModel.versionIds, VersionIdToOption]}
|
||||
></select>
|
||||
<span class="icon">arrow_drop_down</span>
|
||||
</div>
|
||||
</label>
|
||||
|
||||
<hr></hr>
|
||||
|
||||
<label class="tile flex-no">
|
||||
<span class="icon">label</span>
|
||||
<div>
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
const englishTranslations = {
|
||||
general: {
|
||||
deleteItemButtonAudioLabel: "delete item",
|
||||
|
||||
|
||||
abortButton: "Abort",
|
||||
closeButton: "Close",
|
||||
|
||||
|
||||
confirmButton: "Confirm",
|
||||
saveButton: "Save",
|
||||
setButton: "Set",
|
||||
|
||||
fileVersionLabel: "Version",
|
||||
},
|
||||
|
||||
regional: {
|
||||
@@ -134,7 +136,7 @@ const englishTranslations = {
|
||||
createBoardButtonAudioLabel: "create board",
|
||||
|
||||
///
|
||||
|
||||
|
||||
noBoardSelected: "No board selected",
|
||||
boardNotFound: "Board not found",
|
||||
|
||||
|
||||
Reference in New Issue
Block a user