-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
167 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
import { base_url, t } from 'blessing-skin' | ||
|
||
const button = document.querySelector<HTMLAnchorElement>('.main-button') | ||
if (button && button.href.endsWith('/auth/register')) { | ||
button.textContent = t('auth.login') | ||
const url = new URL(base_url) | ||
button.textContent = globalThis.blessing.t('auth.login') | ||
const url = new URL(globalThis.blessing.base_url) | ||
url.pathname = '/auth/login' | ||
button.href = url.toString() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
import { event } from 'blessing-skin' | ||
globalThis.blessing.event.on( | ||
'emailDomainsSuggestion', | ||
(domains: Set<string>) => { | ||
const allowListJSON = document.querySelector('#allowed-email-domains') | ||
if (!allowListJSON) { | ||
return | ||
} | ||
|
||
event.on('emailDomainsSuggestion', (domains: Set<string>) => { | ||
const allowListJSON = document.querySelector('#allowed-email-domains') | ||
if (!allowListJSON) { | ||
return | ||
} | ||
|
||
const allowList: string[] = JSON.parse(allowListJSON.textContent ?? '[]') | ||
if (allowList.length > 0) { | ||
domains.clear() | ||
allowList.forEach((domain) => domains.add(domain)) | ||
} | ||
}) | ||
const allowList: string[] = JSON.parse(allowListJSON.textContent ?? '[]') | ||
if (allowList.length > 0) { | ||
domains.clear() | ||
allowList.forEach((domain) => domains.add(domain)) | ||
} | ||
}, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import { event } from 'blessing-skin' | ||
|
||
event.on('beforeFetch', (request: { data: Record<string, string> }) => { | ||
const search = new URLSearchParams(location.search) | ||
request.data.share = search.get('share') || '' | ||
}) | ||
globalThis.blessing.event.on( | ||
'beforeFetch', | ||
(request: { data: Record<string, string> }) => { | ||
const search = new URLSearchParams(location.search) | ||
request.data.share = search.get('share') || '' | ||
}, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.