Added entity reporting.
This commit is contained in:
@@ -25,6 +25,9 @@ const theme = ref(pageContext.env.theme);
|
||||
const user = pageContext.user;
|
||||
const primaryStash = pageContext.assets?.primaryStash;
|
||||
const unseen = ref(pageContext.assets?.unseenNotifications);
|
||||
const adminIndicators = Object.values(pageContext.assets?.adminIndicators || {}).filter((indicator) => indicator.count > 0);
|
||||
const adminAttention = adminIndicators.reduce((total, indicator) => total + indicator.count, 0);
|
||||
const adminAttentionLabel = adminIndicators.map((indicator) => `${indicator.count} ${indicator.label}`).join(', ');
|
||||
const query = ref(pageContext.urlParsed.search.q || '');
|
||||
const allowLogin = pageContext.env.allowLogin;
|
||||
const searchFocused = ref(false);
|
||||
@@ -316,6 +319,12 @@ function blurSearch(event) {
|
||||
>
|
||||
<Icon icon="wrench" />
|
||||
Admin
|
||||
|
||||
<span
|
||||
v-if="adminAttention > 0"
|
||||
:title="adminAttentionLabel"
|
||||
class="admin-attention"
|
||||
>{{ adminAttention }}</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -523,6 +532,22 @@ function blurSearch(event) {
|
||||
margin-bottom: .1rem;
|
||||
}
|
||||
|
||||
.admin-attention {
|
||||
min-width: 1.25rem;
|
||||
height: 1.25rem;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
padding: 0 .25rem;
|
||||
margin-left: auto;
|
||||
border-radius: .625rem;
|
||||
background: var(--primary);
|
||||
color: var(--text-light);
|
||||
font-size: .75rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.notifs-unseen {
|
||||
bottom: 0;
|
||||
font-size: .65rem;
|
||||
|
||||
Reference in New Issue
Block a user