diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index 92a452b5..b44873c5 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 🐛 1.9.7 - Minor UI Editor Bug fixes [PR #416](https://github.com/Lissy93/dashy/pull/416) +- Fixes unable to edit item bug (#415) +- Fixes unable to add new app bug (#390) +- Fixes nav links visibility (#389) + ## ⚡️ 1.9.6 - Adds Proxy Support for Widget Requests [PR #392](https://github.com/Lissy93/dashy/pull/392) - Refactors widget mixin to include data requests, so that code can be shared between widgets - Adds a Node endpoint for proxying requests server-side, used for APIs that are not CORS enabled diff --git a/package.json b/package.json index 0a26e47c..3eae86ad 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "Dashy", - "version": "1.9.6", + "version": "1.9.7", "license": "MIT", "main": "server", "author": "Alicia Sykes (https://aliciasykes.com)", @@ -96,4 +96,4 @@ "> 1%", "last 2 versions" ] -} +} \ No newline at end of file diff --git a/src/components/LinkItems/Section.vue b/src/components/LinkItems/Section.vue index 351bd60f..db3d73ee 100644 --- a/src/components/LinkItems/Section.vue +++ b/src/components/LinkItems/Section.vue @@ -12,11 +12,11 @@ @openContextMenu="openContextMenu" > -
+
{{ $t('home.no-items-section') }}
-
@@ -58,7 +58,7 @@ />
0) return 'widget'; - if (this.items && this.items.length > 0) return 'item'; - return 'empty'; + hasItems() { + if (this.isEditMode) return true; + return this.items && this.items.length > 0; + }, + hasWidgets() { + return this.widgets && this.widgets.length > 0; + }, + isEmpty() { + return !this.hasItems && !this.hasWidgets; }, /* If the sortBy attribute is specified, then return sorted data */ sortedItems() { diff --git a/src/utils/SectionHelpers.js b/src/utils/SectionHelpers.js index 2d16ba18..28082bfb 100644 --- a/src/utils/SectionHelpers.js +++ b/src/utils/SectionHelpers.js @@ -8,7 +8,8 @@ export const shouldBeVisible = (routeName) => !hideFurnitureOn.includes(routeNam /* Based on section title, item name and index, return a string value for ID */ const makeItemId = (sectionStr, itemStr, index) => { const charSum = sectionStr.split('').map((a) => a.charCodeAt(0)).reduce((x, y) => x + y); - const itemTitleStr = itemStr.replace(/\s+/g, '-').replace(/[^a-zA-Z ]/g, '').toLowerCase(); + const newItemStr = itemStr || `unknown_${Math.random()}`; + const itemTitleStr = newItemStr.replace(/\s+/g, '-').replace(/[^a-zA-Z ]/g, '').toLowerCase(); return `${index}_${charSum}_${itemTitleStr}`; }; diff --git a/src/utils/defaults.js b/src/utils/defaults.js index 0754c99d..cedd90d9 100644 --- a/src/utils/defaults.js +++ b/src/utils/defaults.js @@ -3,10 +3,7 @@ module.exports = { pageInfo: { title: 'Dashy', description: '', - navLinks: [ - { title: 'Home', path: '/' }, - { title: 'Source', path: 'https://github.com/Lissy93/dashy' }, - ], + navLinks: [], footerText: '', }, /* Default appConfig to be used, if user does not specify their own */