-
-
Notifications
You must be signed in to change notification settings - Fork 392
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add tag id to tag context menu (#1185)
- Loading branch information
1 parent
604520f
commit 8b845ea
Showing
8 changed files
with
96 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
packages/web/src/javascripts/Components/Tags/TagContextMenuWrapper.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { observer } from 'mobx-react-lite' | ||
import { SNTag } from '@standardnotes/snjs' | ||
import TagContextMenu from './TagContextMenu' | ||
import { NavigationController } from '@/Controllers/Navigation/NavigationController' | ||
import { FeaturesController } from '@/Controllers/FeaturesController' | ||
|
||
type Props = { | ||
navigationController: NavigationController | ||
featuresController: FeaturesController | ||
} | ||
|
||
const TagContextMenuWrapper = ({ navigationController, featuresController }: Props) => { | ||
const selectedTag = navigationController.selected | ||
|
||
if (!selectedTag || !(selectedTag instanceof SNTag)) { | ||
return null | ||
} | ||
|
||
return ( | ||
<TagContextMenu | ||
navigationController={navigationController} | ||
isEntitledToFolders={featuresController.hasFolders} | ||
selectedTag={selectedTag} | ||
/> | ||
) | ||
} | ||
|
||
export default observer(TagContextMenuWrapper) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters