fix: sync config is not enabled #820

This commit is contained in:
Jacky 2025-01-23 15:29:33 +08:00
parent a48f7145d7
commit 6957e4fb8e
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D
5 changed files with 14 additions and 19 deletions

View file

@ -493,10 +493,6 @@ const paginationSize = computed(() => {
>
{{ $gettext('View') }}
</AButton>
<ADivider
v-if="!props.disableModify"
type="vertical"
/>
</template>
<template v-if="!props.disableModify && !inTrash">
@ -507,7 +503,6 @@ const paginationSize = computed(() => {
>
{{ $gettext('Modify') }}
</AButton>
<ADivider type="vertical" />
</template>
<slot
@ -544,7 +539,6 @@ const paginationSize = computed(() => {
{{ $gettext('Recover') }}
</AButton>
</APopconfirm>
<ADivider type="vertical" />
<APopconfirm
v-if="inTrash"
:cancel-text="$gettext('No')"

View file

@ -157,7 +157,6 @@ const refRename = useTemplateRef('refRename')
>
{{ $gettext('Modify') }}
</AButton>
<ADivider type="vertical" />
<AButton
type="link"
size="small"

View file

@ -135,7 +135,6 @@ function handleBatchUpdated() {
>
{{ $gettext('Enable') }}
</AButton>
<ADivider type="vertical" />
<AButton
type="link"
size="small"
@ -143,7 +142,6 @@ function handleBatchUpdated() {
>
{{ $gettext('Duplicate') }}
</AButton>
<ADivider type="vertical" />
<APopconfirm
:cancel-text="$gettext('No')"
:ok-text="$gettext('OK')"

View file

@ -151,7 +151,6 @@ function handleAddStream() {
>
{{ $gettext('Enable') }}
</AButton>
<ADivider type="vertical" />
<AButton
type="link"
size="small"
@ -159,7 +158,6 @@ function handleAddStream() {
>
{{ $gettext('Duplicate') }}
</AButton>
<ADivider type="vertical" />
<APopconfirm
:cancel-text="$gettext('No')"
:ok-text="$gettext('OK')"

View file

@ -94,6 +94,12 @@ func syncSave(name string, content string) {
return
}
notification.Success("Save Remote Site Success", NewSyncResult(node.Name, name, resp).String())
// Check if the site is enabled, if so then enable it on the remote node
enabledConfigFilePath := nginx.GetConfPath("sites-enabled", name)
if helper.FileExists(enabledConfigFilePath) {
syncEnable(name)
}
}()
}