Skip to content

Commit

Permalink
fix(NotificationsApp): ease template
Browse files Browse the repository at this point in the history
Signed-off-by: Maksim Sukharev <[email protected]>
  • Loading branch information
Antreesy committed Dec 23, 2024
1 parent fc2ddd0 commit d886223
Showing 1 changed file with 23 additions and 31 deletions.
54 changes: 23 additions & 31 deletions src/NotificationsApp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,39 +20,36 @@
<!-- Notifications list content -->
<div ref="container" class="notification-container">
<transition name="fade" mode="out-in">
<div v-if="notifications.length > 0">
<transition-group class="notification-wrapper"
name="list"
tag="ul">
<Notification v-if="hasThrottledPushNotifications"
:key="-2016"
datetime="warning"
app="core"
:icon="warningIcon"
external-link="https://nextcloud.com/fairusepolicy"
:message="emptyContentDescription"
:subject="emptyContentMessage"
:index="2016" />
<Notification v-for="(n, index) in notifications"
:key="n.notificationId"
v-bind="n"
:index="index"
@remove="onRemove" />
</transition-group>

<transition-group v-if="notifications.length > 0"
class="notification-wrapper"
name="list"
tag="ul">
<Notification v-if="hasThrottledPushNotifications"
:key="-2016"
datetime="warning"
app="core"
:icon="warningIcon"
external-link="https://nextcloud.com/fairusepolicy"
:message="emptyContentDescription"
:subject="emptyContentMessage"
:index="2016" />
<Notification v-for="(n, index) in notifications"
:key="n.notificationId"
v-bind="n"
:index="index"
@remove="onRemove" />
<!-- Dismiss all -->
<span v-if="notifications.length > 0"
class="dismiss-all"
@click="onDismissAll">
<li key="dismiss-button" class="dismiss-all">
<NcButton type="tertiary"
wide
@click="onDismissAll">
<template #icon>
<IconClose :size="20" />
</template>
{{ t('notifications', 'Dismiss all notifications') }}
</NcButton>
</span>
</div>
</li>
</transition-group>

<!-- No notifications -->
<NcEmptyContent v-else
Expand Down Expand Up @@ -497,12 +494,7 @@ export default {
}

.dismiss-all {
display: flex;
justify-content: center;
color: var(--color-text-maxcontrast);
border-top: 1px solid var(--color-border);
padding: 10px;
background-color: var(--color-main-background);
padding: calc(2 * var(--default-grid-baseline));
}
}

Expand Down

0 comments on commit d886223

Please sign in to comment.