Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/frontend/src/composables/featureFlags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export const DEFAULT_FEATURE_FLAGS = validateValues({
projectBackground: false,
searchBackground: false,
advancedDebugInfo: false,
FilesRefreshButton: false,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesnt really matter but all the others don't start with an uppercase letter

showProjectPageDownloadModalServersPromo: false,
showProjectPageCreateServersTooltip: true,
showProjectPageQuickServerButton: false,
Expand Down
5 changes: 4 additions & 1 deletion apps/frontend/src/pages/hosting/manage/[id]/files.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@ useHead({
</script>

<template>
<ServersManageFilesPage :show-debug-info="flags.advancedDebugInfo" />
<ServersManageFilesPage
:show-debug-info="flags.advancedDebugInfo"
:show-refresh-button="flags.FilesRefreshButton"
/>
</template>
13 changes: 13 additions & 0 deletions packages/ui/src/components/servers/files/FileNavbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,17 @@
@update:model-value="$emit('update:searchQuery', $event)"
/>

<ButtonStyled v-if="showRefreshButton" type="outlined">
<button
type="button"
class="flex h-10 items-center gap-2 !border-[1px] !border-surface-5"
@click="$emit('refresh')"
>
<RefreshCwIcon aria-hidden="true" class="h-5 w-5" />
Refresh
</button>
</ButtonStyled>

<ButtonStyled type="outlined">
<OverflowMenu
:dropdown-id="`create-new-${baseId}`"
Expand Down Expand Up @@ -178,6 +189,7 @@ const props = defineProps<{
editingFilePath?: string
isEditingImage?: boolean
searchQuery: string
showRefreshButton?: boolean
baseId: string
}>()

Expand All @@ -190,6 +202,7 @@ defineEmits<{
upload: []
uploadZip: []
unzipFromUrl: [cf: boolean]
refresh: []
save: []
saveAs: []
saveRestart: []
Expand Down
3 changes: 3 additions & 0 deletions packages/ui/src/pages/hosting/manage/files.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
:editing-file-path="editingFile?.path"
:is-editing-image="fileEditorRef?.isEditingImage"
:search-query="searchQuery"
:show-refresh-button="showRefreshButton"
:base-id="baseId"
@navigate="navigateToSegment"
@navigate-home="() => navigateToSegment(-1)"
Expand All @@ -39,6 +40,7 @@
@upload="initiateFileUpload"
@upload-zip="() => {}"
@unzip-from-url="showUnzipFromUrlModal"
@refresh="refreshList"
@save="() => fileEditorRef?.saveFileContent(true)"
@save-as="() => fileEditorRef?.saveFileContent(false)"
@save-restart="() => fileEditorRef?.saveAndRestart()"
Expand Down Expand Up @@ -303,6 +305,7 @@ import {

defineProps<{
showDebugInfo?: boolean
showRefreshButton?: boolean
}>()

const notifications = injectNotificationManager()
Expand Down