diff --git a/internal/apps/s3fs/app.go b/internal/apps/s3fs/app.go
index fcb86384..b4e70274 100644
--- a/internal/apps/s3fs/app.go
+++ b/internal/apps/s3fs/app.go
@@ -138,14 +138,14 @@ func (s *App) Delete(w http.ResponseWriter, r *http.Request) {
return
}
- if _, err = shell.Execf(`fusermount -uzq '%s'`, mount.Path); err != nil {
- service.Error(w, http.StatusInternalServerError, "%v", err)
- return
- }
- if _, err = shell.Execf(`umount -lfq '%s'`, mount.Path); err != nil {
- service.Error(w, http.StatusInternalServerError, "%v", err)
+ _, _ = shell.Execf(`fusermount -uz '%s'`, mount.Path)
+ _, err2 := shell.Execf(`umount -lf '%s'`, mount.Path)
+ // 卸载之后再检查下是否还有挂载
+ if _, err = shell.Execf(`df -h | grep '%s'`, mount.Path); err == nil {
+ service.Error(w, http.StatusUnprocessableEntity, s.t.Get("failed to unmount: %v", err2))
return
}
+
if _, err = shell.Execf(`sed -i 's@^s3fs#%s\s%s.*$@@g' /etc/fstab`, mount.Bucket, mount.Path); err != nil {
service.Error(w, http.StatusInternalServerError, "%v", err)
return
diff --git a/internal/route/cli.go b/internal/route/cli.go
index b7870f11..55b655fa 100644
--- a/internal/route/cli.go
+++ b/internal/route/cli.go
@@ -119,6 +119,39 @@ func (route *Cli) Commands() []*cli.Command {
},
},
},
+ {
+ Name: "bind-domain",
+ Usage: route.t.Get("Operate panel domain binding"),
+ Commands: []*cli.Command{
+ {
+ Name: "off",
+ Usage: route.t.Get("Disable domain binding"),
+ Action: route.cli.BindDomainOff,
+ },
+ },
+ },
+ {
+ Name: "bind-ip",
+ Usage: route.t.Get("Operate panel IP binding"),
+ Commands: []*cli.Command{
+ {
+ Name: "off",
+ Usage: route.t.Get("Disable IP binding"),
+ Action: route.cli.BindIPOff,
+ },
+ },
+ },
+ {
+ Name: "bind-ua",
+ Usage: route.t.Get("Operate panel UA binding"),
+ Commands: []*cli.Command{
+ {
+ Name: "off",
+ Usage: route.t.Get("Disable UA binding"),
+ Action: route.cli.BindUAOff,
+ },
+ },
+ },
{
Name: "port",
Usage: route.t.Get("Change panel port"),
diff --git a/internal/service/cli.go b/internal/service/cli.go
index febe6986..b34355c7 100644
--- a/internal/service/cli.go
+++ b/internal/service/cli.go
@@ -436,6 +436,81 @@ func (s *CliService) EntranceOff(ctx context.Context, cmd *cli.Command) error {
return s.Restart(ctx, cmd)
}
+func (s *CliService) BindDomainOff(ctx context.Context, cmd *cli.Command) error {
+ config := new(types.PanelConfig)
+ raw, err := io.Read("/usr/local/etc/panel/config.yml")
+ if err != nil {
+ return err
+ }
+ if err = yaml.Unmarshal([]byte(raw), config); err != nil {
+ return err
+ }
+
+ config.HTTP.BindDomain = nil
+
+ encoded, err := yaml.Marshal(config)
+ if err != nil {
+ return err
+ }
+
+ if err = io.Write("/usr/local/etc/panel/config.yml", string(encoded), 0700); err != nil {
+ return err
+ }
+
+ fmt.Println(s.t.Get("Bind domain disabled"))
+ return s.Restart(ctx, cmd)
+}
+
+func (s *CliService) BindIPOff(ctx context.Context, cmd *cli.Command) error {
+ config := new(types.PanelConfig)
+ raw, err := io.Read("/usr/local/etc/panel/config.yml")
+ if err != nil {
+ return err
+ }
+ if err = yaml.Unmarshal([]byte(raw), config); err != nil {
+ return err
+ }
+
+ config.HTTP.BindIP = nil
+
+ encoded, err := yaml.Marshal(config)
+ if err != nil {
+ return err
+ }
+
+ if err = io.Write("/usr/local/etc/panel/config.yml", string(encoded), 0700); err != nil {
+ return err
+ }
+
+ fmt.Println(s.t.Get("Bind IP disabled"))
+ return s.Restart(ctx, cmd)
+}
+
+func (s *CliService) BindUAOff(ctx context.Context, cmd *cli.Command) error {
+ config := new(types.PanelConfig)
+ raw, err := io.Read("/usr/local/etc/panel/config.yml")
+ if err != nil {
+ return err
+ }
+ if err = yaml.Unmarshal([]byte(raw), config); err != nil {
+ return err
+ }
+
+ config.HTTP.BindUA = nil
+
+ encoded, err := yaml.Marshal(config)
+ if err != nil {
+ return err
+ }
+
+ if err = io.Write("/usr/local/etc/panel/config.yml", string(encoded), 0700); err != nil {
+ return err
+ }
+
+ fmt.Println(s.t.Get("Bind UA disabled"))
+ return s.Restart(ctx, cmd)
+}
+
func (s *CliService) Port(ctx context.Context, cmd *cli.Command) error {
port := cast.ToUint(cmd.Args().First())
if port < 1 || port > 65535 {
diff --git a/web/src/styles/index.scss b/web/src/styles/index.scss
index a5ef8c4f..d443de5f 100644
--- a/web/src/styles/index.scss
+++ b/web/src/styles/index.scss
@@ -8,11 +8,6 @@ body {
height: 100%;
overflow: hidden;
background-color: #f2f2f2;
- font-family:
- -apple-system, 'Noto Sans', 'Helvetica Neue', Helvetica, 'Nimbus Sans L', Arial,
- 'Liberation Sans', 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans CJK SC', 'Noto Sans SC',
- 'Source Han Sans SC', 'Source Han Sans CN', 'Microsoft YaHei', 'Wenquanyi Micro Hei',
- 'WenQuanYi Zen Hei', 'ST Heiti', SimHei, 'WenQuanYi Zen Hei Sharp', sans-serif;
}
#app {
diff --git a/web/src/views/apps/php/PhpView.vue b/web/src/views/apps/php/PhpView.vue
index 3a0b7924..51837d0d 100644
--- a/web/src/views/apps/php/PhpView.vue
+++ b/web/src/views/apps/php/PhpView.vue
@@ -325,7 +325,7 @@ onMounted(() => {
-
+
{
:data="extensions"
:row-key="(row: any) => row.slug"
/>
-
+
diff --git a/web/src/views/apps/pureftpd/IndexView.vue b/web/src/views/apps/pureftpd/IndexView.vue
index 640195dc..68a5eb96 100644
--- a/web/src/views/apps/pureftpd/IndexView.vue
+++ b/web/src/views/apps/pureftpd/IndexView.vue
@@ -265,7 +265,7 @@ onMounted(() => {
-
+
{
pageSizes: [20, 50, 100, 200]
}"
/>
-
+
diff --git a/web/src/views/apps/rsync/IndexView.vue b/web/src/views/apps/rsync/IndexView.vue
index fc88f2c1..5dcdc5c5 100644
--- a/web/src/views/apps/rsync/IndexView.vue
+++ b/web/src/views/apps/rsync/IndexView.vue
@@ -300,7 +300,7 @@ onMounted(() => {
-
+
{
pageSizes: [20, 50, 100, 200]
}"
/>
-
+
diff --git a/web/src/views/apps/s3fs/IndexView.vue b/web/src/views/apps/s3fs/IndexView.vue
index 7fda185d..ae14876f 100644
--- a/web/src/views/apps/s3fs/IndexView.vue
+++ b/web/src/views/apps/s3fs/IndexView.vue
@@ -24,15 +24,15 @@ const columns: any = [
{
title: $gettext('Mount Path'),
key: 'path',
- minWidth: 250,
+ minWidth: 150,
resizable: true,
ellipsis: { tooltip: true }
},
- { title: 'Bucket', key: 'bucket', resizable: true, minWidth: 250, ellipsis: { tooltip: true } },
+ { title: 'Bucket', key: 'bucket', resizable: true, minWidth: 150, ellipsis: { tooltip: true } },
{
title: $gettext('Actions'),
key: 'actions',
- width: 240,
+ width: 150,
hideInExcel: true,
render(row: any) {
return [
@@ -105,11 +105,11 @@ onMounted(() => {
{{ $gettext('Add Mount') }}
-
+
{
pageSizes: [20, 50, 100, 200]
}"
/>
-
+
{
-
+
{
pageSizes: [20, 50, 100, 200]
}"
/>
-
+