fix(client): Propagate show_text_content setting from protocol to client view

This commit is contained in:
infosave2007
2026-01-24 14:28:53 +03:00
parent 57e331239c
commit 7735a25256
+4
View File
@@ -1124,6 +1124,10 @@ Router::get('/clients/{id}', function ($params) {
$stmt->execute([$serverData['install_protocol'] ?? '']); $stmt->execute([$serverData['install_protocol'] ?? '']);
$protocol = $stmt->fetch(); $protocol = $stmt->fetch();
} }
if ($protocol) {
$clientData['show_text_content'] = !empty($protocol['show_text_content']);
}
if ($protocol && ($protocol['output_template'] ?? '') !== '') { if ($protocol && ($protocol['output_template'] ?? '') !== '') {
$slug = $protocol['slug'] ?? ''; $slug = $protocol['slug'] ?? '';
$isWireguard = in_array($slug, ['amnezia-wg-advanced', 'wireguard-standard', 'amnezia-wg'], true); $isWireguard = in_array($slug, ['amnezia-wg-advanced', 'wireguard-standard', 'amnezia-wg'], true);