do not show namespaces in marquee
This commit is contained in:
Vendored
+20
-23
@@ -5596,6 +5596,19 @@
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// src/View/Components/deletableListItem.tsx
|
||||||
|
function DeletableListItem(coreViewModel2, text, primaryButton, ondelete) {
|
||||||
|
return /* @__PURE__ */ createElement("div", { class: "tile flex-row justify-apart align-center padding-0" }, /* @__PURE__ */ createElement("span", { class: "padding-h ellipsis" }, text), /* @__PURE__ */ createElement("div", { class: "flex-row justify-end" }, primaryButton, /* @__PURE__ */ createElement(
|
||||||
|
"button",
|
||||||
|
{
|
||||||
|
class: "danger",
|
||||||
|
"aria-label": coreViewModel2.translations.general.deleteItemButtonAudioLabel,
|
||||||
|
"on:click": ondelete
|
||||||
|
},
|
||||||
|
/* @__PURE__ */ createElement("span", { class: "icon" }, "delete")
|
||||||
|
)));
|
||||||
|
}
|
||||||
|
|
||||||
// src/View/Modals/searchModal.tsx
|
// src/View/Modals/searchModal.tsx
|
||||||
function SearchModal(coreViewModel2, searchViewModel, headline, isOpen) {
|
function SearchModal(coreViewModel2, searchViewModel, headline, isOpen) {
|
||||||
function close() {
|
function close() {
|
||||||
@@ -5670,15 +5683,10 @@
|
|||||||
function applySuggestion() {
|
function applySuggestion() {
|
||||||
searchViewModel.search(suggestion);
|
searchViewModel.search(suggestion);
|
||||||
}
|
}
|
||||||
return /* @__PURE__ */ createElement("div", { class: "flex-row surface align-center" }, /* @__PURE__ */ createElement("span", { class: "width-100 flex-1 padding-h" }, suggestion), /* @__PURE__ */ createElement(
|
return DeletableListItem(
|
||||||
"button",
|
coreViewModel2,
|
||||||
{
|
suggestion,
|
||||||
class: "danger",
|
/* @__PURE__ */ createElement(
|
||||||
"aria-label": coreViewModel2.translations.general.deleteButton,
|
|
||||||
"on:click": deleteSuggestion
|
|
||||||
},
|
|
||||||
/* @__PURE__ */ createElement("span", { class: "icon" }, "delete")
|
|
||||||
), /* @__PURE__ */ createElement(
|
|
||||||
"button",
|
"button",
|
||||||
{
|
{
|
||||||
class: "primary",
|
class: "primary",
|
||||||
@@ -5687,7 +5695,9 @@
|
|||||||
"toggle:disabled": isApplied
|
"toggle:disabled": isApplied
|
||||||
},
|
},
|
||||||
/* @__PURE__ */ createElement("span", { class: "icon" }, "check")
|
/* @__PURE__ */ createElement("span", { class: "icon" }, "check")
|
||||||
));
|
),
|
||||||
|
deleteSuggestion
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// src/View/Components/colorPicker.tsx
|
// src/View/Components/colorPicker.tsx
|
||||||
@@ -5982,19 +5992,6 @@
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// src/View/Components/deletableListItem.tsx
|
|
||||||
function DeletableListItem(coreViewModel2, text, primaryButton, ondelete) {
|
|
||||||
return /* @__PURE__ */ createElement("div", { class: "tile flex-row justify-apart align-center padding-0" }, /* @__PURE__ */ createElement("span", { class: "padding-h ellipsis" }, text), /* @__PURE__ */ createElement("div", { class: "flex-row justify-end" }, primaryButton, /* @__PURE__ */ createElement(
|
|
||||||
"button",
|
|
||||||
{
|
|
||||||
class: "danger",
|
|
||||||
"aria-label": coreViewModel2.translations.general.deleteItemButtonAudioLabel,
|
|
||||||
"on:click": ondelete
|
|
||||||
},
|
|
||||||
/* @__PURE__ */ createElement("span", { class: "icon" }, "delete")
|
|
||||||
)));
|
|
||||||
}
|
|
||||||
|
|
||||||
// src/View/ChatPages/settingsPage.tsx
|
// src/View/ChatPages/settingsPage.tsx
|
||||||
function SettingsPage(coreViewModel2, settingsPageViewModel) {
|
function SettingsPage(coreViewModel2, settingsPageViewModel) {
|
||||||
settingsPageViewModel.loadData();
|
settingsPageViewModel.loadData();
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -102,4 +102,14 @@ export default class ChatListViewModel {
|
|||||||
|
|
||||||
this.loadChats();
|
this.loadChats();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// utility
|
||||||
|
stripNamespace = (fullChannel: string): string => {
|
||||||
|
for (const vm of this.chatViewModels.value) {
|
||||||
|
const fullReference = vm.chatModel.info.namespace + vm.chatModel.info.primaryChannel;
|
||||||
|
if (fullReference == fullChannel) return vm.chatModel.info.primaryChannel;
|
||||||
|
}
|
||||||
|
|
||||||
|
return fullChannel;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
@@ -13,12 +13,11 @@ export default class NotificationViewModel {
|
|||||||
|
|
||||||
// main
|
// main
|
||||||
showNotification = (message: ChatMessage): void => {
|
showNotification = (message: ChatMessage): void => {
|
||||||
const notification: Notification =
|
|
||||||
NotificationViewModel.createNotification(message);
|
|
||||||
if (this.seenMessageIds.has(message.id)) return;
|
if (this.seenMessageIds.has(message.id)) return;
|
||||||
|
|
||||||
if (this.chatListViewModel.selectedChat.value == undefined) return;
|
if (this.chatListViewModel.selectedChat.value == undefined) return;
|
||||||
|
|
||||||
|
const notification: Notification =
|
||||||
|
this.createNotification(message);
|
||||||
const currentChat =
|
const currentChat =
|
||||||
this.chatListViewModel.selectedChat.value.chatModel
|
this.chatListViewModel.selectedChat.value.chatModel
|
||||||
.unwrappedPrimaryChannel;
|
.unwrappedPrimaryChannel;
|
||||||
@@ -83,13 +82,15 @@ export default class NotificationViewModel {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// init
|
// init
|
||||||
constructor(public readonly chatListViewModel: ChatListViewModel) {}
|
constructor(public chatListViewModel: ChatListViewModel) {}
|
||||||
|
|
||||||
// util
|
// util
|
||||||
static createNotification(message: ChatMessage): Notification {
|
createNotification(message: ChatMessage): Notification {
|
||||||
|
const fullChannel = ChatModel.splitChannel(message.channel)[0];
|
||||||
|
const chat = this.chatListViewModel.stripNamespace(fullChannel);
|
||||||
return {
|
return {
|
||||||
messageId: message.id,
|
messageId: message.id,
|
||||||
chat: ChatModel.splitChannel(message.channel)[0],
|
chat,
|
||||||
sender: message.sender,
|
sender: message.sender,
|
||||||
body: message.body,
|
body: message.body,
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user