Skip to content

Commit 93a2ab9

Browse files
authored
add intlf, ignore files (keybase#26869)
1 parent 59aa057 commit 93a2ab9

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

shared/fs/common/path-item-action/layout.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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,

shared/fs/common/path-item-action/menu-container.tsx

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff 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,

0 commit comments

Comments
 (0)