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() | ||||
| @customElement("btrix-account-settings") | ||||
| @needLogin | ||||
| export class AccountSettings extends LiteElement { | ||||
|   @property({ type: Object }) | ||||
|   authState?: AuthState; | ||||
|  | ||||
| @ -36,9 +36,9 @@ const sortableFields: Record< | ||||
| }; | ||||
| const ABORT_REASON_THROTTLE = "throttled"; | ||||
| 
 | ||||
| @needLogin | ||||
| @localized() | ||||
| @customElement("btrix-crawls") | ||||
| @needLogin | ||||
| export class Crawls extends LiteElement { | ||||
|   @property({ type: Object }) | ||||
|   authState!: AuthState; | ||||
|  | ||||
| @ -78,9 +78,9 @@ const defaultTab = "home"; | ||||
| const UUID_REGEX = | ||||
|   /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/; | ||||
| 
 | ||||
| @needLogin | ||||
| @localized() | ||||
| @customElement("btrix-org") | ||||
| @needLogin | ||||
| export class Org extends LiteElement { | ||||
|   @property({ type: Object }) | ||||
|   authState?: AuthState; | ||||
|  | ||||
| @ -8,9 +8,9 @@ import LiteElement, { html } from "@/utils/LiteElement"; | ||||
| import { needLogin } from "@/utils/auth"; | ||||
| import type { APIPaginatedList } from "@/types/api"; | ||||
| 
 | ||||
| @needLogin | ||||
| @localized() | ||||
| @customElement("btrix-orgs") | ||||
| @needLogin | ||||
| export class Orgs extends LiteElement { | ||||
|   @property({ type: Object }) | ||||
|   authState?: AuthState; | ||||
|  | ||||
| @ -6,9 +6,9 @@ import LiteElement, { html } from "@/utils/LiteElement"; | ||||
| import { needLogin } from "@/utils/auth"; | ||||
| import type { CurrentUser } from "@/types/user"; | ||||
| 
 | ||||
| @needLogin | ||||
| @localized() | ||||
| @customElement("btrix-users-invite") | ||||
| @needLogin | ||||
| export class UsersInvite extends LiteElement { | ||||
|   @property({ type: Object }) | ||||
|   authState?: AuthState; | ||||
|  | ||||
| @ -3,10 +3,13 @@ import type { AuthState } 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
 | ||||
|  * @customElement("my-component") | ||||
|  * @needLogin | ||||
|  * MyComponent extends LiteElement {} | ||||
|  * ``` | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user