Skip to content

Commit

Permalink
chore: hide customize toolbar action in mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
lawvs committed Jan 7, 2025
1 parent 950b5af commit ae1cb5e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 1 addition & 3 deletions apps/renderer/src/modules/customize-toolbar/modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,13 @@ const CustomizeToolbar = () => {
// Moving between containers
const sourceList = isActiveInMain ? "main" : "more"
const targetList = isActiveInMain ? "more" : "main"
const item = actionOrder[sourceList].find((item) => item === activeId)
if (!item) return
const newIndexOfOver = actionOrder[targetList].indexOf(overId)
setUISetting("toolbarOrder", {
...actionOrder,
[sourceList]: actionOrder[sourceList].filter((item) => item !== activeId),
[targetList]: [
...actionOrder[targetList].slice(0, newIndexOfOver),
item,
activeId,
...actionOrder[targetList].slice(newIndexOfOver),
],
})
Expand Down
7 changes: 6 additions & 1 deletion apps/renderer/src/modules/entry-content/header.mobile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ function EntryHeaderImpl({ view, entryId, className }: EntryHeaderProps) {
const actionConfigs = useEntryActions({ entryId, view }).filter(
(item) =>
!(
[COMMAND_ID.entry.read, COMMAND_ID.entry.unread, COMMAND_ID.entry.copyLink] as string[]
[
COMMAND_ID.entry.read,
COMMAND_ID.entry.unread,
COMMAND_ID.entry.copyLink,
COMMAND_ID.settings.customizeToolbar,
] as string[]
).includes(item.id),
)

Expand Down

0 comments on commit ae1cb5e

Please sign in to comment.