|
168 | 168 | </p> |
169 | 169 |
|
170 | 170 | <div v-if="state.summary" class="policy-workbench__summary-line policy-workbench__summary-line--crud"> |
171 | | - <span class="policy-workbench__summary-caption">{{ t('libresign', 'Effective baseline') }}</span> |
172 | | - <strong>{{ state.summary.currentBaseValue }}</strong> |
| 171 | + <span class="policy-workbench__summary-caption">{{ t('libresign', 'Default:') }}</span> |
| 172 | + <strong class="policy-workbench__summary-value-compact">{{ state.summary.currentBaseValue }}</strong> |
173 | 173 | <span class="policy-workbench__value-source"> |
174 | 174 | {{ state.hasGlobalDefault ? t('libresign', 'Custom default') : t('libresign', 'System default') }} |
175 | 175 | </span> |
|
181 | 181 | :label="t('libresign', 'Search rules')" |
182 | 182 | :placeholder="t('libresign', 'Search by scope, target, or value')" |
183 | 183 | @update:modelValue="onCrudSearchChange" /> |
184 | | - <NcPopover :boundary="popoverBoundary"> |
185 | | - <template #trigger> |
186 | | - <NcButton :aria-label="t('libresign', 'Filters')" :pressed="crudScopeFilter !== 'all'" variant="tertiary"> |
187 | | - <template #icon> |
188 | | - <NcIconSvgWrapper :path="mdiFilterVariant" /> |
189 | | - </template> |
190 | | - {{ t('libresign', 'Filters') }} |
191 | | - </NcButton> |
192 | | - </template> |
193 | | - <template #default> |
194 | | - <div class="policy-workbench__crud-filter-popover"> |
195 | | - <p class="policy-workbench__crud-filter-title">{{ t('libresign', 'Scope') }}</p> |
196 | | - <div class="policy-workbench__crud-filter-options"> |
197 | | - <label class="policy-workbench__filter-option"> |
198 | | - <input type="radio" name="crudScope" :checked="crudScopeFilter === 'all'" @change="setCrudScopeFilter('all', true)" /> |
199 | | - <span>{{ t('libresign', 'All scopes') }}</span> |
200 | | - </label> |
201 | | - <label class="policy-workbench__filter-option"> |
202 | | - <input type="radio" name="crudScope" :checked="crudScopeFilter === 'system'" @change="setCrudScopeFilter('system', true)" /> |
203 | | - <span>{{ t('libresign', 'Instance') }}</span> |
204 | | - </label> |
205 | | - <label class="policy-workbench__filter-option"> |
206 | | - <input type="radio" name="crudScope" :checked="crudScopeFilter === 'group'" @change="setCrudScopeFilter('group', true)" /> |
207 | | - <span>{{ t('libresign', 'Group') }}</span> |
208 | | - </label> |
209 | | - <label class="policy-workbench__filter-option"> |
210 | | - <input type="radio" name="crudScope" :checked="crudScopeFilter === 'user'" @change="setCrudScopeFilter('user', true)" /> |
211 | | - <span>{{ t('libresign', 'User') }}</span> |
212 | | - </label> |
213 | | - </div> |
214 | | - <NcButton v-if="crudScopeFilter !== 'all'" variant="tertiary" @click="setCrudScopeFilter('all', true)"> |
215 | | - {{ t('libresign', 'Clear filter') }} |
| 184 | + |
| 185 | + <div class="policy-workbench__crud-controls"> |
| 186 | + <NcPopover :boundary="popoverBoundary"> |
| 187 | + <template #trigger> |
| 188 | + <NcButton :aria-label="t('libresign', 'Filters')" :pressed="crudScopeFilter !== 'all'" variant="tertiary"> |
| 189 | + <template #icon> |
| 190 | + <NcIconSvgWrapper :path="mdiFilterVariant" /> |
| 191 | + </template> |
| 192 | + {{ t('libresign', 'Filters') }} |
216 | 193 | </NcButton> |
217 | | - </div> |
218 | | - </template> |
219 | | - </NcPopover> |
| 194 | + </template> |
| 195 | + <template #default> |
| 196 | + <div class="policy-workbench__crud-filter-popover"> |
| 197 | + <p class="policy-workbench__crud-filter-title">{{ t('libresign', 'Scope') }}</p> |
| 198 | + <div class="policy-workbench__crud-filter-options"> |
| 199 | + <label class="policy-workbench__filter-option"> |
| 200 | + <input type="radio" name="crudScope" :checked="crudScopeFilter === 'all'" @change="setCrudScopeFilter('all', true)" /> |
| 201 | + <span>{{ t('libresign', 'All scopes') }}</span> |
| 202 | + </label> |
| 203 | + <label class="policy-workbench__filter-option"> |
| 204 | + <input type="radio" name="crudScope" :checked="crudScopeFilter === 'system'" @change="setCrudScopeFilter('system', true)" /> |
| 205 | + <span>{{ t('libresign', 'Instance') }}</span> |
| 206 | + </label> |
| 207 | + <label class="policy-workbench__filter-option"> |
| 208 | + <input type="radio" name="crudScope" :checked="crudScopeFilter === 'group'" @change="setCrudScopeFilter('group', true)" /> |
| 209 | + <span>{{ t('libresign', 'Group') }}</span> |
| 210 | + </label> |
| 211 | + <label class="policy-workbench__filter-option"> |
| 212 | + <input type="radio" name="crudScope" :checked="crudScopeFilter === 'user'" @change="setCrudScopeFilter('user', true)" /> |
| 213 | + <span>{{ t('libresign', 'User') }}</span> |
| 214 | + </label> |
| 215 | + </div> |
| 216 | + <NcButton v-if="crudScopeFilter !== 'all'" variant="tertiary" @click="setCrudScopeFilter('all', true)"> |
| 217 | + {{ t('libresign', 'Clear filter') }} |
| 218 | + </NcButton> |
| 219 | + </div> |
| 220 | + </template> |
| 221 | + </NcPopover> |
| 222 | + |
| 223 | + <div v-if="activeScopeFilterChip" class="policy-workbench__crud-filter-chips"> |
| 224 | + <NcChip :aria-label-close="t('libresign', 'Remove filter')" :text="activeScopeFilterChip" @close="setCrudScopeFilter('all', true)" /> |
| 225 | + </div> |
| 226 | + </div> |
| 227 | + |
220 | 228 | <div v-if="state.viewMode === 'system-admin'" class="policy-workbench__crud-create"> |
221 | 229 | <NcButton variant="primary" size="small" :disabled="!hasCreatableScope" :title="createRuleDisabledReason || undefined" @click="requestCreateRule()"> |
222 | 230 | {{ t('libresign', 'Create rule') }} |
|
227 | 235 | </div> |
228 | 236 | </div> |
229 | 237 |
|
230 | | - <div v-if="activeScopeFilterChip" class="policy-workbench__crud-filter-chips"> |
231 | | - <NcChip :aria-label-close="t('libresign', 'Remove filter')" :text="activeScopeFilterChip" @close="setCrudScopeFilter('all', true)" /> |
232 | | - </div> |
233 | | - |
234 | | - <p v-if="state.createUserOverrideDisabledReason" class="policy-workbench__table-note"> |
| 238 | + <p v-if="state.createUserOverrideDisabledReason && crudScopeFilter === 'user'" class="policy-workbench__table-note"> |
235 | 239 | {{ t('libresign', 'Some users may not allow user overrides because their group rule requires inheritance.') }} |
236 | 240 | </p> |
237 | 241 |
|
@@ -1089,7 +1093,6 @@ onBeforeUnmount(() => { |
1089 | 1093 | &__crud-filter-chips { |
1090 | 1094 | display: flex; |
1091 | 1095 | align-items: center; |
1092 | | - margin-top: 0.5rem; |
1093 | 1096 | } |
1094 | 1097 |
|
1095 | 1098 | &__settings-grid { |
@@ -1455,19 +1458,28 @@ onBeforeUnmount(() => { |
1455 | 1458 |
|
1456 | 1459 | &--crud { |
1457 | 1460 | align-items: flex-end; |
1458 | | - justify-content: space-between; |
| 1461 | + gap: 0.85rem; |
1459 | 1462 |
|
1460 | 1463 | :deep(.text-field) { |
1461 | | - flex: 1 1 280px; |
| 1464 | + flex: 1 1 320px; |
| 1465 | + min-width: min(100%, 320px); |
1462 | 1466 | } |
1463 | 1467 | } |
1464 | 1468 | } |
1465 | 1469 |
|
| 1470 | + &__crud-controls { |
| 1471 | + display: flex; |
| 1472 | + align-items: center; |
| 1473 | + gap: 0.5rem; |
| 1474 | + flex: 0 1 auto; |
| 1475 | + } |
| 1476 | +
|
1466 | 1477 | &__crud-create { |
1467 | 1478 | display: flex; |
1468 | 1479 | flex-direction: column; |
1469 | 1480 | align-items: flex-end; |
1470 | 1481 | gap: 0.45rem; |
| 1482 | + margin-left: auto; |
1471 | 1483 | } |
1472 | 1484 |
|
1473 | 1485 |
|
@@ -1543,6 +1555,32 @@ onBeforeUnmount(() => { |
1543 | 1555 | display: none; |
1544 | 1556 | } |
1545 | 1557 |
|
| 1558 | + @media (max-width: 720px) { |
| 1559 | + &__table-toolbar-row--crud { |
| 1560 | + align-items: stretch; |
| 1561 | + } |
| 1562 | +
|
| 1563 | + &__crud-controls { |
| 1564 | + width: 100%; |
| 1565 | + justify-content: flex-start; |
| 1566 | + } |
| 1567 | +
|
| 1568 | + &__crud-create { |
| 1569 | + margin-left: 0; |
| 1570 | + align-items: stretch; |
| 1571 | + width: 100%; |
| 1572 | +
|
| 1573 | + :deep(.button-vue) { |
| 1574 | + width: 100%; |
| 1575 | + justify-content: center; |
| 1576 | + } |
| 1577 | + } |
| 1578 | +
|
| 1579 | + &__table-note--align-right { |
| 1580 | + text-align: left; |
| 1581 | + } |
| 1582 | + } |
| 1583 | +
|
1546 | 1584 | @media (min-width: 961px) { |
1547 | 1585 | &__dialog { |
1548 | 1586 | flex-direction: row; |
@@ -1627,24 +1665,29 @@ onBeforeUnmount(() => { |
1627 | 1665 | // New compact summary line |
1628 | 1666 | &__summary-line { |
1629 | 1667 | display: flex; |
1630 | | - align-items: flex-start; |
1631 | | - flex-direction: column; |
1632 | | - gap: 0.35rem; |
1633 | | - padding: 0.25rem 0; |
| 1668 | + align-items: center; |
| 1669 | + flex-wrap: wrap; |
| 1670 | + gap: 0.45rem; |
| 1671 | + padding: 0.15rem 0; |
1634 | 1672 | color: var(--color-main-text); |
1635 | 1673 |
|
1636 | 1674 | &--crud { |
1637 | | - margin: 0.5rem 0 0.75rem; |
| 1675 | + margin: 0.35rem 0 0.6rem; |
1638 | 1676 | } |
1639 | 1677 | } |
1640 | 1678 |
|
1641 | 1679 | &__summary-caption { |
1642 | | - font-size: 0.82rem; |
1643 | | - text-transform: uppercase; |
1644 | | - letter-spacing: 0.03em; |
| 1680 | + font-size: 0.86rem; |
| 1681 | + font-weight: 600; |
1645 | 1682 | color: var(--color-text-maxcontrast); |
1646 | 1683 | } |
1647 | 1684 |
|
| 1685 | + &__summary-value-compact { |
| 1686 | + font-size: 1rem; |
| 1687 | + font-weight: 700; |
| 1688 | + line-height: 1.2; |
| 1689 | + } |
| 1690 | +
|
1648 | 1691 | &__summary-wrap { |
1649 | 1692 | :deep(.notecard) { |
1650 | 1693 | margin: 0; |
|
0 commit comments