* chore: add ARIA attributes * chore: add missing translations * chore: add accessibility translations for multiple languages and configured store according to it * chore: refactor translation file handling and introduce TranslationFiles enum * fix: accessibility issues in workspace sidebar --------- Co-authored-by: JayashTripathy <jayashtripathy371@gmail.com> Co-authored-by: Prateek Shourya <prateekshourya29@gmail.com>
41 lines
1.1 KiB
TypeScript
41 lines
1.1 KiB
TypeScript
import { Briefcase, FileText, Layers, LucideIcon } from "lucide-react";
|
|
// plane imports
|
|
import { IFavorite } from "@plane/types";
|
|
import { ContrastIcon, DiceIcon, FavoriteFolderIcon, ISvgIcons } from "@plane/ui";
|
|
|
|
export const FAVORITE_ITEM_ICONS: Record<string, React.FC<ISvgIcons> | LucideIcon> = {
|
|
page: FileText,
|
|
project: Briefcase,
|
|
view: Layers,
|
|
module: DiceIcon,
|
|
cycle: ContrastIcon,
|
|
folder: FavoriteFolderIcon,
|
|
};
|
|
|
|
export const FAVORITE_ITEM_LINKS: {
|
|
[key: string]: {
|
|
itemLevel: "project" | "workspace";
|
|
getLink: (favorite: IFavorite) => string;
|
|
};
|
|
} = {
|
|
project: {
|
|
itemLevel: "project",
|
|
getLink: () => `issues`,
|
|
},
|
|
cycle: {
|
|
itemLevel: "project",
|
|
getLink: (favorite) => `cycles/${favorite.entity_identifier}`,
|
|
},
|
|
module: {
|
|
itemLevel: "project",
|
|
getLink: (favorite) => `modules/${favorite.entity_identifier}`,
|
|
},
|
|
view: {
|
|
itemLevel: "project",
|
|
getLink: (favorite) => `views/${favorite.entity_identifier}`,
|
|
},
|
|
page: {
|
|
itemLevel: "project",
|
|
getLink: (favorite) => `pages/${favorite.entity_identifier}`,
|
|
},
|
|
};
|