feat: Add directory redirection on the PHP runtime environment page (#9010)

This commit is contained in:
CityFun 2025-06-11 14:42:39 +08:00 committed by GitHub
parent f843438baf
commit 64e74e87c4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 23 additions and 2 deletions

View file

@ -12,7 +12,7 @@
</el-tooltip>
</template>
<template #content>
<ContainerLog :container="config.container" />
<ContainerLog :container="config.container" :highlightDiff="highlightDiff" />
</template>
<template #footer>
<span class="dialog-footer">
@ -42,6 +42,13 @@ const logSearch = reactive({
tail: 100,
});
defineProps({
highlightDiff: {
type: Number,
default: 320,
},
});
function toggleFullscreen() {
globalStore.isFullScreen = !globalStore.isFullScreen;
}

View file

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

View file

@ -43,6 +43,15 @@
</el-text>
</template>
</el-table-column>
<el-table-column :label="$t('home.dir')" prop="codeDir" width="80px">
<template #default="{ row }">
<el-button type="primary" link @click="toFolder(row.path)">
<el-icon>
<FolderOpened />
</el-icon>
</el-button>
</template>
</el-table-column>
<el-table-column :label="$t('app.source')" prop="resource">
<template #default="{ row }">
<span v-if="row.resource == 'appstore'">{{ $t('menu.apps') }}</span>
@ -129,6 +138,7 @@ import RuntimeStatus from '@/views/website/runtime/components/runtime-status.vue
import Terminal from '@/views/website/runtime/components/terminal.vue';
import { disabledButton } from '@/utils/runtime';
import { GlobalStore } from '@/store';
import router from '@/routers/router';
const globalStore = GlobalStore();
const mobile = computed(() => {
return globalStore.isMobile();
@ -365,6 +375,10 @@ const onOpenBuildCache = () => {
});
};
const toFolder = (folder: string) => {
router.push({ path: '/hosts/files', query: { path: folder } });
};
onMounted(() => {
search();
});