mirror of
https://github.com/NohamR/Pocket-Bird.git
synced 2026-05-25 04:07:23 +00:00
Add conditional menu items and disable sticky notes at root
This commit is contained in:
@@ -31,6 +31,7 @@ import {
|
||||
} from './stickyNotes.js';
|
||||
import {
|
||||
MenuItem,
|
||||
ConditionalMenuItem,
|
||||
DebugMenuItem,
|
||||
Separator,
|
||||
insertMenu,
|
||||
@@ -193,9 +194,7 @@ Promise.all([
|
||||
const menuItems = [
|
||||
new MenuItem(`Pet ${birdBirb()}`, pet),
|
||||
new MenuItem("Field Guide", insertFieldGuide),
|
||||
...(getContext().areStickyNotesEnabled() ? [
|
||||
new MenuItem("Sticky Note", () => createNewStickyNote(stickyNotes, save, deleteStickyNote))
|
||||
] : []),
|
||||
new ConditionalMenuItem("Sticky Note", () => createNewStickyNote(stickyNotes, save, deleteStickyNote), () => getContext().areStickyNotesEnabled()),
|
||||
new MenuItem(`Hide ${birdBirb()}`, () => birb.setVisible(false)),
|
||||
new DebugMenuItem("Freeze/Unfreeze", () => {
|
||||
frozen = !frozen;
|
||||
|
||||
Reference in New Issue
Block a user