 Your NameandClaude Sonnet 5
|
4e8f45d7d8
|
路由从 hash 换成 History API(pushState/replaceState/popstate),不再依赖 location.hash
HashNavigation 改名 Navigation(src/lib/navigation.js),接口不变,内部改用真实路径:
parseUrlHash/composeUrlHash 改名 parseUrl/composeUrl;navigateTo/navigateReplace 改调
pushState/replaceState 后手动派发 popstate(pushState/replaceState 不会像赋值 location.hash
那样自动触发事件,这里复用 navigateReplace 早就在用的同一个手动 dispatch 手法);goBack()
不用改,history.back() 本来就是真实浏览器历史机制。新增 Navigation.currentUrl() 替代调用方
原本直接读的 window.location.hash(这个类从来没包装过这个读取)。
一处需要专门处理的边界情况:当 path[0] 是空字符串("不选中侧栏视图、只开一个会话"这个仓库里
的合法状态)时,拼出的真实路径开头会变成双斜杠,被浏览器当协议相对地址解析、试图跳到一个叫
会话id的host,pushState 直接抛 SecurityError。composeUrl/parseUrl 内部用占位 token "_" 处理
这种情况,对外的调用方(19个文件)完全无感。
tinode-web.jsx 的 handleHashRoute 改名 handleRouteChange,监听从 hashchange 换成 popstate;
service-worker.js 的推送通知点击跳转手动改写成同样的路径格式(这个文件在打包之外单独执行,
没法 import Navigation)。index.html/index-dev.html 加了 <base href="/">——所有静态资源引用
都是相对路径,hash 路由下页面路径永远是 /,换真实路径后深层地址刷新会按当前目录解析出错误
资源地址导致白屏,这一行是标准修法。nginx.conf 的 try_files 兜底规则本来就适用两种路由,只
更新了注释。
实机验证:地址栏不再有 #;点击会话/设置等各类视图正常跳转;浏览器前进后退和应用内"返回"
按钮都正常;收藏页内部的类型 tab 切换(navigateReplace)确认不产生新的历史记录;在会话页/
个人中心页刷新、直接用完整深层路径打开新标签页都能正确恢复到位,资源正常加载不白屏。
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
2026-09-07 21:00:39 +08:00 |
|
Moraussubara Shi
|
ece2aa0e87
|
proposed Portuguese translation
|
2026-05-20 20:12:23 +01:00 |
|
or-else
|
3bfabc90f3
|
add missing vi translations, rearrange language imports in alpha order
|
2026-03-02 14:06:40 +03:00 |
|
amit
|
d674deeca6
|
feat(translation): Add Vietnamese (vi) translation
|
2026-03-02 15:07:52 +07:00 |
|
or-else
|
9eba65b711
|
italian translation
|
2025-07-30 17:20:08 +03:00 |
|
Lama Alosaimi
|
e692f80bcf
|
removed (,) from service-worker.js
|
2025-05-24 13:37:34 +03:00 |
|
Lama Alosaimi
|
a411b80fc2
|
added arabic localization
|
2025-05-24 13:35:46 +03:00 |
|
Jirapat Lakma
|
fb2a39280a
|
add Thai translation
|
2023-09-25 11:25:59 +07:00 |
|
or-else
|
691879b2b2
|
ukrainian translations
|
2023-08-14 16:36:01 +03:00 |
|
or-else
|
2d76befea1
|
fix missed calls when topic is not in focus
|
2023-01-10 17:18:34 -08:00 |
|
or-else
|
ba94788fbe
|
fix service worker and notifications init for FF and Safari
|
2023-01-09 11:18:21 -08:00 |
|
or-else
|
a99ad81196
|
all dependencies updated to latest, including breaking changes
|
2022-11-17 11:43:28 -08:00 |
|
Romain
|
eca15317ce
|
added fr to service worker
|
2022-06-13 16:49:50 +02:00 |
|
or-else
|
9c2d3f3693
|
clean up pushes
|
2022-03-05 20:09:02 -08:00 |
|
or-else
|
c6a9df9fe9
|
support for "read" pushes
|
2022-03-03 17:47:32 -08:00 |
|
or-else
|
aa498a7d1f
|
add comment to update Firebase in service worker
|
2022-02-28 15:42:32 -08:00 |
|
or-else
|
d106f6382a
|
google's FCM API is VERY poorly designed
|
2022-02-24 17:39:51 -08:00 |
|
or-else
|
d706cc4f6b
|
a couple of minor changes for clarity
|
2021-08-26 18:04:23 -07:00 |
|
or-else
|
d741f6ec92
|
merge devel
|
2021-08-13 17:29:42 -07:00 |
|
or-else
|
e0e25fc6d3
|
updated dependencies
|
2021-08-13 15:01:42 -07:00 |
|
or-else
|
47e7632399
|
better caching of out-of-band images
|
2021-08-09 16:04:31 -07:00 |
|
or-else
|
e3bdd5bb45
|
zh-TW translations in service worker
|
2021-07-30 09:40:10 -07:00 |
|
or-else
|
122fd018d0
|
fixing #80 in service-worker
|
2021-07-30 09:37:25 -07:00 |
|
or-else
|
aa451946a5
|
releasing 0.17.6
|
2021-07-10 17:25:00 -07:00 |
|
or-else
|
cf5fd9753c
|
release version 0.17.2 and rebuild
|
2021-06-21 14:47:53 -07:00 |
|
or-else
|
2b12baa166
|
updated dependencies, bumped version to 0.17.1 and rebuilt
|
2021-06-03 18:20:12 -07:00 |
|
or-else
|
2ecb522b44
|
updated dependencies including react-intl (previously broken)
|
2021-06-02 17:43:43 -07:00 |
|
or-else
|
eeb14cf752
|
better cache handling
|
2021-05-09 14:07:05 -07:00 |
|
or-else
|
aa8d60cc1d
|
a bit of cleanup, better naming of the app cache
|
2021-05-08 18:01:14 -07:00 |
|
or-else
|
304b5fac6e
|
bug fix: don't cache POST responses
|
2021-04-25 16:48:00 -07:00 |
|
or-else
|
a33891a5a9
|
refresh channels on push, correctly set push enabled status
|
2021-04-12 16:59:01 -07:00 |
|
or-else
|
ebb7537b2f
|
dependencies updated
|
2021-02-28 14:47:33 -08:00 |
|
or-else
|
b410879ca9
|
google renamed a method, fixing
|
2021-02-17 18:36:17 -08:00 |
|
or-else
|
b014592381
|
rebuilt with the bug fix in tinode-js
|
2020-12-13 19:03:16 -08:00 |
|
or-else
|
1d1c9400f8
|
dependencies updated
|
2020-12-11 17:19:01 -08:00 |
|
or-else
|
97d4bcfba9
|
update version, add romanian translation to service worker
|
2020-12-10 11:07:04 -08:00 |
|
or-else
|
96ad18a902
|
dependencies updated
|
2020-09-15 13:57:35 -07:00 |
|
or-else
|
d91534236f
|
dependencies updated
|
2020-08-24 11:38:01 -07:00 |
|
or-else
|
ab128ba6bb
|
dependencies updated, security fix for elliptic pkg
|
2020-07-30 13:51:40 -07:00 |
|
or-else
|
1d46599a1f
|
add german strings to service worker
|
2020-07-01 06:10:08 -04:00 |
|
or-else
|
a192129ff9
|
dependencies updated, breaking change in react-intl fixed
|
2020-06-08 18:20:12 +03:00 |
|
or-else
|
919047cfde
|
define and use max tag count
|
2020-05-01 17:19:18 +03:00 |
|
or-else
|
3f04d0e23b
|
more localizations
|
2020-04-18 12:26:45 +03:00 |
|
or-else
|
375750a6ff
|
bump version and rebuild
|
2020-04-13 16:13:34 +03:00 |
|
or-else
|
506cd00b27
|
chrome bug was fixed
|
2020-04-02 08:18:38 +03:00 |
|
or-else
|
475e5eb3e7
|
dependencies updated
|
2020-03-14 09:09:27 +03:00 |
|
or-else
|
858e62f732
|
google translate missing chinese strings
|
2020-02-04 18:05:58 +03:00 |
|
or-else
|
db76ec3266
|
dependencies updated
|
2019-12-23 10:27:34 +03:00 |
|
or-else
|
b81ec3e634
|
update dependencies and bump version
|
2019-11-30 11:21:10 +03:00 |
|
or-else
|
bb20937bc9
|
replace unpkg with jsdeliver as unpkg is too unreliable https://github.com/mjackson/unpkg/issues/229
|
2019-11-01 09:41:06 +03:00 |
|