Add alphabetize button to app list
This commit is contained in:
@@ -470,6 +470,9 @@
|
||||
<button class="btn btn-primary" @click="newApp" :disabled="actionDisabled">
|
||||
<i class="fas fa-plus"></i> {{ $t('apps.add_new') }}
|
||||
</button>
|
||||
<button class="btn btn-secondary float-end" @click="alphabetizeApps" :disabled="actionDisabled" v-if="!listReordered">
|
||||
<i class="fas fa-sort-alpha-up"></i> {{ $t('apps.alphabetize') }}
|
||||
</button>
|
||||
<button class="btn btn-warning float-end" @click="saveOrder" :disabled="actionDisabled" v-if="listReordered">
|
||||
<i class="fas fa-floppy-disk"></i> {{ $t('apps.save_order') }}
|
||||
</button>
|
||||
@@ -587,6 +590,10 @@
|
||||
|
||||
this.listReordered = true;
|
||||
},
|
||||
alphabetizeApps() {
|
||||
this.apps.sort((a, b) => a.name.localeCompare(b.name));
|
||||
this.listReordered = true;
|
||||
},
|
||||
saveOrder() {
|
||||
this.actionDisabled = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user