mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-09-12 13:10:05 +00:00
no message
This commit is contained in:
parent
3509bd6078
commit
0ed8a3593d
2 changed files with 11 additions and 7 deletions
|
@ -1,9 +1,9 @@
|
||||||
{{define "page/blocked_domains"}}
|
{{ define "page/blocked_domains" }}
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<a-card :title="i18n('menu.blocked_domains')">
|
<a-card :title="i18n('menu.blocked_domains')">
|
||||||
<a-button type="primary" @click="showAddModal = true" style="margin-bottom: 16px;">
|
<a-button type="primary" @click="showAddModal = true" style="margin-bottom: 16px;">
|
||||||
{{ i18n('add') }}
|
{{ i18n "add" }}
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-table-sortable
|
<a-table-sortable
|
||||||
:data-source="domains"
|
:data-source="domains"
|
||||||
|
@ -12,8 +12,8 @@
|
||||||
style="margin-bottom: 16px;"
|
style="margin-bottom: 16px;"
|
||||||
>
|
>
|
||||||
<a-table-column title="#" :customRender="(_, __, i) => i + 1" width="50" />
|
<a-table-column title="#" :customRender="(_, __, i) => i + 1" width="50" />
|
||||||
<a-table-column title="{{ i18n('domain') }}" dataIndex="domain" key="domain" />
|
<a-table-column title="{{ i18n "domain" }}" dataIndex="domain" key="domain" />
|
||||||
<a-table-column title="{{ i18n('comment') }}" dataIndex="comment" key="comment" />
|
<a-table-column title="{{ i18n "comment" }}" dataIndex="comment" key="comment" />
|
||||||
<a-table-column
|
<a-table-column
|
||||||
:title="i18n('action')"
|
:title="i18n('action')"
|
||||||
key="action"
|
key="action"
|
||||||
|
@ -129,4 +129,4 @@ new Vue({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{{end}}
|
{{ end }}
|
|
@ -131,13 +131,17 @@ func (s *Server) getHtmlTemplate(funcMap template.FuncMap) (*template.Template,
|
||||||
t := template.New("").Funcs(funcMap)
|
t := template.New("").Funcs(funcMap)
|
||||||
err := fs.WalkDir(htmlFS, "html", func(path string, d fs.DirEntry, err error) error {
|
err := fs.WalkDir(htmlFS, "html", func(path string, d fs.DirEntry, err error) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
if strings.Contains(err.Error(), "pattern matches no files") {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
println("TEMPLATE ERROR in ", path, ": ", err.Error())
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
if d.IsDir() {
|
if d.IsDir() {
|
||||||
newT, err := t.ParseFS(htmlFS, path+"/*.html")
|
newT, err := t.ParseFS(htmlFS, path+"/*.html")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// ignore
|
println("TEMPLATE ERROR in ", path, ": ", err.Error())
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
t = newT
|
t = newT
|
||||||
|
|
Loading…
Reference in a new issue