Add refresh button in files tab behind feature flag (#5431)
This commit is contained in:
committed by
GitHub
parent
51a83b4536
commit
789ec8966c
@@ -32,6 +32,7 @@ export const DEFAULT_FEATURE_FLAGS = validateValues({
|
|||||||
projectBackground: false,
|
projectBackground: false,
|
||||||
searchBackground: false,
|
searchBackground: false,
|
||||||
advancedDebugInfo: false,
|
advancedDebugInfo: false,
|
||||||
|
FilesRefreshButton: false,
|
||||||
showProjectPageDownloadModalServersPromo: false,
|
showProjectPageDownloadModalServersPromo: false,
|
||||||
showProjectPageCreateServersTooltip: true,
|
showProjectPageCreateServersTooltip: true,
|
||||||
showProjectPageQuickServerButton: false,
|
showProjectPageQuickServerButton: false,
|
||||||
|
|||||||
@@ -10,5 +10,8 @@ useHead({
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<ServersManageFilesPage :show-debug-info="flags.advancedDebugInfo" />
|
<ServersManageFilesPage
|
||||||
|
:show-debug-info="flags.advancedDebugInfo"
|
||||||
|
:show-refresh-button="flags.FilesRefreshButton"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -80,6 +80,17 @@
|
|||||||
@update:model-value="$emit('update:searchQuery', $event)"
|
@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">
|
<ButtonStyled type="outlined">
|
||||||
<OverflowMenu
|
<OverflowMenu
|
||||||
:dropdown-id="`create-new-${baseId}`"
|
:dropdown-id="`create-new-${baseId}`"
|
||||||
@@ -178,6 +189,7 @@ const props = defineProps<{
|
|||||||
editingFilePath?: string
|
editingFilePath?: string
|
||||||
isEditingImage?: boolean
|
isEditingImage?: boolean
|
||||||
searchQuery: string
|
searchQuery: string
|
||||||
|
showRefreshButton?: boolean
|
||||||
baseId: string
|
baseId: string
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
@@ -190,6 +202,7 @@ defineEmits<{
|
|||||||
upload: []
|
upload: []
|
||||||
uploadZip: []
|
uploadZip: []
|
||||||
unzipFromUrl: [cf: boolean]
|
unzipFromUrl: [cf: boolean]
|
||||||
|
refresh: []
|
||||||
save: []
|
save: []
|
||||||
saveAs: []
|
saveAs: []
|
||||||
saveRestart: []
|
saveRestart: []
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
:editing-file-path="editingFile?.path"
|
:editing-file-path="editingFile?.path"
|
||||||
:is-editing-image="fileEditorRef?.isEditingImage"
|
:is-editing-image="fileEditorRef?.isEditingImage"
|
||||||
:search-query="searchQuery"
|
:search-query="searchQuery"
|
||||||
|
:show-refresh-button="showRefreshButton"
|
||||||
:base-id="baseId"
|
:base-id="baseId"
|
||||||
@navigate="navigateToSegment"
|
@navigate="navigateToSegment"
|
||||||
@navigate-home="() => navigateToSegment(-1)"
|
@navigate-home="() => navigateToSegment(-1)"
|
||||||
@@ -39,6 +40,7 @@
|
|||||||
@upload="initiateFileUpload"
|
@upload="initiateFileUpload"
|
||||||
@upload-zip="() => {}"
|
@upload-zip="() => {}"
|
||||||
@unzip-from-url="showUnzipFromUrlModal"
|
@unzip-from-url="showUnzipFromUrlModal"
|
||||||
|
@refresh="refreshList"
|
||||||
@save="() => fileEditorRef?.saveFileContent(true)"
|
@save="() => fileEditorRef?.saveFileContent(true)"
|
||||||
@save-as="() => fileEditorRef?.saveFileContent(false)"
|
@save-as="() => fileEditorRef?.saveFileContent(false)"
|
||||||
@save-restart="() => fileEditorRef?.saveAndRestart()"
|
@save-restart="() => fileEditorRef?.saveAndRestart()"
|
||||||
@@ -303,6 +305,7 @@ import {
|
|||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
showDebugInfo?: boolean
|
showDebugInfo?: boolean
|
||||||
|
showRefreshButton?: boolean
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
const notifications = injectNotificationManager()
|
const notifications = injectNotificationManager()
|
||||||
|
|||||||
Reference in New Issue
Block a user