Skip to content

Commit

Permalink
feat(web): 当未填写OpenAI接口时,默认使用window.origin(http(s)://domain:port) (au…
Browse files Browse the repository at this point in the history
…rora-develop#160)

* feat(web): 当未填写OpenAI接口时,默认使用window.origin(http(s)://domain:port)

* Update index.html

---------

Co-authored-by: xiaofei <[email protected]>
  • Loading branch information
RedShameA and xiaozhou26 authored Apr 7, 2024
1 parent a011d11 commit ae1077b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2419,24 +2419,24 @@
padding-right: 10px;
margin-right: 10px;
}

@media (prefers-color-scheme: dark) {
.link {
border-right-color: white;
}
}

@media (prefers-color-scheme: light) {
.link {
border-right-color: black;
}
}

.link:last-child {
border-right: none;
}
</style>

<div class="links">
<a class="link" href="https://github.com/aurora-develop/aurora" target="_blank" rel="noopener noreferrer">Aurora</a>
<a class="link" href="https://github.com/xqdoo00o/chatgpt-web" target="_blank" rel="noopener noreferrer">chatgpt-web</a>
Expand Down Expand Up @@ -5780,7 +5780,7 @@
if (!(ev.relatedTarget && apiSelectEle.contains(ev.relatedTarget))) apiSelectEle.style.display = "none";
}
let localApiHost = localStorage.getItem("APIHost");
apiHost = apiHostEle.value = envAPIEndpoint || localApiHost || apiHostEle.getAttribute("value") || "";
apiHost = apiHostEle.value = envAPIEndpoint || localApiHost || apiHostEle.getAttribute("value") || window.location.origin || "";
apiHostEle.onchange = () => {
apiHost = apiHostEle.value;
if (apiHost && apiSelects.indexOf(apiHost) === -1) appendApiOption();
Expand Down Expand Up @@ -7002,4 +7002,4 @@
</script>
</body>

</html>
</html>

0 comments on commit ae1077b

Please sign in to comment.