|
Download wp-calypso/desktop/app/lib/menu/README.md from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 611 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/desktop/app/lib/menu/README.md
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/desktop/app/lib/menu/README.md
-
curl -L -o README.md https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/desktop/app/lib/menu/README.md
611 Bytes
Menu
Provides all the app system menus.
The main menu template is main-menu.js, and each submenu is stored in a seperate file.
Any menu item with requiresUser: true will be toggled by enableLoggedInItems and disableLoggedInItems.
Functions
set( app, mainWindow) - called after the app has been initialized and we have access to the window
Where:
app- the Electron app instancemainWindow- the app's main BrowserWindow
enableLoggedInItems() - enable all menu items that require a logged-in user
disableLoggedInItems() - disables all menu items that require a logged-in user