File tree Expand file tree Collapse file tree 2 files changed +19
-19
lines changed
shared/fs/common/path-item-action Expand file tree Collapse file tree 2 files changed +19
-19
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,7 @@ const getRawLayout = (
8585 openChatTeam : parsedPath . kind === T . FS . PathKind . InTeamTlf ,
8686 }
8787 : { } ) ,
88+ archive : true ,
8889 delete : pathItem . writable ,
8990 download : pathItem . type === T . FS . PathType . File && ! C . isIOS ,
9091 moveOrCopy : true ,
Original file line number Diff line number Diff line change @@ -237,25 +237,24 @@ const Container = (op: OwnProps) => {
237237 ] as const )
238238 : [ ]
239239
240- const onArchive = ( ) => {
241- C . featureFlags . archive &&
242- path &&
243- layout . archive &&
244- navigateAppend ( {
245- props : { path, type : 'fsPath' } as const ,
246- selected : 'archiveModal' ,
247- } )
248- }
249- const itemArchive =
250- C . featureFlags . archive && layout . archive
251- ? ( [
252- {
253- icon : 'iconfont-folder-downloads' ,
254- onClick : hideAfter ( ( ) => onArchive ( ) ) ,
255- title : 'Archive folder' ,
256- } ,
257- ] as const )
258- : [ ]
240+ const onArchive =
241+ C . featureFlags . archive && path && layout . archive && pathItem . type === T . FS . PathType . Folder
242+ ? ( ) => {
243+ navigateAppend ( {
244+ props : { path, type : 'fsPath' } as const ,
245+ selected : 'archiveModal' ,
246+ } )
247+ }
248+ : undefined
249+ const itemArchive = onArchive
250+ ? ( [
251+ {
252+ icon : 'iconfont-folder-downloads' ,
253+ onClick : hideAfter ( ( ) => onArchive ( ) ) ,
254+ title : 'Archive folder' ,
255+ } ,
256+ ] as const )
257+ : [ ]
259258
260259 const items : Kb . MenuItems = [
261260 ...itemNewFolder ,
You can’t perform that action at this time.
0 commit comments