1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 04:46:40 +07:00

Добавили заметки в сайдбар (#126)

* added notes sidebar

* added note dropping and editing

* added sidebar navigation

* handling sidebarchanges over time

* using router back for closing sidebar

* fixed tripping inside single sidebar

* added superpowers toggle to sidebar

* user button opens sidebar now

* added profile cover for profile sidebar

* removed profile sidebar completely

* ran prettier over project

* added note not found error literal
This commit is contained in:
muerwre 2022-08-12 14:07:19 +07:00 committed by GitHub
parent fe3db608d6
commit 5d34090238
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
72 changed files with 1241 additions and 664 deletions

View file

@ -1,48 +1,49 @@
import { FlowDisplayVariant, INode } from '~/types';
import { FlowDisplayVariant, INode } from "~/types";
export const URLS = {
BASE: '/',
LAB: '/lab',
BORIS: '/boris',
BASE: "/",
LAB: "/lab",
BORIS: "/boris",
AUTH: {
LOGIN: '/auth/login',
LOGIN: "/auth/login",
},
EXAMPLES: {
EDITOR: '/examples/edit',
IMAGE: '/examples/image',
EDITOR: "/examples/edit",
IMAGE: "/examples/image",
},
ERRORS: {
NOT_FOUND: '/lost',
BACKEND_DOWN: '/oopsie',
NOT_FOUND: "/lost",
BACKEND_DOWN: "/oopsie",
},
NODE_URL: (id: INode['id'] | string) => `/post${id}`,
NODE_URL: (id: INode["id"] | string) => `/post${id}`,
PROFILE_PAGE: (username: string) => `/profile/${username}`,
SETTINGS: {
BASE: '/settings',
NOTES: '/settings/notes',
TRASH: '/settings/trash',
BASE: "/settings",
NOTES: "/settings/notes",
TRASH: "/settings/trash",
},
NOTES: '/notes/',
NOTES: "/notes/",
NOTE: (id: number) => `/notes/${id}`,
};
export const ImagePresets = {
'1600': '1600',
'600': '600',
'300': '300',
cover: 'cover',
small_hero: 'small_hero',
avatar: 'avatar',
flow_square: 'flow_square',
flow_vertical: 'flow_vertical',
flow_horizontal: 'flow_horizontal',
"1600": "1600",
"600": "600",
"300": "300",
cover: "cover",
small_hero: "small_hero",
avatar: "avatar",
flow_square: "flow_square",
flow_vertical: "flow_vertical",
flow_horizontal: "flow_horizontal",
} as const;
export const flowDisplayToPreset: Record<
FlowDisplayVariant,
typeof ImagePresets[keyof typeof ImagePresets]
> = {
single: 'flow_square',
quadro: 'flow_square',
vertical: 'flow_vertical',
horizontal: 'flow_horizontal',
single: "flow_square",
quadro: "flow_square",
vertical: "flow_vertical",
horizontal: "flow_horizontal",
};