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!

πŸ”₯ Remove depricated code

Alicia Sykes0f1f7ce828b8
diff --git a/docs/developing.md b/docs/developing.md
index 97bf532f..70f009b5 100644
--- a/docs/developing.md
+++ b/docs/developing.md
@@ -243,7 +243,6 @@ Styleguides:
β”‚ β”‚ β”œβ”€β”€ CloudBackupRestore.vue # Form where the user manages cloud sync options
β”‚ β”‚ β”œβ”€β”€ ConfigContainer.vue # Main container, wrapping all other config components
β”‚ β”‚ β”œβ”€β”€ CustomCss.vue # Form where the user can input custom CSS
-β”‚ β”‚ β”œβ”€β”€ EditSiteMeta.vue # Form where the user can edit site meta data
β”‚ β”‚ ╰── JsonEditor.vue # JSON editor, where the user can modify the main config file
β”‚ β”œβ”€β”€ FormElements # Basic form elements used throughout the app
β”‚ β”‚ β”œβ”€β”€ Button.vue # Standard button component
diff --git a/src/assets/interface-icons/application-reload.svg b/src/assets/interface-icons/application-reload.svg
deleted file mode 100644
index 22d63563..00000000
--- a/src/assets/interface-icons/application-reload.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="sync" class="svg-inline--fa fa-sync fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M440.65 12.57l4 82.77A247.16 247.16 0 0 0 255.83 8C134.73 8 33.91 94.92 12.29 209.82A12 12 0 0 0 24.09 224h49.05a12 12 0 0 0 11.67-9.26 175.91 175.91 0 0 1 317-56.94l-101.46-4.86a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12H500a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12h-47.37a12 12 0 0 0-11.98 12.57zM255.83 432a175.61 175.61 0 0 1-146-77.8l101.8 4.87a12 12 0 0 0 12.57-12v-47.4a12 12 0 0 0-12-12H12a12 12 0 0 0-12 12V500a12 12 0 0 0 12 12h47.35a12 12 0 0 0 12-12.6l-4.15-82.57A247.17 247.17 0 0 0 255.83 504c121.11 0 221.93-86.92 243.55-201.82a12 12 0 0 0-11.8-14.18h-49.05a12 12 0 0 0-11.67 9.26A175.86 175.86 0 0 1 255.83 432z"></path></svg>
\ No newline at end of file
diff --git a/src/assets/interface-icons/application-workspace.svg b/src/assets/interface-icons/application-workspace.svg
deleted file mode 100644
index 66518c81..00000000
--- a/src/assets/interface-icons/application-workspace.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg aria-hidden="true" focusable="false" data-prefix="fal" data-icon="ellipsis-v-alt" class="svg-inline--fa fa-ellipsis-v-alt fa-w-6" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 192 512"><path fill="currentColor" d="M96 152c39.8 0 72-32.2 72-72S135.8 8 96 8 24 40.2 24 80s32.2 72 72 72zm0-112c22.1 0 40 17.9 40 40s-17.9 40-40 40-40-17.9-40-40 17.9-40 40-40zm0 144c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm0 112c-22.1 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zm0 64c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm0 112c-22.1 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40z"></path></svg>
\ No newline at end of file
diff --git a/src/assets/interface-icons/config-meta-data.svg b/src/assets/interface-icons/config-meta-data.svg
deleted file mode 100644
index 9ada3711..00000000
--- a/src/assets/interface-icons/config-meta-data.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg aria-hidden="true" focusable="false" data-prefix="fal" data-icon="digital-tachograph" class="svg-inline--fa fa-digital-tachograph fa-w-20" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path fill="currentColor" d="M608 96H32c-17.67 0-32 14.33-32 32v256c0 17.67 14.33 32 32 32h576c17.67 0 32-14.33 32-32V128c0-17.67-14.33-32-32-32zm0 288H32V128h576v256zM80 272h208c8.84 0 16-7.16 16-16v-80c0-8.84-7.16-16-16-16H80c-8.84 0-16 7.16-16 16v80c0 8.84 7.16 16 16 16zm8-88h192v64H88v-64zM72 360h224c4.42 0 8-3.58 8-8v-8c0-4.42-3.58-8-8-8H72c-4.42 0-8 3.58-8 8v8c0 4.42 3.58 8 8 8zm272 0h224c4.42 0 8-3.58 8-8v-8c0-4.42-3.58-8-8-8H344c-4.42 0-8 3.58-8 8v8c0 4.42 3.58 8 8 8zM80 288c-4.42 0-8 3.58-8 8v16c0 4.42 3.58 8 8 8h16c4.42 0 8-3.58 8-8v-16c0-4.42-3.58-8-8-8H80zm64 0c-4.42 0-8 3.58-8 8v16c0 4.42 3.58 8 8 8h16c4.42 0 8-3.58 8-8v-16c0-4.42-3.58-8-8-8h-16zm64 0c-4.42 0-8 3.58-8 8v16c0 4.42 3.58 8 8 8h16c4.42 0 8-3.58 8-8v-16c0-4.42-3.58-8-8-8h-16zm64 0c-4.42 0-8 3.58-8 8v16c0 4.42 3.58 8 8 8h16c4.42 0 8-3.58 8-8v-16c0-4.42-3.58-8-8-8h-16z"></path></svg>
\ No newline at end of file
diff --git a/src/components/Configuration/EditSiteMeta.vue b/src/components/Configuration/EditSiteMeta.vue
deleted file mode 100644
index 8e83db50..00000000
--- a/src/components/Configuration/EditSiteMeta.vue
+++ /dev/null
@@ -1,184 +0,0 @@
-<template>
- <div class="site-meta-container">
- <h2>Edit Site Meta</h2>
- <div class="form">
- <div class="row">
- <span>Title</span>
- <input v-model="formElements.title" />
- </div>
- <div class="row">
- <span>Description</span>
- <input v-model="formElements.description" />
- </div>
- <div class="row">
- <span>Footer</span>
- <input v-model="formElements.footer" />
- </div>
- </div>
- <div class="form">
- <h2>Nav Bar Links</h2>
- <div class="add-nav-bar-link" v-for="(link, index) in formElements.navLinks" :key="index">
- <div class="row">
- <span>Link Text</span>
- <input v-model="link.title" />
- </div>
- <div class="row">
- <span>Link URL</span>
- <input v-model="link.path" />
- </div>
- </div>
- <button class="add-new-link" @click="addNavLinkRow()" >
- <AddNewIcon />
- Add New Link
- </button>
- </div>
- <button class="save-button" @click="save()">
- <SaveConfigIcon />
- Save Changes
- </button>
- </div>
-</template>
-
-<script>
-
-import { localStorageKeys } from '@/utils/config/defaults';
-import AddNewIcon from '@/assets/interface-icons/add-new.svg';
-import SaveConfigIcon from '@/assets/interface-icons/save-config.svg';
-
-export default {
- name: 'EditSiteMeta',
- props: {
- config: { type: Object, required: true },
- },
- components: {
- AddNewIcon,
- SaveConfigIcon,
- },
- methods: {
- save() {
- const pageInfo = { ...this.config.pageInfo };
- pageInfo.title = this.formElements.title;
- pageInfo.description = this.formElements.description;
- pageInfo.footer = this.formElements.footer;
- if (this.formElements.navLinks) {
- pageInfo.navLinks = this.formElements.navLinks.filter(link => (link.title !== ''));
- }
- localStorage.setItem(localStorageKeys.PAGE_INFO, JSON.stringify(pageInfo));
- this.$toast('Changes saved successfully');
- setTimeout(() => { location.reload(); }, 1500);
- },
- addNavLinkRow() {
- this.formElements.navLinks.push({ title: '', path: '' });
- },
- },
- data() {
- return {
- formElements: {
- title: this.config.pageInfo.title,
- description: this.config.pageInfo.description,
- footer: this.config.pageInfo.footer,
- navLinks: this.config.pageInfo.navLinks || [],
- },
- };
- },
-};
-</script>
-
-<style scoped lang="scss">
-.site-meta-container {
- display: flex;
- flex-direction: column;
- padding: 1rem 0;
- background: var(--config-settings-background);
- height: calc(100% - 1rem);
- h2 {
- margin: 1rem auto;
- color: var(--config-settings-color);
- }
-}
-
-div.form {
- display: flex;
- flex-direction: column;
- width: fit-content;
- margin: 0 auto 1rem auto;
- padding-bottom: 1rem;
- &:not(:last-child) {
- border-bottom: 1px dashed var(--config-settings-color);
- }
- div.add-nav-bar-link {
- margin: 0 auto;
- }
- div.row {
- margin: 0.25rem auto;
- display: flex;
- justify-content: space-between;
- align-items: baseline;
- min-width: 24rem;
- span {
- font-size: 1.2rem;
- color: var(--config-settings-color);
- }
- input {
- color: var(--config-settings-color);
- background: none;
- border: 1px solid var(--config-settings-color);
- border-radius: var(--curve-factor);
- padding: 0.25rem 0.5rem;
- margin: 0.5rem;
- min-width: 8rem;
- font-size: 1.2rem;
- &:focus {
- box-shadow: 1px 1px 6px var(--config-settings-color);
- outline: none;
- }
- }
- }
-}
-
-button {
- display: flex;
- align-items: center;
- justify-content: center;
- margin: 0.5rem auto;
- svg {
- width: 1.2rem;
- margin: 0 0.2rem;
- }
-}
-
-button.save-button {
- padding: 0.5rem 1rem;
- font-size: 1.2rem;
- width: 24rem;
- background: var(--config-settings-background);
- color: var(--config-settings-color);
- border: 1px solid var(--config-settings-color);
- border-radius: var(--curve-factor);
- cursor: pointer;
- &:hover {
- background: var(--config-settings-color);
- color: var(--config-settings-background);
- }
-}
-
-button.add-new-link {
- background: none;
- text-decoration: underline;
- font-size: 1rem;
- padding: 0.25rem 0.5rem;
- color: var(--config-settings-color);
- cursor: pointer;
- border-radius: 3px;
- border: 1px solid transparent;
- &:hover {
- border-color: var(--config-settings-color);
- text-decoration: none;
- }
- &:active {
- background: var(--config-settings-color);
- color: var(--config-settings-background);
- border-color: var(--config-settings-color);
- }
-}
-</style>
diff --git a/src/utils/MiscHelpers.js b/src/utils/MiscHelpers.js
index 1e81cf9f..71501231 100644
--- a/src/utils/MiscHelpers.js
+++ b/src/utils/MiscHelpers.js
@@ -1,5 +1,5 @@
/* A collection of generic reusable functions for various string processing tasks */
-
+
/* Very rudimentary hash function for generative icons */
export const asciiHash = (input) => {
diff --git a/src/utils/Toast.js b/src/utils/Toast.js
index 7cfe554f..1c2f68a1 100644
--- a/src/utils/Toast.js
+++ b/src/utils/Toast.js
@@ -240,7 +240,6 @@ toast.dismiss = dismiss;
toast.clear = clear;
export { toast };
-export function useToast() { return toast; }
export default {
install(app) {
diff --git a/src/utils/auth/HeaderAuth.js b/src/utils/auth/HeaderAuth.js
index e16c0bbb..7013023b 100644
--- a/src/utils/auth/HeaderAuth.js
+++ b/src/utils/auth/HeaderAuth.js
@@ -69,10 +69,3 @@ export const initHeaderAuth = () => {
headerAuth = new HeaderAuth();
return headerAuth.login();
};
-
-export const getHeaderAuth = () => {
- if (!headerAuth) {
- ErrorHandler("HeaderAuth not initialized, can't get instance of class");
- }
- return headerAuth;
-};