add keyboard shortcut for task modal
This commit is contained in:
Vendored
+73
-65
@@ -1,59 +1,9 @@
|
|||||||
(() => {
|
(() => {
|
||||||
// node_modules/uuid/dist/esm-browser/stringify.js
|
// ../../bloatless-react/index.ts
|
||||||
var byteToHex = [];
|
|
||||||
for (i = 0; i < 256; ++i) {
|
|
||||||
byteToHex.push((i + 256).toString(16).slice(1));
|
|
||||||
}
|
|
||||||
var i;
|
|
||||||
function unsafeStringify(arr, offset = 0) {
|
|
||||||
return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
|
|
||||||
}
|
|
||||||
|
|
||||||
// node_modules/uuid/dist/esm-browser/rng.js
|
|
||||||
var getRandomValues;
|
|
||||||
var rnds8 = new Uint8Array(16);
|
|
||||||
function rng() {
|
|
||||||
if (!getRandomValues) {
|
|
||||||
getRandomValues = typeof crypto !== "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
|
|
||||||
if (!getRandomValues) {
|
|
||||||
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return getRandomValues(rnds8);
|
|
||||||
}
|
|
||||||
|
|
||||||
// node_modules/uuid/dist/esm-browser/native.js
|
|
||||||
var randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
||||||
var native_default = {
|
|
||||||
randomUUID
|
|
||||||
};
|
|
||||||
|
|
||||||
// node_modules/uuid/dist/esm-browser/v4.js
|
|
||||||
function v4(options, buf, offset) {
|
|
||||||
if (native_default.randomUUID && !buf && !options) {
|
|
||||||
return native_default.randomUUID();
|
|
||||||
}
|
|
||||||
options = options || {};
|
|
||||||
var rnds = options.random || (options.rng || rng)();
|
|
||||||
rnds[6] = rnds[6] & 15 | 64;
|
|
||||||
rnds[8] = rnds[8] & 63 | 128;
|
|
||||||
if (buf) {
|
|
||||||
offset = offset || 0;
|
|
||||||
for (var i = 0; i < 16; ++i) {
|
|
||||||
buf[offset + i] = rnds[i];
|
|
||||||
}
|
|
||||||
return buf;
|
|
||||||
}
|
|
||||||
return unsafeStringify(rnds);
|
|
||||||
}
|
|
||||||
var v4_default = v4;
|
|
||||||
|
|
||||||
// node_modules/bloatless-react/index.ts
|
|
||||||
var State = class {
|
var State = class {
|
||||||
_value;
|
|
||||||
_bindings = /* @__PURE__ */ new Set();
|
|
||||||
// init
|
// init
|
||||||
constructor(initialValue) {
|
constructor(initialValue) {
|
||||||
|
this._bindings = /* @__PURE__ */ new Set();
|
||||||
this._value = initialValue;
|
this._value = initialValue;
|
||||||
}
|
}
|
||||||
// value
|
// value
|
||||||
@@ -82,11 +32,11 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
var ListState = class extends State {
|
var ListState = class extends State {
|
||||||
additionHandlers = /* @__PURE__ */ new Set();
|
|
||||||
removalHandlers = /* @__PURE__ */ new Map();
|
|
||||||
// init
|
// init
|
||||||
constructor(initialItems) {
|
constructor(initialItems) {
|
||||||
super(new Set(initialItems));
|
super(new Set(initialItems));
|
||||||
|
this.additionHandlers = /* @__PURE__ */ new Set();
|
||||||
|
this.removalHandlers = /* @__PURE__ */ new Map();
|
||||||
}
|
}
|
||||||
// list
|
// list
|
||||||
add(...items) {
|
add(...items) {
|
||||||
@@ -126,11 +76,11 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
var MapState = class extends State {
|
var MapState = class extends State {
|
||||||
additionHandlers = /* @__PURE__ */ new Set();
|
|
||||||
removalHandlers = /* @__PURE__ */ new Map();
|
|
||||||
// init
|
// init
|
||||||
constructor(initialItems) {
|
constructor(initialItems) {
|
||||||
super(new Map(initialItems));
|
super(new Map(initialItems));
|
||||||
|
this.additionHandlers = /* @__PURE__ */ new Set();
|
||||||
|
this.removalHandlers = /* @__PURE__ */ new Map();
|
||||||
}
|
}
|
||||||
// list
|
// list
|
||||||
set(key, item) {
|
set(key, item) {
|
||||||
@@ -190,7 +140,7 @@
|
|||||||
case "enter": {
|
case "enter": {
|
||||||
element.addEventListener("keydown", (e) => {
|
element.addEventListener("keydown", (e) => {
|
||||||
if (e.key != "Enter") return;
|
if (e.key != "Enter") return;
|
||||||
value();
|
value(e);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -200,6 +150,14 @@
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case "metakey": {
|
||||||
|
element.addEventListener("keydown", (e) => {
|
||||||
|
if (e.metaKey == false) return;
|
||||||
|
if (e.key != directiveValue) return;
|
||||||
|
value(e);
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
}
|
||||||
case "subscribe": {
|
case "subscribe": {
|
||||||
const state = value;
|
const state = value;
|
||||||
state.subscribe(
|
state.subscribe(
|
||||||
@@ -779,6 +737,55 @@
|
|||||||
return Color2;
|
return Color2;
|
||||||
})(Color || {});
|
})(Color || {});
|
||||||
|
|
||||||
|
// node_modules/uuid/dist/esm-browser/stringify.js
|
||||||
|
var byteToHex = [];
|
||||||
|
for (i = 0; i < 256; ++i) {
|
||||||
|
byteToHex.push((i + 256).toString(16).slice(1));
|
||||||
|
}
|
||||||
|
var i;
|
||||||
|
function unsafeStringify(arr, offset = 0) {
|
||||||
|
return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
|
||||||
|
}
|
||||||
|
|
||||||
|
// node_modules/uuid/dist/esm-browser/rng.js
|
||||||
|
var getRandomValues;
|
||||||
|
var rnds8 = new Uint8Array(16);
|
||||||
|
function rng() {
|
||||||
|
if (!getRandomValues) {
|
||||||
|
getRandomValues = typeof crypto !== "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
|
||||||
|
if (!getRandomValues) {
|
||||||
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return getRandomValues(rnds8);
|
||||||
|
}
|
||||||
|
|
||||||
|
// node_modules/uuid/dist/esm-browser/native.js
|
||||||
|
var randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
||||||
|
var native_default = {
|
||||||
|
randomUUID
|
||||||
|
};
|
||||||
|
|
||||||
|
// node_modules/uuid/dist/esm-browser/v4.js
|
||||||
|
function v4(options, buf, offset) {
|
||||||
|
if (native_default.randomUUID && !buf && !options) {
|
||||||
|
return native_default.randomUUID();
|
||||||
|
}
|
||||||
|
options = options || {};
|
||||||
|
var rnds = options.random || (options.rng || rng)();
|
||||||
|
rnds[6] = rnds[6] & 15 | 64;
|
||||||
|
rnds[8] = rnds[8] & 63 | 128;
|
||||||
|
if (buf) {
|
||||||
|
offset = offset || 0;
|
||||||
|
for (var i = 0; i < 16; ++i) {
|
||||||
|
buf[offset + i] = rnds[i];
|
||||||
|
}
|
||||||
|
return buf;
|
||||||
|
}
|
||||||
|
return unsafeStringify(rnds);
|
||||||
|
}
|
||||||
|
var v4_default = v4;
|
||||||
|
|
||||||
// src/Model/Files/boardsAndTasksModel.ts
|
// src/Model/Files/boardsAndTasksModel.ts
|
||||||
var BoardsAndTasksModel = class _BoardsAndTasksModel {
|
var BoardsAndTasksModel = class _BoardsAndTasksModel {
|
||||||
// init
|
// init
|
||||||
@@ -1591,7 +1598,8 @@
|
|||||||
this.close();
|
this.close();
|
||||||
this.loadTaskData();
|
this.loadTaskData();
|
||||||
};
|
};
|
||||||
this.closeAndSave = () => {
|
this.closeAndSave = (e) => {
|
||||||
|
e.preventDefault();
|
||||||
this.close();
|
this.close();
|
||||||
this.save();
|
this.save();
|
||||||
};
|
};
|
||||||
@@ -2237,8 +2245,8 @@
|
|||||||
searchTerm
|
searchTerm
|
||||||
];
|
];
|
||||||
this.storageModel.write(suggestionPath, "");
|
this.storageModel.write(suggestionPath, "");
|
||||||
if (!this.coreViewModel.boardSearchSuggestions.value.has(searchTerm)) {
|
if (!this.coreViewModel.boardFilterStringSuggestions.value.has(searchTerm)) {
|
||||||
this.coreViewModel.boardSearchSuggestions.add(searchTerm);
|
this.coreViewModel.boardFilterStringSuggestions.add(searchTerm);
|
||||||
}
|
}
|
||||||
const lastSearchPath = this.getLastSearchPath();
|
const lastSearchPath = this.getLastSearchPath();
|
||||||
this.storageModel.write(lastSearchPath, searchTerm);
|
this.storageModel.write(lastSearchPath, searchTerm);
|
||||||
@@ -2317,7 +2325,7 @@
|
|||||||
this.loadSearchSuggestions = () => {
|
this.loadSearchSuggestions = () => {
|
||||||
const dirPath = this.getPreviousSearchesPath();
|
const dirPath = this.getPreviousSearchesPath();
|
||||||
const searches = this.storageModel.list(dirPath);
|
const searches = this.storageModel.list(dirPath);
|
||||||
this.coreViewModel.boardSearchSuggestions.add(...searches);
|
this.coreViewModel.boardFilterStringSuggestions.add(...searches);
|
||||||
};
|
};
|
||||||
this.restoreSearch = () => {
|
this.restoreSearch = () => {
|
||||||
const lastSearchPath = this.getLastSearchPath();
|
const lastSearchPath = this.getLastSearchPath();
|
||||||
@@ -2358,7 +2366,7 @@
|
|||||||
this.taskViewModels,
|
this.taskViewModels,
|
||||||
this.filteredTaskViewModels,
|
this.filteredTaskViewModels,
|
||||||
TaskViewModel.getStringsForFilter,
|
TaskViewModel.getStringsForFilter,
|
||||||
this.coreViewModel.boardSearchSuggestions
|
this.coreViewModel.boardFilterStringSuggestions
|
||||||
);
|
);
|
||||||
this.searchViewModel.appliedQuery.subscribeSilent((newQuery) => {
|
this.searchViewModel.appliedQuery.subscribeSilent((newQuery) => {
|
||||||
this.handleNewSearch(newQuery);
|
this.handleNewSearch(newQuery);
|
||||||
@@ -3420,7 +3428,7 @@
|
|||||||
const isSelected = entry[0] == taskViewModel.task.boardId;
|
const isSelected = entry[0] == taskViewModel.task.boardId;
|
||||||
return Option(entry[1], entry[0], isSelected);
|
return Option(entry[1], entry[0], isSelected);
|
||||||
};
|
};
|
||||||
return /* @__PURE__ */ createElement("div", { class: "modal", open: true }, /* @__PURE__ */ createElement("div", null, /* @__PURE__ */ createElement("main", null, /* @__PURE__ */ createElement("h2", null, translations.chatPage.task.taskSettingsHeadline), /* @__PURE__ */ createElement("label", { class: "tile flex-no" }, /* @__PURE__ */ createElement("span", { class: "icon" }, "history"), /* @__PURE__ */ createElement("div", null, /* @__PURE__ */ createElement("span", null, translations.general.fileVersionLabel), /* @__PURE__ */ createElement(
|
return /* @__PURE__ */ createElement("div", { class: "modal", open: true, "metakey:s": taskViewModel.closeAndSave }, /* @__PURE__ */ createElement("div", null, /* @__PURE__ */ createElement("main", null, /* @__PURE__ */ createElement("h2", null, translations.chatPage.task.taskSettingsHeadline), /* @__PURE__ */ createElement("label", { class: "tile flex-no" }, /* @__PURE__ */ createElement("span", { class: "icon" }, "history"), /* @__PURE__ */ createElement("div", null, /* @__PURE__ */ createElement("span", null, translations.general.fileVersionLabel), /* @__PURE__ */ createElement(
|
||||||
"select",
|
"select",
|
||||||
{
|
{
|
||||||
"bind:value": taskViewModel.selectedVersionId,
|
"bind:value": taskViewModel.selectedVersionId,
|
||||||
@@ -4775,7 +4783,7 @@
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ../ui-base/index.ts
|
// node_modules/udn-frontend/index.ts
|
||||||
var UDNFrontend = class {
|
var UDNFrontend = class {
|
||||||
ws;
|
ws;
|
||||||
// HANDLERS
|
// HANDLERS
|
||||||
@@ -5174,7 +5182,7 @@
|
|||||||
this.draggedObject = new State(void 0);
|
this.draggedObject = new State(void 0);
|
||||||
// SUGGESTIONS
|
// SUGGESTIONS
|
||||||
// boards & tasks
|
// boards & tasks
|
||||||
this.boardSearchSuggestions = new ListState();
|
this.boardFilterStringSuggestions = new ListState();
|
||||||
this.taskCategorySuggestions = new ListState();
|
this.taskCategorySuggestions = new ListState();
|
||||||
this.taskStatusSuggestions = new ListState();
|
this.taskStatusSuggestions = new ListState();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user