style: Adjust compose log display height (#10151)

This commit is contained in:
ssongliu 2025-08-26 17:41:59 +08:00 committed by GitHub
parent ab0e0f3f43
commit 5f33c083bf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 16 additions and 26 deletions

View file

@ -456,22 +456,6 @@ func (u *ImageService) ImageRemove(req dto.BatchDelete) error {
return nil
}
func formatFileSize(fileSize int64) (size string) {
if fileSize < 1024 {
return fmt.Sprintf("%.2fB", float64(fileSize)/float64(1))
} else if fileSize < (1024 * 1024) {
return fmt.Sprintf("%.2fKB", float64(fileSize)/float64(1024))
} else if fileSize < (1024 * 1024 * 1024) {
return fmt.Sprintf("%.2fMB", float64(fileSize)/float64(1024*1024))
} else if fileSize < (1024 * 1024 * 1024 * 1024) {
return fmt.Sprintf("%.2fGB", float64(fileSize)/float64(1024*1024*1024))
} else if fileSize < (1024 * 1024 * 1024 * 1024 * 1024) {
return fmt.Sprintf("%.2fTB", float64(fileSize)/float64(1024*1024*1024*1024))
} else {
return fmt.Sprintf("%.2fEB", float64(fileSize)/float64(1024*1024*1024*1024*1024))
}
}
func checkUsed(imageID string, containers []container.Summary) bool {
for _, container := range containers {
if container.ImageID == imageID {

View file

@ -36,7 +36,7 @@ const container = ref('');
const globalStore = GlobalStore();
const logVisible = ref(false);
const compose = ref('');
const highlightDiff = ref(320);
const highlightDiff = ref(150);
const node = ref('');
interface DialogProps {
@ -49,7 +49,7 @@ interface DialogProps {
const defaultProps = defineProps({
highlightDiff: {
type: Number,
default: 320,
default: 150,
},
});

View file

@ -12,7 +12,7 @@
<template #title>
<div>
<span class="version">{{ item.version }}</span>
<span class="date">{{ item.createdAt }}</span>
<span v-if="!mobile" class="date">{{ item.createdAt }}</span>
</div>
<svg-icon class="icon" iconName="p-featureshitu"></svg-icon>
<span class="icon-span">{{ item.newCount }}</span>
@ -55,6 +55,10 @@ import { GlobalStore } from '@/store';
import { storeToRefs } from 'pinia';
const globalStore = GlobalStore();
const mobile = computed(() => {
return globalStore.isMobile();
});
const { isDarkTheme } = storeToRefs(globalStore);
const drawerVisible = ref(false);

View file

@ -341,7 +341,7 @@
<PruneDialog @search="search" ref="dialogPruneRef" />
<RenameDialog @search="search" ref="dialogRenameRef" />
<ContainerLogDialog ref="dialogContainerLogRef" :highlightDiff="235" />
<ContainerLogDialog ref="dialogContainerLogRef" :highlightDiff="210" />
<UpgradeDialog @search="search" ref="dialogUpgradeRef" />
<CommitDialog @search="search" ref="dialogCommitRef" />
<MonitorDialog ref="dialogMonitorRef" />

View file

@ -54,7 +54,7 @@
<el-button :disabled="loading" @click="drawerVisible = false">
{{ $t('commons.button.cancel') }}
</el-button>
<el-button :disabled="loading" type="primary" @click="onSubmit(formRef)">
<el-button :disabled="loading || form.names.length === 0" type="primary" @click="onSubmit(formRef)">
{{ $t('commons.button.confirm') }}
</el-button>
</span>

View file

@ -49,11 +49,13 @@
</el-table-column>
<el-table-column :label="$t('container.volumeDir')" min-width="100">
<template #default="{ row }">
<el-button type="primary" link @click="routerToFileWithPath(row.mountpoint)">
<el-icon>
<FolderOpened />
</el-icon>
</el-button>
<el-tooltip :content="row.mountpoint">
<el-button type="primary" link @click="routerToFileWithPath(row.mountpoint)">
<el-icon>
<FolderOpened />
</el-icon>
</el-button>
</el-tooltip>
</template>
</el-table-column>
<el-table-column