fix: fix issue with subsite dir error (#9259)

This commit is contained in:
CityFun 2025-06-24 18:39:14 +08:00 committed by GitHub
parent 0eaaf7aacb
commit 5ad06f121b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 53 additions and 22 deletions

View file

@ -32,6 +32,8 @@ type WebsiteCreate struct {
TaskID string `json:"taskID"`
ParentWebsiteID uint `json:"parentWebsiteID"`
SiteDir string `json:"siteDir"`
RuntimeConfig
FtpConfig
DataBaseConfig

View file

@ -415,6 +415,7 @@ func (w WebsiteService) CreateWebsite(create request.WebsiteCreate) (err error)
return err
}
website.ParentWebsiteID = parentWebsite.ID
website.SiteDir = create.SiteDir
}
configNginx := func(t *task.Task) error {

View file

@ -2,12 +2,15 @@
<div>
<el-card :style="{ height: height }" class="home-card">
<div class="header">
<span class="header-span">{{ header }}</span>
<slot name="header-l" />
<slot name="header-r" />
<div class="header-left">
<span class="header-span">{{ header }}</span>
<slot name="header-l" />
</div>
<div class="header-right">
<slot name="header-r" />
</div>
</div>
<div>
<div class="body-content">
<slot name="body" />
</div>
</el-card>
@ -25,27 +28,44 @@ defineProps({
<style scoped lang="scss">
.home-card {
.header {
.header-span {
position: relative;
font-size: 16px;
font-weight: 500;
margin-left: 18px;
display: flex;
justify-content: space-between;
align-items: center;
.header-left {
display: flex;
&::before {
position: absolute;
top: 50%;
transform: translateY(-50%);
left: -13px;
width: 4px;
height: 14px;
content: '';
background: $primary-color;
border-radius: 10px;
align-items: center;
gap: 12px;
.header-span {
position: relative;
font-size: 16px;
font-weight: 500;
margin-left: 18px;
display: flex;
align-items: center;
&::before {
position: absolute;
top: 50%;
transform: translateY(-50%);
left: -13px;
width: 4px;
height: 14px;
content: '';
background: $primary-color;
border-radius: 10px;
}
}
}
.header-right {
display: flex;
align-items: center;
}
}
div:nth-child(2) {
.body-content {
margin-top: 20px;
}
}

View file

@ -3109,6 +3109,7 @@ const message = {
belongToIpGroup: 'Belongs to IP Group',
notBelongToIpGroup: 'Does not belong to IP Group',
unknownWebsiteKey: 'Unknown Domain',
special: 'Special',
},
monitor: {
name: 'Website Monitoring',

View file

@ -2980,6 +2980,7 @@ const message = {
belongToIpGroup: 'IP グループに属しています',
notBelongToIpGroup: 'IP グループに属していません',
unknownWebsiteKey: '未知のドメイン',
special: '特別な文字は使用できません',
},
monitor: {
name: 'ウェブサイトモニタリング',

View file

@ -2930,6 +2930,7 @@ const message = {
belongToIpGroup: 'IP 그룹에 속함',
notBelongToIpGroup: 'IP 그룹에 속하지 않음',
unknownWebsiteKey: ' 없는 도메인',
special: '특수 문자',
},
monitor: {
name: '웹사이트 모니터링',

View file

@ -3045,6 +3045,7 @@ const message = {
belongToIpGroup: 'Tergolong dalam Kumpulan IP',
notBelongToIpGroup: 'Tidak tergolong dalam Kumpulan IP',
unknownWebsiteKey: 'Domain Tidak Diketahui',
special: 'Peraturan Khas',
},
monitor: {
name: 'Pemantauan Laman Web',

View file

@ -3048,6 +3048,7 @@ const message = {
belongToIpGroup: 'Pertence ao Grupo de IP',
notBelongToIpGroup: 'Não pertence ao Grupo de IP',
unknownWebsiteKey: 'Domínio Desconhecido',
special: 'Domínio Especial',
},
monitor: {
name: 'Monitoramento de Websites',

View file

@ -3040,6 +3040,7 @@ const message = {
belongToIpGroup: 'Принадлежит к группе IP',
notBelongToIpGroup: 'Не принадлежит к группе IP',
unknownWebsiteKey: 'Неизвестный домен',
special: 'Специальный',
},
monitor: {
name: 'Мониторинг веб-сайта',

View file

@ -2899,6 +2899,7 @@ const message = {
belongToIpGroup: '屬於 IP ',
notBelongToIpGroup: '不屬於 IP ',
unknownWebsiteKey: '未知域名',
special: '指定',
},
monitor: {
name: '網站監控',

View file

@ -2874,6 +2874,7 @@ const message = {
belongToIpGroup: '属于 IP ',
notBelongToIpGroup: '不属于 IP ',
unknownWebsiteKey: '未知域名',
special: '指定',
},
monitor: {
name: '网站监控',

View file

@ -114,7 +114,7 @@ const search = () => {
updatePermission.id = website.value.id;
updatePermission.group = website.value.group === '' ? '1000' : website.value.group;
updatePermission.user = website.value.user === '' ? '1000' : website.value.user;
if (website.value.type === 'static' || website.value.runtimeID > 0) {
if ((website.value.type === 'static' || website.value.runtimeID > 0) && website.value.type != 'subsite') {
configDir.value = true;
getConfig();
}