From d5c0e03f1683f12073dbafb14b0ceb43e4bb44c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=97=E5=AD=90?= Date: Fri, 6 Feb 2026 21:27:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BD=91=E7=AB=99=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/data/website.go | 7 ++----- web/src/views/website/ListView.vue | 17 ++++++++++++++++- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/internal/data/website.go b/internal/data/website.go index 9e0030fb..ab96d805 100644 --- a/internal/data/website.go +++ b/internal/data/website.go @@ -1186,12 +1186,12 @@ func (r *websiteRepo) reloadWebServer() error { func (r *websiteRepo) readBasicAuthUsers(siteName string) map[string]string { htpasswdPath := filepath.Join(app.Root, "sites", siteName, "htpasswd") if !io.Exists(htpasswdPath) { - return nil + return make(map[string]string) } file, err := os.Open(htpasswdPath) if err != nil { - return nil + return make(map[string]string) } defer func(file *os.File) { _ = file.Close() }(file) @@ -1209,9 +1209,6 @@ func (r *websiteRepo) readBasicAuthUsers(siteName string) map[string]string { } } - if len(users) == 0 { - return nil - } return users } diff --git a/web/src/views/website/ListView.vue b/web/src/views/website/ListView.vue index feaaa653..5e75865b 100644 --- a/web/src/views/website/ListView.vue +++ b/web/src/views/website/ListView.vue @@ -86,6 +86,21 @@ const columns: any = [ return h(NFlex, { align: 'center', wrap: false }, { default: () => elements }) } }, + { + title: $gettext('Website Type'), + key: 'type', + width: 150, + resizable: true, + render(row: any) { + const typeMap: any = { + proxy: { label: $gettext('Reverse Proxy'), type: 'warning' }, + php: { label: $gettext('PHP'), type: 'info' }, + static: { label: $gettext('Pure Static'), type: 'success' } + } + const config = typeMap[row.type] || { label: row.type, type: 'default' } + return h(NTag, { type: config.type }, { default: () => config.label }) + } + }, { title: $gettext('Running'), key: 'status', @@ -362,7 +377,7 @@ onMounted(() => { striped remote :loading="loading" - :scroll-x="1400" + :scroll-x="1500" :columns="columns" :data="data" :row-key="(row: any) => row.id"