Line data Source code
1 : import { useDialogService } from '@/services/dialogService'
2 :
3 2356 : const lazyCloudNotificationContent = () =>
4 : import('@/platform/cloud/notification/components/CloudNotificationContent.vue')
5 :
6 4710 : export function useCloudNotificationDialog() {
7 : /** Shows one-time cloud notification modal for macOS desktop users. */
8 3 : async function showCloudNotification(): Promise<void> {
9 3 : const { default: component } = await lazyCloudNotificationContent()
10 3 : return new Promise<void>((resolve) => {
11 3 : useDialogService().showLayoutDialog({
12 : key: 'global-cloud-notification',
13 : component,
14 : props: {},
15 : dialogComponentProps: {
16 : closable: false,
17 : onRemoved: () => resolve()
18 : }
19 : })
20 : })
21 : }
22 :
23 4710 : return { showCloudNotification }
24 : }
|