Alert for already alphabetized
This commit is contained in:
@@ -591,8 +591,16 @@
|
|||||||
this.listReordered = true;
|
this.listReordered = true;
|
||||||
},
|
},
|
||||||
alphabetizeApps() {
|
alphabetizeApps() {
|
||||||
this.apps.sort((a, b) => a.name.localeCompare(b.name));
|
let orderStat = 0;
|
||||||
this.listReordered = true;
|
this.apps.sort((a, b) => {
|
||||||
|
const result = a.name.localeCompare(b.name);
|
||||||
|
orderStat += result;
|
||||||
|
return result;
|
||||||
|
});
|
||||||
|
this.listReordered = orderStat !== this.apps.length - 1;
|
||||||
|
if (!this.listReordered) {
|
||||||
|
alert(this.$t('apps.already_ordered'));
|
||||||
|
}
|
||||||
},
|
},
|
||||||
saveOrder() {
|
saveOrder() {
|
||||||
this.actionDisabled = true;
|
this.actionDisabled = true;
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
"allow_client_commands": "Allow client prepare commands",
|
"allow_client_commands": "Allow client prepare commands",
|
||||||
"allow_client_commands_desc": "Whether to execute client prepare commands when running this app.",
|
"allow_client_commands_desc": "Whether to execute client prepare commands when running this app.",
|
||||||
"alphabetize": "Alphabetize",
|
"alphabetize": "Alphabetize",
|
||||||
|
"already_ordered": "Apps are already alphabetized.",
|
||||||
"app_name": "Application Name",
|
"app_name": "Application Name",
|
||||||
"app_name_desc": "Application Name, as shown on Moonlight",
|
"app_name_desc": "Application Name, as shown on Moonlight",
|
||||||
"applications_desc": "Applications are refreshed when a session is terminated.",
|
"applications_desc": "Applications are refreshed when a session is terminated.",
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
"allow_client_commands": "允许客户端准备命令",
|
"allow_client_commands": "允许客户端准备命令",
|
||||||
"allow_client_commands_desc": "在此APP运行时是否允许执行客户端准备命令",
|
"allow_client_commands_desc": "在此APP运行时是否允许执行客户端准备命令",
|
||||||
"alphabetize": "按字母排序",
|
"alphabetize": "按字母排序",
|
||||||
|
"already_ordered": "应用已按字母排序。",
|
||||||
"app_name": "应用名称",
|
"app_name": "应用名称",
|
||||||
"app_name_desc": "在 Moonlight 显示的应用名称",
|
"app_name_desc": "在 Moonlight 显示的应用名称",
|
||||||
"applications_desc": "应用列表在会话终止时刷新",
|
"applications_desc": "应用列表在会话终止时刷新",
|
||||||
|
|||||||
Reference in New Issue
Block a user