Frontend typo fixes (#1315)

- fix missing org slug instead of org id change
- fix login validation to check for 429 response code
This commit is contained in:
Ilya Kreymer 2023-10-25 10:28:41 -07:00 committed by GitHub
parent d58747dfa2
commit 4b9ca44adb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 6 deletions

View File

@ -372,7 +372,7 @@ export class LogInPage extends LiteElement {
} catch (e: any) { } catch (e: any) {
if (e.isApiError) { if (e.isApiError) {
let message = msg("Sorry, invalid username or password"); let message = msg("Sorry, invalid username or password");
if (e.message == "Too Many Requests") { if (e.statusCode === 429) {
message = msg( message = msg(
"Sorry, too many failed login attempts. A reset password link has been sent to your email." "Sorry, too many failed login attempts. A reset password link has been sent to your email."
); );

View File

@ -468,9 +468,7 @@ export class CrawlDetail extends LiteElement {
<sl-menu-item <sl-menu-item
@click=${() => @click=${() =>
this.navTo( this.navTo(
`/orgs/${this.crawl!.oid}/workflows/crawl/${ `${this.orgBasePath}/workflows/crawl/${this.crawl!.cid}`
this.crawl!.cid
}`
)} )}
> >
<sl-icon name="arrow-return-right" slot="prefix"></sl-icon> <sl-icon name="arrow-return-right" slot="prefix"></sl-icon>

View File

@ -456,7 +456,7 @@ export class CrawlsList extends LiteElement {
<sl-menu-item <sl-menu-item
@click=${() => @click=${() =>
this.navTo( this.navTo(
`/orgs/${item.oid}/crawls/${ `${this.orgBasePath}/items/${
item.type === "upload" ? "upload" : "crawl" item.type === "upload" ? "upload" : "crawl"
}/${item.id}` }/${item.id}`
)} )}
@ -493,7 +493,7 @@ export class CrawlsList extends LiteElement {
() => html` () => html`
<sl-menu-item <sl-menu-item
@click=${() => @click=${() =>
this.navTo(`/orgs/${item.oid}/workflows/crawl/${item.cid}`)} this.navTo(`${this.orgBasePath}/workflows/crawl/${item.cid}`)}
> >
<sl-icon name="arrow-return-right" slot="prefix"></sl-icon> <sl-icon name="arrow-return-right" slot="prefix"></sl-icon>
${msg("Go to Workflow")} ${msg("Go to Workflow")}