Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable27] only show weather credits if the app is enabled and the weather statu… #39663

Merged
merged 1 commit into from
Aug 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions apps/dashboard/src/DashboardApp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,17 @@

<a v-if="isAdmin" :href="appStoreUrl" class="button">{{ t('dashboard', 'Get more widgets from the App Store') }}</a>

<h3>{{ t('dashboard', 'Weather service') }}</h3>
<p>
{{ t('dashboard', 'For your privacy, the weather data is requested by your Nextcloud server on your behalf so the weather service receives no personal information.') }}
</p>
<p class="credits--end">
<a href="https://api.met.no/doc/TermsOfService" target="_blank" rel="noopener">{{ t('dashboard', 'Weather data from Met.no') }}</a>,
<a href="https://wiki.osmfoundation.org/wiki/Privacy_Policy" target="_blank" rel="noopener">{{ t('dashboard', 'geocoding with Nominatim') }}</a>,
<a href="https://www.opentopodata.org/#public-api" target="_blank" rel="noopener">{{ t('dashboard', 'elevation data from OpenTopoData') }}</a>.
</p>
<div v-if="statuses.weather && isStatusActive('weather')">
<h3>{{ t('dashboard', 'Weather service') }}</h3>
<p>
{{ t('dashboard', 'For your privacy, the weather data is requested by your Nextcloud server on your behalf so the weather service receives no personal information.') }}
</p>
<p class="credits--end">
<a href="https://api.met.no/doc/TermsOfService" target="_blank" rel="noopener">{{ t('dashboard', 'Weather data from Met.no') }}</a>,
<a href="https://wiki.osmfoundation.org/wiki/Privacy_Policy" target="_blank" rel="noopener">{{ t('dashboard', 'geocoding with Nominatim') }}</a>,
<a href="https://www.opentopodata.org/#public-api" target="_blank" rel="noopener">{{ t('dashboard', 'elevation data from OpenTopoData') }}</a>.
</p>
</div>
</div>
</NcModal>
</div>
Expand Down Expand Up @@ -229,7 +231,7 @@
}
if (element) {
this.callbacksStatus[app](element[0])
Vue.set(this.statuses, app, { mounted: true })

Check warning on line 234 in apps/dashboard/src/DashboardApp.vue

View workflow job for this annotation

GitHub Actions / eslint

Caution: `Vue` also has a named export `set`. Check if you meant to write `import {set} from 'vue'` instead
} else {
console.error('Failed to register panel in the frontend as no backend data was provided for ' + app)
}
Expand Down Expand Up @@ -261,16 +263,16 @@
* @param {Function} callback The callback function to register a panel which gets the DOM element passed as parameter
*/
register(app, callback) {
Vue.set(this.callbacks, app, callback)

Check warning on line 266 in apps/dashboard/src/DashboardApp.vue

View workflow job for this annotation

GitHub Actions / eslint

Caution: `Vue` also has a named export `set`. Check if you meant to write `import {set} from 'vue'` instead
},
registerStatus(app, callback) {
// always save callbacks in case user enables the status later
Vue.set(this.allCallbacksStatus, app, callback)

Check warning on line 270 in apps/dashboard/src/DashboardApp.vue

View workflow job for this annotation

GitHub Actions / eslint

Caution: `Vue` also has a named export `set`. Check if you meant to write `import {set} from 'vue'` instead
// register only if status is enabled or missing from config
if (this.isStatusActive(app)) {
this.registeredStatus.push(app)
this.$nextTick(() => {
Vue.set(this.callbacksStatus, app, callback)

Check warning on line 275 in apps/dashboard/src/DashboardApp.vue

View workflow job for this annotation

GitHub Actions / eslint

Caution: `Vue` also has a named export `set`. Check if you meant to write `import {set} from 'vue'` instead
})
}
},
Expand Down
4 changes: 2 additions & 2 deletions dist/dashboard-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/dashboard-main.js.map

Large diffs are not rendered by default.

Loading