[MM-50352] Improve URL validation and add/edit server experience (#2720)
* [MM-50352] Improve URL validation and add/edit server experience * Fix build * Fix translations * First pass of fixes * Some changes to avoid 2 clicks, tests * PR feedback * Update translations * PR feedback * Fix translations * PR feedback * E2E test fixes
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
export type RemoteInfo = {
|
||||
serverVersion?: string;
|
||||
siteName?: string;
|
||||
siteURL?: string;
|
||||
hasFocalboard?: boolean;
|
||||
hasPlaybooks?: boolean;
|
||||
@@ -11,5 +12,14 @@ export type RemoteInfo = {
|
||||
export type ClientConfig = {
|
||||
Version: string;
|
||||
SiteURL: string;
|
||||
SiteName: string;
|
||||
BuildBoards: string;
|
||||
}
|
||||
|
||||
export type URLValidationResult = {
|
||||
status: string;
|
||||
validatedURL?: string;
|
||||
existingServerName?: string;
|
||||
serverVersion?: string;
|
||||
serverName?: string;
|
||||
}
|
||||
|
@@ -8,6 +8,7 @@ import {Language} from '../../i18n/i18n';
|
||||
import {CombinedConfig, LocalConfiguration, UniqueView, UniqueServer} from './config';
|
||||
import {DownloadedItem, DownloadedItems, DownloadsMenuOpenEventPayload} from './downloads';
|
||||
import {SaveQueueItem} from './settings';
|
||||
import {URLValidationResult} from './server';
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
@@ -56,6 +57,7 @@ declare global {
|
||||
getOrderedServers: () => Promise<UniqueServer[]>;
|
||||
getOrderedTabsForServer: (serverId: string) => Promise<UniqueView[]>;
|
||||
onUpdateServers: (listener: () => void) => void;
|
||||
validateServerURL: (url: string, currentId?: string) => Promise<URLValidationResult>;
|
||||
|
||||
getConfiguration: () => Promise<CombinedConfig[keyof CombinedConfig] | CombinedConfig>;
|
||||
getVersion: () => Promise<{name: string; version: string}>;
|
||||
|
Reference in New Issue
Block a user