Nativefier/src
Chris Dzombak b4ddd6865c
Support defining a custom bookmarks menu (fix #1065) (PR #1155)
This PR adds an optional, customizable menu of predefined bookmarks. In addition to containing a list of bookmarks, this file customizes the name of the menu and (optionally) allows assigning keyboard shortcuts to bookmarks. It adds a new command-line flag, `--bookmarks-menu <string>`, which can be set as the path to a JSON file containing configuration for the bookmarks menu.

Example of such a JSON file:

```json
{
    "menuLabel": "Music",
    "bookmarks": [
        {
            "title": "lofi.cafe",
            "url": "https://lofi.cafe/",
            "type": "link",
            "shortcut": "Cmd+1"
        },
        {
            "title": "beats to relax/study to",
            "url": "https://www.youtube.com/watch?v=5qap5aO4i9A",
            "type": "link",
            "shortcut": "Cmd+2"
        },
        {
            "type": "separator"
        },
        {
            "title": "RÜFÜS DU SOL Live from Joshua Tree",
            "type": "link",
            "url": "https://www.youtube.com/watch?v=Zy4KtD98S2c"
        }
    ]
}
```

## Checks
- [x] `npm run ci` passes

## Notes

Compared to the fork linked in #1065, this PR:
- adds no dependencies
- doesn't currently support submenus (this should be easy enough to add, but I didn't need it)

## Screenshot

<img width="853" alt="screenshot" src="https://user-images.githubusercontent.com/102904/115882015-5493a800-a41a-11eb-85ef-a190f3dbfe76.png">
2021-04-23 21:46:34 -04:00
..
build Support defining a custom bookmarks menu (fix #1065) (PR #1155) 2021-04-23 21:46:34 -04:00
helpers Docker: fix Windows builds (fix #997), line endings, switch to Alpine (PR #1122) 2021-03-02 00:16:30 -05:00
infer Docker: fix Windows builds (fix #997), line endings, switch to Alpine (PR #1122) 2021-03-02 00:16:30 -05:00
options Support defining a custom bookmarks menu (fix #1065) (PR #1155) 2021-04-23 21:46:34 -04:00
utils App: Automatically consider known login pages as internal (fix #706) (PR #1124) 2021-03-10 19:20:53 -05:00
cli.ts Support defining a custom bookmarks menu (fix #1065) (PR #1155) 2021-04-23 21:46:34 -04:00
constants.ts Bump to Electron 12.0.4 with Chrome 89.0.4389.114 2021-04-13 21:49:31 -04:00
integration-test.ts App: revert addition of extra flag --internal-login-pages 2021-03-10 19:36:20 -05:00
jestSetupFiles.ts Revamp and move to TypeScript (#898) 2020-03-15 16:50:01 -04:00
main.ts Bump eslint to 7.x, fix new lint errors 2020-07-18 11:19:58 -04:00