build
This commit is contained in:
Vendored
+22
-9
@@ -2254,7 +2254,7 @@
|
|||||||
this.connectionModel = connectionModel2;
|
this.connectionModel = connectionModel2;
|
||||||
this.chatListModel = chatListModel2;
|
this.chatListModel = chatListModel2;
|
||||||
this.fileTransferModel = fileTransferModel2;
|
this.fileTransferModel = fileTransferModel2;
|
||||||
this.BUILD = "Build 26.04.13.A";
|
this.BUILD = "Build 26.04.13.B";
|
||||||
// CONTEXT
|
// CONTEXT
|
||||||
this.contextStack = /* @__PURE__ */ new Map();
|
this.contextStack = /* @__PURE__ */ new Map();
|
||||||
this.logContexts = () => {
|
this.logContexts = () => {
|
||||||
@@ -2266,7 +2266,8 @@
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
this.closeContext = (contextId) => {
|
this.closeContext = (contextId) => {
|
||||||
if (!this.contexts.map((context) => context.contextId).includes(contextId)) return;
|
if (!this.contexts.map((context) => context.contextId).includes(contextId))
|
||||||
|
return;
|
||||||
while (this.contexts.length > 0) {
|
while (this.contexts.length > 0) {
|
||||||
const currentContext = this.context;
|
const currentContext = this.context;
|
||||||
this.contextStack.delete(currentContext.contextId);
|
this.contextStack.delete(currentContext.contextId);
|
||||||
@@ -2315,7 +2316,9 @@
|
|||||||
this.contextId = v4_default();
|
this.contextId = v4_default();
|
||||||
this.keystrokes = /* @__PURE__ */ new Map();
|
this.keystrokes = /* @__PURE__ */ new Map();
|
||||||
this.handleKeystroke = (e) => {
|
this.handleKeystroke = (e) => {
|
||||||
const fn = this.keystrokes.get(e.key.toLowerCase());
|
const fn = this.keystrokes.get(
|
||||||
|
e.key.toLowerCase()
|
||||||
|
);
|
||||||
if (!fn) return false;
|
if (!fn) return false;
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
fn();
|
fn();
|
||||||
@@ -2336,18 +2339,21 @@
|
|||||||
};
|
};
|
||||||
this.closeContext = () => {
|
this.closeContext = () => {
|
||||||
if (this.currentContext.value) {
|
if (this.currentContext.value) {
|
||||||
this.coreViewModel.closeContext(this.currentContext.value.contextId);
|
this.coreViewModel.closeContext(
|
||||||
|
this.currentContext.value.contextId
|
||||||
|
);
|
||||||
}
|
}
|
||||||
this.currentContext.value = void 0;
|
this.currentContext.value = void 0;
|
||||||
};
|
};
|
||||||
this.updateContexts = () => {
|
this.updateContexts = () => {
|
||||||
if (this.isOpen == false) return;
|
if (this.isOpen == false) return;
|
||||||
const selectedContext = this.contexts.get(this.contextSelection);
|
const selectedContext = this.contexts.get(
|
||||||
|
this.contextSelection
|
||||||
|
);
|
||||||
if (!selectedContext) return;
|
if (!selectedContext) return;
|
||||||
if (selectedContext != this.currentContext.value) {
|
if (selectedContext != this.currentContext.value) {
|
||||||
this.closeContext();
|
this.closeContext();
|
||||||
}
|
}
|
||||||
;
|
|
||||||
this.coreViewModel.logContexts();
|
this.coreViewModel.logContexts();
|
||||||
this.coreViewModel.context = selectedContext;
|
this.coreViewModel.context = selectedContext;
|
||||||
this.currentContext.value = selectedContext;
|
this.currentContext.value = selectedContext;
|
||||||
@@ -2372,7 +2378,9 @@
|
|||||||
window.location.reload();
|
window.location.reload();
|
||||||
}
|
}
|
||||||
function setFocus() {
|
function setFocus() {
|
||||||
const focusedInModal = document.querySelector(".modal[open] #focused");
|
const focusedInModal = document.querySelector(
|
||||||
|
".modal[open] #focused"
|
||||||
|
);
|
||||||
if (focusedInModal) return focusedInModal.focus();
|
if (focusedInModal) return focusedInModal.focus();
|
||||||
document.getElementById("focused")?.focus();
|
document.getElementById("focused")?.focus();
|
||||||
}
|
}
|
||||||
@@ -3657,7 +3665,9 @@
|
|||||||
"," /* Settings */,
|
"," /* Settings */,
|
||||||
() => this.openPage("settings" /* Settings */)
|
() => this.openPage("settings" /* Settings */)
|
||||||
);
|
);
|
||||||
this.chatListViewModel.selectedChat.subscribeSilent(this.updateContexts);
|
this.chatListViewModel.selectedChat.subscribeSilent(
|
||||||
|
this.updateContexts
|
||||||
|
);
|
||||||
this.selectedPage.subscribeSilent(this.updateContexts);
|
this.selectedPage.subscribeSilent(this.updateContexts);
|
||||||
}
|
}
|
||||||
// context
|
// context
|
||||||
@@ -6751,7 +6761,10 @@
|
|||||||
"change",
|
"change",
|
||||||
() => this.applyTheme()
|
() => this.applyTheme()
|
||||||
);
|
);
|
||||||
this.registerKeyStroke("backspace" /* CloseOrCancel */, this.hideSettingsModal);
|
this.registerKeyStroke(
|
||||||
|
"backspace" /* CloseOrCancel */,
|
||||||
|
this.hideSettingsModal
|
||||||
|
);
|
||||||
}
|
}
|
||||||
static generateThemeMedia() {
|
static generateThemeMedia() {
|
||||||
return window.matchMedia("(prefers-color-scheme: dark)");
|
return window.matchMedia("(prefers-color-scheme: dark)");
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import FileTransferModel from "../../Model/Global/fileTransferModel";
|
|||||||
import { v4 } from "uuid";
|
import { v4 } from "uuid";
|
||||||
|
|
||||||
export default class CoreViewModel {
|
export default class CoreViewModel {
|
||||||
readonly BUILD = "Build 26.04.13.A";
|
readonly BUILD = "Build 26.04.13.B";
|
||||||
|
|
||||||
translations: Translations;
|
translations: Translations;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user