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
web: add feature limit check when adding new tag
Abdullah Atta8c70abda0418
diff --git a/apps/web/src/dialogs/add-tags-dialog.tsx b/apps/web/src/dialogs/add-tags-dialog.tsxindex f07cb3a88..0d1b68e4d 100644--- a/apps/web/src/dialogs/add-tags-dialog.tsx+++ b/apps/web/src/dialogs/add-tags-dialog.tsx@@ -26,7 +26,7 @@ import { store as notestore } from "../stores/note-store";import { FilteredList } from "../components/filtered-list";import { ItemReference, Tag } from "@notesnook/core";import { VirtualizedGrouping } from "@notesnook/core";-import { isFeatureAvailable, ResolvedItem } from "@notesnook/common";+import { ResolvedItem } from "@notesnook/common";import { BaseDialogProps, DialogManager } from "../common/dialog-manager";import { strings } from "@notesnook/intl";import {@@ -35,7 +35,7 @@ import {selectMultiple,useSelectionStore} from "./move-note-dialog";-import { showFeatureNotAllowedToast } from "../common/toasts";+import { checkFeature } from "../common";type AddTagsDialogProps = BaseDialogProps<boolean> & { noteIds: string[] };export const AddTagsDialog = DialogManager.register(function AddTagsDialog(@@ -116,10 +116,7 @@ export const AddTagsDialog = DialogManager.register(function AddTagsDialog();}}onCreateNewItem={async (title) => {- const result = await isFeatureAvailable("tags");- if (!result.isAllowed) {- return showFeatureNotAllowedToast(result);- }+ if (!(await checkFeature("tags", { type: "toast" }))) return;const tagId = await db.tags.add({ title });if (!tagId) return;