Fix redirect to login page (#1445)
Fixes https://github.com/webrecorder/browsertrix-cloud/issues/1436, regression introduced in https://github.com/webrecorder/browsertrix-cloud/pull/1381
This commit is contained in:
parent
d74d9ac09d
commit
603ace0740
@ -88,9 +88,9 @@ export class RequestVerify extends LitElement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@needLogin
|
|
||||||
@localized()
|
@localized()
|
||||||
@customElement("btrix-account-settings")
|
@customElement("btrix-account-settings")
|
||||||
|
@needLogin
|
||||||
export class AccountSettings extends LiteElement {
|
export class AccountSettings extends LiteElement {
|
||||||
@property({ type: Object })
|
@property({ type: Object })
|
||||||
authState?: AuthState;
|
authState?: AuthState;
|
||||||
|
@ -36,9 +36,9 @@ const sortableFields: Record<
|
|||||||
};
|
};
|
||||||
const ABORT_REASON_THROTTLE = "throttled";
|
const ABORT_REASON_THROTTLE = "throttled";
|
||||||
|
|
||||||
@needLogin
|
|
||||||
@localized()
|
@localized()
|
||||||
@customElement("btrix-crawls")
|
@customElement("btrix-crawls")
|
||||||
|
@needLogin
|
||||||
export class Crawls extends LiteElement {
|
export class Crawls extends LiteElement {
|
||||||
@property({ type: Object })
|
@property({ type: Object })
|
||||||
authState!: AuthState;
|
authState!: AuthState;
|
||||||
|
@ -78,9 +78,9 @@ const defaultTab = "home";
|
|||||||
const UUID_REGEX =
|
const UUID_REGEX =
|
||||||
/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
|
/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
|
||||||
|
|
||||||
@needLogin
|
|
||||||
@localized()
|
@localized()
|
||||||
@customElement("btrix-org")
|
@customElement("btrix-org")
|
||||||
|
@needLogin
|
||||||
export class Org extends LiteElement {
|
export class Org extends LiteElement {
|
||||||
@property({ type: Object })
|
@property({ type: Object })
|
||||||
authState?: AuthState;
|
authState?: AuthState;
|
||||||
|
@ -8,9 +8,9 @@ import LiteElement, { html } from "@/utils/LiteElement";
|
|||||||
import { needLogin } from "@/utils/auth";
|
import { needLogin } from "@/utils/auth";
|
||||||
import type { APIPaginatedList } from "@/types/api";
|
import type { APIPaginatedList } from "@/types/api";
|
||||||
|
|
||||||
@needLogin
|
|
||||||
@localized()
|
@localized()
|
||||||
@customElement("btrix-orgs")
|
@customElement("btrix-orgs")
|
||||||
|
@needLogin
|
||||||
export class Orgs extends LiteElement {
|
export class Orgs extends LiteElement {
|
||||||
@property({ type: Object })
|
@property({ type: Object })
|
||||||
authState?: AuthState;
|
authState?: AuthState;
|
||||||
|
@ -6,9 +6,9 @@ import LiteElement, { html } from "@/utils/LiteElement";
|
|||||||
import { needLogin } from "@/utils/auth";
|
import { needLogin } from "@/utils/auth";
|
||||||
import type { CurrentUser } from "@/types/user";
|
import type { CurrentUser } from "@/types/user";
|
||||||
|
|
||||||
@needLogin
|
|
||||||
@localized()
|
@localized()
|
||||||
@customElement("btrix-users-invite")
|
@customElement("btrix-users-invite")
|
||||||
|
@needLogin
|
||||||
export class UsersInvite extends LiteElement {
|
export class UsersInvite extends LiteElement {
|
||||||
@property({ type: Object })
|
@property({ type: Object })
|
||||||
authState?: AuthState;
|
authState?: AuthState;
|
||||||
|
@ -3,10 +3,13 @@ import type { AuthState } from "@/utils/AuthService";
|
|||||||
import AuthService from "@/utils/AuthService";
|
import AuthService from "@/utils/AuthService";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Block rendering and dispatch event if user is not logged in
|
* Block rendering and dispatch event if user is not logged in.
|
||||||
|
* When using with other class decorators, `@needLogin` should
|
||||||
|
* be closest to the component (see usage example.)
|
||||||
*
|
*
|
||||||
* Usage example:
|
* @example Usage:
|
||||||
* ```ts
|
* ```ts
|
||||||
|
* @customElement("my-component")
|
||||||
* @needLogin
|
* @needLogin
|
||||||
* MyComponent extends LiteElement {}
|
* MyComponent extends LiteElement {}
|
||||||
* ```
|
* ```
|
||||||
|
Loading…
Reference in New Issue
Block a user