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!

πŸ‘Œ Code review : implemented the requested changes

Totto1674370ac5577b
diff --git a/src/components/Widgets/Clock.vue b/src/components/Widgets/Clock.vue
index 26414db2..9b238f45 100644
--- a/src/components/Widgets/Clock.vue
+++ b/src/components/Widgets/Clock.vue
@@ -37,12 +37,10 @@ export default {
return this.timeZone.split('/')[1].replaceAll('_', ' ');
},
showSeconds() {
- if (this.options.hideSeconds) return !this.options.hideSeconds;
- // this is the default
- return true;
+ return !this.options.hideSeconds;
},
use12Hour() {
- if (this.options.use12Hour) return this.options.use12Hour;
+ if (typeof this.options.use12Hour === "boolean") return this.options.use12Hour;
// this is the default, it gets computed by the DateTimeFormat implementation
return Intl.DateTimeFormat(this.timeFormat, { timeZone: this.timeZone, hour: 'numeric' }).resolvedOptions().hour12 ?? false;
},