no message

This commit is contained in:
Alexander Kraev 2025-07-22 10:26:41 +03:00
parent 3509bd6078
commit 0ed8a3593d
2 changed files with 11 additions and 7 deletions

View file

@ -3,7 +3,7 @@
<div>
<a-card :title="i18n('menu.blocked_domains')">
<a-button type="primary" @click="showAddModal = true" style="margin-bottom: 16px;">
{{ i18n('add') }}
{{ i18n "add" }}
</a-button>
<a-table-sortable
:data-source="domains"
@ -12,8 +12,8 @@
style="margin-bottom: 16px;"
>
<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('comment') }}" dataIndex="comment" key="comment" />
<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('action')"
key="action"

View file

@ -131,13 +131,17 @@ func (s *Server) getHtmlTemplate(funcMap template.FuncMap) (*template.Template,
t := template.New("").Funcs(funcMap)
err := fs.WalkDir(htmlFS, "html", func(path string, d fs.DirEntry, err error) error {
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() {
newT, err := t.ParseFS(htmlFS, path+"/*.html")
if err != nil {
// ignore
println("TEMPLATE ERROR in ", path, ": ", err.Error())
return nil
}
t = newT