* feat: create whats new initial component * feat: create initial whats-new hook * feat: create whats-new story * feat: add button to open dialog in storybook * feat: complete popup ui * feat: add check for new updates or installs * fix: fix linter issues * fix: use proper features and add video * fix: properly fetch version from manifest * feat: add a link to open the popup * fix: update spacing and features' content * fix: update UTRP Map name * fix: increase icon size and display version correctly * feat: update the features video * fix: update offwhite color * fix: color typo * fix: fixing colors again * feat: use numbers instead of boolean * fix: typo in import * feat: add type safety to features array * feat: cdn video url * fix: delete mp4 video * feat: handle video failure to load * fix: make border outline tight to video * feat: make design responsive * fix: make features array readonly --------- Co-authored-by: doprz <52579214+doprz@users.noreply.github.com> Co-authored-by: Derek Chen <derex1987@gmail.com>
45 lines
1.5 KiB
TypeScript
45 lines
1.5 KiB
TypeScript
import type TabInfoMessages from '@shared/messages/TabInfoMessages';
|
|
import Calendar from '@views/components/calendar/Calendar';
|
|
import DialogProvider from '@views/components/common/DialogProvider/DialogProvider';
|
|
import ExtensionRoot from '@views/components/common/ExtensionRoot/ExtensionRoot';
|
|
import { MigrationDialog } from '@views/components/common/MigrationDialog';
|
|
import { WhatsNewDialog } from '@views/components/common/WhatsNewPopup';
|
|
import SentryProvider from '@views/contexts/SentryContext';
|
|
import { MessageListener } from 'chrome-extension-toolkit';
|
|
import useKC_DABR_WASM from 'kc-dabr-wasm';
|
|
import React, { useEffect } from 'react';
|
|
|
|
/**
|
|
* Calendar page
|
|
* @returns entire page
|
|
*/
|
|
export default function CalendarMain() {
|
|
useKC_DABR_WASM();
|
|
useEffect(() => {
|
|
const tabInfoListener = new MessageListener<TabInfoMessages>({
|
|
getTabInfo: ({ sendResponse }) => {
|
|
sendResponse({
|
|
url: window.location.href,
|
|
title: document.title,
|
|
});
|
|
},
|
|
});
|
|
|
|
tabInfoListener.listen();
|
|
|
|
return () => tabInfoListener.unlisten();
|
|
}, []);
|
|
|
|
return (
|
|
<SentryProvider fullInit>
|
|
<ExtensionRoot className='h-full w-full'>
|
|
<DialogProvider>
|
|
<MigrationDialog />
|
|
<WhatsNewDialog />
|
|
<Calendar />
|
|
</DialogProvider>
|
|
</ExtensionRoot>
|
|
</SentryProvider>
|
|
);
|
|
}
|