Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions dwertheimer.Favorites/plugin.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"COMMENT1": "Note If you are not going to use the `npm run autowatch` command to compile, then delete the macOS.minVersion line below",
"macOS.minVersion": "10.13.0",
"noteplan.minAppVersion": "3.20.0",
"noteplan.minAppVersion": "3.20.1",
"plugin.id": "dwertheimer.Favorites",
"plugin.name": "⭐️ Favorites",
"plugin.description": "Get fast access to commonly-used notes. Set any Project Note(s) as a Favorites and have quick access to choose/open the file",
"plugin.author": "@dwertheimer",
"plugin.version": "1.3.2",
"plugin.lastUpdateInfo": "1.3.0: Add new '/favorites browser' command to open favorites in a sidebar window to view and open favorite notes and commands\n1.3.1: Fix request timeout issue\n1.3.2: Fix frontmatter not being removed when unfavoriting",
"plugin.version": "1.3.3",
"plugin.lastUpdateInfo": "1.3.3: Use new sidebar view feature\n1.3.0: Add new '/favorites browser' command to open favorites in a sidebar window to view and open favorite notes and commands\n1.3.1: Fix request timeout issue\n1.3.2: Fix frontmatter not being removed when unfavoriting",
"plugin.dependencies": [],
"plugin.requiredFiles": ["react.c.FavoritesView.bundle.dev.js"],
"plugin.script": "script.js",
Expand Down Expand Up @@ -46,6 +46,12 @@
"favorites-browser",
"fav-browser"
],
"sidebarView": {
"windowID": "favorites-browser-window main",
"title": "Favorites",
"icon": "star",
"iconColor": "#F8E160"
},
"arguments": [ "IsFloating: If true or 'true', opens as a floating window instead of main window (optional, defaults to false)"]
},
{
Expand Down
10 changes: 5 additions & 5 deletions dwertheimer.Favorites/src/windowManagement.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,13 @@ export async function openFavoritesBrowser(_isFloating: boolean | string = false
</script>
`,
// Options for showInMainWindow (main window mode)
splitView: false,
icon: 'star',
iconColor: iconColorHex ? iconColorHex : 'blue-500',
iconColor: '#F8E160',
splitView: false,
autoTopPadding: true,
showReloadButton: false, // TODO: change to true when np 3.20.1 is released
reloadPluginID: pluginJson['plugin.id'],
reloadCommandName: 'openFavoritesBrowser',
showReloadButton: true,
reloadPluginID: 'dwertheimer.Favorites',
reloadCommandName: 'Sidebar - Open Favorites Browser Sidebar',
}

// Choose the appropriate command based on whether it's floating or main window
Expand Down
3 changes: 3 additions & 0 deletions np.Shared/src/NPReactLocal.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,9 @@ export function showInMainWindow(globalData: any = null, windowOptions?: HtmlWin
iconColor: windowOptsAny.iconColor || 'blue-500',
autoTopPadding: windowOptsAny.autoTopPadding ?? true,
showReloadButton: windowOptsAny.showReloadButton ?? false,
reloadPluginID: windowOptsAny.reloadPluginID || null,
reloadCommandName: windowOptsAny.reloadCommandName || null,
reloadCommandArgs: windowOptsAny.reloadCommandArgs || null,
}
// $FlowFixMe[prop-missing] - showInMainWindow is available in NotePlan v3.20+
HTMLView.showInMainWindow(fullHTMLStr, windowOptions.windowTitle || 'React Window', mainWindowOptions)
Expand Down