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

Add attributions for weather status in modal #22319

Merged
merged 1 commit into from
Aug 21, 2020
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
2 changes: 1 addition & 1 deletion apps/dashboard/js/dashboard.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/dashboard/js/dashboard.js.map

Large diffs are not rendered by default.

32 changes: 31 additions & 1 deletion apps/dashboard/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div id="app-dashboard" :style="backgroundStyle">
<h2>{{ greeting.text }}</h2>
<ul class="statuses">
<div v-for="status in registeredStatus"
<div v-for="status in sortedRegisteredStatus"
:id="'status-' + status"
:key="status">
<div :ref="'status-' + status" />
Expand Down Expand Up @@ -59,6 +59,14 @@

<h3>{{ t('dashboard', 'Change background image') }}</h3>
<BackgroundSettings :background="background" @update:background="updateBackground" />

<h3>{{ t('dashboard', 'Weather service') }}</h3>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally we should put this in the weather_status app somehow, but fine for now I'd say 👍

<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>
</Modal>
</div>
Expand Down Expand Up @@ -164,6 +172,9 @@ export default {
return indexA - indexB || a.id - b.id
})
},
sortedRegisteredStatus() {
return this.registeredStatus.slice().sort((a, b) => a > b)
},
},
watch: {
callbacks() {
Expand Down Expand Up @@ -494,6 +505,25 @@ export default {
padding: 12px 24px;
margin: 0;
}

p {
max-width: 650px;
margin: 0 auto;

a:hover,
a:focus {
border-bottom: 2px solid var(--color-border);
}
}

.credits--end {
padding-bottom: 32px;
color: var(--color-text-maxcontrast);

a {
color: var(--color-text-maxcontrast);
}
}
}

.flip-list-move {
Expand Down