@wix/himalaya-cli 0.1835.0 → 0.1837.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/local-db/src/index.d.ts +15 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/define-app.d.ts +4 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +1 -0
- package/dist/browser-plane/assets.json +5 -5
- package/dist/browser-plane/preview-deferred/{9258d331cc401dff7b183ce732d49df2e480ea113b52198a4a10790167519c09.bin → 12b7dd1ca5ed350a30ed6a0085a4c31f30b46688e3795c425f145dfdd3830b31.bin} +1 -1
- package/dist/browser-plane/sw.js +8 -8
- package/dist/cli.mjs +1010 -705
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/app-config.md +42 -0
- package/guides/component-index.md +198 -0
- package/guides/designing-himi-screens.md +6 -5
- package/guides/getting-started.md +5 -1
- package/guides/himi-json-output.md +14 -1
- package/guides/himi-skill.md +5 -1
- package/guides/himi-test.md +6 -1
- package/guides/index.json +6 -0
- package/guides/release-notes.md +8 -0
- package/guides/sdk-reference.json +1 -1
- package/guides/skill.md +4 -0
- package/guides/tier-5-add-a-screen.md +10 -5
- package/guides/web-ux.md +2 -1
- package/package.json +2 -2
- package/templates/beauty-salon/dev/index.ts +305 -2
- package/templates/beauty-salon/l10n/ar.json +77 -0
- package/templates/beauty-salon/l10n/cs.json +77 -0
- package/templates/beauty-salon/l10n/da.json +77 -0
- package/templates/beauty-salon/l10n/de.json +77 -0
- package/templates/beauty-salon/l10n/el.json +77 -0
- package/templates/beauty-salon/l10n/en.json +85 -1
- package/templates/beauty-salon/l10n/es.json +77 -0
- package/templates/beauty-salon/l10n/fi.json +77 -0
- package/templates/beauty-salon/l10n/fr.json +77 -0
- package/templates/beauty-salon/l10n/he.json +64 -0
- package/templates/beauty-salon/l10n/hu.json +77 -0
- package/templates/beauty-salon/l10n/id.json +77 -0
- package/templates/beauty-salon/l10n/it.json +77 -0
- package/templates/beauty-salon/l10n/ja.json +77 -0
- package/templates/beauty-salon/l10n/ko.json +77 -0
- package/templates/beauty-salon/l10n/lt.json +77 -0
- package/templates/beauty-salon/l10n/nl.json +77 -0
- package/templates/beauty-salon/l10n/no.json +77 -0
- package/templates/beauty-salon/l10n/pl.json +77 -0
- package/templates/beauty-salon/l10n/pt.json +77 -0
- package/templates/beauty-salon/l10n/ru.json +77 -0
- package/templates/beauty-salon/l10n/sv.json +77 -0
- package/templates/beauty-salon/l10n/th.json +77 -0
- package/templates/beauty-salon/l10n/tr.json +77 -0
- package/templates/beauty-salon/l10n/uk.json +77 -0
- package/templates/beauty-salon/l10n/vi.json +77 -0
- package/templates/beauty-salon/l10n/zh.json +77 -0
- package/templates/beauty-salon/tier5-src/_shared/push-permission.ts +75 -0
- package/templates/beauty-salon/tier5-src/himi-branded-lite-home/index.ts +103 -4
- package/templates/beauty-salon/tier5-src/himi-branded-lite-notifsettings/index.ts +108 -6
- package/templates/branded-lite/dev/index.ts +305 -2
- package/templates/branded-lite/l10n/ar.json +77 -0
- package/templates/branded-lite/l10n/cs.json +77 -0
- package/templates/branded-lite/l10n/da.json +77 -0
- package/templates/branded-lite/l10n/de.json +77 -0
- package/templates/branded-lite/l10n/el.json +77 -0
- package/templates/branded-lite/l10n/en.json +85 -1
- package/templates/branded-lite/l10n/es.json +77 -0
- package/templates/branded-lite/l10n/fi.json +77 -0
- package/templates/branded-lite/l10n/fr.json +77 -0
- package/templates/branded-lite/l10n/he.json +64 -0
- package/templates/branded-lite/l10n/hu.json +77 -0
- package/templates/branded-lite/l10n/id.json +77 -0
- package/templates/branded-lite/l10n/it.json +77 -0
- package/templates/branded-lite/l10n/ja.json +77 -0
- package/templates/branded-lite/l10n/ko.json +77 -0
- package/templates/branded-lite/l10n/lt.json +77 -0
- package/templates/branded-lite/l10n/nl.json +77 -0
- package/templates/branded-lite/l10n/no.json +77 -0
- package/templates/branded-lite/l10n/pl.json +77 -0
- package/templates/branded-lite/l10n/pt.json +77 -0
- package/templates/branded-lite/l10n/ru.json +77 -0
- package/templates/branded-lite/l10n/sv.json +77 -0
- package/templates/branded-lite/l10n/th.json +77 -0
- package/templates/branded-lite/l10n/tr.json +77 -0
- package/templates/branded-lite/l10n/uk.json +77 -0
- package/templates/branded-lite/l10n/vi.json +77 -0
- package/templates/branded-lite/l10n/zh.json +77 -0
- package/templates/branded-lite/tier5-src/_shared/push-permission.ts +75 -0
- package/templates/branded-lite/tier5-src/himi-branded-lite-home/index.ts +103 -4
- package/templates/branded-lite/tier5-src/himi-branded-lite-notifsettings/index.ts +108 -6
- package/templates/community-club/dev/index.ts +305 -2
- package/templates/community-club/l10n/ar.json +77 -0
- package/templates/community-club/l10n/cs.json +77 -0
- package/templates/community-club/l10n/da.json +77 -0
- package/templates/community-club/l10n/de.json +77 -0
- package/templates/community-club/l10n/el.json +77 -0
- package/templates/community-club/l10n/en.json +85 -1
- package/templates/community-club/l10n/es.json +77 -0
- package/templates/community-club/l10n/fi.json +77 -0
- package/templates/community-club/l10n/fr.json +77 -0
- package/templates/community-club/l10n/he.json +64 -0
- package/templates/community-club/l10n/hu.json +77 -0
- package/templates/community-club/l10n/id.json +77 -0
- package/templates/community-club/l10n/it.json +77 -0
- package/templates/community-club/l10n/ja.json +77 -0
- package/templates/community-club/l10n/ko.json +77 -0
- package/templates/community-club/l10n/lt.json +77 -0
- package/templates/community-club/l10n/nl.json +77 -0
- package/templates/community-club/l10n/no.json +77 -0
- package/templates/community-club/l10n/pl.json +77 -0
- package/templates/community-club/l10n/pt.json +77 -0
- package/templates/community-club/l10n/ru.json +77 -0
- package/templates/community-club/l10n/sv.json +77 -0
- package/templates/community-club/l10n/th.json +77 -0
- package/templates/community-club/l10n/tr.json +77 -0
- package/templates/community-club/l10n/uk.json +77 -0
- package/templates/community-club/l10n/vi.json +77 -0
- package/templates/community-club/l10n/zh.json +77 -0
- package/templates/community-club/tier5-src/_shared/push-permission.ts +75 -0
- package/templates/community-club/tier5-src/himi-branded-lite-home/index.ts +103 -4
- package/templates/community-club/tier5-src/himi-branded-lite-notifsettings/index.ts +108 -6
- package/templates/events-meetups/dev/index.ts +305 -2
- package/templates/events-meetups/l10n/ar.json +77 -0
- package/templates/events-meetups/l10n/cs.json +77 -0
- package/templates/events-meetups/l10n/da.json +77 -0
- package/templates/events-meetups/l10n/de.json +77 -0
- package/templates/events-meetups/l10n/el.json +77 -0
- package/templates/events-meetups/l10n/en.json +85 -1
- package/templates/events-meetups/l10n/es.json +77 -0
- package/templates/events-meetups/l10n/fi.json +77 -0
- package/templates/events-meetups/l10n/fr.json +77 -0
- package/templates/events-meetups/l10n/he.json +64 -0
- package/templates/events-meetups/l10n/hu.json +77 -0
- package/templates/events-meetups/l10n/id.json +77 -0
- package/templates/events-meetups/l10n/it.json +77 -0
- package/templates/events-meetups/l10n/ja.json +77 -0
- package/templates/events-meetups/l10n/ko.json +77 -0
- package/templates/events-meetups/l10n/lt.json +77 -0
- package/templates/events-meetups/l10n/nl.json +77 -0
- package/templates/events-meetups/l10n/no.json +77 -0
- package/templates/events-meetups/l10n/pl.json +77 -0
- package/templates/events-meetups/l10n/pt.json +77 -0
- package/templates/events-meetups/l10n/ru.json +77 -0
- package/templates/events-meetups/l10n/sv.json +77 -0
- package/templates/events-meetups/l10n/th.json +77 -0
- package/templates/events-meetups/l10n/tr.json +77 -0
- package/templates/events-meetups/l10n/uk.json +77 -0
- package/templates/events-meetups/l10n/vi.json +77 -0
- package/templates/events-meetups/l10n/zh.json +77 -0
- package/templates/events-meetups/tier5-src/_shared/push-permission.ts +75 -0
- package/templates/events-meetups/tier5-src/himi-branded-lite-home/index.ts +103 -4
- package/templates/events-meetups/tier5-src/himi-branded-lite-notifsettings/index.ts +108 -6
- package/templates/gym-fitness/dev/index.ts +305 -2
- package/templates/gym-fitness/l10n/ar.json +77 -0
- package/templates/gym-fitness/l10n/cs.json +77 -0
- package/templates/gym-fitness/l10n/da.json +77 -0
- package/templates/gym-fitness/l10n/de.json +77 -0
- package/templates/gym-fitness/l10n/el.json +77 -0
- package/templates/gym-fitness/l10n/en.json +85 -1
- package/templates/gym-fitness/l10n/es.json +77 -0
- package/templates/gym-fitness/l10n/fi.json +77 -0
- package/templates/gym-fitness/l10n/fr.json +77 -0
- package/templates/gym-fitness/l10n/he.json +64 -0
- package/templates/gym-fitness/l10n/hu.json +77 -0
- package/templates/gym-fitness/l10n/id.json +77 -0
- package/templates/gym-fitness/l10n/it.json +77 -0
- package/templates/gym-fitness/l10n/ja.json +77 -0
- package/templates/gym-fitness/l10n/ko.json +77 -0
- package/templates/gym-fitness/l10n/lt.json +77 -0
- package/templates/gym-fitness/l10n/nl.json +77 -0
- package/templates/gym-fitness/l10n/no.json +77 -0
- package/templates/gym-fitness/l10n/pl.json +77 -0
- package/templates/gym-fitness/l10n/pt.json +77 -0
- package/templates/gym-fitness/l10n/ru.json +77 -0
- package/templates/gym-fitness/l10n/sv.json +77 -0
- package/templates/gym-fitness/l10n/th.json +77 -0
- package/templates/gym-fitness/l10n/tr.json +77 -0
- package/templates/gym-fitness/l10n/uk.json +77 -0
- package/templates/gym-fitness/l10n/vi.json +77 -0
- package/templates/gym-fitness/l10n/zh.json +77 -0
- package/templates/gym-fitness/tier5-src/_shared/push-permission.ts +75 -0
- package/templates/gym-fitness/tier5-src/himi-branded-lite-home/index.ts +103 -4
- package/templates/gym-fitness/tier5-src/himi-branded-lite-notifsettings/index.ts +108 -6
- package/templates/nonprofit-cause/dev/index.ts +305 -2
- package/templates/nonprofit-cause/l10n/ar.json +77 -0
- package/templates/nonprofit-cause/l10n/cs.json +77 -0
- package/templates/nonprofit-cause/l10n/da.json +77 -0
- package/templates/nonprofit-cause/l10n/de.json +77 -0
- package/templates/nonprofit-cause/l10n/el.json +77 -0
- package/templates/nonprofit-cause/l10n/en.json +85 -1
- package/templates/nonprofit-cause/l10n/es.json +77 -0
- package/templates/nonprofit-cause/l10n/fi.json +77 -0
- package/templates/nonprofit-cause/l10n/fr.json +77 -0
- package/templates/nonprofit-cause/l10n/he.json +64 -0
- package/templates/nonprofit-cause/l10n/hu.json +77 -0
- package/templates/nonprofit-cause/l10n/id.json +77 -0
- package/templates/nonprofit-cause/l10n/it.json +77 -0
- package/templates/nonprofit-cause/l10n/ja.json +77 -0
- package/templates/nonprofit-cause/l10n/ko.json +77 -0
- package/templates/nonprofit-cause/l10n/lt.json +77 -0
- package/templates/nonprofit-cause/l10n/nl.json +77 -0
- package/templates/nonprofit-cause/l10n/no.json +77 -0
- package/templates/nonprofit-cause/l10n/pl.json +77 -0
- package/templates/nonprofit-cause/l10n/pt.json +77 -0
- package/templates/nonprofit-cause/l10n/ru.json +77 -0
- package/templates/nonprofit-cause/l10n/sv.json +77 -0
- package/templates/nonprofit-cause/l10n/th.json +77 -0
- package/templates/nonprofit-cause/l10n/tr.json +77 -0
- package/templates/nonprofit-cause/l10n/uk.json +77 -0
- package/templates/nonprofit-cause/l10n/vi.json +77 -0
- package/templates/nonprofit-cause/l10n/zh.json +77 -0
- package/templates/nonprofit-cause/tier5-src/_shared/push-permission.ts +75 -0
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-home/index.ts +103 -4
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-notifsettings/index.ts +108 -6
- package/templates/personal-fitness-trainer/config.ts +1 -1
- package/templates/personal-fitness-trainer/dev/index.ts +129 -1
- package/templates/personal-fitness-trainer/tier5-src/_shared/push-permission.ts +75 -0
- package/templates/personal-fitness-trainer/tier5-src/himi-branded-lite-notifsettings/index.ts +108 -6
- package/templates/podcast-creator/dev/index.ts +305 -2
- package/templates/podcast-creator/l10n/ar.json +77 -0
- package/templates/podcast-creator/l10n/cs.json +77 -0
- package/templates/podcast-creator/l10n/da.json +77 -0
- package/templates/podcast-creator/l10n/de.json +77 -0
- package/templates/podcast-creator/l10n/el.json +77 -0
- package/templates/podcast-creator/l10n/en.json +85 -1
- package/templates/podcast-creator/l10n/es.json +77 -0
- package/templates/podcast-creator/l10n/fi.json +77 -0
- package/templates/podcast-creator/l10n/fr.json +77 -0
- package/templates/podcast-creator/l10n/he.json +64 -0
- package/templates/podcast-creator/l10n/hu.json +77 -0
- package/templates/podcast-creator/l10n/id.json +77 -0
- package/templates/podcast-creator/l10n/it.json +77 -0
- package/templates/podcast-creator/l10n/ja.json +77 -0
- package/templates/podcast-creator/l10n/ko.json +77 -0
- package/templates/podcast-creator/l10n/lt.json +77 -0
- package/templates/podcast-creator/l10n/nl.json +77 -0
- package/templates/podcast-creator/l10n/no.json +77 -0
- package/templates/podcast-creator/l10n/pl.json +77 -0
- package/templates/podcast-creator/l10n/pt.json +77 -0
- package/templates/podcast-creator/l10n/ru.json +77 -0
- package/templates/podcast-creator/l10n/sv.json +77 -0
- package/templates/podcast-creator/l10n/th.json +77 -0
- package/templates/podcast-creator/l10n/tr.json +77 -0
- package/templates/podcast-creator/l10n/uk.json +77 -0
- package/templates/podcast-creator/l10n/vi.json +77 -0
- package/templates/podcast-creator/l10n/zh.json +77 -0
- package/templates/podcast-creator/tier5-src/_shared/push-permission.ts +75 -0
- package/templates/podcast-creator/tier5-src/himi-branded-lite-home/index.ts +103 -4
- package/templates/podcast-creator/tier5-src/himi-branded-lite-notifsettings/index.ts +108 -6
- package/templates/portfolio-creative/dev/index.ts +305 -2
- package/templates/portfolio-creative/l10n/ar.json +77 -0
- package/templates/portfolio-creative/l10n/cs.json +77 -0
- package/templates/portfolio-creative/l10n/da.json +77 -0
- package/templates/portfolio-creative/l10n/de.json +77 -0
- package/templates/portfolio-creative/l10n/el.json +77 -0
- package/templates/portfolio-creative/l10n/en.json +85 -1
- package/templates/portfolio-creative/l10n/es.json +77 -0
- package/templates/portfolio-creative/l10n/fi.json +77 -0
- package/templates/portfolio-creative/l10n/fr.json +77 -0
- package/templates/portfolio-creative/l10n/he.json +64 -0
- package/templates/portfolio-creative/l10n/hu.json +77 -0
- package/templates/portfolio-creative/l10n/id.json +77 -0
- package/templates/portfolio-creative/l10n/it.json +77 -0
- package/templates/portfolio-creative/l10n/ja.json +77 -0
- package/templates/portfolio-creative/l10n/ko.json +77 -0
- package/templates/portfolio-creative/l10n/lt.json +77 -0
- package/templates/portfolio-creative/l10n/nl.json +77 -0
- package/templates/portfolio-creative/l10n/no.json +77 -0
- package/templates/portfolio-creative/l10n/pl.json +77 -0
- package/templates/portfolio-creative/l10n/pt.json +77 -0
- package/templates/portfolio-creative/l10n/ru.json +77 -0
- package/templates/portfolio-creative/l10n/sv.json +77 -0
- package/templates/portfolio-creative/l10n/th.json +77 -0
- package/templates/portfolio-creative/l10n/tr.json +77 -0
- package/templates/portfolio-creative/l10n/uk.json +77 -0
- package/templates/portfolio-creative/l10n/vi.json +77 -0
- package/templates/portfolio-creative/l10n/zh.json +77 -0
- package/templates/portfolio-creative/tier5-src/_shared/push-permission.ts +75 -0
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-home/index.ts +103 -4
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-notifsettings/index.ts +108 -6
- package/templates/restaurant/dev/index.ts +305 -2
- package/templates/restaurant/l10n/ar.json +77 -0
- package/templates/restaurant/l10n/cs.json +77 -0
- package/templates/restaurant/l10n/da.json +77 -0
- package/templates/restaurant/l10n/de.json +77 -0
- package/templates/restaurant/l10n/el.json +77 -0
- package/templates/restaurant/l10n/en.json +85 -1
- package/templates/restaurant/l10n/es.json +77 -0
- package/templates/restaurant/l10n/fi.json +77 -0
- package/templates/restaurant/l10n/fr.json +77 -0
- package/templates/restaurant/l10n/he.json +64 -0
- package/templates/restaurant/l10n/hu.json +77 -0
- package/templates/restaurant/l10n/id.json +77 -0
- package/templates/restaurant/l10n/it.json +77 -0
- package/templates/restaurant/l10n/ja.json +77 -0
- package/templates/restaurant/l10n/ko.json +77 -0
- package/templates/restaurant/l10n/lt.json +77 -0
- package/templates/restaurant/l10n/nl.json +77 -0
- package/templates/restaurant/l10n/no.json +77 -0
- package/templates/restaurant/l10n/pl.json +77 -0
- package/templates/restaurant/l10n/pt.json +77 -0
- package/templates/restaurant/l10n/ru.json +77 -0
- package/templates/restaurant/l10n/sv.json +77 -0
- package/templates/restaurant/l10n/th.json +77 -0
- package/templates/restaurant/l10n/tr.json +77 -0
- package/templates/restaurant/l10n/uk.json +77 -0
- package/templates/restaurant/l10n/vi.json +77 -0
- package/templates/restaurant/l10n/zh.json +77 -0
- package/templates/restaurant/tier5-src/_shared/push-permission.ts +75 -0
- package/templates/restaurant/tier5-src/himi-branded-lite-home/index.ts +103 -4
- package/templates/restaurant/tier5-src/himi-branded-lite-notifsettings/index.ts +108 -6
- package/templates/retail-store/dev/index.ts +305 -2
- package/templates/retail-store/l10n/ar.json +77 -0
- package/templates/retail-store/l10n/cs.json +77 -0
- package/templates/retail-store/l10n/da.json +77 -0
- package/templates/retail-store/l10n/de.json +77 -0
- package/templates/retail-store/l10n/el.json +77 -0
- package/templates/retail-store/l10n/en.json +85 -1
- package/templates/retail-store/l10n/es.json +77 -0
- package/templates/retail-store/l10n/fi.json +77 -0
- package/templates/retail-store/l10n/fr.json +77 -0
- package/templates/retail-store/l10n/he.json +64 -0
- package/templates/retail-store/l10n/hu.json +77 -0
- package/templates/retail-store/l10n/id.json +77 -0
- package/templates/retail-store/l10n/it.json +77 -0
- package/templates/retail-store/l10n/ja.json +77 -0
- package/templates/retail-store/l10n/ko.json +77 -0
- package/templates/retail-store/l10n/lt.json +77 -0
- package/templates/retail-store/l10n/nl.json +77 -0
- package/templates/retail-store/l10n/no.json +77 -0
- package/templates/retail-store/l10n/pl.json +77 -0
- package/templates/retail-store/l10n/pt.json +77 -0
- package/templates/retail-store/l10n/ru.json +77 -0
- package/templates/retail-store/l10n/sv.json +77 -0
- package/templates/retail-store/l10n/th.json +77 -0
- package/templates/retail-store/l10n/tr.json +77 -0
- package/templates/retail-store/l10n/uk.json +77 -0
- package/templates/retail-store/l10n/vi.json +77 -0
- package/templates/retail-store/l10n/zh.json +77 -0
- package/templates/retail-store/tier5-src/_shared/push-permission.ts +75 -0
- package/templates/retail-store/tier5-src/himi-branded-lite-home/index.ts +103 -4
- package/templates/retail-store/tier5-src/himi-branded-lite-notifsettings/index.ts +108 -6
- package/templates/yoga-studio/dev/index.ts +305 -2
- package/templates/yoga-studio/l10n/ar.json +77 -0
- package/templates/yoga-studio/l10n/cs.json +77 -0
- package/templates/yoga-studio/l10n/da.json +77 -0
- package/templates/yoga-studio/l10n/de.json +77 -0
- package/templates/yoga-studio/l10n/el.json +77 -0
- package/templates/yoga-studio/l10n/en.json +85 -1
- package/templates/yoga-studio/l10n/es.json +77 -0
- package/templates/yoga-studio/l10n/fi.json +77 -0
- package/templates/yoga-studio/l10n/fr.json +77 -0
- package/templates/yoga-studio/l10n/he.json +64 -0
- package/templates/yoga-studio/l10n/hu.json +77 -0
- package/templates/yoga-studio/l10n/id.json +77 -0
- package/templates/yoga-studio/l10n/it.json +77 -0
- package/templates/yoga-studio/l10n/ja.json +77 -0
- package/templates/yoga-studio/l10n/ko.json +77 -0
- package/templates/yoga-studio/l10n/lt.json +77 -0
- package/templates/yoga-studio/l10n/nl.json +77 -0
- package/templates/yoga-studio/l10n/no.json +77 -0
- package/templates/yoga-studio/l10n/pl.json +77 -0
- package/templates/yoga-studio/l10n/pt.json +77 -0
- package/templates/yoga-studio/l10n/ru.json +77 -0
- package/templates/yoga-studio/l10n/sv.json +77 -0
- package/templates/yoga-studio/l10n/th.json +77 -0
- package/templates/yoga-studio/l10n/tr.json +77 -0
- package/templates/yoga-studio/l10n/uk.json +77 -0
- package/templates/yoga-studio/l10n/vi.json +77 -0
- package/templates/yoga-studio/l10n/zh.json +77 -0
- package/templates/yoga-studio/tier5-src/_shared/push-permission.ts +75 -0
- package/templates/yoga-studio/tier5-src/himi-branded-lite-home/index.ts +103 -4
- package/templates/yoga-studio/tier5-src/himi-branded-lite-notifsettings/index.ts +108 -6
|
@@ -1928,6 +1928,78 @@
|
|
|
1928
1928
|
"translation": "Fotoğrafı değiştir",
|
|
1929
1929
|
"origin": "machine"
|
|
1930
1930
|
},
|
|
1931
|
+
"h_134635e9a2a6": {
|
|
1932
|
+
"key": "notifsettings.openSettingsCta",
|
|
1933
|
+
"source": "Open Settings",
|
|
1934
|
+
"translation": "Ayarlar'ı aç",
|
|
1935
|
+
"origin": "machine"
|
|
1936
|
+
},
|
|
1937
|
+
"h_2bcb76170ec3": {
|
|
1938
|
+
"key": "notifsettings.pushOffTitle",
|
|
1939
|
+
"source": "Notifications are off on this phone",
|
|
1940
|
+
"translation": "Bu telefonda bildirimler kapalı",
|
|
1941
|
+
"origin": "machine"
|
|
1942
|
+
},
|
|
1943
|
+
"h_31b3496929a9": {
|
|
1944
|
+
"key": "notifsettings.pushAskBody",
|
|
1945
|
+
"source": "Allow notifications on this phone to get the updates you choose below.",
|
|
1946
|
+
"translation": "Aşağıda seçtiğiniz güncellemeleri almak için bu telefonda bildirimlere izin verin.",
|
|
1947
|
+
"origin": "machine"
|
|
1948
|
+
},
|
|
1949
|
+
"h_5ab087ec11ff": {
|
|
1950
|
+
"key": "notifsettings.turnOnCta",
|
|
1951
|
+
"source": "Turn on notifications",
|
|
1952
|
+
"translation": "Bildirimleri aç",
|
|
1953
|
+
"origin": "machine"
|
|
1954
|
+
},
|
|
1955
|
+
"h_e45714907316": {
|
|
1956
|
+
"key": "home.pushAskNotNow",
|
|
1957
|
+
"source": "Not now",
|
|
1958
|
+
"translation": "Şimdi değil",
|
|
1959
|
+
"origin": "machine"
|
|
1960
|
+
},
|
|
1961
|
+
"h_e9093cc9cde8": {
|
|
1962
|
+
"key": "home.pushAskBodyOrdersBookings",
|
|
1963
|
+
"source": "Get notified when your order status changes, and get reminders about your bookings.",
|
|
1964
|
+
"translation": "Siparişinizin durumu değiştiğinde bildirim, rezervasyonlarınız için hatırlatıcı alın.",
|
|
1965
|
+
"origin": "machine"
|
|
1966
|
+
},
|
|
1967
|
+
"h_f54254af0c08": {
|
|
1968
|
+
"key": "home.pushAskTitle",
|
|
1969
|
+
"source": "Stay in the loop",
|
|
1970
|
+
"translation": "Haberdar olun",
|
|
1971
|
+
"origin": "machine"
|
|
1972
|
+
},
|
|
1973
|
+
"h_01828fbf543c": {
|
|
1974
|
+
"key": "home.pushAskBodyOrders",
|
|
1975
|
+
"source": "Get notified when your order status changes.",
|
|
1976
|
+
"translation": "Siparişinizin durumu değiştiğinde bildirim alın.",
|
|
1977
|
+
"origin": "machine"
|
|
1978
|
+
},
|
|
1979
|
+
"h_a365748a7092": {
|
|
1980
|
+
"key": "home.pushAskBodyBookings",
|
|
1981
|
+
"source": "Get reminders and updates about your bookings.",
|
|
1982
|
+
"translation": "Rezervasyonlarınızla ilgili hatırlatıcılar ve güncellemeler alın.",
|
|
1983
|
+
"origin": "machine"
|
|
1984
|
+
},
|
|
1985
|
+
"h_fb0c45519478": {
|
|
1986
|
+
"key": "home.pushAskBodyGeneral",
|
|
1987
|
+
"source": "Get notified about replies and updates that matter to you.",
|
|
1988
|
+
"translation": "Sizin için önemli yanıtlar ve güncellemeler hakkında bildirim alın.",
|
|
1989
|
+
"origin": "machine"
|
|
1990
|
+
},
|
|
1991
|
+
"h_b115e30c1a23": {
|
|
1992
|
+
"key": "notifsettings.pushAskTitle",
|
|
1993
|
+
"source": "Notifications aren't on yet",
|
|
1994
|
+
"translation": "Bildirimler henüz açık değil",
|
|
1995
|
+
"origin": "machine"
|
|
1996
|
+
},
|
|
1997
|
+
"h_282e81f51b9e": {
|
|
1998
|
+
"key": "notifsettings.pushOffBody",
|
|
1999
|
+
"source": "Your choices below are saved, but nothing arrives until notifications are allowed on this phone.",
|
|
2000
|
+
"translation": "Aşağıdaki seçimleriniz kaydedildi ancak bu telefonda bildirimlere izin verilene kadar hiçbir şey gelmez.",
|
|
2001
|
+
"origin": "machine"
|
|
2002
|
+
},
|
|
1931
2003
|
"h_1e9b74b4dda5": {
|
|
1932
2004
|
"source": "Show all ({count})",
|
|
1933
2005
|
"translation": "Tümünü göster ({count})",
|
|
@@ -4902,6 +4974,11 @@
|
|
|
4902
4974
|
"source": "Unblock {name}?",
|
|
4903
4975
|
"translation": "{name} engeli kaldırılsın mı?",
|
|
4904
4976
|
"origin": "machine"
|
|
4977
|
+
},
|
|
4978
|
+
"h_27b36f21a125": {
|
|
4979
|
+
"source": "Change notifications for this app in your phone's settings.",
|
|
4980
|
+
"translation": "Bu uygulamanın bildirimlerini telefonunuzun ayarlarından değiştirin.",
|
|
4981
|
+
"origin": "machine"
|
|
4905
4982
|
}
|
|
4906
4983
|
}
|
|
4907
4984
|
}
|
|
@@ -1928,6 +1928,78 @@
|
|
|
1928
1928
|
"translation": "Змінити фото",
|
|
1929
1929
|
"origin": "machine"
|
|
1930
1930
|
},
|
|
1931
|
+
"h_134635e9a2a6": {
|
|
1932
|
+
"key": "notifsettings.openSettingsCta",
|
|
1933
|
+
"source": "Open Settings",
|
|
1934
|
+
"translation": "Відкрити Налаштування",
|
|
1935
|
+
"origin": "machine"
|
|
1936
|
+
},
|
|
1937
|
+
"h_2bcb76170ec3": {
|
|
1938
|
+
"key": "notifsettings.pushOffTitle",
|
|
1939
|
+
"source": "Notifications are off on this phone",
|
|
1940
|
+
"translation": "Сповіщення на цьому телефоні вимкнено",
|
|
1941
|
+
"origin": "machine"
|
|
1942
|
+
},
|
|
1943
|
+
"h_31b3496929a9": {
|
|
1944
|
+
"key": "notifsettings.pushAskBody",
|
|
1945
|
+
"source": "Allow notifications on this phone to get the updates you choose below.",
|
|
1946
|
+
"translation": "Дозвольте сповіщення на цьому телефоні, щоб отримувати вибрані нижче оновлення.",
|
|
1947
|
+
"origin": "machine"
|
|
1948
|
+
},
|
|
1949
|
+
"h_5ab087ec11ff": {
|
|
1950
|
+
"key": "notifsettings.turnOnCta",
|
|
1951
|
+
"source": "Turn on notifications",
|
|
1952
|
+
"translation": "Увімкнути сповіщення",
|
|
1953
|
+
"origin": "machine"
|
|
1954
|
+
},
|
|
1955
|
+
"h_e45714907316": {
|
|
1956
|
+
"key": "home.pushAskNotNow",
|
|
1957
|
+
"source": "Not now",
|
|
1958
|
+
"translation": "Не зараз",
|
|
1959
|
+
"origin": "machine"
|
|
1960
|
+
},
|
|
1961
|
+
"h_e9093cc9cde8": {
|
|
1962
|
+
"key": "home.pushAskBodyOrdersBookings",
|
|
1963
|
+
"source": "Get notified when your order status changes, and get reminders about your bookings.",
|
|
1964
|
+
"translation": "Отримуйте сповіщення, коли змінюється статус замовлення, і нагадування про бронювання.",
|
|
1965
|
+
"origin": "machine"
|
|
1966
|
+
},
|
|
1967
|
+
"h_f54254af0c08": {
|
|
1968
|
+
"key": "home.pushAskTitle",
|
|
1969
|
+
"source": "Stay in the loop",
|
|
1970
|
+
"translation": "Будьте в курсі",
|
|
1971
|
+
"origin": "machine"
|
|
1972
|
+
},
|
|
1973
|
+
"h_01828fbf543c": {
|
|
1974
|
+
"key": "home.pushAskBodyOrders",
|
|
1975
|
+
"source": "Get notified when your order status changes.",
|
|
1976
|
+
"translation": "Отримуйте сповіщення, коли змінюється статус замовлення.",
|
|
1977
|
+
"origin": "machine"
|
|
1978
|
+
},
|
|
1979
|
+
"h_a365748a7092": {
|
|
1980
|
+
"key": "home.pushAskBodyBookings",
|
|
1981
|
+
"source": "Get reminders and updates about your bookings.",
|
|
1982
|
+
"translation": "Отримуйте нагадування й оновлення про ваші бронювання.",
|
|
1983
|
+
"origin": "machine"
|
|
1984
|
+
},
|
|
1985
|
+
"h_fb0c45519478": {
|
|
1986
|
+
"key": "home.pushAskBodyGeneral",
|
|
1987
|
+
"source": "Get notified about replies and updates that matter to you.",
|
|
1988
|
+
"translation": "Отримуйте сповіщення про відповіді й важливі для вас оновлення.",
|
|
1989
|
+
"origin": "machine"
|
|
1990
|
+
},
|
|
1991
|
+
"h_b115e30c1a23": {
|
|
1992
|
+
"key": "notifsettings.pushAskTitle",
|
|
1993
|
+
"source": "Notifications aren't on yet",
|
|
1994
|
+
"translation": "Сповіщення ще не ввімкнено",
|
|
1995
|
+
"origin": "machine"
|
|
1996
|
+
},
|
|
1997
|
+
"h_282e81f51b9e": {
|
|
1998
|
+
"key": "notifsettings.pushOffBody",
|
|
1999
|
+
"source": "Your choices below are saved, but nothing arrives until notifications are allowed on this phone.",
|
|
2000
|
+
"translation": "Ваш вибір нижче збережено, але нічого не надходитиме, доки сповіщення не дозволено на цьому телефоні.",
|
|
2001
|
+
"origin": "machine"
|
|
2002
|
+
},
|
|
1931
2003
|
"h_1e9b74b4dda5": {
|
|
1932
2004
|
"source": "Show all ({count})",
|
|
1933
2005
|
"translation": "Показати все ({count})",
|
|
@@ -4902,6 +4974,11 @@
|
|
|
4902
4974
|
"source": "Unblock {name}?",
|
|
4903
4975
|
"translation": "Розблокувати {name}?",
|
|
4904
4976
|
"origin": "machine"
|
|
4977
|
+
},
|
|
4978
|
+
"h_27b36f21a125": {
|
|
4979
|
+
"source": "Change notifications for this app in your phone's settings.",
|
|
4980
|
+
"translation": "Змініть сповіщення цього застосунку в налаштуваннях телефона.",
|
|
4981
|
+
"origin": "machine"
|
|
4905
4982
|
}
|
|
4906
4983
|
}
|
|
4907
4984
|
}
|
|
@@ -1928,6 +1928,78 @@
|
|
|
1928
1928
|
"translation": "Đổi ảnh",
|
|
1929
1929
|
"origin": "machine"
|
|
1930
1930
|
},
|
|
1931
|
+
"h_134635e9a2a6": {
|
|
1932
|
+
"key": "notifsettings.openSettingsCta",
|
|
1933
|
+
"source": "Open Settings",
|
|
1934
|
+
"translation": "Mở Cài đặt",
|
|
1935
|
+
"origin": "machine"
|
|
1936
|
+
},
|
|
1937
|
+
"h_2bcb76170ec3": {
|
|
1938
|
+
"key": "notifsettings.pushOffTitle",
|
|
1939
|
+
"source": "Notifications are off on this phone",
|
|
1940
|
+
"translation": "Thông báo đang tắt trên điện thoại này",
|
|
1941
|
+
"origin": "machine"
|
|
1942
|
+
},
|
|
1943
|
+
"h_31b3496929a9": {
|
|
1944
|
+
"key": "notifsettings.pushAskBody",
|
|
1945
|
+
"source": "Allow notifications on this phone to get the updates you choose below.",
|
|
1946
|
+
"translation": "Cho phép thông báo trên điện thoại này để nhận các cập nhật bạn chọn bên dưới.",
|
|
1947
|
+
"origin": "machine"
|
|
1948
|
+
},
|
|
1949
|
+
"h_5ab087ec11ff": {
|
|
1950
|
+
"key": "notifsettings.turnOnCta",
|
|
1951
|
+
"source": "Turn on notifications",
|
|
1952
|
+
"translation": "Bật thông báo",
|
|
1953
|
+
"origin": "machine"
|
|
1954
|
+
},
|
|
1955
|
+
"h_e45714907316": {
|
|
1956
|
+
"key": "home.pushAskNotNow",
|
|
1957
|
+
"source": "Not now",
|
|
1958
|
+
"translation": "Để sau",
|
|
1959
|
+
"origin": "machine"
|
|
1960
|
+
},
|
|
1961
|
+
"h_e9093cc9cde8": {
|
|
1962
|
+
"key": "home.pushAskBodyOrdersBookings",
|
|
1963
|
+
"source": "Get notified when your order status changes, and get reminders about your bookings.",
|
|
1964
|
+
"translation": "Nhận thông báo khi trạng thái đơn hàng thay đổi và lời nhắc về lịch đặt của bạn.",
|
|
1965
|
+
"origin": "machine"
|
|
1966
|
+
},
|
|
1967
|
+
"h_f54254af0c08": {
|
|
1968
|
+
"key": "home.pushAskTitle",
|
|
1969
|
+
"source": "Stay in the loop",
|
|
1970
|
+
"translation": "Luôn cập nhật",
|
|
1971
|
+
"origin": "machine"
|
|
1972
|
+
},
|
|
1973
|
+
"h_01828fbf543c": {
|
|
1974
|
+
"key": "home.pushAskBodyOrders",
|
|
1975
|
+
"source": "Get notified when your order status changes.",
|
|
1976
|
+
"translation": "Nhận thông báo khi trạng thái đơn hàng của bạn thay đổi.",
|
|
1977
|
+
"origin": "machine"
|
|
1978
|
+
},
|
|
1979
|
+
"h_a365748a7092": {
|
|
1980
|
+
"key": "home.pushAskBodyBookings",
|
|
1981
|
+
"source": "Get reminders and updates about your bookings.",
|
|
1982
|
+
"translation": "Nhận lời nhắc và cập nhật về lịch đặt của bạn.",
|
|
1983
|
+
"origin": "machine"
|
|
1984
|
+
},
|
|
1985
|
+
"h_fb0c45519478": {
|
|
1986
|
+
"key": "home.pushAskBodyGeneral",
|
|
1987
|
+
"source": "Get notified about replies and updates that matter to you.",
|
|
1988
|
+
"translation": "Nhận thông báo về phản hồi và cập nhật quan trọng với bạn.",
|
|
1989
|
+
"origin": "machine"
|
|
1990
|
+
},
|
|
1991
|
+
"h_b115e30c1a23": {
|
|
1992
|
+
"key": "notifsettings.pushAskTitle",
|
|
1993
|
+
"source": "Notifications aren't on yet",
|
|
1994
|
+
"translation": "Thông báo chưa được bật",
|
|
1995
|
+
"origin": "machine"
|
|
1996
|
+
},
|
|
1997
|
+
"h_282e81f51b9e": {
|
|
1998
|
+
"key": "notifsettings.pushOffBody",
|
|
1999
|
+
"source": "Your choices below are saved, but nothing arrives until notifications are allowed on this phone.",
|
|
2000
|
+
"translation": "Lựa chọn của bạn bên dưới đã được lưu, nhưng sẽ không có thông báo nào cho đến khi điện thoại này cho phép thông báo.",
|
|
2001
|
+
"origin": "machine"
|
|
2002
|
+
},
|
|
1931
2003
|
"h_1e9b74b4dda5": {
|
|
1932
2004
|
"source": "Show all ({count})",
|
|
1933
2005
|
"translation": "Xem tất cả ({count})",
|
|
@@ -4902,6 +4974,11 @@
|
|
|
4902
4974
|
"source": "Unblock {name}?",
|
|
4903
4975
|
"translation": "Bỏ chặn {name}?",
|
|
4904
4976
|
"origin": "machine"
|
|
4977
|
+
},
|
|
4978
|
+
"h_27b36f21a125": {
|
|
4979
|
+
"source": "Change notifications for this app in your phone's settings.",
|
|
4980
|
+
"translation": "Thay đổi thông báo của ứng dụng này trong cài đặt điện thoại.",
|
|
4981
|
+
"origin": "machine"
|
|
4905
4982
|
}
|
|
4906
4983
|
}
|
|
4907
4984
|
}
|
|
@@ -1928,6 +1928,78 @@
|
|
|
1928
1928
|
"translation": "變更相片",
|
|
1929
1929
|
"origin": "machine"
|
|
1930
1930
|
},
|
|
1931
|
+
"h_134635e9a2a6": {
|
|
1932
|
+
"key": "notifsettings.openSettingsCta",
|
|
1933
|
+
"source": "Open Settings",
|
|
1934
|
+
"translation": "打开设置",
|
|
1935
|
+
"origin": "machine"
|
|
1936
|
+
},
|
|
1937
|
+
"h_2bcb76170ec3": {
|
|
1938
|
+
"key": "notifsettings.pushOffTitle",
|
|
1939
|
+
"source": "Notifications are off on this phone",
|
|
1940
|
+
"translation": "此手机已关闭通知",
|
|
1941
|
+
"origin": "machine"
|
|
1942
|
+
},
|
|
1943
|
+
"h_31b3496929a9": {
|
|
1944
|
+
"key": "notifsettings.pushAskBody",
|
|
1945
|
+
"source": "Allow notifications on this phone to get the updates you choose below.",
|
|
1946
|
+
"translation": "在此手机上允许通知,即可收到你在下方选择的更新。",
|
|
1947
|
+
"origin": "machine"
|
|
1948
|
+
},
|
|
1949
|
+
"h_5ab087ec11ff": {
|
|
1950
|
+
"key": "notifsettings.turnOnCta",
|
|
1951
|
+
"source": "Turn on notifications",
|
|
1952
|
+
"translation": "开启通知",
|
|
1953
|
+
"origin": "machine"
|
|
1954
|
+
},
|
|
1955
|
+
"h_e45714907316": {
|
|
1956
|
+
"key": "home.pushAskNotNow",
|
|
1957
|
+
"source": "Not now",
|
|
1958
|
+
"translation": "以后再说",
|
|
1959
|
+
"origin": "machine"
|
|
1960
|
+
},
|
|
1961
|
+
"h_e9093cc9cde8": {
|
|
1962
|
+
"key": "home.pushAskBodyOrdersBookings",
|
|
1963
|
+
"source": "Get notified when your order status changes, and get reminders about your bookings.",
|
|
1964
|
+
"translation": "订单状态变化时通知你,并提醒你的预约。",
|
|
1965
|
+
"origin": "machine"
|
|
1966
|
+
},
|
|
1967
|
+
"h_f54254af0c08": {
|
|
1968
|
+
"key": "home.pushAskTitle",
|
|
1969
|
+
"source": "Stay in the loop",
|
|
1970
|
+
"translation": "及时了解动态",
|
|
1971
|
+
"origin": "machine"
|
|
1972
|
+
},
|
|
1973
|
+
"h_01828fbf543c": {
|
|
1974
|
+
"key": "home.pushAskBodyOrders",
|
|
1975
|
+
"source": "Get notified when your order status changes.",
|
|
1976
|
+
"translation": "订单状态变化时通知你。",
|
|
1977
|
+
"origin": "machine"
|
|
1978
|
+
},
|
|
1979
|
+
"h_a365748a7092": {
|
|
1980
|
+
"key": "home.pushAskBodyBookings",
|
|
1981
|
+
"source": "Get reminders and updates about your bookings.",
|
|
1982
|
+
"translation": "接收预约提醒和最新动态。",
|
|
1983
|
+
"origin": "machine"
|
|
1984
|
+
},
|
|
1985
|
+
"h_fb0c45519478": {
|
|
1986
|
+
"key": "home.pushAskBodyGeneral",
|
|
1987
|
+
"source": "Get notified about replies and updates that matter to you.",
|
|
1988
|
+
"translation": "接收与你相关的回复和更新通知。",
|
|
1989
|
+
"origin": "machine"
|
|
1990
|
+
},
|
|
1991
|
+
"h_b115e30c1a23": {
|
|
1992
|
+
"key": "notifsettings.pushAskTitle",
|
|
1993
|
+
"source": "Notifications aren't on yet",
|
|
1994
|
+
"translation": "通知尚未开启",
|
|
1995
|
+
"origin": "machine"
|
|
1996
|
+
},
|
|
1997
|
+
"h_282e81f51b9e": {
|
|
1998
|
+
"key": "notifsettings.pushOffBody",
|
|
1999
|
+
"source": "Your choices below are saved, but nothing arrives until notifications are allowed on this phone.",
|
|
2000
|
+
"translation": "你在下方的选择已保存,但在此手机允许通知之前,不会收到任何通知。",
|
|
2001
|
+
"origin": "machine"
|
|
2002
|
+
},
|
|
1931
2003
|
"h_1e9b74b4dda5": {
|
|
1932
2004
|
"source": "Show all ({count})",
|
|
1933
2005
|
"translation": "查看全部({count})",
|
|
@@ -4902,6 +4974,11 @@
|
|
|
4902
4974
|
"source": "Unblock {name}?",
|
|
4903
4975
|
"translation": "要解除封鎖 {name} 嗎?",
|
|
4904
4976
|
"origin": "machine"
|
|
4977
|
+
},
|
|
4978
|
+
"h_27b36f21a125": {
|
|
4979
|
+
"source": "Change notifications for this app in your phone's settings.",
|
|
4980
|
+
"translation": "请在手机设置中更改此应用的通知。",
|
|
4981
|
+
"origin": "machine"
|
|
4905
4982
|
}
|
|
4906
4983
|
}
|
|
4907
4984
|
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// The phone's notification permission, as Branded Lite's screens use it (Notification settings and
|
|
2
|
+
// Home's in-context ask). Every call is caught: a host without the push capability (an older binary)
|
|
3
|
+
// answers "error", which shows nothing rather than an offer that leads nowhere.
|
|
4
|
+
//
|
|
5
|
+
// Only a native app has a PHONE permission. A web host reports the browser's, which says nothing
|
|
6
|
+
// about the member's phone, so it reads as "error" too.
|
|
7
|
+
//
|
|
8
|
+
// Android reports "denied" both before its first ask and after a refusal (it has no "undetermined"
|
|
9
|
+
// once API 33's runtime permission exists), so only a request can tell the two apart. Below API 33
|
|
10
|
+
// there is no runtime dialog at all: "denied" means switched off in Settings.
|
|
11
|
+
|
|
12
|
+
import { openSettings, requestPermission, type PushPermission } from "@himalaya/push";
|
|
13
|
+
import { dispatch } from "@himalaya/dispatch";
|
|
14
|
+
import { get as getAppInfo } from "@himalaya/app-info";
|
|
15
|
+
|
|
16
|
+
export type PushStatus = PushPermission | "error";
|
|
17
|
+
export type PushPlatform = "ios" | "android" | "macos" | "";
|
|
18
|
+
|
|
19
|
+
export interface PhonePush {
|
|
20
|
+
status: PushStatus;
|
|
21
|
+
platform: PushPlatform;
|
|
22
|
+
/** A "denied" answer may still hide a first ask the system can show (Android 13+ only). */
|
|
23
|
+
deniedMayPrompt: boolean;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const NATIVE: readonly string[] = ["ios", "android", "macos"];
|
|
27
|
+
|
|
28
|
+
/** Android's major version, or 0 when the host does not say. */
|
|
29
|
+
function androidMajor(osVersion: string | undefined): number {
|
|
30
|
+
const major = Number.parseInt(String(osVersion ?? ""), 10);
|
|
31
|
+
return Number.isFinite(major) ? major : 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export async function readPhonePush(): Promise<PhonePush> {
|
|
35
|
+
const info = await getAppInfo().catch(() => undefined);
|
|
36
|
+
const platform = (NATIVE.includes(info?.platform ?? "") ? info!.platform : "") as PushPlatform;
|
|
37
|
+
if (!platform) return { status: "error", platform, deniedMayPrompt: false };
|
|
38
|
+
const status = await readPushStatus();
|
|
39
|
+
// An unknown Android version may be below 13, where no dialog exists: promise no prompt then.
|
|
40
|
+
return { status, platform, deniedMayPrompt: platform === "android" && androidMajor(info?.osVersion) >= 13 };
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/** Read raw: the SDK maps every unknown answer to "undetermined", but a native host without the
|
|
44
|
+
* push module answers "unavailable", where a Turn on button could never prompt. */
|
|
45
|
+
export async function readPushStatus(): Promise<PushStatus> {
|
|
46
|
+
try {
|
|
47
|
+
const r = (await dispatch("capability.push.getPermissionStatus")) as { status?: unknown } | null;
|
|
48
|
+
const status = r?.status;
|
|
49
|
+
return status === "granted" || status === "denied" || status === "undetermined" ? status : "error";
|
|
50
|
+
} catch { return "error"; }
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** Ask the OS. Shows the system prompt only while it still can; otherwise just reads the answer.
|
|
54
|
+
* Once granted it also registers this session's push token (no prompt). */
|
|
55
|
+
export async function askForPush(): Promise<PushStatus> {
|
|
56
|
+
try { return await requestPermission(); } catch { return readPushStatus(); }
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export async function openPushSettings(): Promise<boolean> {
|
|
60
|
+
try { return await openSettings(); } catch { return false; }
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** A grant made earlier (or just now, in the OS settings) still needs this launch's token:
|
|
64
|
+
* `requestPermission` on a granted phone registers it without a prompt. */
|
|
65
|
+
export async function refreshGrantedToken(status: PushStatus): Promise<void> {
|
|
66
|
+
if (status === "granted") await askForPush();
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** The same, at most once per worker run: a launch needs one token request, not one per refresh. */
|
|
70
|
+
let tokenRefreshedThisRun = false;
|
|
71
|
+
export async function refreshGrantedTokenOnce(status: PushStatus): Promise<void> {
|
|
72
|
+
if (status !== "granted" || tokenRefreshedThisRun) return;
|
|
73
|
+
tokenRefreshedThisRun = true;
|
|
74
|
+
await askForPush();
|
|
75
|
+
}
|
|
@@ -5,6 +5,7 @@ import { isProgramEnded } from "../_shared/program-fields.js";
|
|
|
5
5
|
import { fetchMemberBookings, type MemberBookingRow } from "../_shared/member-bookings.js";
|
|
6
6
|
import { hostSiteFromInput, hostedExploreCards, hostedHiddenFlags, type HostedExploreCard } from "../_shared/branded-lite-hosted.js";
|
|
7
7
|
import { memberAccess, assertMemberAccess } from "../_shared/member-access.js";
|
|
8
|
+
import { askForPush, readPhonePush, refreshGrantedTokenOnce, type PhonePush } from "../_shared/push-permission.js";
|
|
8
9
|
import { defineService as registerHome } from "../_shared/home-service.js";
|
|
9
10
|
import { navigate } from "@himalaya/state";
|
|
10
11
|
import { withIapPresentation } from "../_shared/iap-presentation.js";
|
|
@@ -283,6 +284,12 @@ interface State {
|
|
|
283
284
|
/** Inverse of onboardingHidden — hide the post-onboarding primary Shop CTA
|
|
284
285
|
* while the welcome card is still up (one primary: Got it). */
|
|
285
286
|
onboardingActive: boolean;
|
|
287
|
+
/** The in-context push ask (Turn on / Not now). Hidden unless a signed-in member's phone can
|
|
288
|
+
* still show the system prompt and this phone has not answered the card. */
|
|
289
|
+
pushAskHidden: boolean;
|
|
290
|
+
/** Which benefit line the ask shows (hiddenWhen flags, so TRUE hides): the one that fits the
|
|
291
|
+
* installed verticals, the general one in hosted mode. */
|
|
292
|
+
hidePushBodyOrders: boolean; hidePushBodyBookings: boolean; hidePushBodyOrdersBookings: boolean; hidePushBodyGeneral: boolean;
|
|
286
293
|
heroTitle: string;
|
|
287
294
|
heroSubtitle: string;
|
|
288
295
|
heroPrice: string;
|
|
@@ -378,6 +385,51 @@ function onboardingSeen(): boolean {
|
|
|
378
385
|
try { return storage()?.getItem(ONBOARDING_KEY) === "1"; } catch { return false; }
|
|
379
386
|
}
|
|
380
387
|
|
|
388
|
+
// The push ask is answered once per phone, either way: "Not now" must not come back every launch.
|
|
389
|
+
const PUSH_ASKED_KEY = "himi.brandedLite.pushAsked";
|
|
390
|
+
let pushCheckGeneration = 0;
|
|
391
|
+
/** Also held in memory: a host without storage must still keep "Not now" for this run. */
|
|
392
|
+
let pushAskAnsweredThisRun = false;
|
|
393
|
+
function pushAskAnswered(): boolean {
|
|
394
|
+
if (pushAskAnsweredThisRun) return true;
|
|
395
|
+
try { return storage()?.getItem(PUSH_ASKED_KEY) === "1"; } catch { return false; }
|
|
396
|
+
}
|
|
397
|
+
function rememberPushAskAnswered(): void {
|
|
398
|
+
pushAskAnsweredThisRun = true;
|
|
399
|
+
try { storage()?.setItem(PUSH_ASKED_KEY, "1"); } catch { /* best-effort: held in memory for this run */ }
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
/** Whether the system prompt can still be shown. iOS and macOS say so ("undetermined"); Android 13+
|
|
403
|
+
* reports "denied" before its first ask too, so there a refusal cannot be told from never asked.
|
|
404
|
+
* An iOS phone that refused, and Android below 13 (no runtime dialog), have Notification
|
|
405
|
+
* settings' Settings path instead. */
|
|
406
|
+
function promptPossible(phone: PhonePush): boolean {
|
|
407
|
+
return phone.status === "undetermined" || (phone.status === "denied" && phone.deniedMayPrompt);
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
type PushBody = "orders" | "bookings" | "ordersBookings" | "general";
|
|
411
|
+
/** Ping routes member pushes for orders and bookings; anything else is replies and updates. */
|
|
412
|
+
function pushBodyFor(verticals: string[], hosted: boolean): PushBody {
|
|
413
|
+
if (hosted) return "general";
|
|
414
|
+
const orders = verticals.includes("store"), bookings = verticals.includes("bookings");
|
|
415
|
+
return orders && bookings ? "ordersBookings" : orders ? "orders" : bookings ? "bookings" : "general";
|
|
416
|
+
}
|
|
417
|
+
function pushBodyFlags(body: PushBody): Pick<State, "hidePushBodyOrders" | "hidePushBodyBookings" | "hidePushBodyOrdersBookings" | "hidePushBodyGeneral"> {
|
|
418
|
+
return { hidePushBodyOrders: body !== "orders", hidePushBodyBookings: body !== "bookings",
|
|
419
|
+
hidePushBodyOrdersBookings: body !== "ordersBookings", hidePushBodyGeneral: body !== "general" };
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
/** The moment of value is after sign-in: Ping delivers member notifications (orders, bookings,
|
|
423
|
+
* chat) only to a signed-in member, so a visitor has nothing to be notified about yet. */
|
|
424
|
+
async function shouldAskForPush(): Promise<boolean> {
|
|
425
|
+
const phone = await readPhonePush();
|
|
426
|
+
// Every launch, answered or not: a grant still needs this launch's token, and shells older than
|
|
427
|
+
// the native refresh registered it only from the launch prompt this app no longer shows.
|
|
428
|
+
await refreshGrantedTokenOnce(phone.status);
|
|
429
|
+
if (pushAskAnswered() || !promptPossible(phone)) return false;
|
|
430
|
+
return (await memberAccess()).signedIn === true;
|
|
431
|
+
}
|
|
432
|
+
|
|
381
433
|
// The user's own layout choice, persisted by the appearance worker under the
|
|
382
434
|
// same shared LAYOUT_KEY. Best-effort — a missing store just means we fall back
|
|
383
435
|
// to owner-default / content-recommendation.
|
|
@@ -1085,6 +1137,8 @@ function baseState(): State {
|
|
|
1085
1137
|
refreshedAt: "",
|
|
1086
1138
|
effectiveLayout: resolveEffectiveLayout(undefined, 0),
|
|
1087
1139
|
onboardingHidden: onboardingSeen(),
|
|
1140
|
+
pushAskHidden: true,
|
|
1141
|
+
...pushBodyFlags("general"),
|
|
1088
1142
|
// derive() recomputes this from onboardingHidden, but State requires it and this
|
|
1089
1143
|
// literal is a full State by contract — every other derived flag above is passed
|
|
1090
1144
|
// explicitly for the same reason. Omitting it made baseState() not a State.
|
|
@@ -1327,6 +1381,7 @@ async function refresh(state: State, arg?: unknown): Promise<State | undefined>
|
|
|
1327
1381
|
const generation = ++personalGeneration;
|
|
1328
1382
|
// Personalized work must never hold public browsing behind identity/network.
|
|
1329
1383
|
svc.clearPersonal();
|
|
1384
|
+
void svc.checkPushAsk();
|
|
1330
1385
|
void refreshPersonal(generation, arg);
|
|
1331
1386
|
const publicState = await refreshPublic(state, arg);
|
|
1332
1387
|
if (!publicState || generation !== personalGeneration) return undefined;
|
|
@@ -1344,7 +1399,10 @@ async function refresh(state: State, arg?: unknown): Promise<State | undefined>
|
|
|
1344
1399
|
memberProgressLabel: current.memberProgressLabel, memberProgressFraction: current.memberProgressFraction,
|
|
1345
1400
|
hideMemberProgress: current.hideMemberProgress, personalError: current.personalError, hidePersonalError: current.hidePersonalError,
|
|
1346
1401
|
// The weekly goal is PERSONAL (member bookings); the public refresh resets it, so keep it.
|
|
1347
|
-
weeklyClassCount: current.weeklyClassCount, weeklyClassGoalFraction: current.weeklyClassGoalFraction, weeklyGoalLabel: current.weeklyGoalLabel
|
|
1402
|
+
weeklyClassCount: current.weeklyClassCount, weeklyClassGoalFraction: current.weeklyClassGoalFraction, weeklyGoalLabel: current.weeklyGoalLabel,
|
|
1403
|
+
// Decided by checkPushAsk, which may have landed while the public read was in flight.
|
|
1404
|
+
pushAskHidden: current.pushAskHidden, hidePushBodyOrders: current.hidePushBodyOrders, hidePushBodyBookings: current.hidePushBodyBookings,
|
|
1405
|
+
hidePushBodyOrdersBookings: current.hidePushBodyOrdersBookings, hidePushBodyGeneral: current.hidePushBodyGeneral });
|
|
1348
1406
|
}
|
|
1349
1407
|
|
|
1350
1408
|
const defineService = withIapPresentation<State>({
|
|
@@ -1366,6 +1424,9 @@ const svc = defineService<State, {
|
|
|
1366
1424
|
// constraint allows an undefined return for exactly this; the declaration did not.
|
|
1367
1425
|
refresh: (state: State, arg?: unknown) => Promise<State | undefined>;
|
|
1368
1426
|
dismissOnboarding: (state: State) => State;
|
|
1427
|
+
checkPushAsk: (state: State, arg?: unknown) => Promise<State | undefined>;
|
|
1428
|
+
turnOnPush: (state: State) => Promise<State | undefined>;
|
|
1429
|
+
dismissPushAsk: (state: State) => State;
|
|
1369
1430
|
clearPersonal: (state: State) => State;
|
|
1370
1431
|
memberProgramsLoaded: (state: State, arg: { generation: number; rows: MemberProgramCard[]; attempt?: number }) => State | undefined;
|
|
1371
1432
|
openShopCategory: (state: State, arg?: unknown) => State;
|
|
@@ -1375,9 +1436,10 @@ const svc = defineService<State, {
|
|
|
1375
1436
|
state: baseState(),
|
|
1376
1437
|
// The host's site is read fresh at every boot: a snapshot of the last session's site must not
|
|
1377
1438
|
// decide this one's verticals or name (an owner installs or removes one; another site opens).
|
|
1378
|
-
notHydrated: ["hosted", "hostedName", "hostedCards", "homeCategories", "noHomeCategories", "memberPrograms", "noMemberPrograms"],
|
|
1439
|
+
notHydrated: ["hosted", "hostedName", "hostedCards", "homeCategories", "noHomeCategories", "memberPrograms", "noMemberPrograms", "pushAskHidden"],
|
|
1379
1440
|
// A member's standing never reaches the on-device snapshot either: the next boot may be another member's.
|
|
1380
|
-
|
|
1441
|
+
// Nor does the push ask: an early paint from the snapshot would show last run's card.
|
|
1442
|
+
notPersisted: ["memberPrograms", "noMemberPrograms", "pushAskHidden"],
|
|
1381
1443
|
actions: {
|
|
1382
1444
|
clearPersonal: state => derive({ ...state, nextBooking: [], hideNextBooking: true, memberProgressLabel: "", memberProgressFraction: 0, hideMemberProgress: true, memberPrograms: [], noMemberPrograms: true, personalError: false, hidePersonalError: true,
|
|
1383
1445
|
weeklyClassCount: 0, weeklyClassGoalFraction: 0, weeklyGoalLabel: "" }),
|
|
@@ -1419,6 +1481,42 @@ const svc = defineService<State, {
|
|
|
1419
1481
|
try { storage()?.setItem(ONBOARDING_KEY, "1"); } catch { /* best-effort */ }
|
|
1420
1482
|
return derive({ ...state, onboardingHidden: true });
|
|
1421
1483
|
},
|
|
1484
|
+
checkPushAsk: async (_state: State, arg?: unknown): Promise<State | undefined> => {
|
|
1485
|
+
stashCopy(arg);
|
|
1486
|
+
// Only the newest check publishes: an older one (e.g. a visitor's) must not undo a later
|
|
1487
|
+
// revisit's answer for the member who has signed in since.
|
|
1488
|
+
const generation = ++pushCheckGeneration;
|
|
1489
|
+
// Re-read the answer after the awaits: "Not now" tapped meanwhile must win.
|
|
1490
|
+
const hidden = !(await shouldAskForPush()) || pushAskAnswered();
|
|
1491
|
+
if (generation !== pushCheckGeneration) return undefined;
|
|
1492
|
+
const live: State = svc.getState();
|
|
1493
|
+
const body = pushBodyFlags(pushBodyFor(parseVerticals(undefined), !!hostedSite));
|
|
1494
|
+
const same = live.pushAskHidden === hidden && (Object.keys(body) as (keyof typeof body)[]).every((k) => live[k] === body[k]);
|
|
1495
|
+
return same ? undefined : derive({ ...live, ...body, pushAskHidden: hidden });
|
|
1496
|
+
},
|
|
1497
|
+
// The ONLY path to the system prompt. Never a Settings trip: whatever the answer, the card is done.
|
|
1498
|
+
turnOnPush: async (): Promise<State | undefined> => {
|
|
1499
|
+
// Re-check before prompting: a card restored from an older session may outlive the member.
|
|
1500
|
+
// The tap decides on its own fresh check and then outranks every check started before it
|
|
1501
|
+
// (a Home refresh must not cancel it). The permission is the phone's, not the member's, so a
|
|
1502
|
+
// sign-out racing the tap costs nothing but timing.
|
|
1503
|
+
const stillEligible = await shouldAskForPush();
|
|
1504
|
+
++pushCheckGeneration;
|
|
1505
|
+
// A failed check hides the card for now but does not use up the offer; "Not now" tapped
|
|
1506
|
+
// while the check ran wins.
|
|
1507
|
+
if (stillEligible && !pushAskAnswered()) {
|
|
1508
|
+
const status = await askForPush();
|
|
1509
|
+
// Remembered only once the OS has an answer: a request that failed before any dialog
|
|
1510
|
+
// ("undetermined" or unreadable) leaves the offer for the next visit.
|
|
1511
|
+
if (status === "granted" || status === "denied") rememberPushAskAnswered();
|
|
1512
|
+
}
|
|
1513
|
+
const live: State = svc.getState();
|
|
1514
|
+
return derive({ ...live, pushAskHidden: true });
|
|
1515
|
+
},
|
|
1516
|
+
dismissPushAsk: (state) => {
|
|
1517
|
+
rememberPushAskAnswered();
|
|
1518
|
+
return derive({ ...state, pushAskHidden: true });
|
|
1519
|
+
},
|
|
1422
1520
|
},
|
|
1423
1521
|
});
|
|
1424
1522
|
|
|
@@ -1427,7 +1525,8 @@ const svc = defineService<State, {
|
|
|
1427
1525
|
// name. In place, because on those runtimes getState() IS the stored state (as himi-player-home does).
|
|
1428
1526
|
if ((globalThis as { himalaya?: { hydrationOptOut?: unknown } }).himalaya?.hydrationOptOut !== true) {
|
|
1429
1527
|
const live = (svc as { getState?: () => State | undefined }).getState?.();
|
|
1430
|
-
|
|
1528
|
+
// pushAskHidden too: a card restored from the last session may not be this member's.
|
|
1529
|
+
if (live && typeof live === "object") Object.assign(live, hostedBoot, { homeCategories: [], noHomeCategories: true, pushAskHidden: true });
|
|
1431
1530
|
}
|
|
1432
1531
|
|
|
1433
1532
|
svc.refresh();
|