Skip to content

Commit bef76be

Browse files
committed
chore(sidebarConfig): change how msg is shown
1 parent 94e5c63 commit bef76be

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

jsHelper/sidebarConfig.js

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,13 +166,26 @@ color: var(--spice-button-disabled);
166166
(async () => {
167167
await new Promise((res) => Spicetify.Events.webpackLoaded.on(res));
168168
if (document.querySelector(".Root__globalNav")) {
169-
Spicetify.showNotification(
170-
"Sidebar config is not supported on global navbar. Please disable it with `spicetify config sidebar_config 0` command.",
171-
false,
172-
7000
173-
);
169+
Spicetify.Snackbar?.enqueueCustomSnackbar("sidebar-config", {
170+
keyPrefix: "sidebar-config",
171+
autoHideDuration: 7500,
172+
children: Spicetify.ReactComponent.Snackbar.wrapper({
173+
children: Spicetify.ReactComponent.Snackbar.simpleLayout({
174+
center: Spicetify.React.createElement("div", {
175+
dangerouslySetInnerHTML: {
176+
__html:
177+
"Sidebar config is not supported when Global Navbar is enabled. In Powershell, please run <code>spicetify config sidebar_config 0</code> command and then re-apply spicetify with <code>spicetify apply</code>.",
178+
},
179+
style: {
180+
"text-size": "12px",
181+
},
182+
}),
183+
}),
184+
}),
185+
});
174186
isGlobalNavbar = true;
175187
}
188+
176189
if (!isGlobalNavbar) {
177190
new Spicetify.Menu.Item(
178191
"Sidebar config",

0 commit comments

Comments
 (0)