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!

🚨 Fixes all remaining lint warnings

Alicia Sykes09fd86876fdb
diff --git a/src/components/Charts/PercentageChart.vue b/src/components/Charts/PercentageChart.vue
index 7c623d24..6de9fa0c 100644
--- a/src/components/Charts/PercentageChart.vue
+++ b/src/components/Charts/PercentageChart.vue
@@ -36,7 +36,7 @@ export default {
default: true,
},
height: {
- number: Boolean,
+ type: Number,
default: 1,
},
values: { type: Array, required: true },
diff --git a/src/components/FormElements/Input.vue b/src/components/FormElements/Input.vue
index 0a56ed03..1f5aa388 100644
--- a/src/components/FormElements/Input.vue
+++ b/src/components/FormElements/Input.vue
@@ -47,6 +47,7 @@ export default {
default: 'vertical',
},
},
+ emits: ['update:modelValue'],
methods: {
updateValue(value) {
this.$emit('update:modelValue', value);
diff --git a/src/components/FormElements/Radio.vue b/src/components/FormElements/Radio.vue
index d54dd61a..f1a5d159 100644
--- a/src/components/FormElements/Radio.vue
+++ b/src/components/FormElements/Radio.vue
@@ -31,6 +31,7 @@ export default {
description: { type: String, default: '' }, // Optional description text
disabled: Boolean, // Disable all radio buttons
},
+ emits: ['update:modelValue'],
data() {
return {
selectedRadio: '', // The currently radio val
diff --git a/src/components/FormElements/Select.vue b/src/components/FormElements/Select.vue
index 0d88a7ca..06e36aeb 100644
--- a/src/components/FormElements/Select.vue
+++ b/src/components/FormElements/Select.vue
@@ -23,6 +23,7 @@ export default {
label: { type: String, default: '' }, // Form label for element
description: { type: String, default: '' }, // Optional description text
},
+ emits: ['update:modelValue'],
data() {
return {
selectedOption: '', // The currently selected val
diff --git a/src/components/FormElements/Toggle.vue b/src/components/FormElements/Toggle.vue
index 5471956c..e0794f60 100644
--- a/src/components/FormElements/Toggle.vue
+++ b/src/components/FormElements/Toggle.vue
@@ -35,6 +35,8 @@ export default {
},
},
+ emits: ['change'],
+
data() {
return {
currentState: this.defaultState,
diff --git a/src/components/InteractiveEditor/EditItem.vue b/src/components/InteractiveEditor/EditItem.vue
index 87a5cb5f..2b1fee22 100644
--- a/src/components/InteractiveEditor/EditItem.vue
+++ b/src/components/InteractiveEditor/EditItem.vue
@@ -104,6 +104,7 @@ export default {
isNew: Boolean,
parentSectionTitle: { type: String, default: '' }, // If adding new item, which section to add it under
},
+ emits: ['closeEditMenu'],
computed: {
allowViewConfig() {
return this.$store.getters.permissions.allowViewConfig;
diff --git a/src/components/InteractiveEditor/EditSection.vue b/src/components/InteractiveEditor/EditSection.vue
index 5eecadbc..5aca4c2a 100644
--- a/src/components/InteractiveEditor/EditSection.vue
+++ b/src/components/InteractiveEditor/EditSection.vue
@@ -58,6 +58,7 @@ export default {
sectionIndex: { type: Number, default: -1 },
isAddNew: Boolean,
},
+ emits: ['closeEditSection'],
data() {
return {
modalName: modalNames.EDIT_SECTION,
diff --git a/src/components/LinkItems/Collapsable.vue b/src/components/LinkItems/Collapsable.vue
index 177a3554..a650f77f 100644
--- a/src/components/LinkItems/Collapsable.vue
+++ b/src/components/LinkItems/Collapsable.vue
@@ -56,6 +56,7 @@ export default {
customStyles: { type: String, default: '' }, // Optional custom stylings
cutToHeight: Boolean, // To set section height with content height
},
+ emits: ['openEditSection', 'openContextMenu'],
components: {
Icon,
EditModeIcon,
diff --git a/src/components/LinkItems/ItemContextMenu.vue b/src/components/LinkItems/ItemContextMenu.vue
index 1466b945..3b421d72 100644
--- a/src/components/LinkItems/ItemContextMenu.vue
+++ b/src/components/LinkItems/ItemContextMenu.vue
@@ -85,6 +85,7 @@ export default {
show: Boolean, // Should show or hide the menu
disableEdit: Boolean, // Disable editing for certain items
},
+ emits: ['launchItem', 'openItemSettings', 'openMoveItemMenu', 'openDeleteItem'],
computed: {
isMenuDisabled() {
return !!this.$store.getters.appConfig.disableContextMenu;
diff --git a/src/components/LinkItems/Section.vue b/src/components/LinkItems/Section.vue
index 4aaf1272..cf9aa0f9 100644
--- a/src/components/LinkItems/Section.vue
+++ b/src/components/LinkItems/Section.vue
@@ -127,6 +127,7 @@ export default {
isWide: Boolean,
activeColCount: { type: Number, required: true },
},
+ emits: ['itemClicked'],
components: {
Collapsable,
ContextMenu,
diff --git a/src/components/LinkItems/SectionContextMenu.vue b/src/components/LinkItems/SectionContextMenu.vue
index 5f758c05..5c991493 100644
--- a/src/components/LinkItems/SectionContextMenu.vue
+++ b/src/components/LinkItems/SectionContextMenu.vue
@@ -48,6 +48,7 @@ export default {
posY: { type: Number, default: 0 }, // The Y coordinate for positioning
show: Boolean, // Should show or hide the menu
},
+ emits: ['navigateToSection', 'openEditSection', 'expandCollapseSection', 'removeSection'],
computed: {
isMenuDisabled() {
return !!this.$store.getters.appConfig.disableContextMenu;
diff --git a/src/components/LinkItems/SubItemGroup.vue b/src/components/LinkItems/SubItemGroup.vue
index 0fa6cec0..3d5dd0fa 100644
--- a/src/components/LinkItems/SubItemGroup.vue
+++ b/src/components/LinkItems/SubItemGroup.vue
@@ -21,6 +21,7 @@ export default {
title: { type: String, default: '' },
subItemGridSize: { type: Number, default: 0 },
},
+ emits: ['triggerModal'],
components: {
SubItem,
},
diff --git a/src/components/MinimalView/MinimalHeading.vue b/src/components/MinimalView/MinimalHeading.vue
index 655376eb..079bdabd 100644
--- a/src/components/MinimalView/MinimalHeading.vue
+++ b/src/components/MinimalView/MinimalHeading.vue
@@ -20,6 +20,7 @@ export default {
selected: Boolean,
hideTitleText: Boolean,
},
+ emits: ['sectionSelected'],
methods: {
selectSection(index) {
this.$emit('sectionSelected', index);
diff --git a/src/components/MinimalView/MinimalSearch.vue b/src/components/MinimalView/MinimalSearch.vue
index 607b6533..3b4ef7dc 100644
--- a/src/components/MinimalView/MinimalSearch.vue
+++ b/src/components/MinimalView/MinimalSearch.vue
@@ -18,6 +18,7 @@ export default {
props: {
active: Boolean,
},
+ emits: ['user-is-searchin'],
data() {
return {
input: '', // Users current search term
diff --git a/src/components/MinimalView/MinimalSection.vue b/src/components/MinimalView/MinimalSection.vue
index 57cd61a6..1d7d3559 100644
--- a/src/components/MinimalView/MinimalSection.vue
+++ b/src/components/MinimalView/MinimalSection.vue
@@ -66,6 +66,7 @@ export default {
selected: Boolean,
showAll: Boolean,
},
+ emits: ['itemClicked', 'sectionSelected'],
computed: {
appConfig() {
return this.$store.getters.appConfig;
diff --git a/src/components/Settings/CustomThemeMaker.vue b/src/components/Settings/CustomThemeMaker.vue
index b7fabcdd..4534c0e8 100644
--- a/src/components/Settings/CustomThemeMaker.vue
+++ b/src/components/Settings/CustomThemeMaker.vue
@@ -72,6 +72,7 @@ export default {
props: {
themeToEdit: { type: String, required: true },
},
+ emits: ['closeThemeConfigurator'],
methods: {
/* Finds the current dominent value for a given CSS variable */
getCssVariableValue(cssVar) {
diff --git a/src/components/Settings/SearchBar.vue b/src/components/Settings/SearchBar.vue
index 1411b46a..19501337 100644
--- a/src/components/Settings/SearchBar.vue
+++ b/src/components/Settings/SearchBar.vue
@@ -38,6 +38,7 @@ export default {
props: {
minimalSearch: Boolean, // If true, then keep it simple
},
+ emits: ['user-is-searchin'],
data() {
return {
input: '', // Users current search term
diff --git a/src/components/Settings/SettingsContainer.vue b/src/components/Settings/SettingsContainer.vue
index fe791a6a..cb732998 100644
--- a/src/components/Settings/SettingsContainer.vue
+++ b/src/components/Settings/SettingsContainer.vue
@@ -67,6 +67,7 @@ export default {
LanguageSwitcher,
IconOptions,
},
+ emits: ['user-is-searchin'],
data: () => ({ panelOpen: false, modalNames }),
computed: {
searchVisible() {
diff --git a/src/components/Widgets/HackernewsTrending.vue b/src/components/Widgets/HackernewsTrending.vue
index 3996418a..b2b4f9dd 100644
--- a/src/components/Widgets/HackernewsTrending.vue
+++ b/src/components/Widgets/HackernewsTrending.vue
@@ -2,14 +2,14 @@
<div class="hackernews-wrapper">
<!-- Hackernews Trending Posts-->
<div class="posts-wrapper" v-if="trendingPosts">
- <div class="post-row" v-for="(trendingPosts, index) in trendingPosts" :key="index">
- <a class="post-top" :href="trendingPosts.originURL">
+ <div class="post-row" v-for="(trendingPost, index) in trendingPosts" :key="index">
+ <a class="post-top" :href="trendingPost.originURL">
<div class="post-title-wrap">
- <p class="post-title">{{ trendingPosts.title }}</p>
+ <p class="post-title">{{ trendingPost.title }}</p>
<p class="post-date">
- {{ formatDate(trendingPosts.time) }}
+ {{ formatDate(trendingPost.time) }}
</p>
- <p class="post-score" v-if="trendingPosts.score">score: {{ trendingPosts.score }}</p>
+ <p class="post-score" v-if="trendingPost.score">score: {{ trendingPost.score }}</p>
</div>
</a>
</div>
diff --git a/src/components/Widgets/MinecraftStatus.vue b/src/components/Widgets/MinecraftStatus.vue
index 0cdbd008..6753bcc8 100644
--- a/src/components/Widgets/MinecraftStatus.vue
+++ b/src/components/Widgets/MinecraftStatus.vue
@@ -30,16 +30,16 @@
<div v-if="showMods" class="mod-list">
<span>{{ mods.length }} Mods</span>
<ul>
- <li v-for="{ name, version } in mods" :key="name">
- {{ name }}={{ version }}
+ <li v-for="{ name, version: modVersion } in mods" :key="name">
+ {{ name }}={{ modVersion }}
</li>
</ul>
</div>
<div v-if="showPlugins" class="plugin-list">
<span>{{ plugins.length }} Plugins</span>
<ul>
- <li v-for="{ name, version } in plugins" :key="name">
- {{ name }}={{ version }}
+ <li v-for="{ name, version: pluginVersion } in plugins" :key="name">
+ {{ name }}={{ pluginVersion }}
</li>
</ul>
</div>
diff --git a/src/components/Widgets/NextcloudNotifications.vue b/src/components/Widgets/NextcloudNotifications.vue
index 2f143fc7..73ad4d16 100644
--- a/src/components/Widgets/NextcloudNotifications.vue
+++ b/src/components/Widgets/NextcloudNotifications.vue
@@ -16,7 +16,7 @@
</small> <span v-tooltip="subjectTooltip(notification)">{{ notification.subject }} </span>
<!-- notifications item: action links -->
<span v-if="notification.actions.length">
- <span v-for="(action, idx) in notification.actions" :key="idx">
+ <span v-for="(action, actionIdx) in notification.actions" :key="actionIdx">
<a :href="action.link" class="action" target="_blank">{{ action.label }}</a>
</span>
</span>
diff --git a/src/components/Widgets/WidgetBase.vue b/src/components/Widgets/WidgetBase.vue
index a3230070..31b4353c 100644
--- a/src/components/Widgets/WidgetBase.vue
+++ b/src/components/Widgets/WidgetBase.vue
@@ -149,6 +149,7 @@ export default {
widget: { type: Object, required: true },
index: { type: Number, required: true },
},
+ emits: ['navigateToSection'],
data: () => ({
loading: false,
error: false,
diff --git a/src/components/Workspace/SideBar.vue b/src/components/Workspace/SideBar.vue
index aca238c5..c0899b77 100644
--- a/src/components/Workspace/SideBar.vue
+++ b/src/components/Workspace/SideBar.vue
@@ -45,6 +45,7 @@ export default {
sections: { type: Array, default: () => [] },
initUrl: { type: String, default: '' },
},
+ emits: ['launch-widget', 'launch-app'],
data() {
return {
isOpen: [],
diff --git a/src/components/Workspace/SideBarItem.vue b/src/components/Workspace/SideBarItem.vue
index 90f5e2bb..4bfc7f6a 100644
--- a/src/components/Workspace/SideBarItem.vue
+++ b/src/components/Workspace/SideBarItem.vue
@@ -19,6 +19,7 @@ export default {
target: { type: String, default: '' },
click: { type: Function, default: () => {} },
},
+ emits: ['launch-app'],
components: {
Icon,
},
diff --git a/src/components/Workspace/SideBarSection.vue b/src/components/Workspace/SideBarSection.vue
index 61a8e5f7..ffd231fa 100644
--- a/src/components/Workspace/SideBarSection.vue
+++ b/src/components/Workspace/SideBarSection.vue
@@ -35,6 +35,7 @@ export default {
props: {
items: { type: Array, default: () => [] },
},
+ emits: ['launch-app'],
components: {
SideBarItem,
},