Skip to content

Commit

Permalink
chore(client): trim unnecessary description
Browse files Browse the repository at this point in the history
  • Loading branch information
1715173329 authored Sep 3, 2024
1 parent 4cf4d63 commit 1060b86
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
26 changes: 13 additions & 13 deletions htdocs/luci-static/resources/view/homeproxy/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,17 @@ return view.extend({
var features = data[1],
hosts = data[2]?.hosts;

/* Cache all configured proxy nodes, they will be called multiple times */
var proxy_nodes = {};
uci.sections(data[0], 'node', (res) => {
var nodeaddr = ((res.type === 'direct') ? res.override_address : res.address) || '',
nodeport = ((res.type === 'direct') ? res.override_port : res.port) || '';

proxy_nodes[res['.name']] =
String.format('[%s] %s', res.type, res.label || ((stubValidator.apply('ip6addr', nodeaddr) ?
String.format('[%s]', nodeaddr) : nodeaddr) + ':' + nodeport));
});

m = new form.Map('homeproxy', _('HomeProxy'),
_('The modern ImmortalWrt proxy platform for ARM64/AMD64.'));

Expand All @@ -123,17 +134,6 @@ return view.extend({
]);
}

/* Cache all configured proxy nodes, they will be called multiple times */
var proxy_nodes = {};
uci.sections(data[0], 'node', (res) => {
var nodeaddr = ((res.type === 'direct') ? res.override_address : res.address) || '',
nodeport = ((res.type === 'direct') ? res.override_port : res.port) || '';

proxy_nodes[res['.name']] =
String.format('[%s] %s', res.type, res.label || ((stubValidator.apply('ip6addr', nodeaddr) ?
String.format('[%s]', nodeaddr) : nodeaddr) + ':' + nodeport));
});

s = m.section(form.NamedSection, 'config', 'homeproxy');

s.tab('routing', _('Routing Settings'));
Expand Down Expand Up @@ -383,7 +383,7 @@ return view.extend({
so.editable = true;

so = ss.option(form.ListValue, 'domain_strategy', _('Domain strategy'),
_('If set, the server domain name will be resolved to IP before connecting.<br/>dns.strategy will be used if empty.'));
_('If set, the server domain name will be resolved to IP before connecting.<br/>'));
for (var i in hp.dns_strategy)
so.value(i, hp.dns_strategy[i]);
so.modalonly = true;
Expand Down Expand Up @@ -725,7 +725,7 @@ return view.extend({
so.modalonly = true;

so = ss.option(form.ListValue, 'address_strategy', _('Address strategy'),
_('The domain strategy for resolving the domain name in the address. dns.strategy will be used if empty.'));
_('The domain strategy for resolving the domain name in the address.'));
for (var i in hp.dns_strategy)
so.value(i, hp.dns_strategy[i]);
so.modalonly = true;
Expand Down
3 changes: 2 additions & 1 deletion htdocs/luci-static/resources/view/homeproxy/status.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0-only
/*
* SPDX-License-Identifier: GPL-2.0-only
*
* Copyright (C) 2022-2023 ImmortalWrt.org
*/
Expand Down

0 comments on commit 1060b86

Please sign in to comment.