-
Notifications
You must be signed in to change notification settings - Fork 3.1k
feat: Add directory redirection on the PHP runtime environment page #9010
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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" /> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The changes introduced by this code patch are minor and do not introduce significant irregularities or potential issues within their current scope. However, there is one suggested enhancement: Suggested Change: @@ -351,7 +351,8 @@
<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" />Add |
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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(); | ||
| }); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The provided code is generally well-structured and follows best practices. However, there are a few areas that can be improved:
Here are some specific changes you might consider to add: // Function definition with type annotation
const toFolder = (folder: string): void => {
// Push route to /hosts/files with query param path
router.push({ path: '/hosts/files', query: { path: folder } });
}
export default {
components: {
// Component declarations
},
setup(props, ctx) {
// Setup logic here
}
}Additionally, ensure all necessary imports and configurations remain accurate according to your application's requirements. This includes any additional dependencies or configurations needed for navigation routing like Vue Router ( If JavaScript-based solution applies, simply remove TypeScript annotations and adjust variable names accordingly in their respective parts of the module. Finally, document what this function does clearly at its declaration with inline comments or using JSDoc style comments above the function body. |
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two changes needed:
Add
exportkeyword to export the default function and properties when using module syntax.Change
<ContainerLog/>component's@update:scrollPosevent from emitting an object withposition,scrollTargetId, andfromTopPosition, to simply emit a number that represents scrollTop position of target. You should also updatev-model="logScrollPos"accordingly if you intend to use this event handler elsewhere.