<div id="app-dashboard">
<h2>{{ greeting.icon }} {{ greeting.text }}</h2>
- <Draggable class="panels" v-model="layout" @end="saveLayout">
+ <Draggable v-model="layout" class="panels" @end="saveLayout">
<div v-for="panelId in layout" :key="panels[panelId].id" class="panel">
<div class="panel--header">
<h3 :class="panels[panelId].iconClass">
<Modal v-if="modal" @close="closeModal">
<div class="modal__content">
<h3>{{ t('dashboard', 'Edit widgets') }}</h3>
- <transition-group name="flip-list" tag="ol">
+ <Draggable v-model="layout"
+ class="panels"
+ tag="ol"
+ @end="saveLayout">
<li v-for="panel in sortedPanels" :key="panel.id">
<input :id="'panel-checkbox-' + panel.id"
type="checkbox"
{{ panel.title }}
</label>
</li>
- <li key="appstore">
- <a :href="appStoreUrl" class="button">{{ t('dashboard', 'Get more widgets from the app store') }}</a>
+ </Draggable>
+ <transition-group name="flip-list" tag="ol">
+ <li v-for="panel in sortedPanels" :key="panel.id">
+ <input :id="'panel-checkbox-' + panel.id"
+ type="checkbox"
+ class="checkbox"
+ :checked="isActive(panel)"
+ @input="updateCheckbox(panel, $event.target.checked)">
+ <label :for="'panel-checkbox-' + panel.id" :class="panel.iconClass">
+ {{ panel.title }}
+ </label>
</li>
</transition-group>
+
+ <a :href="appStoreUrl" class="button">{{ t('dashboard', 'Get more widgets from the app store') }}</a>
</div>
</Modal>
</div>
rerenderPanels() {
for (const app in this.callbacks) {
const element = this.$refs[app]
+ if (this.layout.indexOf(app) === -1) {
+ continue
+ }
if (this.panels[app] && this.panels[app].mounted) {
continue
}
width: 30vw;
margin: 20px;
ol {
+ display: flex;
+ flex-direction: column;
list-style-type: none;
}
li label {