feat: add view resource dialog

This commit is contained in:
boojack
2022-08-07 01:30:48 +08:00
parent 8c8bb9e59f
commit 84564891be
15 changed files with 279 additions and 18 deletions

View File

@ -4,6 +4,7 @@ import Only from "./common/OnlyWhen";
import showDailyReviewDialog from "./DailyReviewDialog";
import showSettingDialog from "./SettingDialog";
import showArchivedMemoDialog from "./ArchivedMemoDialog";
import showResourcesDialog from "./ResourcesDialog";
import UserBanner from "./UserBanner";
import UsageHeatMap from "./UsageHeatMap";
import ShortcutList from "./ShortcutList";
@ -17,6 +18,10 @@ const Sidebar: React.FC<Props> = () => {
showSettingDialog();
};
const handleResourcesBtnClick = () => {
showResourcesDialog();
};
const handleArchivedBtnClick = () => {
showArchivedMemoDialog();
};
@ -35,6 +40,9 @@ const Sidebar: React.FC<Props> = () => {
<span className="icon">📅</span> Daily Review
</button>
<Only when={!userService.isVisitorMode()}>
<button className="btn action-btn" onClick={handleResourcesBtnClick}>
<span className="icon">🌄</span> Resources
</button>
<button className="btn action-btn" onClick={handleMyAccountBtnClick}>
<span className="icon"></span> Setting
</button>