@kennofizet/apphub-frontend 0.1.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.
Files changed (90) hide show
  1. package/README.md +84 -0
  2. package/package.json +31 -0
  3. package/src/api/coreApi.js +25 -0
  4. package/src/api/index.js +80 -0
  5. package/src/composables/createZoneContext.js +156 -0
  6. package/src/composables/useAppHubHostApi.js +24 -0
  7. package/src/composables/useAppHubZoneContext.js +11 -0
  8. package/src/composables/useDevOriginToggle.js +40 -0
  9. package/src/i18n/index.js +16 -0
  10. package/src/i18n/resolveLang.js +6 -0
  11. package/src/i18n/resolveTheme.js +30 -0
  12. package/src/i18n/translations/en.js +303 -0
  13. package/src/i18n/translations/vi.js +302 -0
  14. package/src/index.js +427 -0
  15. package/src/moduleStore.js +10 -0
  16. package/src/modules/app-store/components/AppHubAppStoreApp.vue +210 -0
  17. package/src/modules/app-store/components/AppHubAppStoreCard.vue +88 -0
  18. package/src/modules/app-store/components/AppHubAppStoreSettingsPanel.vue +266 -0
  19. package/src/modules/app-store/components/AppHubAppVersionHistory.vue +77 -0
  20. package/src/modules/app-store/components/AppHubDevReviewPanel.vue +206 -0
  21. package/src/modules/app-store/components/AppHubDraftStoreApp.vue +184 -0
  22. package/src/modules/app-store/components/AppHubDraftStoreCard.vue +116 -0
  23. package/src/modules/app-store/composables/useAppStore.js +206 -0
  24. package/src/modules/app-store/composables/useCatalogInfiniteScroll.js +47 -0
  25. package/src/modules/app-store/constants/catalogModes.js +2 -0
  26. package/src/modules/app-store/data/defaultCatalog.js +19 -0
  27. package/src/modules/app-store/index.js +9 -0
  28. package/src/modules/app-store/utils/normalizeCatalogApp.js +37 -0
  29. package/src/modules/desktop/components/AppHubDesktop.vue +1510 -0
  30. package/src/modules/desktop/components/AppHubDesktopDevOriginBar.vue +57 -0
  31. package/src/modules/desktop/components/AppHubDesktopDropLayer.vue +15 -0
  32. package/src/modules/desktop/components/AppHubDesktopDropTarget.vue +32 -0
  33. package/src/modules/desktop/components/AppHubDesktopIconContextMenu.vue +74 -0
  34. package/src/modules/desktop/components/AppHubDesktopIconFolder.vue +60 -0
  35. package/src/modules/desktop/components/AppHubDesktopIconGroup.vue +58 -0
  36. package/src/modules/desktop/components/AppHubDesktopIconInfoDialog.vue +33 -0
  37. package/src/modules/desktop/components/AppHubDesktopIconRenameDialog.vue +62 -0
  38. package/src/modules/desktop/components/AppHubDesktopSettings.vue +28 -0
  39. package/src/modules/desktop/components/AppHubDropInstallBadge.vue +65 -0
  40. package/src/modules/desktop/components/AppHubDuplicateAppDialog.vue +38 -0
  41. package/src/modules/desktop/components/AppHubGuideApp.vue +278 -0
  42. package/src/modules/desktop/components/AppHubOriginBlockScreen.vue +105 -0
  43. package/src/modules/desktop/components/AppHubOriginLoadingScreen.vue +23 -0
  44. package/src/modules/desktop/components/AppHubPlaceholderApp.vue +14 -0
  45. package/src/modules/desktop/components/AppHubSettingsApp.vue +319 -0
  46. package/src/modules/desktop/components/AppHubStartButton.vue +24 -0
  47. package/src/modules/desktop/components/AppHubStartMenu.vue +182 -0
  48. package/src/modules/desktop/components/AppHubTaskbarPins.vue +23 -0
  49. package/src/modules/desktop/components/settings/AppHubSettingsKeyboardPanel.vue +82 -0
  50. package/src/modules/desktop/components/settings/AppHubSettingsScreenPanel.vue +41 -0
  51. package/src/modules/desktop/components/settings/AppHubSettingsStartMenuPanel.vue +95 -0
  52. package/src/modules/desktop/composables/simulateInstallProgress.js +15 -0
  53. package/src/modules/desktop/composables/useDesktopDropInstall.js +272 -0
  54. package/src/modules/desktop/composables/useDesktopHubSettings.js +51 -0
  55. package/src/modules/desktop/composables/useDesktopIconDrag.js +207 -0
  56. package/src/modules/desktop/composables/useDesktopShell.js +335 -0
  57. package/src/modules/desktop/data/builtinApps.js +77 -0
  58. package/src/modules/desktop/index.js +12 -0
  59. package/src/modules/desktop/styles/desktop.css +3104 -0
  60. package/src/modules/desktop/styles/theme.css +616 -0
  61. package/src/modules/desktop/utils/desktopGrid.js +43 -0
  62. package/src/modules/desktop/utils/desktopIconGroups.js +103 -0
  63. package/src/modules/desktop/utils/desktopSession.js +40 -0
  64. package/src/modules/desktop/utils/desktopSettings.js +37 -0
  65. package/src/modules/desktop/utils/dropPackageParser.js +140 -0
  66. package/src/modules/desktop/utils/duplicateAppUtils.js +28 -0
  67. package/src/modules/desktop/utils/hubKeyboardSettings.js +63 -0
  68. package/src/modules/desktop/utils/recentApps.js +148 -0
  69. package/src/modules/desktop/utils/startMenuFavorites.js +100 -0
  70. package/src/modules/desktop/utils/startMenuPins.js +90 -0
  71. package/src/modules/notifications/components/AppHubDesktopNotifications.vue +54 -0
  72. package/src/modules/notifications/composables/createDesktopNotifications.js +86 -0
  73. package/src/modules/notifications/index.js +9 -0
  74. package/src/modules/notifications/styles/notifications.css +118 -0
  75. package/src/modules/notifications/utils/parseApiError.js +29 -0
  76. package/src/modules/runner/components/AppHubRunner.vue +292 -0
  77. package/src/modules/runner/index.js +1 -0
  78. package/src/modules/window-manager/components/AppHubWindowFrame.vue +224 -0
  79. package/src/modules/window-manager/composables/useWindowManager.js +652 -0
  80. package/src/modules/window-manager/index.js +7 -0
  81. package/src/modules/window-manager/utils/sessionLayout.js +28 -0
  82. package/src/modules/window-manager/utils/windowLayout.js +236 -0
  83. package/src/modules/window-manager/utils/windowSnap.js +146 -0
  84. package/src/utils/bootstrapCache.js +47 -0
  85. package/src/utils/devOriginSettings.js +22 -0
  86. package/src/utils/launchUrl.js +111 -0
  87. package/src/utils/originSafety.js +267 -0
  88. package/src/utils/safeStorage.js +191 -0
  89. package/src/utils/semver.js +30 -0
  90. package/src/utils/zoneContext.js +38 -0
@@ -0,0 +1,303 @@
1
+ export default {
2
+ origin_block_title: 'App Hub must run on a separate origin',
3
+ origin_block_same_origin_embed:
4
+ 'App Hub is embedded in an iframe on the same origin as your main product. Hosted apps could read shared browser storage (localStorage, cookies).',
5
+ origin_block_not_configured:
6
+ 'App Hub was started inside your main product without a dedicated origin. Do not add installAppHubModule to the product app — deploy a separate App Hub frontend.',
7
+ origin_block_wrong_origin:
8
+ 'This page origin does not match the configured hubOrigin. App Hub must run only on its dedicated URL.',
9
+ origin_block_generic: 'This page origin is not allowed to run App Hub.',
10
+ origin_block_runtime_not_configured:
11
+ 'runtimePublicUrl is required. Hosted app bundles must be served from a separate origin (e.g. https://apps.yourcompany.com/api/.../apphub).',
12
+ origin_block_runtime_same_origin:
13
+ 'runtimePublicUrl must use a different origin than the Hub page so publisher apps cannot read Hub localStorage.',
14
+ origin_block_hint:
15
+ 'Local dev on localhost works automatically. Hub host = your frontend origin (bootstrap reads browser Origin). Runtime API = APP_URL + KNF_CORE_API_PREFIX + APPHUB_API_PREFIX. Embed only the Hub URL in your product iframe.',
16
+ origin_block_current_origin: 'Current page origin',
17
+ origin_block_expected_hub_origin: 'Configured hubOrigin',
18
+ origin_block_expected_runtime_origin: 'Configured runtimePublicUrl',
19
+ origin_block_parent_origin: 'Parent page origin',
20
+ origin_loading_title: 'Starting App Hub…',
21
+ origin_loading_hint: 'Checking origin safety and loading configuration from the server.',
22
+ dev_origin_bar_title: 'Origin safety (dev)',
23
+ dev_origin_status_relaxed: 'Relaxed — localhost bypass active',
24
+ dev_origin_status_strict: 'Strict — production origin rules active',
25
+ dev_origin_action_strict: 'Enable strict checks',
26
+ dev_origin_action_relaxed: 'Relax (dev mode)',
27
+ desktop_start: 'Start',
28
+ desktop_app_store: 'App Store',
29
+ desktop_app_store_hint: 'Install and open apps',
30
+ window_close: 'Close',
31
+ window_minimize: 'Minimize',
32
+ window_fullscreen: 'Full screen',
33
+ window_restore: 'Windowed mode',
34
+ app_store_title: 'App Store',
35
+ app_store_search: 'Search apps',
36
+ app_store_install: 'Get',
37
+ app_store_open: 'Open',
38
+ app_store_empty: 'No apps yet.',
39
+ app_store_empty_zone_hint: 'Try another zone in Settings, or check zone access for active apps.',
40
+ app_store_loading: 'Loading apps...',
41
+ app_store_loading_more: 'Loading more...',
42
+ app_store_load_error: 'Could not load the app catalog.',
43
+ app_store_permission_denied: 'You do not have permission to view apps for this zone.',
44
+ app_store_no_api: 'App Store is not connected to the backend yet.',
45
+ app_store_unavailable: 'Offline',
46
+ app_store_status_draft: 'Draft',
47
+ app_store_status_offline: 'Offline',
48
+ app_store_section_apps: 'Apps',
49
+ app_store_section_testing: 'Testing apps',
50
+ app_store_section_testing_hint: 'Draft builds for owners and testers — not listed for all users until approved.',
51
+ app_store_installed: 'Installed on desktop',
52
+ app_store_uninstall: 'Remove',
53
+ app_store_update: 'Update',
54
+ app_store_installed_version: 'installed',
55
+ desktop_icon_draft_hint: 'Draft app — testing only until approved',
56
+ draft_store_app_name: 'Draft Store',
57
+ draft_store_app_hint: 'App Store for draft apps — owners and testers only',
58
+ draft_store_title: 'Draft App Store',
59
+ draft_store_intro: 'Submit hosted apps by dropping a .zip on the desktop (manifest.json inside). Test drafts here; approved apps appear in the main App Store.',
60
+ draft_store_empty: 'No draft apps for your account.',
61
+ draft_ping_health_url: 'Health URL',
62
+ draft_ping_entry_url: 'Entry URL',
63
+ draft_ping_no_health_url: 'Not configured',
64
+ draft_ping_safe_check: 'Origin check',
65
+ draft_ping_safe_ok: 'HTTPS origin allowed',
66
+ draft_ping_safe_fail: 'Origin not in allowedRuntimeOrigins',
67
+ draft_ping_btn: 'Ping health',
68
+ draft_ping_pinging: 'Pinging…',
69
+ draft_ping_ok: 'Health check OK',
70
+ draft_ping_fail: 'Health check failed',
71
+ draft_ping_latency: 'Latency',
72
+ draft_ping_err_no_health: 'No healthcheck_url on this app',
73
+ draft_ping_err_unhealthy: 'Endpoint returned non-success status',
74
+ draft_ping_err_request: 'Could not reach health endpoint',
75
+ draft_ping_err_permission: 'You do not have permission to test this app',
76
+ draft_ping_err_generic: 'Ping failed — check backend and re-run seeder',
77
+ app_store_settings_btn: 'Settings',
78
+ app_store_settings_title: 'App Store settings',
79
+ app_store_settings_close: 'Close',
80
+ app_store_settings_user_title: 'Current user',
81
+ app_store_settings_user_id: 'User ID',
82
+ app_store_settings_user_name: 'Display name',
83
+ app_store_settings_auth_status: 'API connection',
84
+ app_store_settings_auth_ok: 'Connected',
85
+ app_store_settings_auth_missing: 'No token — host must pass token after login',
86
+ app_store_settings_auth_fail: 'Token rejected or expired',
87
+ app_store_settings_manager: 'Zone manager',
88
+ app_store_settings_manager_yes: 'Yes',
89
+ app_store_settings_zone_title: 'Zones',
90
+ app_store_settings_zone_hint: 'Apps are filtered by your zone (same as other packages).',
91
+ app_store_settings_zone_loading: 'Loading zones...',
92
+ app_store_settings_zone_no_core: 'Set coreUrl in installAppHubModule to load zones.',
93
+ app_store_settings_zone_error: 'Could not load zones.',
94
+ app_store_settings_zone_empty: 'No zones for this user. Join a zone in packages-core first.',
95
+ app_store_settings_zone_select: 'Active zone',
96
+ app_store_settings_zone_all: 'Show apps from all my zones',
97
+ app_store_settings_zone_name: 'Zone {id}',
98
+ app_store_settings_timezone: 'Timezone',
99
+ app_store_settings_refresh: 'Refresh',
100
+ app_store_settings_dev_title: 'Dev — emergency off',
101
+ app_store_settings_dev_hint: 'Requires APPHUB_DEV_USER_IDS. Disable re-enables from here for testing.',
102
+ app_store_settings_dev_disable: 'Disable',
103
+ app_store_settings_dev_enable: 'Enable',
104
+ dev_review_title: 'DEV — review drafts',
105
+ dev_review_hint: 'Inspect hosted bundles and approve apps for the main App Store.',
106
+ dev_review_loading: 'Checking dev access…',
107
+ dev_review_empty: 'No draft apps pending review.',
108
+ dev_review_hash: 'Bundle hash',
109
+ dev_review_file_count: 'Files in bundle',
110
+ dev_review_files_btn: 'View files',
111
+ dev_review_files_loading: 'Loading…',
112
+ dev_review_files_title: 'Bundle files',
113
+ dev_review_files_truncated: 'truncated',
114
+ dev_review_approve: 'Approve',
115
+ dev_review_approving: 'Approving…',
116
+ dev_review_iframe: 'Iframe',
117
+ dev_review_history_btn: 'Version history',
118
+ dev_review_history_loading: 'Loading…',
119
+ dev_review_history_title: 'Version history',
120
+ dev_review_history_empty: 'No versions recorded yet.',
121
+ dev_review_history_current: 'Current',
122
+ dev_review_history_error: 'Could not load version history.',
123
+ runner_loading: 'Loading app...',
124
+ runner_launch_btn: 'Launch app',
125
+ runner_no_entry_url: 'App has no entry URL configured.',
126
+ runner_no_bundle: 'Hosted bundle is not available for this app.',
127
+ runner_hosted_badge: 'Hosted',
128
+ runner_hosted_bundle: 'Hub bundle',
129
+ error_generic: 'Something went wrong.',
130
+ drop_hint: 'Close all windows, then drop a .zip with manifest.json inside (hosted draft — awaits DEV approval)',
131
+ drop_installing: 'Installing...',
132
+ drop_done: 'Installed',
133
+ drop_done_publish: 'Draft submitted — awaiting DEV approval',
134
+ drop_error: 'Install failed',
135
+ notif_region: 'Notifications',
136
+ notif_close: 'Dismiss notification',
137
+ notif_error_title: 'App Hub',
138
+ notif_publish_success: 'Draft submitted and installed on your desktop.',
139
+ notif_publish_upgrade_success: 'New version submitted. Update from App Store when you want to run it.',
140
+ notif_install_cancelled: 'Install cancelled.',
141
+ drop_method_publish: 'Submit hosted draft',
142
+ drop_method_appstore: 'App Store package',
143
+ drop_method_local: 'Local package',
144
+ settings_snap_grid: 'Align icons to grid',
145
+ settings_light_mode: 'Light mode',
146
+ hub_settings_app_name: 'Settings',
147
+ hub_settings_app_hint: 'Screen, keyboard shortcuts, and desktop preferences',
148
+ hub_settings_app_title: 'Settings',
149
+ hub_settings_app_subtitle: 'Configure App Hub desktop and shortcuts.',
150
+ hub_settings_app_nav: 'Settings categories',
151
+ hub_settings_menu_screen: 'Screen',
152
+ hub_settings_menu_pin_favorite: 'Pin & favorite',
153
+ hub_settings_menu_keyboard: 'Keyboard',
154
+ hub_settings_pin_favorite_title: 'Pin & favorite',
155
+ hub_settings_pin_favorite_hint: 'Pin puts app icons on the taskbar. Favorites appear in the Start menu. Toggle visibility without removing pin or favorite.',
156
+ hub_settings_pin_favorite_note: 'Right-click any desktop icon to pin, favorite, or remove.',
157
+ hub_settings_pins_section: 'Pin',
158
+ hub_settings_start_empty: 'No pinned apps. Right-click a desktop icon and choose Pin to taskbar.',
159
+ hub_settings_start_show: 'Show on taskbar',
160
+ hub_settings_start_favorites_empty: 'No favorite apps. Right-click a desktop icon and choose Add to favorites.',
161
+ hub_settings_start_favorites_show: 'Show in Start menu',
162
+ hub_settings_screen_title: 'Screen',
163
+ hub_settings_screen_hint: 'Desktop appearance and icon layout.',
164
+ hub_settings_keyboard_title: 'Keyboard shortcuts',
165
+ hub_settings_keyboard_hint: 'Snap the active App Hub window inside the desktop work area.',
166
+ hub_settings_keyboard_browser_note: 'Windows (⊞) + arrow keys are owned by the operating system — the browser never receives them, so App Hub cannot override PC snap. Use Ctrl + Alt + arrow here instead.',
167
+ hub_settings_keyboard_enabled: 'Enable Ctrl + Alt snap shortcuts',
168
+ hub_settings_keyboard_modifier_ctrl_alt: 'Ctrl + Alt',
169
+ hub_settings_keyboard_modifier_note: 'Click the desktop or a window first so App Hub has focus, then press the shortcut.',
170
+ hub_settings_keyboard_col_action: 'Action',
171
+ hub_settings_keyboard_col_keys: 'Shortcut',
172
+ hub_settings_keyboard_snap_left: 'Snap window left',
173
+ hub_settings_keyboard_snap_right: 'Snap window right',
174
+ hub_settings_keyboard_snap_up: 'Maximize / snap top',
175
+ hub_settings_keyboard_snap_down: 'Restore / snap bottom / minimize',
176
+ hub_settings_keyboard_titlebar_note: 'Double-click a window title bar to toggle full screen and windowed mode.',
177
+ hub_settings_keyboard_key_left: '{mod} + ←',
178
+ hub_settings_keyboard_key_right: '{mod} + →',
179
+ hub_settings_keyboard_key_up: '{mod} + ↑',
180
+ hub_settings_keyboard_key_down: '{mod} + ↓',
181
+ duplicate_app_title: 'App already exists',
182
+ duplicate_app_message: 'An app named "{name}" is already on the desktop.',
183
+ duplicate_app_hint: 'Replace the existing icon or keep both (new name gets a number).',
184
+ duplicate_app_replace: 'Replace',
185
+ duplicate_app_keep: 'Keep both',
186
+ duplicate_app_cancel: 'Cancel',
187
+ duplicate_app_keep_as: 'Will be added as "{name}"',
188
+ desktop_icon_move_hint: 'Drag to move',
189
+ desktop_icon_hold_hint: 'Hold to drag group · tap to open folder',
190
+ group_label: 'Group',
191
+ group_drop_hint: 'Release to add to group',
192
+ group_folder_title: 'Folder',
193
+ group_folder_count: '{count} apps',
194
+ group_context_open: 'Open folder',
195
+ group_rename_title: 'Rename group',
196
+ group_rename_label: 'Group name',
197
+ group_info_title: 'Group properties',
198
+ group_info_count: 'App count',
199
+ group_info_apps: 'Contains',
200
+ group_info_type_group: 'App group',
201
+ start_menu_search: 'Type here to search',
202
+ start_menu_recent: 'Recent',
203
+ start_menu_favorites: 'Favorites',
204
+ start_menu_search_results: 'Search results',
205
+ start_menu_suggested: 'Suggested',
206
+ start_menu_empty: 'No apps found',
207
+ taskbar_pins: 'Pinned apps',
208
+ icon_context_open: 'Open',
209
+ icon_context_rename: 'Rename',
210
+ icon_context_properties: 'Properties',
211
+ icon_context_pin: 'Pin to taskbar',
212
+ icon_context_unpin: 'Unpin from taskbar',
213
+ icon_context_favorite: 'Add to favorites',
214
+ icon_context_unfavorite: 'Remove from favorites',
215
+ icon_context_uninstall: 'Uninstall',
216
+ icon_context_uninstall: 'Uninstall',
217
+ icon_info_title: 'Properties',
218
+ icon_info_name: 'Name',
219
+ icon_info_slug: 'App ID',
220
+ icon_info_version: 'Version',
221
+ icon_info_created: 'Installed',
222
+ icon_info_source: 'Source',
223
+ icon_info_source_appstore: 'App Store',
224
+ icon_info_source_local: 'Local package',
225
+ icon_info_description: 'Description',
226
+ icon_info_position: 'Desktop position',
227
+ icon_info_type: 'Type',
228
+ icon_info_type_builtin: 'Built-in app',
229
+ icon_info_date_unknown: 'Unknown',
230
+ icon_info_close: 'OK',
231
+ icon_rename_title: 'Rename',
232
+ icon_rename_label: 'Display name',
233
+ icon_rename_save: 'Save',
234
+ icon_rename_cancel: 'Cancel',
235
+ icon_rename_error_empty: 'Name cannot be empty.',
236
+ icon_rename_error_duplicate: 'An app with this name already exists.',
237
+ guide_app_name: 'App Hub Guide',
238
+ guide_app_hint: 'How to use App Hub — users & app bridge for publishers',
239
+ guide_app_title: 'App Hub Guide',
240
+ guide_app_subtitle: 'Wiki for desktop users and App Hub bridge for publisher apps.',
241
+ guide_tab_user: 'For users',
242
+ guide_tab_dev: 'App bridge',
243
+ guide_user_welcome_title: 'Welcome',
244
+ guide_user_welcome_1: 'App Hub is a Windows-style desktop inside your host app.',
245
+ guide_user_welcome_2: 'Double-click any icon to open an app in a window.',
246
+ guide_user_desktop_title: 'Desktop & icons',
247
+ guide_user_desktop_1: 'Drag installed app icons to move them (grid snap in Settings → Screen).',
248
+ guide_user_desktop_2: 'Right-click an icon: Open, Pin to taskbar, Add to favorites, Rename, or Properties.',
249
+ guide_user_desktop_3: 'Your layout is saved — reload restores open windows and icon positions.',
250
+ guide_user_windows_title: 'Windows',
251
+ guide_user_windows_1: 'Drag the title bar to move a window; use ⊞ / ⛶ / — / × on the title bar.',
252
+ guide_user_windows_2: 'Minimized apps stay on the taskbar — click to restore.',
253
+ guide_user_windows_3: 'Full-screen apps fill the desktop work area above the taskbar.',
254
+ guide_user_install_title: 'Install apps',
255
+ guide_user_install_1: 'App Store (🛒): browse and install demo apps to the desktop.',
256
+ guide_user_install_2: 'Publish hosted app: close all windows, drop a .zip with manifest.json inside (draft — DEV approves). Local test drops still work with manifest source local.',
257
+ guide_user_install_3: 'Duplicate names: Replace, Keep both (numbered name), or Cancel.',
258
+ guide_user_start_title: 'Start menu',
259
+ guide_user_start_1: 'Click the Windows icon on the taskbar — search apps and open pinned apps.',
260
+ guide_user_start_2: 'Open Settings (⚙️) for screen and keyboard options.',
261
+ guide_user_tips_title: 'Tips',
262
+ guide_user_tips_1: 'File drop only works on the main desktop (no windows open).',
263
+ guide_user_tips_2: 'Built-in apps (App Store, Guide, Settings) cannot be renamed or removed.',
264
+ guide_user_tips_3: 'Building an app? Open App bridge for how to connect and use permissions.',
265
+ guide_dev_who_title: 'Connect your app',
266
+ guide_dev_who_1: 'Your app runs inside App Hub when a user opens it from the desktop.',
267
+ guide_dev_who_2: 'App Hub provides AppHubBridge so your app can request permissions and use desktop features.',
268
+ guide_dev_bridge_title: 'Getting started',
269
+ guide_dev_bridge_1: 'When a user opens your app, Hub calls POST /apps/{slug}/launch and opens your runtime in a window.',
270
+ guide_dev_bridge_2: 'Hub attaches window.AppHubBridge (or postMessage channel apphub:bridge) for permissions and desktop APIs.',
271
+ guide_dev_bridge_3: 'Wait for apphub:bridge:ready, request scopes, then call bridge methods.',
272
+ guide_dev_permissions_title: 'Permissions',
273
+ guide_dev_permissions_1: 'user.read — minimal id and display name.',
274
+ guide_dev_permissions_2: 'user.profile — extended profile (avatar, locale, etc.) when the user agrees.',
275
+ guide_dev_permissions_3: 'desktop.notify — toast on desktop; desktop.message — banner/overlay on desktop screen.',
276
+ guide_dev_permissions_4: 'desktop.badge — update your app button on the taskbar.',
277
+ guide_dev_bridge_code_title: 'Example',
278
+ guide_dev_bridge_code: `const bridge = window.AppHubBridge
279
+ await bridge.requestPermission('user.read')
280
+ const user = await bridge.getUserInfo()
281
+ await bridge.requestPermission('desktop.message')
282
+ await bridge.sendDesktopMessage({
283
+ type: 'banner',
284
+ title: 'Hello',
285
+ body: 'Welcome ' + user.name,
286
+ duration_ms: 5000
287
+ })`,
288
+ guide_dev_user_title: 'Get user info',
289
+ guide_dev_user_1: 'Call requestPermission("user.read") then getUserInfo().',
290
+ guide_dev_user_2: 'For more fields use user.profile and getProfile() after consent.',
291
+ guide_dev_user_3: 'Never assume access — handle denied permissions in your UI.',
292
+ guide_dev_desktop_title: 'Messages to desktop',
293
+ guide_dev_desktop_1: 'sendDesktopMessage sends banners or hints on the Hub desktop work area.',
294
+ guide_dev_desktop_2: 'notify is a shortcut for desktop.toast-style alerts.',
295
+ guide_dev_desktop_3: 'setTaskbarBadge(count) updates your app on the taskbar when desktop.badge is granted.',
296
+ guide_dev_deploy_title: 'Submit your app',
297
+ guide_dev_deploy_1: 'Bridge is separate from listing: local drop (private) or public App Store when publisher submit API is live.',
298
+ guide_dev_deploy_2: 'Test bridge in a local install first, then submit catalog package with your slug.',
299
+ guide_dev_docs_title: 'Full API reference',
300
+ guide_dev_docs_1: 'GET …/apphub/integration-docs → audiences.publisher.bridge',
301
+ guide_dev_docs_2: 'All scopes, methods, and launch details are in that JSON.',
302
+ guide_dev_docs_3: 'Test with a local desktop install, then list on App Store when ready.',
303
+ }
@@ -0,0 +1,302 @@
1
+ export default {
2
+ origin_block_title: 'App Hub phải chạy trên origin riêng',
3
+ origin_block_same_origin_embed:
4
+ 'App Hub đang được nhúng iframe cùng origin với sản phẩm chính. App hosted có thể đọc chung localStorage/cookie của trình duyệt.',
5
+ origin_block_not_configured:
6
+ 'App Hub được gọi trong app sản phẩm mà chưa khai báo origin riêng. Không gắn installAppHubModule vào app sản phẩm — hãy deploy frontend App Hub riêng.',
7
+ origin_block_wrong_origin:
8
+ 'Origin trang hiện tại không khớp hubOrigin đã cấu hình. App Hub chỉ được chạy trên URL riêng của nó.',
9
+ origin_block_generic: 'Origin trang này không được phép chạy App Hub.',
10
+ origin_block_runtime_not_configured:
11
+ 'Cần runtimePublicUrl. Bundle hosted phải phục vụ trên origin riêng (vd. https://apps.congty.com/api/.../apphub).',
12
+ origin_block_runtime_same_origin:
13
+ 'runtimePublicUrl phải khác origin trang Hub để app publisher không đọc localStorage của Hub.',
14
+ origin_block_hint:
15
+ 'Dev localhost tự động. Host Hub = origin frontend (bootstrap đọc Origin trình duyệt). Runtime API = APP_URL + KNF_CORE_API_PREFIX + APPHUB_API_PREFIX. Chỉ nhúng URL Hub vào iframe sản phẩm.',
16
+ origin_block_current_origin: 'Origin trang hiện tại',
17
+ origin_block_expected_hub_origin: 'hubOrigin đã cấu hình',
18
+ origin_block_expected_runtime_origin: 'runtimePublicUrl đã cấu hình',
19
+ origin_block_parent_origin: 'Origin trang cha',
20
+ origin_loading_title: 'Đang khởi động App Hub…',
21
+ origin_loading_hint: 'Đang kiểm tra an toàn origin và tải cấu hình từ máy chủ.',
22
+ dev_origin_bar_title: 'An toàn origin (dev)',
23
+ dev_origin_status_relaxed: 'Nới lỏng — bỏ qua localhost',
24
+ dev_origin_status_strict: 'Nghiêm — quy tắc origin như production',
25
+ dev_origin_action_strict: 'Bật kiểm tra nghiêm',
26
+ dev_origin_action_relaxed: 'Nới lỏng (dev)',
27
+ desktop_start: 'Start',
28
+ desktop_app_store: 'App Store',
29
+ desktop_app_store_hint: 'Cài và mở ứng dụng',
30
+ window_close: 'Đóng',
31
+ window_minimize: 'Thu nhỏ',
32
+ window_fullscreen: 'Toàn màn hình',
33
+ window_restore: 'Chế độ cửa sổ',
34
+ app_store_title: 'App Store',
35
+ app_store_search: 'Tìm ứng dụng',
36
+ app_store_install: 'Tải',
37
+ app_store_open: 'Mở',
38
+ app_store_empty: 'Chưa có ứng dụng.',
39
+ app_store_empty_zone_hint: 'Thử đổi zone trong Cài đặt, hoặc kiểm tra quyền zone cho app active.',
40
+ app_store_loading: 'Đang tải ứng dụng...',
41
+ app_store_loading_more: 'Đang tải thêm...',
42
+ app_store_load_error: 'Không tải được danh mục ứng dụng.',
43
+ app_store_permission_denied: 'Bạn không có quyền xem ứng dụng cho zone này.',
44
+ app_store_no_api: 'App Store chưa kết nối backend.',
45
+ app_store_unavailable: 'Ngừng hoạt động',
46
+ app_store_status_draft: 'Bản nháp',
47
+ app_store_status_offline: 'Ngừng hoạt động',
48
+ app_store_section_apps: 'Ứng dụng',
49
+ app_store_section_testing: 'Ứng dụng thử nghiệm',
50
+ app_store_section_testing_hint: 'Bản nháp cho chủ sở hữu và tester — chưa công khai cho đến khi duyệt.',
51
+ app_store_installed: 'Đã cài trên desktop',
52
+ app_store_uninstall: 'Gỡ',
53
+ app_store_update: 'Cập nhật',
54
+ app_store_installed_version: 'đang dùng',
55
+ desktop_icon_draft_hint: 'App nháp — chỉ để test trước khi duyệt',
56
+ draft_store_app_name: 'Store nháp',
57
+ draft_store_app_hint: 'App Store cho app nháp — chủ / tester',
58
+ draft_store_title: 'App Store nháp',
59
+ draft_store_intro: 'Gửi app hosted bằng cách thả .zip lên desktop (manifest.json trong zip). Thử draft tại đây; app đã duyệt hiện ở App Store chính.',
60
+ draft_store_empty: 'Không có app nháp cho tài khoản của bạn.',
61
+ draft_ping_health_url: 'URL health',
62
+ draft_ping_entry_url: 'URL entry',
63
+ draft_ping_no_health_url: 'Chưa cấu hình',
64
+ draft_ping_safe_check: 'Kiểm tra origin',
65
+ draft_ping_safe_ok: 'Origin HTTPS được phép',
66
+ draft_ping_safe_fail: 'Origin không nằm trong allowedRuntimeOrigins',
67
+ draft_ping_btn: 'Ping health',
68
+ draft_ping_pinging: 'Đang ping…',
69
+ draft_ping_ok: 'Health OK',
70
+ draft_ping_fail: 'Health thất bại',
71
+ draft_ping_latency: 'Độ trễ',
72
+ draft_ping_err_no_health: 'App chưa có healthcheck_url',
73
+ draft_ping_err_unhealthy: 'Endpoint trả về mã lỗi',
74
+ draft_ping_err_request: 'Không kết nối được endpoint health',
75
+ draft_ping_err_permission: 'Bạn không có quyền test app này',
76
+ draft_ping_err_generic: 'Ping thất bại — kiểm tra backend và chạy lại seeder',
77
+ app_store_settings_btn: 'Cài đặt',
78
+ app_store_settings_title: 'Cài đặt App Store',
79
+ app_store_settings_close: 'Đóng',
80
+ app_store_settings_user_title: 'User hiện tại',
81
+ app_store_settings_user_id: 'ID user',
82
+ app_store_settings_user_name: 'Tên hiển thị',
83
+ app_store_settings_auth_status: 'Kết nối API',
84
+ app_store_settings_auth_ok: 'Đã kết nối',
85
+ app_store_settings_auth_missing: 'Chưa có token — host cần truyền token sau khi đăng nhập',
86
+ app_store_settings_auth_fail: 'Token không hợp lệ hoặc hết hạn',
87
+ app_store_settings_manager: 'Quản lý zone',
88
+ app_store_settings_manager_yes: 'Có',
89
+ app_store_settings_zone_title: 'Khu vực (zone)',
90
+ app_store_settings_zone_hint: 'Ứng dụng được lọc theo zone của bạn (giống các package khác).',
91
+ app_store_settings_zone_loading: 'Đang tải zone...',
92
+ app_store_settings_zone_no_core: 'Cần coreUrl trong installAppHubModule để tải zone.',
93
+ app_store_settings_zone_error: 'Không tải được zone.',
94
+ app_store_settings_zone_empty: 'User chưa thuộc zone nào. Gán zone trong packages-core trước.',
95
+ app_store_settings_zone_select: 'Zone đang dùng',
96
+ app_store_settings_zone_all: 'Hiển thị app từ mọi zone của tôi',
97
+ app_store_settings_zone_name: 'Zone {id}',
98
+ app_store_settings_timezone: 'Múi giờ',
99
+ app_store_settings_refresh: 'Làm mới',
100
+ app_store_settings_dev_title: 'Dev — tắt khẩn cấp',
101
+ app_store_settings_dev_hint: 'Cần APPHUB_DEV_USER_IDS. Bật lại tại đây để test.',
102
+ app_store_settings_dev_disable: 'Tắt',
103
+ app_store_settings_dev_enable: 'Bật lại',
104
+ dev_review_title: 'DEV — duyệt draft',
105
+ dev_review_hint: 'Xem bundle hosted và duyệt app lên App Store chính.',
106
+ dev_review_loading: 'Đang kiểm tra quyền dev…',
107
+ dev_review_empty: 'Không có draft cần duyệt.',
108
+ dev_review_hash: 'Hash bundle',
109
+ dev_review_file_count: 'Số file trong bundle',
110
+ dev_review_files_btn: 'Xem file',
111
+ dev_review_files_loading: 'Đang tải…',
112
+ dev_review_files_title: 'File trong bundle',
113
+ dev_review_files_truncated: 'đã cắt bớt',
114
+ dev_review_approve: 'Duyệt',
115
+ dev_review_approving: 'Đang duyệt…',
116
+ dev_review_iframe: 'Iframe',
117
+ dev_review_history_btn: 'Lịch sử phiên bản',
118
+ dev_review_history_loading: 'Đang tải…',
119
+ dev_review_history_title: 'Lịch sử phiên bản',
120
+ dev_review_history_empty: 'Chưa có phiên bản nào.',
121
+ dev_review_history_current: 'Hiện tại',
122
+ dev_review_history_error: 'Không tải được lịch sử phiên bản.',
123
+ runner_loading: 'Đang tải ứng dụng...',
124
+ runner_launch_btn: 'Mở app',
125
+ runner_no_entry_url: 'App chưa có entry URL.',
126
+ runner_no_bundle: 'Chưa có bundle hosted cho app này.',
127
+ runner_hosted_badge: 'Hosted',
128
+ runner_hosted_bundle: 'Bundle Hub',
129
+ error_generic: 'Đã xảy ra lỗi.',
130
+ drop_hint: 'Đóng hết cửa sổ, thả file .zip có manifest.json bên trong (draft hosted — chờ DEV duyệt)',
131
+ drop_installing: 'Đang cài đặt...',
132
+ drop_done: 'Đã cài xong',
133
+ drop_done_publish: 'Đã gửi draft — chờ DEV duyệt',
134
+ drop_error: 'Cài đặt thất bại',
135
+ notif_region: 'Thông báo',
136
+ notif_close: 'Đóng thông báo',
137
+ notif_error_title: 'App Hub',
138
+ notif_publish_success: 'Đã gửi draft và cài lên desktop của bạn.',
139
+ notif_publish_upgrade_success: 'Đã gửi phiên bản mới. Vào App Store bấm Cập nhật khi muốn chạy bản mới.',
140
+ notif_install_cancelled: 'Đã hủy cài đặt.',
141
+ drop_method_publish: 'Gửi draft hosted',
142
+ drop_method_appstore: 'Gói App Store',
143
+ drop_method_local: 'Gói cục bộ',
144
+ settings_snap_grid: 'Căn biểu tượng theo lưới',
145
+ settings_light_mode: 'Chế độ sáng',
146
+ hub_settings_app_name: 'Cài đặt',
147
+ hub_settings_app_hint: 'Màn hình, phím tắt và tùy chọn desktop',
148
+ hub_settings_app_title: 'Cài đặt',
149
+ hub_settings_app_subtitle: 'Cấu hình desktop App Hub và phím tắt.',
150
+ hub_settings_app_nav: 'Danh mục cài đặt',
151
+ hub_settings_menu_screen: 'Màn hình',
152
+ hub_settings_menu_pin_favorite: 'Ghim & yêu thích',
153
+ hub_settings_menu_keyboard: 'Bàn phím',
154
+ hub_settings_pin_favorite_title: 'Ghim & yêu thích',
155
+ hub_settings_pin_favorite_hint: 'Ghim đưa biểu tượng lên thanh tác vụ. Yêu thích hiển thị trong menu Start. Bật/tắt hiển thị mà không cần bỏ ghim hoặc yêu thích.',
156
+ hub_settings_pin_favorite_note: 'Click phải biểu tượng desktop để ghim, yêu thích hoặc bỏ.',
157
+ hub_settings_pins_section: 'Ghim',
158
+ hub_settings_start_empty: 'Chưa có app ghim. Click phải biểu tượng desktop → Ghim vào thanh tác vụ.',
159
+ hub_settings_start_show: 'Hiện trên thanh tác vụ',
160
+ hub_settings_start_favorites_empty: 'Chưa có app yêu thích. Click phải biểu tượng desktop → Thêm vào yêu thích.',
161
+ hub_settings_start_favorites_show: 'Hiện trong menu Start',
162
+ hub_settings_screen_title: 'Màn hình',
163
+ hub_settings_screen_hint: 'Giao diện desktop và bố cục biểu tượng.',
164
+ hub_settings_keyboard_title: 'Phím tắt',
165
+ hub_settings_keyboard_hint: 'Snap cửa sổ App Hub đang active trong vùng desktop.',
166
+ hub_settings_keyboard_browser_note: 'Phím Windows (⊞) + mũi tên thuộc hệ điều hành — trình duyệt không nhận được, App Hub không thể thay snap của Windows. Dùng Ctrl + Alt + mũi tên trong app.',
167
+ hub_settings_keyboard_enabled: 'Bật phím tắt Ctrl + Alt snap',
168
+ hub_settings_keyboard_modifier_ctrl_alt: 'Ctrl + Alt',
169
+ hub_settings_keyboard_modifier_note: 'Click desktop hoặc cửa sổ trước để App Hub có focus, rồi bấm phím tắt.',
170
+ hub_settings_keyboard_col_action: 'Thao tác',
171
+ hub_settings_keyboard_col_keys: 'Phím tắt',
172
+ hub_settings_keyboard_snap_left: 'Snap cửa sổ trái',
173
+ hub_settings_keyboard_snap_right: 'Snap cửa sổ phải',
174
+ hub_settings_keyboard_snap_up: 'Phóng to / snap trên',
175
+ hub_settings_keyboard_snap_down: 'Khôi phục / snap dưới / thu nhỏ',
176
+ hub_settings_keyboard_titlebar_note: 'Double-click thanh tiêu đề để chuyển toàn màn hình và cửa sổ.',
177
+ hub_settings_keyboard_key_left: '{mod} + ←',
178
+ hub_settings_keyboard_key_right: '{mod} + →',
179
+ hub_settings_keyboard_key_up: '{mod} + ↑',
180
+ hub_settings_keyboard_key_down: '{mod} + ↓',
181
+ duplicate_app_title: 'Ứng dụng đã tồn tại',
182
+ duplicate_app_message: 'Ứng dụng "{name}" đã có trên màn hình.',
183
+ duplicate_app_hint: 'Thay thế biểu tượng cũ hoặc giữ cả hai (tên mới sẽ có số thứ tự).',
184
+ duplicate_app_replace: 'Thay thế',
185
+ duplicate_app_keep: 'Giữ cả hai',
186
+ duplicate_app_cancel: 'Hủy',
187
+ duplicate_app_keep_as: 'Sẽ thêm với tên "{name}"',
188
+ desktop_icon_move_hint: 'Kéo để di chuyển',
189
+ desktop_icon_hold_hint: 'Giữ để kéo nhóm · chạm để mở thư mục',
190
+ group_label: 'Nhóm',
191
+ group_drop_hint: 'Thả để thêm vào nhóm',
192
+ group_folder_title: 'Thư mục',
193
+ group_folder_count: '{count} ứng dụng',
194
+ group_context_open: 'Mở thư mục',
195
+ group_rename_title: 'Đổi tên nhóm',
196
+ group_rename_label: 'Tên nhóm',
197
+ group_info_title: 'Thuộc tính nhóm',
198
+ group_info_count: 'Số ứng dụng',
199
+ group_info_apps: 'Chứa',
200
+ group_info_type_group: 'Nhóm ứng dụng',
201
+ start_menu_search: 'Nhập để tìm kiếm',
202
+ start_menu_recent: 'Gần đây',
203
+ start_menu_favorites: 'Yêu thích',
204
+ start_menu_search_results: 'Kết quả tìm kiếm',
205
+ start_menu_suggested: 'Gợi ý',
206
+ start_menu_empty: 'Không tìm thấy ứng dụng',
207
+ taskbar_pins: 'App đã ghim',
208
+ icon_context_open: 'Mở',
209
+ icon_context_rename: 'Đổi tên',
210
+ icon_context_properties: 'Thuộc tính',
211
+ icon_context_pin: 'Ghim vào thanh tác vụ',
212
+ icon_context_unpin: 'Bỏ ghim khỏi thanh tác vụ',
213
+ icon_context_favorite: 'Thêm vào yêu thích',
214
+ icon_context_unfavorite: 'Bỏ khỏi yêu thích',
215
+ icon_context_uninstall: 'Gỡ cài',
216
+ icon_info_title: 'Thuộc tính',
217
+ icon_info_name: 'Tên',
218
+ icon_info_slug: 'Mã ứng dụng',
219
+ icon_info_version: 'Phiên bản',
220
+ icon_info_created: 'Đã cài đặt',
221
+ icon_info_source: 'Nguồn',
222
+ icon_info_source_appstore: 'App Store',
223
+ icon_info_source_local: 'Gói cục bộ',
224
+ icon_info_description: 'Mô tả',
225
+ icon_info_position: 'Vị trí trên màn hình',
226
+ icon_info_type: 'Loại',
227
+ icon_info_type_builtin: 'Ứng dụng tích hợp',
228
+ icon_info_date_unknown: 'Không rõ',
229
+ icon_info_close: 'OK',
230
+ icon_rename_title: 'Đổi tên',
231
+ icon_rename_label: 'Tên hiển thị',
232
+ icon_rename_save: 'Lưu',
233
+ icon_rename_cancel: 'Hủy',
234
+ icon_rename_error_empty: 'Tên không được để trống.',
235
+ icon_rename_error_duplicate: 'Đã có ứng dụng với tên này.',
236
+ guide_app_name: 'Hướng dẫn App Hub',
237
+ guide_app_hint: 'Cách dùng App Hub — người dùng & cầu nối app cho publisher',
238
+ guide_app_title: 'Hướng dẫn App Hub',
239
+ guide_app_subtitle: 'Wiki cho người dùng desktop và cầu nối App Hub cho app publisher.',
240
+ guide_tab_user: 'Cho người dùng',
241
+ guide_tab_dev: 'Cầu nối App',
242
+ guide_user_welcome_title: 'Chào mừng',
243
+ guide_user_welcome_1: 'App Hub là màn hình desktop kiểu Windows trong app host của bạn.',
244
+ guide_user_welcome_2: 'Double-click biểu tượng để mở ứng dụng trong cửa sổ.',
245
+ guide_user_desktop_title: 'Desktop & biểu tượng',
246
+ guide_user_desktop_1: 'Kéo biểu tượng app để di chuyển (căn lưới trong Cài đặt → Màn hình).',
247
+ guide_user_desktop_2: 'Click phải biểu tượng: Mở, Ghim thanh tác vụ, Thêm yêu thích, Đổi tên, hoặc Thuộc tính.',
248
+ guide_user_desktop_3: 'Bố cục được lưu — tải lại trang sẽ khôi phục cửa sổ và vị trí icon.',
249
+ guide_user_windows_title: 'Cửa sổ',
250
+ guide_user_windows_1: 'Kéo thanh tiêu đề để di chuyển; dùng ⊞ / ⛶ / — / × trên thanh tiêu đề.',
251
+ guide_user_windows_2: 'App thu nhỏ vẫn ở taskbar — click để mở lại.',
252
+ guide_user_windows_3: 'Toàn màn hình chiếm vùng desktop phía trên taskbar.',
253
+ guide_user_install_title: 'Cài ứng dụng',
254
+ guide_user_install_1: 'App Store (🛒): duyệt và cài app demo lên desktop.',
255
+ guide_user_install_2: 'Gửi app hosted: đóng hết cửa sổ, thả .zip có manifest.json bên trong (draft — DEV duyệt). Cài local vẫn dùng manifest source local.',
256
+ guide_user_install_3: 'Trùng tên: Thay thế, Giữ cả hai (tên có số), hoặc Hủy.',
257
+ guide_user_start_title: 'Menu Start',
258
+ guide_user_start_1: 'Click biểu tượng Windows trên taskbar — tìm app và mở app đã ghim.',
259
+ guide_user_start_2: 'Mở Cài đặt (⚙️) để chỉnh màn hình và phím tắt.',
260
+ guide_user_tips_title: 'Mẹo',
261
+ guide_user_tips_1: 'Kéo thả file chỉ hoạt động khi không có cửa sổ nào mở.',
262
+ guide_user_tips_2: 'App tích hợp (App Store, Hướng dẫn, Cài đặt) không đổi tên hoặc xóa được.',
263
+ guide_user_tips_3: 'Làm app? Mở Cầu nối App để biết cách kết nối và dùng quyền.',
264
+ guide_dev_who_title: 'Kết nối app của bạn',
265
+ guide_dev_who_1: 'App của bạn chạy trong App Hub khi user mở từ desktop.',
266
+ guide_dev_who_2: 'App Hub cung cấp AppHubBridge để app xin quyền và dùng tính năng desktop.',
267
+ guide_dev_bridge_title: 'Bắt đầu',
268
+ guide_dev_bridge_1: 'Khi user mở app, Hub gọi POST /apps/{slug}/launch và mở runtime trong cửa sổ.',
269
+ guide_dev_bridge_2: 'Hub gắn window.AppHubBridge (hoặc postMessage kênh apphub:bridge) cho quyền và API desktop.',
270
+ guide_dev_bridge_3: 'Chờ apphub:bridge:ready, xin scope, rồi gọi method bridge.',
271
+ guide_dev_permissions_title: 'Quyền (permissions)',
272
+ guide_dev_permissions_1: 'user.read — id và tên hiển thị tối thiểu.',
273
+ guide_dev_permissions_2: 'user.profile — hồ sơ mở rộng (avatar, locale, v.v.) khi user đồng ý.',
274
+ guide_dev_permissions_3: 'desktop.notify — toast trên desktop; desktop.message — banner trên màn hình desktop.',
275
+ guide_dev_permissions_4: 'desktop.badge — cập nhật nút app trên taskbar.',
276
+ guide_dev_bridge_code_title: 'Ví dụ',
277
+ guide_dev_bridge_code: `const bridge = window.AppHubBridge
278
+ await bridge.requestPermission('user.read')
279
+ const user = await bridge.getUserInfo()
280
+ await bridge.requestPermission('desktop.message')
281
+ await bridge.sendDesktopMessage({
282
+ type: 'banner',
283
+ title: 'Xin chào',
284
+ body: 'Chào ' + user.name,
285
+ duration_ms: 5000
286
+ })`,
287
+ guide_dev_user_title: 'Lấy thông tin user',
288
+ guide_dev_user_1: 'Gọi requestPermission("user.read") rồi getUserInfo().',
289
+ guide_dev_user_2: 'Cần thêm trường: user.profile và getProfile() sau khi user đồng ý.',
290
+ guide_dev_user_3: 'Không giả định đã có quyền — xử lý khi user từ chối.',
291
+ guide_dev_desktop_title: 'Gửi tin lên desktop',
292
+ guide_dev_desktop_1: 'sendDesktopMessage gửi banner hoặc gợi ý lên vùng desktop Hub.',
293
+ guide_dev_desktop_2: 'notify là lối tắt cho thông báo kiểu toast.',
294
+ guide_dev_desktop_3: 'setTaskbarBadge(count) cập nhật app trên taskbar khi có desktop.badge.',
295
+ guide_dev_deploy_title: 'Gửi app lên Hub',
296
+ guide_dev_deploy_1: 'Bridge tách khỏi đăng ký: cài local (riêng) hoặc App Store công khai khi API submit sẵn sàng.',
297
+ guide_dev_deploy_2: 'Test bridge với bản cài local trước, sau đó gửi gói catalog với slug của bạn.',
298
+ guide_dev_docs_title: 'Tham chiếu API đầy đủ',
299
+ guide_dev_docs_1: 'GET …/apphub/integration-docs → audiences.publisher.bridge',
300
+ guide_dev_docs_2: 'Mọi scope, method và chi tiết launch nằm trong JSON đó.',
301
+ guide_dev_docs_3: 'Test bằng cài local trên desktop, sau đó đăng App Store khi sẵn sàng.',
302
+ }