Skip to content

Commit

Permalink
chore(client): update title/description for rule set
Browse files Browse the repository at this point in the history
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
  • Loading branch information
1715173329 committed Jan 22, 2024
1 parent c7d8e15 commit 20406cf
Showing 1 changed file with 21 additions and 19 deletions.
40 changes: 21 additions & 19 deletions htdocs/luci-static/resources/view/homeproxy/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -479,8 +479,8 @@ return view.extend({
so.datatype = 'or(cidr, ipaddr)';
so.modalonly = true;

so = ss.option(form.Flag, 'source_ip_is_private', _('Source IP is Private'),
_('Match non-public source IP.'));
so = ss.option(form.Flag, 'source_ip_is_private', _('Private source IP'),
_('Match private source IP.'));
so.default = so.disabled;
so.rmempty = false;
so.modalonly = true;
Expand All @@ -490,8 +490,8 @@ return view.extend({
so.datatype = 'or(cidr, ipaddr)';
so.modalonly = true;

so = ss.option(form.Flag, 'ip_is_private', _('IP is Private'),
_('Match non-public IP.'));
so = ss.option(form.Flag, 'ip_is_private', _('Private IP'),
_('Match private IP.'));
so.default = so.disabled;
so.rmempty = false;
so.modalonly = true;
Expand Down Expand Up @@ -528,8 +528,8 @@ return view.extend({
_('Match user name.'));
so.modalonly = true;

so = ss.option(form.MultiValue, 'rule_set', _('Ruleset'),
_('Match Rule Set.'));
so = ss.option(form.MultiValue, 'rule_set', _('Rule set'),
_('Match rule set.'));
so.load = function(section_id) {
delete this.keylist;
delete this.vallist;
Expand All @@ -544,8 +544,8 @@ return view.extend({
}
so.modalonly = true;

so = ss.option(form.Flag, 'rule_set_ipcidr_match_source', _('Ruleset ipcidr match source'),
_('Make <code>ipcidr</code> in rule sets match the source IP.'));
so = ss.option(form.Flag, 'rule_set_ipcidr_match_source', _('Match source IP via rule set'),
_('Make IP CIDR in rule set used to match the source IP.'));
so.default = so.disabled;
so.rmempty = false;
so.modalonly = true;
Expand Down Expand Up @@ -825,8 +825,8 @@ return view.extend({
_('Match user name.'));
so.modalonly = true;

so = ss.option(form.MultiValue, 'rule_set', _('Ruleset'),
_('Match Rule Set.'));
so = ss.option(form.MultiValue, 'rule_set', _('Rule set'),
_('Match rule set.'));
so.load = function(section_id) {
delete this.keylist;
delete this.vallist;
Expand Down Expand Up @@ -895,8 +895,8 @@ return view.extend({
/* DNS rules end */
/* Custom routing settings end */

/* Rule Set settings start */
s.tab('ruleset', _('Rule Set'));
/* Rule set settings start */
s.tab('ruleset', _('Rule set'));
o = s.taboption('ruleset', form.SectionValue, '_ruleset', form.GridSection, 'ruleset');
o.depends('routing_mode', 'custom');

Expand All @@ -905,7 +905,7 @@ return view.extend({
ss.rowcolors = true;
ss.sortable = true;
ss.nodescriptions = true;
ss.modaltitle = L.bind(hp.loadModalTitle, this, _('Ruleset'), _('Add a ruleset'), data[0]);
ss.modaltitle = L.bind(hp.loadModalTitle, this, _('Rule set'), _('Add a rule set'), data[0]);
ss.sectiontitle = L.bind(hp.loadDefaultLabel, this, data[0]);
ss.renderSectionAdd = L.bind(hp.renderSectionAdd, this, ss);

Expand Down Expand Up @@ -938,9 +938,12 @@ return view.extend({
so.depends('type', 'local');
so.modalonly = true;

so = ss.option(form.Value, 'url', _('Ruleset URL'));
so = ss.option(form.Value, 'url', _('Rule set URL'));
so.validate = function(section_id, value) {
if (section_id && value) {
if (section_id) {
if (!value)
return _('Expecting: %s').format(_('non-empty value'));

try {
var url = new URL(value);
if (!url.hostname)
Expand All @@ -958,7 +961,7 @@ return view.extend({
so.modalonly = true;

so = ss.option(form.ListValue, 'outbound', _('Outbound'),
_('Tag of the outbound to download rule-set.'));
_('Tag of the outbound to download rule set.'));
so.load = function(section_id) {
delete this.keylist;
delete this.vallist;
Expand All @@ -973,13 +976,12 @@ return view.extend({
}
so.default = 'direct-out';
so.rmempty = false;
//so.editable = true;
so.depends('type', 'remote');

so = ss.option(form.Value, 'update_interval', _('Update interval'),
_('Update interval of Rule Set. <br/><code>1d</code> will be used if empty.'));
_('Update interval of rule set.<br/><code>1d</code> will be used if empty.'));
so.depends('type', 'remote');
/* Rule Set settings end */
/* Rule set settings end */

/* ACL settings start */
s.tab('control', _('Access Control'));
Expand Down

0 comments on commit 20406cf

Please sign in to comment.