diff options
| author | rxliuli <rxliuli@gmail.com> | 2025-11-04 05:03:50 +0800 |
|---|---|---|
| committer | rxliuli <rxliuli@gmail.com> | 2025-11-04 05:03:50 +0800 |
| commit | bce557cc2dc767628bed6aac87301a1be7c5431b (patch) | |
| tree | b51a051228d01fe3306cd7626d4a96768aadb944 /node_modules/@jet-app/app-store/tmp/src/common/web-navigation/web-navigation.js | |
init commit
Diffstat (limited to 'node_modules/@jet-app/app-store/tmp/src/common/web-navigation/web-navigation.js')
| -rw-r--r-- | node_modules/@jet-app/app-store/tmp/src/common/web-navigation/web-navigation.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/node_modules/@jet-app/app-store/tmp/src/common/web-navigation/web-navigation.js b/node_modules/@jet-app/app-store/tmp/src/common/web-navigation/web-navigation.js new file mode 100644 index 0000000..13b7f6d --- /dev/null +++ b/node_modules/@jet-app/app-store/tmp/src/common/web-navigation/web-navigation.js @@ -0,0 +1,28 @@ +import { createPlatformSelectors } from "./platform-selection"; +import { createLandingPageLinks } from "./landing-page-links-by-platform"; +import { makeWebSearchAction } from "../search/web-search-action"; +/** + * Create a {@linkcode WebNavigation} based on the active {@linkcode Intent} + */ +export function createWebNavigation(objectGraph, platform) { + const webNavigation = { + platforms: [], + tabs: [], + searchAction: makeWebSearchAction(objectGraph, platform), + }; + setActivePlatform(objectGraph, webNavigation, platform); + return webNavigation; +} +/** + * Updates a {@linkcode WebNavigation} to reflect: + * + * 1. the platform specified by {@linkcode platform} + * 2. the "active landing page" specified by {@linkcode intent} + */ +export function setActivePlatform(objectGraph, shelf, platform, intent) { + shelf.platforms = createPlatformSelectors(objectGraph, platform); + const searchActionDestination = shelf.searchAction.destination; + shelf.tabs = createLandingPageLinks(objectGraph, platform, intent); + searchActionDestination.platform = platform; +} +//# sourceMappingURL=web-navigation.js.map
\ No newline at end of file |
