Add alphabetize button to app list

This commit is contained in:
Yukino Song
2025-05-28 20:41:53 +08:00
parent 4030680fcc
commit d89f3f75d3
3 changed files with 9 additions and 0 deletions

View File

@@ -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;

View File

@@ -36,6 +36,7 @@
"add_new": "Add New",
"allow_client_commands": "Allow client prepare commands",
"allow_client_commands_desc": "Whether to execute client prepare commands when running this app.",
"alphabetize": "Alphabetize",
"app_name": "Application Name",
"app_name_desc": "Application Name, as shown on Moonlight",
"applications_desc": "Applications are refreshed when a session is terminated.",

View File

@@ -36,6 +36,7 @@
"add_new": "添加新应用",
"allow_client_commands": "允许客户端准备命令",
"allow_client_commands_desc": "在此APP运行时是否允许执行客户端准备命令",
"alphabetize": "按字母排序",
"app_name": "应用名称",
"app_name_desc": "在 Moonlight 显示的应用名称",
"applications_desc": "应用列表在会话终止时刷新",