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!

Fixed as suggested

Matthias Bilger59118a54dd84
diff --git a/src/components/Widgets/Mvg.vue b/src/components/Widgets/Mvg.vue
index fa9ff3f7..166eed00 100644
--- a/src/components/Widgets/Mvg.vue
+++ b/src/components/Widgets/Mvg.vue
@@ -72,12 +72,8 @@ export default {
const diff = Math.max(0, Math.round(msDifference / 60000));
return diff;
},
- limitLength(str) {
- return str;
- },
},
computed: {
- /* API endpoint, either for self-hosted or managed instance */
isLocationId() {
if (!this.options.location) {
this.error('Location is required');
@@ -91,8 +87,7 @@ export default {
return 0;
},
limit() {
- if (this.options.limit) return this.options.limit;
- return 10;
+ return this.options.limit || 10;
},
endpointDeparture() {
return `${widgetApiEndpoints.mvg}/departure?globalId=${this.location}&limit=30&offsetInMinutes=${this.offset}&transportTypes=UBAHN,TRAM,BUS,SBAHN`;
diff --git a/src/components/Widgets/MvgConnection.vue b/src/components/Widgets/MvgConnection.vue
index 998e6356..b4eae501 100644
--- a/src/components/Widgets/MvgConnection.vue
+++ b/src/components/Widgets/MvgConnection.vue
@@ -90,9 +90,6 @@ export default {
const diff = Math.max(0, Math.round(msDifference / 60000));
return diff;
},
- limitLength(str) {
- return str;
- },
formatTime(str) {
const d = new Date(Date.parse(str));
function ii(i) {
@@ -155,7 +152,7 @@ export default {
return `${widgetApiEndpoints.mvg}/location?query=${encodeURIComponent(loc)}`;
},
endpointConnection() {
- return `${widgetApiEndpoints.mvg}/connection?${this.formatPoint(this.locations.origin, 'origin')}&${this.formatPoint(this.locations.destination, 'destination')}&routingDateTime=${(new Date()).toISOString()}&limit=30&offsetInMinutes=${this.offset}&transportTypes=${this.transportTypes}`;
+ return `${widgetApiEndpoints.mvg}/connection?${this.formatPoint(this.locations.origin, 'origin')}&${this.formatPoint(this.locations.destination, 'destination')}&routingDateTime=${(new Date()).toISOString()}&offsetInMinutes=${this.offset}&transportTypes=${this.transportTypes}`;
},
update() {
this.startLoading();