MM-45981_Desktop: Add Server Screen: Improve Onboarding screens (#2243)

This commit is contained in:
Julian Mondragón
2022-09-16 10:35:37 -05:00
committed by GitHub
parent c12dc3d6ae
commit c3493b09ff
24 changed files with 1920 additions and 100 deletions

View File

@@ -7,6 +7,7 @@ export const DEVELOPMENT = 'development';
export const SECOND = 1000;
export const RELOAD_INTERVAL = 5 * SECOND;
export const MODAL_TRANSITION_TIMEOUT = 400;
export const MAX_SERVER_RETRIES = 3;

View File

@@ -19,6 +19,10 @@ function isValidURI(testURL: string) {
return Boolean(isUri(testURL));
}
function startsWithProtocol(testURL: string) {
return Boolean((/^https?:\/\/.*/).test(testURL.trim()));
}
function parseURL(inputURL: URL | string) {
if (inputURL instanceof URL) {
return inputURL;
@@ -237,4 +241,5 @@ export default {
isChannelExportUrl,
isUrlType,
cleanPathName,
startsWithProtocol,
};