Skip to content

armgit / dashy

Public Imported from GitHub
0

πŸš€ A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!

:sparkles: Adds helper function to enable furniture hiding

Alicia Sykes64ef03036e6f
diff --git a/src/utils/MiscHelpers.js b/src/utils/MiscHelpers.js
new file mode 100644
index 00000000..212e7495
--- /dev/null
+++ b/src/utils/MiscHelpers.js
@@ -0,0 +1,6 @@
+import { hideFurnitureOn } from '@/utils/defaults';
+
+/* Returns false if page furniture should be hidden on said route */
+export const shouldBeVisible = (routeName) => !hideFurnitureOn.includes(routeName);
+
+export const x = () => null;
diff --git a/src/utils/defaults.js b/src/utils/defaults.js
index d146508c..a78fab92 100644
--- a/src/utils/defaults.js
+++ b/src/utils/defaults.js
@@ -58,6 +58,11 @@ module.exports = {
settings: true,
footer: true,
},
+ /* A list of route names that page furniture (header, footer, etc) should be hidden on */
+ hideFurnitureOn: [
+ 'minimal',
+ 'login',
+ ],
/* Key names for local storage identifiers */
localStorageKeys: {
LANGUAGE: 'language',