fix checkbox order and icons
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
This commit is contained in:
parent
3940abcf48
commit
fd2e4e496c
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -39,7 +39,7 @@
|
||||||
<div class="modal__content">
|
<div class="modal__content">
|
||||||
<h3>{{ t('dashboard', 'Edit widgets') }}</h3>
|
<h3>{{ t('dashboard', 'Edit widgets') }}</h3>
|
||||||
<ol class="panels">
|
<ol class="panels">
|
||||||
<li v-for="(cb, status) in allCallbacksStatus" :key="status">
|
<li v-for="status in sortedAllStatuses" :key="status">
|
||||||
<input :id="'status-checkbox-' + status"
|
<input :id="'status-checkbox-' + status"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
class="checkbox"
|
class="checkbox"
|
||||||
|
@ -105,11 +105,11 @@ const shippedBackgroundList = loadState('dashboard', 'shippedBackgrounds')
|
||||||
const statusInfo = {
|
const statusInfo = {
|
||||||
weather: {
|
weather: {
|
||||||
text: t('dashboard', 'Weather'),
|
text: t('dashboard', 'Weather'),
|
||||||
icon: 'icon-github',
|
icon: 'icon-weather-status',
|
||||||
},
|
},
|
||||||
status: {
|
status: {
|
||||||
text: t('dashboard', 'User status'),
|
text: t('dashboard', 'User status'),
|
||||||
icon: 'icon-discourse',
|
icon: 'icon-user-status-online',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -190,6 +190,9 @@ export default {
|
||||||
isStatusActive() {
|
isStatusActive() {
|
||||||
return (status) => !(status in this.enabledStatuses) || this.enabledStatuses[status]
|
return (status) => !(status in this.enabledStatuses) || this.enabledStatuses[status]
|
||||||
},
|
},
|
||||||
|
sortedAllStatuses() {
|
||||||
|
return Object.keys(this.allCallbacksStatus).slice().sort((a, b) => a > b)
|
||||||
|
},
|
||||||
sortedPanels() {
|
sortedPanels() {
|
||||||
return Object.values(this.panels).sort((a, b) => {
|
return Object.values(this.panels).sort((a, b) => {
|
||||||
const indexA = this.layout.indexOf(a.id)
|
const indexA = this.layout.indexOf(a.id)
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -360,6 +360,12 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
.icon-weather-status {
|
||||||
|
background-image: url('./../img/app-dark.svg');
|
||||||
|
}
|
||||||
|
body.theme--dark .icon-weather-status {
|
||||||
|
background-image: url('./../img/app.svg');
|
||||||
|
}
|
||||||
.icon-clearsky-day {
|
.icon-clearsky-day {
|
||||||
background-image: url('./../img/sun.svg');
|
background-image: url('./../img/sun.svg');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue