feat: Update version to 3.0.2 and add default footer elements for portal settings
This commit is contained in:
@@ -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 }
|
||||
|
||||
Reference in New Issue
Block a user