haishanh / yacd

Yet Another Clash Dashboard
http://yacd.haishan.me
MIT License
4.16k stars 736 forks source link

切换后端时导航错误 #808

Open DavidDiao opened 11 months ago

DavidDiao commented 11 months ago

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

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,大概是版本问题,导致我打不开规则,这有什么办法解决吗