Add legacy ordering support toggle for each client
This commit is contained in:
@@ -105,6 +105,15 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Enable legacy ordering -->
|
||||
<Checkbox class="mb-3"
|
||||
id="enable_legacy_ordering"
|
||||
label="pin.enable_legacy_ordering"
|
||||
desc="pin.enable_legacy_ordering_desc"
|
||||
v-model="client.editEnableLegacyOrdering"
|
||||
default="true"
|
||||
></Checkbox>
|
||||
|
||||
<!-- Display Mode Override -->
|
||||
<div class="mb-3 mt-2">
|
||||
<label for="display_mode_override" class="form-label">{{ $t('pin.display_mode_override') }}</label>
|
||||
@@ -119,8 +128,17 @@
|
||||
<div class="form-text">{{ $t('pin.display_mode_override_desc') }} <a href="https://github.com/ClassicOldSong/Apollo/wiki/Display-Mode-Override" target="_blank">{{ $t('_common.learn_more') }}</a></div>
|
||||
</div>
|
||||
|
||||
<!-- Allow client commands -->
|
||||
<Checkbox class="mb-3"
|
||||
id="allow_client_commands"
|
||||
label="pin.allow_client_commands"
|
||||
desc="pin.allow_client_commands_desc"
|
||||
v-model="client.editAllowClientCommands"
|
||||
default="true"
|
||||
></Checkbox>
|
||||
|
||||
<!-- connect/disconnect commands -->
|
||||
<div class="mb-3 mt-2 d-flex flex-column" v-for="cmdType in ['do', 'undo']">
|
||||
<div class="mb-3 mt-2 d-flex flex-column" v-for="cmdType in ['do', 'undo']" v-if="client.editAllowClientCommands">
|
||||
<label class="mb-0 orm-label">{{ $t(`pin.client_${cmdType}_cmd`) }}</label>
|
||||
<div class="form-text">{{ $t(`pin.client_${cmdType}_cmd_desc`) }} <a href="https://github.com/ClassicOldSong/Apollo/wiki/Client-Commands" target="_blank">{{ $t('_common.learn_more') }}</a></div>
|
||||
<table class="mt-2 table" v-if="client[`edit_${cmdType}`].length > 0">
|
||||
@@ -185,6 +203,7 @@
|
||||
import { createApp } from 'vue'
|
||||
import { initApp } from './init'
|
||||
import Navbar from './Navbar.vue'
|
||||
import Checkbox from './Checkbox.vue'
|
||||
|
||||
let resetOTPTimeout = null;
|
||||
const qrContainer = document.createElement('div');
|
||||
@@ -353,7 +372,8 @@
|
||||
|
||||
let app = createApp({
|
||||
components: {
|
||||
Navbar
|
||||
Navbar,
|
||||
Checkbox
|
||||
},
|
||||
inject: ['i18n'],
|
||||
data,
|
||||
@@ -497,22 +517,26 @@
|
||||
if (currentEditingClient) {
|
||||
this.cancelEdit(currentEditingClient);
|
||||
}
|
||||
currentEditingClient = client;
|
||||
client.editing = true;
|
||||
client.editPerm = client.perm;
|
||||
client.editName = client.name;
|
||||
client.editAllowClientCommands = client.allow_client_commands;
|
||||
client.editEnableLegacyOrdering = client.enable_legacy_ordering;
|
||||
client.editDisplayMode = client.display_mode;
|
||||
client.edit_do = JSON.parse(JSON.stringify(client.do || []));
|
||||
client.edit_undo = JSON.parse(JSON.stringify(client.undo || []));
|
||||
currentEditingClient = client;
|
||||
|
||||
console.log(client.do, client.undo)
|
||||
},
|
||||
cancelEdit(client) {
|
||||
currentEditingClient = null;
|
||||
client.editing = false;
|
||||
client.editPerm = client.perm;
|
||||
client.editName = client.name;
|
||||
client.editDisplayMode = client.display_mode;
|
||||
currentEditingClient = null;
|
||||
client.editAllowClientCommands = client.allow_client_commands;
|
||||
client.editEnableLegacyOrdering = client.enable_legacy_ordering;
|
||||
},
|
||||
saveClient(client) {
|
||||
client.editing = false;
|
||||
@@ -521,6 +545,8 @@
|
||||
uuid: client.uuid,
|
||||
name: client.editName,
|
||||
display_mode: client.editDisplayMode.trim(),
|
||||
allow_client_commands: client.editAllowClientCommands,
|
||||
enable_legacy_ordering: client.editEnableLegacyOrdering,
|
||||
perm: client.editPerm & permissionMapping._all,
|
||||
do: client.edit_do.reduce((filtered, {cmd: _cmd, elevated}) => {
|
||||
const cmd = _cmd.trim()
|
||||
@@ -643,7 +669,17 @@
|
||||
.then((response) => {
|
||||
if (response.status && response.named_certs && response.named_certs.length) {
|
||||
this.platform = response.platform
|
||||
this.clients = response.named_certs.map(({name, uuid, display_mode, perm, connected, do: _do, undo}) => {
|
||||
this.clients = response.named_certs.map(({
|
||||
name,
|
||||
uuid,
|
||||
display_mode,
|
||||
perm,
|
||||
connected,
|
||||
do: _do,
|
||||
undo,
|
||||
allow_client_commands,
|
||||
enable_legacy_ordering
|
||||
}) => {
|
||||
const permInt = parseInt(perm, 10);
|
||||
return {
|
||||
name,
|
||||
@@ -653,7 +689,9 @@
|
||||
connected,
|
||||
editing: false,
|
||||
do: _do,
|
||||
undo
|
||||
undo,
|
||||
allow_client_commands,
|
||||
enable_legacy_ordering
|
||||
}
|
||||
})
|
||||
currentEditingClient = null;
|
||||
|
||||
@@ -307,7 +307,7 @@
|
||||
"lan_encryption_mode_2": "Required for all clients",
|
||||
"lan_encryption_mode_desc": "This determines when encryption will be used when streaming over your local network. Encryption can reduce streaming performance, particularly on less powerful hosts and clients.",
|
||||
"legacy_ordering": "App ordering for legacy clients",
|
||||
"legacy_ordering_desc": "Enable ordering support workaround for legacy clients. Can cause issues with clients or scripts that can't handle UTF8 correctly.",
|
||||
"legacy_ordering_desc": "Enable ordering support workaround for legacy clients. Can cause issues with clients or scripts that can't handle UTF8 correctly. Artemis clients support this by default.",
|
||||
"limit_framerate": "Limit capture framerate",
|
||||
"limit_framerate_desc": "Limit the framerate being captured to client requested framerate. May not run at full framerate if vsync is enabled and display refreshrate does not match requested framerate. Could cause lag on some clients if disabled.",
|
||||
"locale": "Locale",
|
||||
@@ -497,6 +497,8 @@
|
||||
"launch": "Launch Apps"
|
||||
},
|
||||
"pin": {
|
||||
"allow_client_commands": "Allow client commands",
|
||||
"allow_client_commands_desc": "Allow client commands to be executed when connecting to this device.",
|
||||
"client_do_cmd": "Client connect commands",
|
||||
"client_do_cmd_desc": "Commands to be executed when client connects. All of the commands are executed detached.",
|
||||
"client_undo_cmd": "Client disconnect commands",
|
||||
@@ -505,6 +507,8 @@
|
||||
"display_mode_override": "Display Mode Override",
|
||||
"display_mode_override_desc": "Apollo will ignore client requested display mode and use this value to configure (virtual) displays. Leave blank for auto matching. Format: [Width]x[Height]x[FPS]",
|
||||
"display_mode_override_error": "Invalid mode override. Format: [Width]x[Height]x[FPS]",
|
||||
"enable_legacy_ordering": "Enable legacy ordering",
|
||||
"enable_legacy_ordering_desc": "Enable app ordering for legacy clients. Disable if this client can't handle UTF8 correctly. Needs to enable \"App ordering for legacy clients\" in the Advanced settings.",
|
||||
"pair_failure": "Pairing Failed: Check if the PIN is typed correctly",
|
||||
"pair_success": "Success! Please check Moonlight to continue",
|
||||
"pair_success_check_perm": "Pair success! Please grant necessary permissions to the client manually below.",
|
||||
|
||||
@@ -302,7 +302,7 @@
|
||||
"lan_encryption_mode_2": "强制所有客户端使用",
|
||||
"lan_encryption_mode_desc": "这将决定在本地网络上进行流媒体传输时何时使用加密。加密会降低流媒体性能,尤其是在功能较弱的主机和客户端上。",
|
||||
"legacy_ordering": "过时客户端 APP 排序支持",
|
||||
"legacy_ordering_desc": "启用对过时客户端的 APP 排序支持。可能在某些无法正确处理 UTF8 编码的客户端/脚本上导致问题。",
|
||||
"legacy_ordering_desc": "启用对过时客户端的 APP 排序支持。可能在某些无法正确处理 UTF8 编码的客户端/脚本上导致问题。Artemis 客户端默认支持此功能。",
|
||||
"limit_framerate": "限制捕获帧率",
|
||||
"limit_framerate_desc": "将捕获帧率限制到客户端请求的帧率。当启用垂直同步且显示器刷新率与客户端刷新率不匹配时可能会跑不满请求的帧率。若禁用,可能会在某些客户端上导致延迟。",
|
||||
"locale": "本地化",
|
||||
@@ -490,6 +490,8 @@
|
||||
"launch": "启动APP"
|
||||
},
|
||||
"pin": {
|
||||
"allow_client_commands": "允许客户端命令",
|
||||
"allow_client_commands_desc": "允许客户端命令在运行此应用时执行。",
|
||||
"client_do_cmd": "客户端连入命令",
|
||||
"client_do_cmd_desc": "当此客户端连接时执行的命令。所有命令都以后台模式允许。",
|
||||
"client_undo_cmd": "客户端断开命令",
|
||||
@@ -498,6 +500,8 @@
|
||||
"display_mode_override": "显示模式覆盖",
|
||||
"display_mode_override_desc": "Apollo 将无视客户端请求的显示参数而使用此参数来配置(虚拟)显示器。留空则自动匹配。格式: [Width]x[Height]x[FPS]",
|
||||
"display_mode_override_error": "无效的显示模式。格式: [Width]x[Height]x[FPS]",
|
||||
"enable_legacy_ordering": "启用过时客户端 APP 排序",
|
||||
"enable_legacy_ordering_desc": "启用对过时客户端的 APP 排序支持。如果此客户端无法正确处理 UTF8 编码,请禁用。需要在高级设置中启用 \"过时客户端 APP 排序支持\" 选项。",
|
||||
"pair_failure": "配对失败:请检查 PIN 码是否正确输入",
|
||||
"pair_success": "成功!请检查 Moonlight 以继续",
|
||||
"pair_success_check_perm": "配对成功!请在下方手动授予客户端必要的权限。",
|
||||
|
||||
Reference in New Issue
Block a user