mirror of https://github.com/1Panel-dev/1Panel
parent
1a400e7f81
commit
5f9073cb85
|
@ -251,8 +251,11 @@ func (f *FileService) MvFile(m request.FileMove) error {
|
|||
if !fo.Stat(m.NewPath) {
|
||||
return buserr.New(constant.ErrPathNotFound)
|
||||
}
|
||||
for _, path := range m.OldPaths {
|
||||
if path == m.NewPath || strings.Contains(m.NewPath, filepath.Clean(path)+"/") {
|
||||
for _, oldPath := range m.OldPaths {
|
||||
if !fo.Stat(oldPath) {
|
||||
return buserr.WithName(constant.ErrFileNotFound, oldPath)
|
||||
}
|
||||
if oldPath == m.NewPath || strings.Contains(m.NewPath, filepath.Clean(oldPath)+"/") {
|
||||
return buserr.New(constant.ErrMovePathFailed)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1091,6 +1091,8 @@ const message = {
|
|||
fileRecycleBin: 'File Recycle Bin',
|
||||
fileRecycleBinMsg: '{0} recycle bin',
|
||||
wordWrap: 'Automatically wrap',
|
||||
deleteHelper2:
|
||||
'Are you sure you want to delete the selected file? The deletion operation cannot be rolled back',
|
||||
},
|
||||
ssh: {
|
||||
autoStart: 'Auto Start',
|
||||
|
|
|
@ -1040,6 +1040,7 @@ const message = {
|
|||
fileRecycleBin: '檔案回收站',
|
||||
fileRecycleBinMsg: '已{0}回收站',
|
||||
wordWrap: '自動換行',
|
||||
deleteHelper2: '確定刪除所選檔案? 刪除操作不可回滾',
|
||||
},
|
||||
ssh: {
|
||||
autoStart: '開機自啟',
|
||||
|
|
|
@ -1041,6 +1041,7 @@ const message = {
|
|||
fileRecycleBin: '文件回收站',
|
||||
fileRecycleBinMsg: '已{0}回收站',
|
||||
wordWrap: '自动换行',
|
||||
deleteHelper2: '确定删除所选文件?删除操作不可回滚',
|
||||
},
|
||||
ssh: {
|
||||
autoStart: '开机自启',
|
||||
|
|
|
@ -3,9 +3,15 @@
|
|||
<div>
|
||||
<el-row>
|
||||
<el-col :span="20" :offset="2">
|
||||
<el-alert class="mt-2" :show-icon="true" type="warning" :closable="false">
|
||||
<el-alert
|
||||
class="mt-2"
|
||||
:show-icon="true"
|
||||
:type="recycleStatus === 'enable' ? 'warning' : 'error'"
|
||||
:closable="false"
|
||||
>
|
||||
<div class="delete-warn">
|
||||
<span>{{ $t('file.deleteHelper') }}</span>
|
||||
<span v-if="recycleStatus === 'enable'">{{ $t('file.deleteHelper') }}</span>
|
||||
<span v-else>{{ $t('file.deleteHelper2') }}</span>
|
||||
</div>
|
||||
</el-alert>
|
||||
<div class="mt-4" v-if="recycleStatus === 'enable'">
|
||||
|
|
|
@ -85,6 +85,7 @@ const handleParams = () => {
|
|||
rules[p.envKey] = [Rules.requiredInput];
|
||||
}
|
||||
}
|
||||
form[p.envKey] = p.default;
|
||||
}
|
||||
emit('update:rules', rules);
|
||||
updateParam();
|
||||
|
|
Loading…
Reference in New Issue