A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
feat: improve reminder bar ui
thecodrr1a314be8756a
diff --git a/apps/web/src/common/reminders.js b/apps/web/src/common/reminders.jsindex b0b473de1..d4c36bb51 100644--- a/apps/web/src/common/reminders.js+++ b/apps/web/src/common/reminders.js@@ -23,11 +23,11 @@ export async function shouldAddBackupReminder() {export async function shouldAddRecoveryKeyBackupReminder() {const recoveryKeyBackupDate = Config.get("recoveryKeyBackupDate", 0);- if (!recoveryKeyBackupDate) return false;+ if (!recoveryKeyBackupDate) return true;return dayjs(recoveryKeyBackupDate).add(7, "d").isBefore(dayjs());}-export async function shouldAddSignupReminder() {+export async function shouldAddLoginReminder() {const user = await db.user.getUser();if (!user) return true;}@@ -39,22 +39,26 @@ export async function shouldAddConfirmEmailReminder() {export const Reminders = {backup: {- title: "Back up your data now!",+ subtitle: "Create a backup to keep your notes safe",+ title: "Back up your data",action: createBackup,icon: Icon.Backup,},- signup: {- title: "Sign up for cross-device syncing!",- action: () => hashNavigate("/signup"),- icon: Icon.Login,+ login: {+ title: "Login to sync your notes",+ subtitle: "You are not logged in",+ action: () => hashNavigate("/login"),+ icon: Icon.User,},email: {title: "Please confirm your email",+ subtitle: "Confirm your email to sync notes",action: () => hashNavigate("/email/verify"),icon: Icon.Email,},recoverykey: {- title: "Did you backup your recovery key?",+ title: "Backup your recovery key",+ subtitle: "Keep your recovery key safe",action: showRecoveryKeyDialog,icon: Icon.Warn,},@@ -70,8 +74,8 @@ export async function resetReminders() {appStore.addReminder("backup", "high");}}- if (await shouldAddSignupReminder()) {- appStore.addReminder("signup", "low");+ if (await shouldAddLoginReminder()) {+ appStore.addReminder("login", "low");}if (await shouldAddConfirmEmailReminder()) {appStore.addReminder("email", "high");diff --git a/apps/web/src/components/reminder-bar/index.js b/apps/web/src/components/reminder-bar/index.jsindex 0bac94aa3..d982558d0 100644--- a/apps/web/src/components/reminder-bar/index.js+++ b/apps/web/src/components/reminder-bar/index.js@@ -15,22 +15,33 @@ function ReminderBar() {if (!reminder) return null;return (<Flex- p={1}- bg={"primary"}alignItems="center"- mb={1}- px={2}- sx={{ cursor: "pointer" }}- onClick={reminder?.action}justifyContent="space-between"+ sx={{+ cursor: "pointer",+ borderRadius: "default",+ ":hover": { bg: "hover" },+ }}+ onClick={reminder?.action}+ mx={1}+ p={1}><Flex alignItems="center">- <reminder.icon size={14} color="static" sx={{ mr: 1 }} />- <Text variant="body" fontSize={"body"} color="static">- {reminder.title}- </Text>+ <reminder.icon+ size={18}+ color="primary"+ sx={{ bg: "shade", mr: 2, p: 2, borderRadius: 80 }}+ />+ <Flex variant="columnCenter" alignItems="flex-start">+ <Text display={["block", "none", "block"]} variant="subBody">+ {reminder.subtitle}+ </Text>+ <Text variant="body" fontSize={"body"}>+ {reminder.title}+ </Text>+ </Flex></Flex>- <Icon.ArrowRight size={14} color="static" />+ <Icon.ChevronRight size={20} color="primary" /></Flex>);}