update 2025-02-24 12:23:56

This commit is contained in:
kenzok8 2025-02-24 12:23:56 +08:00
parent e0781bc12a
commit 78ed473d41
4 changed files with 22 additions and 22 deletions

View File

@ -206,10 +206,24 @@ return view.extend({
o.value('inline', _('Inline')); o.value('inline', _('Inline'));
o.default = 'http'; o.default = 'http';
o = s.option(form.ListValue, 'behavior', _('Behavior'));
o.value('classical');
o.value('domain');
o.value('ipcidr');
o.default = 'classical';
o.validate = function(section_id, value) {
const format = this.section.getUIElement(section_id, 'format').getValue();
if (value === 'classical' && format === 'mrs')
return _('Expecting: %s').format(_('Binary format only supports domain / ipcidr'));
return true;
}
o = s.option(form.ListValue, 'format', _('Format')); o = s.option(form.ListValue, 'format', _('Format'));
o.value('text', _('Plain text')); o.value('text', _('Plain text'));
o.value('yaml', _('Yaml text')); o.value('yaml', _('Yaml text'));
o.value('mrs', _('Binary file')); o.value('mrs', _('Binary mrs'));
o.default = 'yaml'; o.default = 'yaml';
o.validate = function(section_id, value) { o.validate = function(section_id, value) {
const behavior = this.section.getUIElement(section_id, 'behavior').getValue(); const behavior = this.section.getUIElement(section_id, 'behavior').getValue();
@ -229,20 +243,6 @@ return view.extend({
}; };
o.depends({'type': 'inline', '!reverse': true}); o.depends({'type': 'inline', '!reverse': true});
o = s.option(form.ListValue, 'behavior', _('Behavior'));
o.value('classical');
o.value('domain');
o.value('ipcidr');
o.default = 'classical';
o.validate = function(section_id, value) {
const format = this.section.getUIElement(section_id, 'format').getValue();
if (value === 'classical' && format === 'mrs')
return _('Expecting: %s').format(_('Binary format only supports domain / ipcidr'));
return true;
}
o = s.option(form.DummyValue, '_value', _('Value')); o = s.option(form.DummyValue, '_value', _('Value'));
o.load = function(section_id) { o.load = function(section_id) {
const option = uci.get(data[0], section_id, 'type'); const option = uci.get(data[0], section_id, 'type');

View File

@ -209,7 +209,7 @@ msgid "Behavior"
msgstr "" msgstr ""
#: htdocs/luci-static/resources/view/fchomo/ruleset.js:212 #: htdocs/luci-static/resources/view/fchomo/ruleset.js:212
msgid "Binary file" msgid "Binary mrs"
msgstr "" msgstr ""
#: htdocs/luci-static/resources/view/fchomo/ruleset.js:218 #: htdocs/luci-static/resources/view/fchomo/ruleset.js:218

View File

@ -217,8 +217,8 @@ msgid "Behavior"
msgstr "行为" msgstr "行为"
#: htdocs/luci-static/resources/view/fchomo/ruleset.js:212 #: htdocs/luci-static/resources/view/fchomo/ruleset.js:212
msgid "Binary file" msgid "Binary mrs"
msgstr "二进制文件" msgstr "二进制 mrs"
#: htdocs/luci-static/resources/view/fchomo/ruleset.js:218 #: htdocs/luci-static/resources/view/fchomo/ruleset.js:218
#: htdocs/luci-static/resources/view/fchomo/ruleset.js:241 #: htdocs/luci-static/resources/view/fchomo/ruleset.js:241
@ -1569,7 +1569,7 @@ msgstr "性能可能会略有下降,建议仅在需要时开启。"
#: htdocs/luci-static/resources/view/fchomo/ruleset.js:210 #: htdocs/luci-static/resources/view/fchomo/ruleset.js:210
msgid "Plain text" msgid "Plain text"
msgstr "纯文本" msgstr "纯文本 text"
#: htdocs/luci-static/resources/view/fchomo/global.js:781 #: htdocs/luci-static/resources/view/fchomo/global.js:781
msgid "" msgid ""

View File

@ -217,8 +217,8 @@ msgid "Behavior"
msgstr "行為" msgstr "行為"
#: htdocs/luci-static/resources/view/fchomo/ruleset.js:212 #: htdocs/luci-static/resources/view/fchomo/ruleset.js:212
msgid "Binary file" msgid "Binary mrs"
msgstr "二進位檔案" msgstr "二進位 mrs"
#: htdocs/luci-static/resources/view/fchomo/ruleset.js:218 #: htdocs/luci-static/resources/view/fchomo/ruleset.js:218
#: htdocs/luci-static/resources/view/fchomo/ruleset.js:241 #: htdocs/luci-static/resources/view/fchomo/ruleset.js:241
@ -1569,7 +1569,7 @@ msgstr "效能可能會略有下降,建議僅在需要時開啟。"
#: htdocs/luci-static/resources/view/fchomo/ruleset.js:210 #: htdocs/luci-static/resources/view/fchomo/ruleset.js:210
msgid "Plain text" msgid "Plain text"
msgstr "純文本" msgstr "純文本 text"
#: htdocs/luci-static/resources/view/fchomo/global.js:781 #: htdocs/luci-static/resources/view/fchomo/global.js:781
msgid "" msgid ""