mirror of
https://github.com/ragestudio/relic.git
synced 2025-06-09 10:34:18 +00:00
use relative locations
This commit is contained in:
parent
be51e638e5
commit
406a10e3c5
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "rs-bundler",
|
"name": "rs-bundler",
|
||||||
"version": "0.13.0",
|
"version": "0.13.1",
|
||||||
"description": "RageStudio Bundler Utility GUI",
|
"description": "RageStudio Bundler Utility GUI",
|
||||||
"main": "./out/main/index.js",
|
"main": "./out/main/index.js",
|
||||||
"author": "RageStudio",
|
"author": "RageStudio",
|
||||||
|
@ -64,9 +64,15 @@ const NavigationController = (props) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
app.location.path = to
|
app.location.last = {
|
||||||
|
path: app.location.path,
|
||||||
|
search: app.location.search,
|
||||||
|
state: app.location.state,
|
||||||
|
}
|
||||||
|
|
||||||
app.location.last = window.location
|
app.location.search = to.includes("?") ? to.split("?")[1] : ""
|
||||||
|
app.location.state = state
|
||||||
|
app.location.path = to
|
||||||
|
|
||||||
document.startViewTransition(() => {
|
document.startViewTransition(() => {
|
||||||
navigate(to, {
|
navigate(to, {
|
||||||
@ -76,7 +82,7 @@ const NavigationController = (props) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function backLocation() {
|
async function backLocation() {
|
||||||
return setLocation(app.location.last.pathname + app.location.last.search, app.location.last.state)
|
return setLocation(app.location.last.path + app.location.last.search, app.location.last.state)
|
||||||
}
|
}
|
||||||
|
|
||||||
function pushToListeners(listener) {
|
function pushToListeners(listener) {
|
||||||
@ -91,7 +97,11 @@ const NavigationController = (props) => {
|
|||||||
|
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
app.location = {
|
app.location = {
|
||||||
last: window.location,
|
last: {
|
||||||
|
path: "/",
|
||||||
|
search: "",
|
||||||
|
state: {},
|
||||||
|
},
|
||||||
path: "/",
|
path: "/",
|
||||||
listeners: [],
|
listeners: [],
|
||||||
listen: pushToListeners,
|
listen: pushToListeners,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user