Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShishkevich D. <135337715+shishkevichd@users.noreply.github.com>2025-03-08 18:41:27 +0300
committerGitHub <noreply@github.com>2025-03-08 18:41:27 +0300
commit697cd5e6d9d8cdacb1cf36fb485667e2409eba62 (patch)
treef0fb34bc3daeb022e0bd0040128fb6e61fa153cd /web/html/xui/component/setting.html
parentc6d27a446355e7278fedd98334a314994bb70153 (diff)
Code refactoring (#2739)
* refactor: switching to the use of typed props * refactor: `password-input` -> `a-password-input` * fix: qr modal copy error
Diffstat (limited to 'web/html/xui/component/setting.html')
-rw-r--r--web/html/xui/component/setting.html21
1 files changed, 19 insertions, 2 deletions
diff --git a/web/html/xui/component/setting.html b/web/html/xui/component/setting.html
index bc2c6e42..85220d25 100644
--- a/web/html/xui/component/setting.html
+++ b/web/html/xui/component/setting.html
@@ -21,7 +21,24 @@
{{define "component/setting"}}
<script>
Vue.component('a-setting-list-item', {
- props: ["title", "description", "paddings"],
+ props: {
+ 'title': {
+ type: String,
+ required: true,
+ },
+ 'description': {
+ type: String,
+ required: false,
+ },
+ 'paddings': {
+ type: String,
+ required: false,
+ defaultValue: "default",
+ validator: function (value) {
+ return ['small', 'default'].includes(value)
+ }
+ }
+ },
template: `{{ template "component/settingListItem" }}`,
computed: {
padding() {
@@ -29,7 +46,7 @@
case "small":
return "10px 20px !important"
break;
- default:
+ case "default":
return "20px !important"
break;
}