Skip to content

Commit

Permalink
fix: Web UI 生成链接缺少pathname
Browse files Browse the repository at this point in the history
  • Loading branch information
nitezs committed Sep 16, 2023
1 parent 8833e03 commit e8a4779
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@

## TODO

- [ ] 可视化面板
- [x] 可视化面板
5 changes: 3 additions & 2 deletions api/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ <h2 class="mb-4">sub2clash</h2>

<!-- footer-->
<footer>
<p class="text-center">Powered by <a class="link-primary" href="https://github.com/nitezs/sub2clash">sub2clash</a></p>
<p class="text-center">Powered by <a class="link-primary"
href="https://github.com/nitezs/sub2clash">sub2clash</a></p>
</footer>

</div>
Expand Down Expand Up @@ -255,7 +256,7 @@ <h2 class="mb-4">sub2clash</h2>
queryParams.push(`sort=${sort}`);

// 组合最终的API链接
document.getElementById("apiLink").value = `${window.location.origin}${endpoint}?${queryParams.join('&')}`;
document.getElementById("apiLink").value = `${window.location.origin}${window.location.pathname}${endpoint}?${queryParams.join('&')}`;
}

</script>
Expand Down

0 comments on commit e8a4779

Please sign in to comment.