feat: Update version to 3.0.2 and add default footer elements for portal settings

This commit is contained in:
Torsten Brendgen
2026-08-18 16:09:16 +02:00
parent 6f548362e2
commit c529716a18
10 changed files with 94 additions and 15 deletions
+20 -2
View File
@@ -39,6 +39,22 @@ $componentName = 'CustomBranding'
$componentTitle = 'Custom Branding Application Customizer'
$classicActionName = 'CustomBranding.Classic.ScriptLink'
function New-DefaultFooterElements {
return @(@{
type = 'div'
attributes = @{ role = 'contentinfo'; 'aria-label' = 'Portalverwaltung' }
styles = @{
'background-color' = '#323130'; color = '#ffffff'; padding = '12px 16px'
'text-align' = 'center'; width = '100%'; 'box-sizing' = 'border-box'
}
children = @(@{
type = 'a'; content = 'Portal Settings'
attributes = @{ href = '~sitecollection/SitePages/PortalSettings.aspx' }
styles = @{ color = '#ffffff'; 'text-decoration' = 'underline' }
})
})
}
function New-DefaultCustomBrandingConfiguration {
return @{
schemaVersion = 2
@@ -52,7 +68,7 @@ function New-DefaultCustomBrandingConfiguration {
allowedCssHosts = @()
cssfiles = @()
placeholdertop = @{ elements = @() }
placeholderbottom = @{ elements = @() }
placeholderbottom = @{ elements = @(New-DefaultFooterElements) }
}
}
@@ -133,7 +149,9 @@ try {
minimumPortalSettingsVersion = '3.0.0'
}
if (-not $configuration.ContainsKey('placeholdertop')) { $configuration.placeholdertop = @{ elements = @() } }
if (-not $configuration.ContainsKey('placeholderbottom')) { $configuration.placeholderbottom = @{ elements = @() } }
if (-not $configuration.ContainsKey('placeholderbottom')) {
$configuration.placeholderbottom = @{ elements = @(New-DefaultFooterElements) }
}
if (-not $configuration.ContainsKey('cssfiles')) { $configuration.cssfiles = @() }
if (-not $configuration.ContainsKey('allowedCssHosts')) { $configuration.allowedCssHosts = @() }
if ($PSBoundParameters.ContainsKey('EnableDebug')) { $configuration.debug = [bool]$EnableDebug.IsPresent }