mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-31 14:08:06 +08:00
style: 优化网站列表描述信息显示 (#4726)
This commit is contained in:
parent
5532636e02
commit
6e635c691d
@ -314,6 +314,7 @@ func (f FileOp) DownloadFile(url, dst string) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
out, err := os.Create(dst)
|
||||
if err != nil {
|
||||
@ -324,8 +325,6 @@ func (f FileOp) DownloadFile(url, dst string) error {
|
||||
if _, err = io.Copy(out, resp.Body); err != nil {
|
||||
return fmt.Errorf("save download file [%s] error, err %s", dst, err.Error())
|
||||
}
|
||||
out.Close()
|
||||
resp.Body.Close()
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,6 @@ package files
|
||||
import (
|
||||
"bufio"
|
||||
"fmt"
|
||||
"github.com/spf13/afero"
|
||||
"io"
|
||||
"net/http"
|
||||
"os"
|
||||
@ -12,6 +11,8 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/spf13/afero"
|
||||
)
|
||||
|
||||
func IsSymlink(mode os.FileMode) bool {
|
||||
@ -144,8 +145,5 @@ func GetParentMode(path string) (os.FileMode, error) {
|
||||
}
|
||||
|
||||
func IsInvalidChar(name string) bool {
|
||||
if strings.Contains(name, "&") {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
return strings.Contains(name, "&")
|
||||
}
|
||||
|
@ -43,7 +43,6 @@ func GetHttpRes(url string) (*http.Response, error) {
|
||||
return nil, buserr.WithMap("ErrHttpReqFailed", map[string]interface{}{"err": err.Error()}, err)
|
||||
}
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
if resp.StatusCode == 404 {
|
||||
return nil, buserr.New("ErrHttpReqNotFound")
|
||||
}
|
||||
|
@ -111,11 +111,12 @@
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('website.remark')" prop="remark" min-width="120px">
|
||||
<template #default="{ row }">
|
||||
<MsgInfo :info="row.remark" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:label="$t('website.remark')"
|
||||
prop="remark"
|
||||
show-overflow-tooltip
|
||||
min-width="120px"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
:label="$t('commons.table.protocol')"
|
||||
prop="protocol"
|
||||
@ -194,7 +195,6 @@ import { dateFormatSimple } from '@/utils/util';
|
||||
import { MsgSuccess } from '@/utils/message';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { VideoPlay, VideoPause } from '@element-plus/icons-vue';
|
||||
import MsgInfo from '@/components/msg-info/index.vue';
|
||||
import { GetGroupList } from '@/api/modules/group';
|
||||
import { Group } from '@/api/interface/group';
|
||||
import { GlobalStore } from '@/store';
|
||||
|
Loading…
x
Reference in New Issue
Block a user