Aktualisiere Versionsnummer auf 3.0.1 in README.md, package.json, package-lock.json und package-solution.json. Füge Unterstützung für zentrale Aktivierung von CustomBranding hinzu und verbessere die Logik zur Handhabung von UserCustomActions. Aktualisiere Tests zur Validierung der neuen Struktur.
This commit is contained in:
@@ -2,6 +2,11 @@ import { ISettingsProvider } from '../core/ProviderContracts';
|
||||
|
||||
export interface ICustomBrandingSettings {
|
||||
schemaVersion: number;
|
||||
portalSettings: {
|
||||
providerKey: string;
|
||||
contractVersion: number;
|
||||
minimumPortalSettingsVersion: string;
|
||||
};
|
||||
enabled: boolean;
|
||||
debug: boolean;
|
||||
allowedCssHosts: string[];
|
||||
@@ -19,7 +24,16 @@ export const CustomBrandingSettingsProvider: ISettingsProvider<ICustomBrandingSe
|
||||
schemaVersion: 2,
|
||||
minimumPortalSettingsVersion: '3.0.0',
|
||||
componentIds: ['035ba968-6488-4d42-86b3-0470ffcc95b9'],
|
||||
storage: { kind: 'siteUserCustomAction' },
|
||||
storage: {
|
||||
kind: 'siteUserCustomAction',
|
||||
action: {
|
||||
name: 'CustomBranding',
|
||||
title: 'Custom Branding Application Customizer',
|
||||
description: 'MSFT-Custom-Solution:CustomBranding',
|
||||
location: 'ClientSideExtension.ApplicationCustomizer',
|
||||
sequence: 100
|
||||
}
|
||||
},
|
||||
sections: [
|
||||
{
|
||||
key: 'general', title: 'Allgemein', layout: 'twoColumns', iconName: 'Settings',
|
||||
@@ -70,6 +84,11 @@ export const CustomBrandingSettingsProvider: ISettingsProvider<ICustomBrandingSe
|
||||
],
|
||||
createDefault: (): ICustomBrandingSettings => ({
|
||||
schemaVersion: 2,
|
||||
portalSettings: {
|
||||
providerKey: 'custombranding',
|
||||
contractVersion: 1,
|
||||
minimumPortalSettingsVersion: '3.0.0'
|
||||
},
|
||||
enabled: true,
|
||||
debug: false,
|
||||
allowedCssHosts: [],
|
||||
@@ -82,6 +101,11 @@ export const CustomBrandingSettingsProvider: ISettingsProvider<ICustomBrandingSe
|
||||
const result: any = {}; // tslint:disable-line:no-any
|
||||
Object.keys(source).forEach((key: string): void => { result[key] = source[key]; });
|
||||
result.schemaVersion = 2;
|
||||
result.portalSettings = {
|
||||
providerKey: 'custombranding',
|
||||
contractVersion: 1,
|
||||
minimumPortalSettingsVersion: '3.0.0'
|
||||
};
|
||||
result.enabled = source.enabled !== false;
|
||||
result.debug = source.debug === true;
|
||||
result.allowedCssHosts = Array.isArray(source.allowedCssHosts) ? source.allowedCssHosts : [];
|
||||
|
||||
Reference in New Issue
Block a user