mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-16 17:46:18 +08:00
feat(core): open in app for self-hosted (#9231)
<div class='graphite__hidden'>
<div>🎥 Video uploaded on Graphite:</div>
<a href="https://app.graphite.dev/media/video/T2klNLEk0wxLh4NRDzhk/545994dd-6f7d-468d-a90c-45cb382fdb9d.mp4">
<img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/T2klNLEk0wxLh4NRDzhk/545994dd-6f7d-468d-a90c-45cb382fdb9d.mp4">
</a>
</div>
<video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/T2klNLEk0wxLh4NRDzhk/545994dd-6f7d-468d-a90c-45cb382fdb9d.mp4">20241222-1456-24.5006677.mp4</video>
fix AF-1815
This commit is contained in:
@@ -35,6 +35,11 @@ export interface AuthSessionAuthenticated {
|
||||
session: AuthSessionInfo;
|
||||
}
|
||||
|
||||
export type AuthSessionStatus = (
|
||||
| AuthSessionUnauthenticated
|
||||
| AuthSessionAuthenticated
|
||||
)['status'];
|
||||
|
||||
export class AuthSession extends Entity {
|
||||
session$: LiveData<AuthSessionUnauthenticated | AuthSessionAuthenticated> =
|
||||
LiveData.from(this.store.watchCachedAuthSession(), null).map(session =>
|
||||
|
||||
@@ -20,6 +20,10 @@ export const getOpenUrlInDesktopAppLink = (
|
||||
if (newTab) {
|
||||
params.set('new-tab', '1');
|
||||
}
|
||||
if (environment.isSelfHosted) {
|
||||
// assume self-hosted server is the current origin
|
||||
params.set('server', location.origin);
|
||||
}
|
||||
return new URL(
|
||||
`${scheme}://${urlObject.host}${urlObject.pathname}?${params.toString()}#${urlObject.hash}`
|
||||
).toString();
|
||||
|
||||
Reference in New Issue
Block a user