Strip ANSI sequences from notifications text
This commit is contained in:
parent
8fa91f7c4a
commit
028382aab3
1 changed files with 2 additions and 1 deletions
|
@ -8,6 +8,7 @@ import Connect from "/components/connect.js";
|
||||||
import Composer from "/components/composer.js";
|
import Composer from "/components/composer.js";
|
||||||
import ScrollManager from "/components/scroll-manager.js";
|
import ScrollManager from "/components/scroll-manager.js";
|
||||||
import { html, Component, createRef } from "/lib/index.js";
|
import { html, Component, createRef } from "/lib/index.js";
|
||||||
|
import { strip as stripANSI } from "/lib/ansi.js";
|
||||||
import { SERVER_BUFFER, BufferType, ReceiptType, Status, Unread } from "/state.js";
|
import { SERVER_BUFFER, BufferType, ReceiptType, Status, Unread } from "/state.js";
|
||||||
import commands from "/commands.js";
|
import commands from "/commands.js";
|
||||||
import { setup as setupKeybindings } from "/keybindings.js";
|
import { setup as setupKeybindings } from "/keybindings.js";
|
||||||
|
@ -309,7 +310,7 @@ export default class App extends Component {
|
||||||
title += " in " + target;
|
title += " in " + target;
|
||||||
}
|
}
|
||||||
var notif = new Notification(title, {
|
var notif = new Notification(title, {
|
||||||
body: text,
|
body: stripANSI(text),
|
||||||
requireInteraction: true,
|
requireInteraction: true,
|
||||||
});
|
});
|
||||||
notif.addEventListener("click", () => {
|
notif.addEventListener("click", () => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue