aboutsummaryrefslogtreecommitdiff
path: root/src/components/extra_notifications/extra_notifications.vue
blob: 7e09e5cce3a628b739e8a9ce4643dc5c60006395 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<template>
  <div class="ExtraNotifications">
    <router-link
      v-if="shouldShowChats"
      class="button-unstyled -link extra-notification"
      :to="{ name: 'chats', params: { username: currentUser.screen_name } }"
    >
      {{ $tc('notifications.unread_chats', unreadChatCount, { num: unreadChatCount }) }}
    </router-link>
    <router-link
      v-if="shouldShowAnnouncements"
      class="button-unstyled -link extra-notification"
      :to="{ name: 'announcements' }"
    >
      {{ $tc('notifications.unread_announcements', unreadAnnouncementCount, { num: unreadAnnouncementCount }) }}
    </router-link>
    <router-link
      v-if="shouldShowFollowRequests"
      class="button-unstyled -link extra-notification"
      :to="{ name: 'friend-requests' }"
    >
      {{ $tc('notifications.unread_follow_requests', followRequestCount, { num: followRequestCount }) }}
    </router-link>
    <i18n-t
      v-if="shouldShowCustomizationTip"
      tag="span"
      class="extra-notification tip"
      keypath="notifications.configuration_tip"
    >
      <template #theSettings>
        <button
          class="button-unstyled -link"
          @click="openNotificationSettings"
        >
          {{ $t('notifications.configuration_tip_settings') }}
        </button>
      </template>
      <template #dismiss>
        <button
          class="button-unstyled -link"
          @click="dismissConfigurationTip"
        >
          {{ $t('notifications.configuration_tip_dismiss') }}
        </button>
      </template>
    </i18n-t>
  </div>
</template>

<script src="./extra_notifications.js" />

<style lang="scss">
@import "../../variables";

.ExtraNotifications {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;

  .extra-notification {
    width: 100%;
    padding: 1em;
  }

  .extra-notification {
    border-bottom: 1px solid;
    border-color: $fallback--border;
    border-color: var(--border, $fallback--border);
  }

  .tip {
    display: inline;
  }
}
</style>