Skip to content

Commit b03cece

Browse files
committed
style(policy-workbench): apply wide dialog width only for configured setting
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent b2e6e3a commit b03cece

1 file changed

Lines changed: 21 additions & 1 deletion

File tree

src/views/Settings/PolicyWorkbench/RealPolicyWorkbench.vue

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,10 +314,14 @@
314314
v-if="showCreateScopeDialog || state.editorDraft"
315315
:name="ruleDialogTitle"
316316
size="normal"
317+
:class="ruleEditorDialogClass"
317318
:buttons="ruleDialogButtons"
318319
:can-close="true"
319320
@closing="requestCloseRuleDialog()">
320-
<div v-if="state.editorDraft" class="policy-workbench__editor-modal-body">
321+
<div
322+
v-if="state.editorDraft"
323+
class="policy-workbench__editor-modal-body"
324+
:class="ruleEditorDialogBodyClass">
321325
<PolicyRuleEditorPanel
322326
v-if="state.editorDraft"
323327
:editor-draft="state.editorDraft"
@@ -610,6 +614,18 @@ const showCreateRuleBackAction = computed(() => {
610614
611615
const dialogDescription = computed(() => state.activeDefinition?.description || '')
612616
617+
const ruleEditorDialogClass = computed(() => {
618+
return state.activeDefinition?.editorDialogLayout === 'wide'
619+
? 'policy-workbench__rule-dialog policy-workbench__rule-dialog--wide'
620+
: 'policy-workbench__rule-dialog'
621+
})
622+
623+
const ruleEditorDialogBodyClass = computed(() => {
624+
return state.activeDefinition?.editorDialogLayout === 'wide'
625+
? 'policy-workbench__editor-modal-body--wide'
626+
: ''
627+
})
628+
613629
function scopeCreateDisabledReason(scope: 'system' | 'group' | 'user') {
614630
if (scope === 'group') {
615631
return state.createGroupOverrideDisabledReason || ''
@@ -2462,6 +2478,10 @@ onBeforeUnmount(() => {
24622478
&__editor-modal-body {
24632479
width: min(100%, 42rem);
24642480
margin: 0 auto;
2481+
2482+
&--wide {
2483+
width: min(100%, 64rem);
2484+
}
24652485
}
24662486
24672487
&__create-scope-grid {

0 commit comments

Comments
 (0)