Skip to content

Commit 616ea05

Browse files
christophfriedrichm-mohr
authored andcommitted
Add compact prop to FederationMissingNotice
1 parent 50f2f34 commit 616ea05

File tree

3 files changed

+32
-2
lines changed

3 files changed

+32
-2
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Added
11+
12+
- `FederationMissingNotice`: Prop `compact`
13+
1014
## [2.18.3] - 2025-01-15
1115

1216
### Fixed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ Show a message that a response is incomplete due to missing data from an inacces
252252
- `missing` (array, required): The identifiers of the federated back-ends that are not providing data for the list of processes due to an issue.
253253
- `federation` (object): The data of the `federation` property obtained from the capabilities.
254254
- `retry` (function): Displays a "retry" button which executes the given function.
255+
- `compact` (boolean): Renders the notice more compact if set to `true`. Defaults to `false`.
255256

256257
**Slots:**
257258

components/FederationMissingNotice.vue

+27-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<section v-if="services" class="vue-component message-block federation federation-backends">
2+
<section v-if="services" class="vue-component message-block federation federation-backends" :class="{compact: compact}">
33
<AsyncButton v-if="retry" confirm class="retry" :fn="retry">Retry</AsyncButton>
44
<strong class="header">Incomplete</strong>
55
<p>
@@ -9,7 +9,7 @@
99
<li v-for="service in services" :key="service.url">
1010
<div class="fed-header">
1111
<strong class="fed-title">{{ service }}</strong>
12-
<ul class="badges small inline">
12+
<ul v-if="!compact" class="badges small inline">
1313
<li class="badge red">offline</li>
1414
</ul>
1515
</div>
@@ -35,6 +35,10 @@ export default {
3535
type: Function,
3636
default: null
3737
},
38+
compact: {
39+
type: Boolean,
40+
default: false
41+
},
3842
federation: {
3943
type: Object,
4044
default: () => ({})
@@ -78,4 +82,25 @@ export default {
7882
float: right;
7983
}
8084
}
85+
86+
.vue-component.federation-backends.compact {
87+
margin: 0;
88+
padding: 0.25em;
89+
90+
strong, p, ul, ul li, ul li div {
91+
display: inline;
92+
}
93+
94+
strong.header, p {
95+
margin-right: 5px;
96+
}
97+
98+
ul {
99+
padding-left: 0;
100+
}
101+
102+
li:not(:last-child)::after {
103+
content: ", "
104+
}
105+
}
81106
</style>

0 commit comments

Comments
 (0)