yacd icon indicating copy to clipboard operation
yacd copied to clipboard

切换后端时导航错误

Open DavidDiao opened this issue 1 year ago • 0 comments

我自己部署的,没有放在根目录下面

https://github.com/haishanh/yacd/blob/master/src/components/backend/BackendList.tsx#L75

      if (currIdx === idx) {
        navigate('/', { replace: true });
      } else {
        setCurrIdx(idx);
        await sleep(32);
        // manual clean up is too complex
        // we just reload the app
        try {
          window.location.href = '/';
        } catch (err) {
          // ignore
        }
      }

这里切换后端的时候导航到了根目录下面,应该改成window.location.href = '#/';比较好 ~~懒得发pr了~~

另外我的后端没有/providers/rules,大概是版本问题,导致我打不开规则,这有什么办法解决吗

DavidDiao avatar Dec 15 '23 09:12 DavidDiao