From bef76be550e966a1c0108d0adb08ef962a40e992 Mon Sep 17 00:00:00 2001 From: ririxi Date: Fri, 27 Sep 2024 20:44:58 +0200 Subject: [PATCH] chore(sidebarConfig): change how msg is shown --- jsHelper/sidebarConfig.js | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/jsHelper/sidebarConfig.js b/jsHelper/sidebarConfig.js index a64eb7b2ca..2c3eba1bb5 100644 --- a/jsHelper/sidebarConfig.js +++ b/jsHelper/sidebarConfig.js @@ -166,13 +166,26 @@ color: var(--spice-button-disabled); (async () => { await new Promise((res) => Spicetify.Events.webpackLoaded.on(res)); if (document.querySelector(".Root__globalNav")) { - Spicetify.showNotification( - "Sidebar config is not supported on global navbar. Please disable it with `spicetify config sidebar_config 0` command.", - false, - 7000 - ); + Spicetify.Snackbar?.enqueueCustomSnackbar("sidebar-config", { + keyPrefix: "sidebar-config", + autoHideDuration: 7500, + children: Spicetify.ReactComponent.Snackbar.wrapper({ + children: Spicetify.ReactComponent.Snackbar.simpleLayout({ + center: Spicetify.React.createElement("div", { + dangerouslySetInnerHTML: { + __html: + "Sidebar config is not supported when Global Navbar is enabled. In Powershell, please run spicetify config sidebar_config 0 command and then re-apply spicetify with spicetify apply.", + }, + style: { + "text-size": "12px", + }, + }), + }), + }), + }); isGlobalNavbar = true; } + if (!isGlobalNavbar) { new Spicetify.Menu.Item( "Sidebar config",