🔀 Merge pull request #1481 from Lissy93/FEAT/2.1.2_dependency-updates-n-fixes

[FEAT] Version 2.1.2 (+dependency updates, bug fixes)
This commit is contained in:
Alicia Sykes
2024-03-03 15:34:03 +00:00
committed by GitHub
37 changed files with 2289 additions and 3323 deletions

View File

@@ -115,7 +115,9 @@ export default {
},
},
mounted() {
this.jsonData = this.config;
const jsonData = { ...this.config };
jsonData.sections = jsonData.sections.map(({ filteredItems, ...section }) => section);
this.jsonData = jsonData;
if (!this.allowWriteToDisk) this.saveMode = 'local';
},
methods: {

View File

@@ -94,6 +94,7 @@ export default {
const raw = rawAppConfig;
const isEmptyObject = (obj) => (typeof obj === 'object' && Object.keys(obj).length === 0);
const isEmpty = (value) => (value === undefined || isEmptyObject(value));
// Delete empty values
Object.keys(raw).forEach(key => {
if (isEmpty(raw[key])) delete raw[key];

View File

@@ -9,7 +9,8 @@
:target="anchorTarget"
:class="`item ${makeClassList}`"
v-tooltip="getTooltipOptions()"
rel="noopener noreferrer" tabindex="0"
:rel="`${item.rel || 'noopener noreferrer'}`"
tabindex="0"
:id="`link-${item.id}`"
:style="customStyle"
>
@@ -258,6 +259,9 @@ export default {
overflow: hidden;
span.text {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
display: block;
}
}

View File

@@ -24,6 +24,8 @@ export default {
const isSubPag = !!this.$store.state.currentConfigInfo;
const jsonConfig = config;
if (isSubPag) delete jsonConfig.appConfig;
jsonConfig.sections = jsonConfig.sections.map(({ filteredItems, ...section }) => section);
// 2. Convert JSON into YAML
const yamlOptions = {};
const strjsonConfig = JSON.stringify(jsonConfig);

View File

@@ -292,11 +292,15 @@ const store = new Vuex.Store({
InfoHandler('Color palette updated', InfoKeys.VISUAL);
},
[SET_ITEM_LAYOUT](state, layout) {
state.config.appConfig.layout = layout;
const newConfig = { ...state.config };
newConfig.appConfig.layout = layout;
state.config = newConfig;
InfoHandler('Layout updated', InfoKeys.VISUAL);
},
[SET_ITEM_SIZE](state, iconSize) {
state.config.appConfig.iconSize = iconSize;
const newConfig = { ...state.config };
newConfig.appConfig.iconSize = iconSize;
state.config = newConfig;
InfoHandler('Item size updated', InfoKeys.VISUAL);
},
[UPDATE_CUSTOM_CSS](state, customCss) {

View File

@@ -93,8 +93,9 @@ export const getCustomColors = () => {
* So that when the hotkey is pressed, the app/ service can be launched
*/
export const getCustomKeyShortcuts = () => {
const Accumulator = new ConfigAccumulator();
const results = [];
const sections = config.sections || [];
const sections = filterUserSections(Accumulator.sections()) || [];
sections.forEach((section) => {
const itemsWithHotKeys = section.items.filter(item => item.hotkey);
results.push(itemsWithHotKeys.map(item => ({ hotkey: item.hotkey, url: item.url })));

View File

@@ -982,6 +982,11 @@
"type": "number",
"description": "A numeric shortcut key, between 0 and 9. Useful for quickly launching frequently used applications"
},
"rel": {
"title": "rel",
"type": "string",
"description": "The rel attribute for the link. For specifying the relationship between the current document and the linked document"
},
"tags": {
"title": "Tags",
"type": "array",
@@ -1086,6 +1091,11 @@
}
}
}
},
"filteredItems": {
"title": "Filtered Items - temp",
"type": "array",
"description": "This attribute will be deprecated in the next release - do not use!"
}
}
}

View File

@@ -9,7 +9,7 @@ export const welcomeMsg = () => {
/* Prints warning message, usually when there is a configuration error */
export const warningMsg = (message, stack) => {
console.info(
`\n%c⚠ Warning ⚠️%c \n${message} \n\n%cThis is likely not an issue with Dashy, but rather your configuration. If you think it is a bug, please open a ticket on GitHub: https://git.io/JukXk`,
`\n%c⚠ Warning ⚠️%c \n${message} \n\n%cThis is likely not an issue with Dashy, but rather your configuration.\nIf you think it is a bug, please open a ticket on GitHub: https://git.io/JukXk`,
"color:#ceb73f; background: #ceb73f33; font-size:1.5rem; padding:0.15rem; margin: 1rem auto; font-family: Rockwell, Tahoma, 'Trebuchet MS', Helvetica; border: 2px solid #ceb73f; border-radius: 4px; font-weight: bold; text-shadow: 1px 1px 1px #000000bf;",
'font-weight: bold; font-size: 1rem;color: #ceb73f;',
"color: #ceb73f; font-size: 0.75rem; font-family: Tahoma, 'Trebuchet MS', Helvetica;",

View File

@@ -89,6 +89,9 @@ export default {
<style scoped lang="scss">
.work-space {
min-height: calc(100vh - var(--footer-height));
min-height: fit-content;
}
:global(footer) {
display: none;
}
</style>