Compare commits
No commits in common. "4c0925a6a12cdafafdcc4327d0da8d2e9df081a7" and "4c717a0cb7eb479dcd6d6c836d287bacb8d3354d" have entirely different histories.
4c0925a6a1
...
4c717a0cb7
3 changed files with 8 additions and 16 deletions
|
@ -167,7 +167,7 @@ export async function getOrRegisterApp(site: string, redirectUrl: string) {
|
|||
});
|
||||
const app = await client.v1.apps.create({
|
||||
clientName: "TuTu",
|
||||
website: "https://code.lightstands.xyz/Rubicon/tutu",
|
||||
website: "https://github.com/thislight/tutu",
|
||||
redirectUris: redirectUrl,
|
||||
scopes: "read write push",
|
||||
});
|
||||
|
|
|
@ -64,7 +64,7 @@ export function useSessions() {
|
|||
if (sessions().length > 0) return;
|
||||
push(
|
||||
"/accounts/sign-in?back=" + encodeURIComponent(location.pathname),
|
||||
{ replace: "all" },
|
||||
{ replace: true },
|
||||
);
|
||||
});
|
||||
|
||||
|
|
|
@ -36,9 +36,9 @@ export type NewFrameOptions<T> = (T extends undefined
|
|||
}
|
||||
: { state: T }) & {
|
||||
/**
|
||||
* The new frame should replace the current frame or all the stack.
|
||||
* The new frame should replace the current frame.
|
||||
*/
|
||||
replace?: boolean | "all";
|
||||
replace?: boolean;
|
||||
/**
|
||||
* The animatedOpen phase of the life cycle.
|
||||
*
|
||||
|
@ -427,19 +427,11 @@ const StackedRouter: Component<StackedRouterProps> = (oprops) => {
|
|||
animateClose: opts?.animateClose,
|
||||
};
|
||||
|
||||
const replace = opts?.replace;
|
||||
if (replace === "all") {
|
||||
mutStack([frame]);
|
||||
mutStack(opts?.replace ? stack.length - 1 : stack.length, frame);
|
||||
if (opts?.replace) {
|
||||
window.history.replaceState(serializableStack(stack), "", path);
|
||||
} else {
|
||||
mutStack(replace ? stack.length - 1 : stack.length, frame);
|
||||
}
|
||||
|
||||
const savedStack = serializableStack(stack);
|
||||
|
||||
if (replace) {
|
||||
window.history.replaceState(savedStack, "", path);
|
||||
} else {
|
||||
window.history.pushState(savedStack, "", path);
|
||||
window.history.pushState(serializableStack(stack), "", path);
|
||||
}
|
||||
return frame;
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue