feat(ui): desktop piggy/notifications views, support chat fixes, gift card list
This commit is contained in:
@@ -1,35 +1,44 @@
|
||||
<template>
|
||||
<div class="dapp-notif">
|
||||
<BrowserNotificationPermissionBanner class="mb-4 max-w-3xl w-full" />
|
||||
<div class="dapp-notif__container">
|
||||
<DesktopPageTopbar
|
||||
eyebrow="اعلانها"
|
||||
title="پیامهای مدیریت"
|
||||
subtitle="اعلانهای ارسالشده از طرف مدیریت را اینجا ببینید"
|
||||
/>
|
||||
|
||||
<div v-if="loading && !items.length" class="app-page-content-loading">
|
||||
<a-spin size="large" />
|
||||
</div>
|
||||
<BrowserNotificationPermissionBanner class="mb-4 max-w-3xl w-full" />
|
||||
|
||||
<div
|
||||
<div v-if="loading && !items.length" class="app-page-content-loading">
|
||||
<a-spin size="large" />
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-else-if="!items.length"
|
||||
class="dapp-notif__empty"
|
||||
>
|
||||
<BasicIcon icon="vuesax-linear:notification-bing" size="36" />
|
||||
<p>اعلانی برای نمایش نیست.</p>
|
||||
</div>
|
||||
|
||||
<a-spin v-else :spinning="loading">
|
||||
<div class="dapp-notif__list">
|
||||
<AppNotificationCard
|
||||
v-for="item in items"
|
||||
:key="item.id"
|
||||
:item="item"
|
||||
compact
|
||||
@open="openItem"
|
||||
/>
|
||||
>
|
||||
<BasicIcon icon="vuesax-linear:notification-bing" size="36" />
|
||||
<p>اعلانی برای نمایش نیست.</p>
|
||||
</div>
|
||||
</a-spin>
|
||||
|
||||
<a-spin v-else :spinning="loading">
|
||||
<div class="dapp-notif__list">
|
||||
<AppNotificationCard
|
||||
v-for="item in items"
|
||||
:key="item.id"
|
||||
:item="item"
|
||||
compact
|
||||
@open="openItem"
|
||||
/>
|
||||
</div>
|
||||
</a-spin>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import BasicIcon from '@/components/BasicPacks/BasicIcon.vue'
|
||||
import DesktopPageTopbar from '@/layouts/components/DesktopPageTopbar.vue'
|
||||
import AppNotificationCard from '../components/AppNotificationCard.vue'
|
||||
import BrowserNotificationPermissionBanner from '../components/BrowserNotificationPermissionBanner.vue'
|
||||
import { useAppNotificationsPageContext } from '../composables/useAppNotificationsPage'
|
||||
@@ -39,7 +48,10 @@ const { loading, items, openItem } = useAppNotificationsPageContext()
|
||||
|
||||
<style scoped>
|
||||
.dapp-notif {
|
||||
@apply p-6 min-h-full;
|
||||
@apply min-h-full;
|
||||
}
|
||||
.dapp-notif__container {
|
||||
@apply mx-auto w-full max-w-5xl p-6;
|
||||
}
|
||||
.dapp-notif__empty {
|
||||
@apply flex flex-col items-center gap-2 text-gray-500;
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<MobileAppNotificationsView v-else />
|
||||
|
||||
<BasicActionSheet
|
||||
v-if="!isDesktop"
|
||||
v-model:show="detailVisible"
|
||||
:title="selectedItem?.title || 'جزئیات اعلان'"
|
||||
width="32rem"
|
||||
@@ -27,11 +28,38 @@
|
||||
<p class="app-notif-detail__body">{{ selectedItem.body }}</p>
|
||||
</div>
|
||||
</BasicActionSheet>
|
||||
|
||||
<BasicModal
|
||||
v-else
|
||||
v-model:visible="detailVisible"
|
||||
:title="selectedItem?.title || 'جزئیات اعلان'"
|
||||
width="520px"
|
||||
custom-footer
|
||||
destroy-on-close
|
||||
@close="closeDetail"
|
||||
>
|
||||
<div v-if="selectedItem" class="app-notif-detail">
|
||||
<div class="app-notif-detail__meta">
|
||||
<span
|
||||
class="app-notif-detail__badge"
|
||||
:class="`app-notif-detail__badge--${selectedItem.severity}`"
|
||||
>
|
||||
{{ severityLabel(selectedItem.severity) }}
|
||||
</span>
|
||||
</div>
|
||||
<p class="app-notif-detail__body">{{ selectedItem.body }}</p>
|
||||
</div>
|
||||
<template #footer>
|
||||
<BasicButton class="w-full" @click="closeDetail">بستن</BasicButton>
|
||||
</template>
|
||||
</BasicModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import BasicActionSheet from '@/components/BasicPacks/BasicActionSheet.vue'
|
||||
import BasicButton from '@/components/BasicPacks/BasicButton.vue'
|
||||
import BasicModal from '@/components/BasicPacks/BasicModal.vue'
|
||||
import { useDesktopBreakpoint } from '@/layouts/composables/useAppLayout'
|
||||
import { useAppNotificationsPage } from './composables/useAppNotificationsPage'
|
||||
import { severityLabel } from './composables/notificationDisplay'
|
||||
|
||||
Reference in New Issue
Block a user