mirror of
https://github.com/aykhans/slash-e.git
synced 2025-04-17 20:55:28 +00:00
refactor: update imports
This commit is contained in:
parent
905b962e0b
commit
8649e562dc
@ -1,9 +1,8 @@
|
|||||||
import { useColorScheme } from "@mui/joy";
|
import { useColorScheme } from "@mui/joy";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { Outlet } from "react-router-dom";
|
import { Outlet } from "react-router-dom";
|
||||||
import DemoBanner from "./components/DemoBanner";
|
import DemoBanner from "@/components/DemoBanner";
|
||||||
import useUserStore from "./stores/v1/user";
|
import { useUserStore, useWorkspaceStore } from "@/stores";
|
||||||
import useWorkspaceStore from "./stores/v1/workspace";
|
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
const { mode: colorScheme } = useColorScheme();
|
const { mode: colorScheme } = useColorScheme();
|
||||||
|
@ -2,8 +2,8 @@ import { Button, Input, Modal, ModalDialog } from "@mui/joy";
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { toast } from "react-hot-toast";
|
import { toast } from "react-hot-toast";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import useLoading from "../hooks/useLoading";
|
import useLoading from "@/hooks/useLoading";
|
||||||
import useUserStore from "../stores/v1/user";
|
import { useUserStore } from "@/stores";
|
||||||
import Icon from "./Icon";
|
import Icon from "./Icon";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
@ -7,9 +7,7 @@ import { Link } from "react-router-dom";
|
|||||||
import { absolutifyLink } from "@/helpers/utils";
|
import { absolutifyLink } from "@/helpers/utils";
|
||||||
import useNavigateTo from "@/hooks/useNavigateTo";
|
import useNavigateTo from "@/hooks/useNavigateTo";
|
||||||
import useResponsiveWidth from "@/hooks/useResponsiveWidth";
|
import useResponsiveWidth from "@/hooks/useResponsiveWidth";
|
||||||
import useCollectionStore from "@/stores/v1/collection";
|
import { useCollectionStore, useShortcutStore, useUserStore } from "@/stores";
|
||||||
import useShortcutStore from "@/stores/v1/shortcut";
|
|
||||||
import useUserStore from "@/stores/v1/user";
|
|
||||||
import { Collection } from "@/types/proto/api/v1/collection_service";
|
import { Collection } from "@/types/proto/api/v1/collection_service";
|
||||||
import { Shortcut } from "@/types/proto/api/v1/shortcut_service";
|
import { Shortcut } from "@/types/proto/api/v1/shortcut_service";
|
||||||
import { showCommonDialog } from "./Alert";
|
import { showCommonDialog } from "./Alert";
|
||||||
|
@ -3,8 +3,8 @@ import { useState } from "react";
|
|||||||
import { toast } from "react-hot-toast";
|
import { toast } from "react-hot-toast";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { userServiceClient } from "@/grpcweb";
|
import { userServiceClient } from "@/grpcweb";
|
||||||
|
import { useUserStore } from "@/stores";
|
||||||
import useLoading from "../hooks/useLoading";
|
import useLoading from "../hooks/useLoading";
|
||||||
import useUserStore from "../stores/v1/user";
|
|
||||||
import Icon from "./Icon";
|
import Icon from "./Icon";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
@ -3,14 +3,12 @@ import { isUndefined } from "lodash-es";
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { toast } from "react-hot-toast";
|
import { toast } from "react-hot-toast";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import useCollectionStore from "@/stores/v1/collection";
|
import useLoading from "@/hooks/useLoading";
|
||||||
import useShortcutStore from "@/stores/v1/shortcut";
|
import { useCollectionStore, useShortcutStore, useWorkspaceStore } from "@/stores";
|
||||||
import useWorkspaceStore from "@/stores/v1/workspace";
|
|
||||||
import { Collection } from "@/types/proto/api/v1/collection_service";
|
import { Collection } from "@/types/proto/api/v1/collection_service";
|
||||||
import { Visibility } from "@/types/proto/api/v1/common";
|
import { Visibility } from "@/types/proto/api/v1/common";
|
||||||
import { Shortcut } from "@/types/proto/api/v1/shortcut_service";
|
import { Shortcut } from "@/types/proto/api/v1/shortcut_service";
|
||||||
import { convertVisibilityFromPb } from "@/utils/visibility";
|
import { convertVisibilityFromPb } from "@/utils/visibility";
|
||||||
import useLoading from "../hooks/useLoading";
|
|
||||||
import Icon from "./Icon";
|
import Icon from "./Icon";
|
||||||
import ShortcutView from "./ShortcutView";
|
import ShortcutView from "./ShortcutView";
|
||||||
|
|
||||||
|
@ -16,12 +16,12 @@ import { isUndefined, uniq } from "lodash-es";
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { toast } from "react-hot-toast";
|
import { toast } from "react-hot-toast";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import useShortcutStore, { getShortcutUpdateMask } from "@/stores/v1/shortcut";
|
import useLoading from "@/hooks/useLoading";
|
||||||
import useWorkspaceStore from "@/stores/v1/workspace";
|
import { useWorkspaceStore, useShortcutStore } from "@/stores";
|
||||||
|
import { getShortcutUpdateMask } from "@/stores/shortcut";
|
||||||
import { Visibility } from "@/types/proto/api/v1/common";
|
import { Visibility } from "@/types/proto/api/v1/common";
|
||||||
import { Shortcut } from "@/types/proto/api/v1/shortcut_service";
|
import { Shortcut } from "@/types/proto/api/v1/shortcut_service";
|
||||||
import { convertVisibilityFromPb } from "@/utils/visibility";
|
import { convertVisibilityFromPb } from "@/utils/visibility";
|
||||||
import useLoading from "../hooks/useLoading";
|
|
||||||
import Icon from "./Icon";
|
import Icon from "./Icon";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
@ -3,9 +3,9 @@ import { isUndefined } from "lodash-es";
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { toast } from "react-hot-toast";
|
import { toast } from "react-hot-toast";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
import useLoading from "@/hooks/useLoading";
|
||||||
|
import { useUserStore } from "@/stores";
|
||||||
import { Role, User } from "@/types/proto/api/v1/user_service";
|
import { Role, User } from "@/types/proto/api/v1/user_service";
|
||||||
import useLoading from "../hooks/useLoading";
|
|
||||||
import useUserStore from "../stores/v1/user";
|
|
||||||
import Icon from "./Icon";
|
import Icon from "./Icon";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import useWorkspaceStore from "@/stores/v1/workspace";
|
import { useWorkspaceStore } from "@/stores";
|
||||||
import Icon from "./Icon";
|
import Icon from "./Icon";
|
||||||
|
|
||||||
const DemoBanner: React.FC = () => {
|
const DemoBanner: React.FC = () => {
|
||||||
|
@ -2,8 +2,8 @@ import { Button, Input, Modal, ModalDialog } from "@mui/joy";
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { toast } from "react-hot-toast";
|
import { toast } from "react-hot-toast";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import useLoading from "../hooks/useLoading";
|
import useLoading from "@/hooks/useLoading";
|
||||||
import useUserStore from "../stores/v1/user";
|
import { useUserStore } from "@/stores";
|
||||||
import Icon from "./Icon";
|
import Icon from "./Icon";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { useViewStore } from "@/stores";
|
||||||
import { convertVisibilityFromPb } from "@/utils/visibility";
|
import { convertVisibilityFromPb } from "@/utils/visibility";
|
||||||
import useViewStore from "../stores/v1/view";
|
|
||||||
import Icon from "./Icon";
|
import Icon from "./Icon";
|
||||||
import VisibilityIcon from "./VisibilityIcon";
|
import VisibilityIcon from "./VisibilityIcon";
|
||||||
|
|
||||||
|
@ -3,10 +3,9 @@ import { useState } from "react";
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { Link, useLocation } from "react-router-dom";
|
import { Link, useLocation } from "react-router-dom";
|
||||||
import { authServiceClient } from "@/grpcweb";
|
import { authServiceClient } from "@/grpcweb";
|
||||||
import useWorkspaceStore from "@/stores/v1/workspace";
|
import { useWorkspaceStore, useUserStore } from "@/stores";
|
||||||
import { PlanType } from "@/types/proto/api/v1/subscription_service";
|
import { PlanType } from "@/types/proto/api/v1/subscription_service";
|
||||||
import { Role } from "@/types/proto/api/v1/user_service";
|
import { Role } from "@/types/proto/api/v1/user_service";
|
||||||
import useUserStore from "../stores/v1/user";
|
|
||||||
import AboutDialog from "./AboutDialog";
|
import AboutDialog from "./AboutDialog";
|
||||||
import Icon from "./Icon";
|
import Icon from "./Icon";
|
||||||
import Dropdown from "./common/Dropdown";
|
import Dropdown from "./common/Dropdown";
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import useNavigateTo from "@/hooks/useNavigateTo";
|
import useNavigateTo from "@/hooks/useNavigateTo";
|
||||||
import useShortcutStore from "@/stores/v1/shortcut";
|
import { useShortcutStore, useUserStore } from "@/stores";
|
||||||
import { Shortcut } from "@/types/proto/api/v1/shortcut_service";
|
import { Shortcut } from "@/types/proto/api/v1/shortcut_service";
|
||||||
import { Role } from "@/types/proto/api/v1/user_service";
|
import { Role } from "@/types/proto/api/v1/user_service";
|
||||||
import useUserStore from "../stores/v1/user";
|
|
||||||
import { showCommonDialog } from "./Alert";
|
import { showCommonDialog } from "./Alert";
|
||||||
import CreateShortcutDrawer from "./CreateShortcutDrawer";
|
import CreateShortcutDrawer from "./CreateShortcutDrawer";
|
||||||
import GenerateQRCodeDialog from "./GenerateQRCodeDialog";
|
import GenerateQRCodeDialog from "./GenerateQRCodeDialog";
|
||||||
|
@ -5,11 +5,10 @@ import { useEffect } from "react";
|
|||||||
import toast from "react-hot-toast";
|
import toast from "react-hot-toast";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import useUserStore from "@/stores/v1/user";
|
import { useUserStore, useViewStore } from "@/stores";
|
||||||
import { Shortcut } from "@/types/proto/api/v1/shortcut_service";
|
import { Shortcut } from "@/types/proto/api/v1/shortcut_service";
|
||||||
import { convertVisibilityFromPb } from "@/utils/visibility";
|
import { convertVisibilityFromPb } from "@/utils/visibility";
|
||||||
import { absolutifyLink, getFaviconWithGoogleS2 } from "../helpers/utils";
|
import { absolutifyLink, getFaviconWithGoogleS2 } from "../helpers/utils";
|
||||||
import useViewStore from "../stores/v1/view";
|
|
||||||
import Icon from "./Icon";
|
import Icon from "./Icon";
|
||||||
import ShortcutActionsDropdown from "./ShortcutActionsDropdown";
|
import ShortcutActionsDropdown from "./ShortcutActionsDropdown";
|
||||||
import VisibilityIcon from "./VisibilityIcon";
|
import VisibilityIcon from "./VisibilityIcon";
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import useNavigateTo from "@/hooks/useNavigateTo";
|
import useNavigateTo from "@/hooks/useNavigateTo";
|
||||||
|
import { useViewStore } from "@/stores";
|
||||||
import { Shortcut } from "@/types/proto/api/v1/shortcut_service";
|
import { Shortcut } from "@/types/proto/api/v1/shortcut_service";
|
||||||
import useViewStore from "../stores/v1/view";
|
|
||||||
import ShortcutCard from "./ShortcutCard";
|
import ShortcutCard from "./ShortcutCard";
|
||||||
import ShortcutView from "./ShortcutView";
|
import ShortcutView from "./ShortcutView";
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import useShortcutStore from "@/stores/v1/shortcut";
|
import { useShortcutStore, useViewStore } from "@/stores";
|
||||||
import useViewStore from "../stores/v1/view";
|
|
||||||
import Icon from "./Icon";
|
import Icon from "./Icon";
|
||||||
|
|
||||||
const ShortcutsNavigator = () => {
|
const ShortcutsNavigator = () => {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Divider, Option, Select, Switch } from "@mui/joy";
|
import { Divider, Option, Select, Switch } from "@mui/joy";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import useViewStore from "../stores/v1/view";
|
import { useViewStore } from "@/stores";
|
||||||
import Icon from "./Icon";
|
import Icon from "./Icon";
|
||||||
import Dropdown from "./common/Dropdown";
|
import Dropdown from "./common/Dropdown";
|
||||||
|
|
||||||
|
@ -4,8 +4,8 @@ import { useEffect, useState } from "react";
|
|||||||
import { toast } from "react-hot-toast";
|
import { toast } from "react-hot-toast";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { userServiceClient } from "@/grpcweb";
|
import { userServiceClient } from "@/grpcweb";
|
||||||
|
import { useUserStore } from "@/stores";
|
||||||
import { UserAccessToken } from "@/types/proto/api/v1/user_service";
|
import { UserAccessToken } from "@/types/proto/api/v1/user_service";
|
||||||
import useUserStore from "../../stores/v1/user";
|
|
||||||
import { showCommonDialog } from "../Alert";
|
import { showCommonDialog } from "../Alert";
|
||||||
import CreateAccessTokenDialog from "../CreateAccessTokenDialog";
|
import CreateAccessTokenDialog from "../CreateAccessTokenDialog";
|
||||||
import Icon from "../Icon";
|
import Icon from "../Icon";
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { Button } from "@mui/joy";
|
import { Button } from "@mui/joy";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { useUserStore } from "@/stores";
|
||||||
import { Role } from "@/types/proto/api/v1/user_service";
|
import { Role } from "@/types/proto/api/v1/user_service";
|
||||||
import useUserStore from "../../stores/v1/user";
|
|
||||||
import ChangePasswordDialog from "../ChangePasswordDialog";
|
import ChangePasswordDialog from "../ChangePasswordDialog";
|
||||||
import EditUserinfoDialog from "../EditUserinfoDialog";
|
import EditUserinfoDialog from "../EditUserinfoDialog";
|
||||||
|
|
||||||
|
@ -2,9 +2,9 @@ import { Button, IconButton } from "@mui/joy";
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import toast from "react-hot-toast";
|
import toast from "react-hot-toast";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { useUserStore } from "@/stores";
|
||||||
import { User } from "@/types/proto/api/v1/user_service";
|
import { User } from "@/types/proto/api/v1/user_service";
|
||||||
import { convertRoleFromPb } from "@/utils/user";
|
import { convertRoleFromPb } from "@/utils/user";
|
||||||
import useUserStore from "../../stores/v1/user";
|
|
||||||
import { showCommonDialog } from "../Alert";
|
import { showCommonDialog } from "../Alert";
|
||||||
import CreateUserDialog from "../CreateUserDialog";
|
import CreateUserDialog from "../CreateUserDialog";
|
||||||
import Icon from "../Icon";
|
import Icon from "../Icon";
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { Option, Select } from "@mui/joy";
|
import { Option, Select } from "@mui/joy";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { useUserStore } from "@/stores";
|
||||||
import { UserSetting, UserSetting_ColorTheme, UserSetting_Locale } from "@/types/proto/api/v1/user_setting_service";
|
import { UserSetting, UserSetting_ColorTheme, UserSetting_Locale } from "@/types/proto/api/v1/user_setting_service";
|
||||||
import useUserStore from "../../stores/v1/user";
|
|
||||||
import BetaBadge from "../BetaBadge";
|
import BetaBadge from "../BetaBadge";
|
||||||
|
|
||||||
const PreferenceSection: React.FC = () => {
|
const PreferenceSection: React.FC = () => {
|
||||||
|
@ -4,7 +4,7 @@ import { useRef, useState } from "react";
|
|||||||
import toast from "react-hot-toast";
|
import toast from "react-hot-toast";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { workspaceServiceClient } from "@/grpcweb";
|
import { workspaceServiceClient } from "@/grpcweb";
|
||||||
import useWorkspaceStore from "@/stores/v1/workspace";
|
import { useWorkspaceStore } from "@/stores";
|
||||||
import { Visibility } from "@/types/proto/api/v1/common";
|
import { Visibility } from "@/types/proto/api/v1/common";
|
||||||
import { WorkspaceSetting } from "@/types/proto/api/v1/workspace_service";
|
import { WorkspaceSetting } from "@/types/proto/api/v1/workspace_service";
|
||||||
|
|
||||||
|
@ -3,11 +3,11 @@ import { isEqual } from "lodash-es";
|
|||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { Outlet } from "react-router-dom";
|
import { Outlet } from "react-router-dom";
|
||||||
|
import Header from "@/components/Header";
|
||||||
import Navigator from "@/components/Navigator";
|
import Navigator from "@/components/Navigator";
|
||||||
import useNavigateTo from "@/hooks/useNavigateTo";
|
import useNavigateTo from "@/hooks/useNavigateTo";
|
||||||
|
import { useUserStore } from "@/stores";
|
||||||
import { UserSetting_ColorTheme, UserSetting_Locale } from "@/types/proto/api/v1/user_setting_service";
|
import { UserSetting_ColorTheme, UserSetting_Locale } from "@/types/proto/api/v1/user_setting_service";
|
||||||
import Header from "../components/Header";
|
|
||||||
import useUserStore from "../stores/v1/user";
|
|
||||||
|
|
||||||
const Root: React.FC = () => {
|
const Root: React.FC = () => {
|
||||||
const navigateTo = useNavigateTo();
|
const navigateTo = useNavigateTo();
|
||||||
|
@ -3,8 +3,7 @@ import { useEffect, useState } from "react";
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import CollectionView from "@/components/CollectionView";
|
import CollectionView from "@/components/CollectionView";
|
||||||
import CreateCollectionDrawer from "@/components/CreateCollectionDrawer";
|
import CreateCollectionDrawer from "@/components/CreateCollectionDrawer";
|
||||||
import useCollectionStore from "@/stores/v1/collection";
|
import { useShortcutStore, useCollectionStore } from "@/stores";
|
||||||
import useShortcutStore from "@/stores/v1/shortcut";
|
|
||||||
import FilterView from "../components/FilterView";
|
import FilterView from "../components/FilterView";
|
||||||
import Icon from "../components/Icon";
|
import Icon from "../components/Icon";
|
||||||
import useLoading from "../hooks/useLoading";
|
import useLoading from "../hooks/useLoading";
|
||||||
|
@ -7,9 +7,7 @@ import Icon from "@/components/Icon";
|
|||||||
import ShortcutFrame from "@/components/ShortcutFrame";
|
import ShortcutFrame from "@/components/ShortcutFrame";
|
||||||
import ShortcutView from "@/components/ShortcutView";
|
import ShortcutView from "@/components/ShortcutView";
|
||||||
import useResponsiveWidth from "@/hooks/useResponsiveWidth";
|
import useResponsiveWidth from "@/hooks/useResponsiveWidth";
|
||||||
import useCollectionStore from "@/stores/v1/collection";
|
import { useUserStore, useCollectionStore, useShortcutStore } from "@/stores";
|
||||||
import useShortcutStore from "@/stores/v1/shortcut";
|
|
||||||
import useUserStore from "@/stores/v1/user";
|
|
||||||
import { Collection } from "@/types/proto/api/v1/collection_service";
|
import { Collection } from "@/types/proto/api/v1/collection_service";
|
||||||
import { Shortcut } from "@/types/proto/api/v1/shortcut_service";
|
import { Shortcut } from "@/types/proto/api/v1/shortcut_service";
|
||||||
|
|
||||||
|
@ -1,16 +1,15 @@
|
|||||||
import { Button, Input } from "@mui/joy";
|
import { Button, Input } from "@mui/joy";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import useShortcutStore from "@/stores/v1/shortcut";
|
import CreateShortcutDrawer from "@/components/CreateShortcutDrawer";
|
||||||
import CreateShortcutDrawer from "../components/CreateShortcutDrawer";
|
import FilterView from "@/components/FilterView";
|
||||||
import FilterView from "../components/FilterView";
|
import Icon from "@/components/Icon";
|
||||||
import Icon from "../components/Icon";
|
import ShortcutsContainer from "@/components/ShortcutsContainer";
|
||||||
import ShortcutsContainer from "../components/ShortcutsContainer";
|
import ShortcutsNavigator from "@/components/ShortcutsNavigator";
|
||||||
import ShortcutsNavigator from "../components/ShortcutsNavigator";
|
import ViewSetting from "@/components/ViewSetting";
|
||||||
import ViewSetting from "../components/ViewSetting";
|
import useLoading from "@/hooks/useLoading";
|
||||||
import useLoading from "../hooks/useLoading";
|
import { useShortcutStore, useUserStore, useViewStore } from "@/stores";
|
||||||
import useUserStore from "../stores/v1/user";
|
import { getFilteredShortcutList, getOrderedShortcutList } from "@/stores/view";
|
||||||
import useViewStore, { getFilteredShortcutList, getOrderedShortcutList } from "../stores/v1/view";
|
|
||||||
|
|
||||||
interface State {
|
interface State {
|
||||||
showCreateShortcutDrawer: boolean;
|
showCreateShortcutDrawer: boolean;
|
||||||
|
@ -7,7 +7,7 @@ import { useTranslation } from "react-i18next";
|
|||||||
import { useParams } from "react-router-dom";
|
import { useParams } from "react-router-dom";
|
||||||
import useLoading from "@/hooks/useLoading";
|
import useLoading from "@/hooks/useLoading";
|
||||||
import useNavigateTo from "@/hooks/useNavigateTo";
|
import useNavigateTo from "@/hooks/useNavigateTo";
|
||||||
import useShortcutStore from "@/stores/v1/shortcut";
|
import { useUserStore, useShortcutStore } from "@/stores";
|
||||||
import { Shortcut } from "@/types/proto/api/v1/shortcut_service";
|
import { Shortcut } from "@/types/proto/api/v1/shortcut_service";
|
||||||
import { Role } from "@/types/proto/api/v1/user_service";
|
import { Role } from "@/types/proto/api/v1/user_service";
|
||||||
import { convertVisibilityFromPb } from "@/utils/visibility";
|
import { convertVisibilityFromPb } from "@/utils/visibility";
|
||||||
@ -19,7 +19,6 @@ import Icon from "../components/Icon";
|
|||||||
import VisibilityIcon from "../components/VisibilityIcon";
|
import VisibilityIcon from "../components/VisibilityIcon";
|
||||||
import Dropdown from "../components/common/Dropdown";
|
import Dropdown from "../components/common/Dropdown";
|
||||||
import { absolutifyLink, getFaviconWithGoogleS2 } from "../helpers/utils";
|
import { absolutifyLink, getFaviconWithGoogleS2 } from "../helpers/utils";
|
||||||
import useUserStore from "../stores/v1/user";
|
|
||||||
|
|
||||||
interface State {
|
interface State {
|
||||||
showEditDrawer: boolean;
|
showEditDrawer: boolean;
|
||||||
|
@ -5,8 +5,7 @@ import { useParams } from "react-router-dom";
|
|||||||
import CreateShortcutDrawer from "@/components/CreateShortcutDrawer";
|
import CreateShortcutDrawer from "@/components/CreateShortcutDrawer";
|
||||||
import { isURL } from "@/helpers/utils";
|
import { isURL } from "@/helpers/utils";
|
||||||
import useNavigateTo from "@/hooks/useNavigateTo";
|
import useNavigateTo from "@/hooks/useNavigateTo";
|
||||||
import useShortcutStore from "@/stores/v1/shortcut";
|
import { useShortcutStore, useUserStore } from "@/stores";
|
||||||
import useUserStore from "@/stores/v1/user";
|
|
||||||
import { Shortcut } from "@/types/proto/api/v1/shortcut_service";
|
import { Shortcut } from "@/types/proto/api/v1/shortcut_service";
|
||||||
|
|
||||||
const ShortcutSpace = () => {
|
const ShortcutSpace = () => {
|
||||||
|
@ -6,8 +6,7 @@ import { Link } from "react-router-dom";
|
|||||||
import Icon from "@/components/Icon";
|
import Icon from "@/components/Icon";
|
||||||
import { authServiceClient } from "@/grpcweb";
|
import { authServiceClient } from "@/grpcweb";
|
||||||
import useNavigateTo from "@/hooks/useNavigateTo";
|
import useNavigateTo from "@/hooks/useNavigateTo";
|
||||||
import useUserStore from "@/stores/v1/user";
|
import { useUserStore, useWorkspaceStore } from "@/stores";
|
||||||
import useWorkspaceStore from "@/stores/v1/workspace";
|
|
||||||
import useLoading from "../hooks/useLoading";
|
import useLoading from "../hooks/useLoading";
|
||||||
|
|
||||||
const SignIn: React.FC = () => {
|
const SignIn: React.FC = () => {
|
||||||
|
@ -6,8 +6,7 @@ import { Link } from "react-router-dom";
|
|||||||
import Icon from "@/components/Icon";
|
import Icon from "@/components/Icon";
|
||||||
import { authServiceClient } from "@/grpcweb";
|
import { authServiceClient } from "@/grpcweb";
|
||||||
import useNavigateTo from "@/hooks/useNavigateTo";
|
import useNavigateTo from "@/hooks/useNavigateTo";
|
||||||
import useUserStore from "@/stores/v1/user";
|
import { useUserStore, useWorkspaceStore } from "@/stores";
|
||||||
import useWorkspaceStore from "@/stores/v1/workspace";
|
|
||||||
import useLoading from "../hooks/useLoading";
|
import useLoading from "../hooks/useLoading";
|
||||||
|
|
||||||
const SignUp: React.FC = () => {
|
const SignUp: React.FC = () => {
|
||||||
|
@ -4,11 +4,10 @@ import toast from "react-hot-toast";
|
|||||||
import Icon from "@/components/Icon";
|
import Icon from "@/components/Icon";
|
||||||
import SubscriptionFAQ from "@/components/SubscriptionFAQ";
|
import SubscriptionFAQ from "@/components/SubscriptionFAQ";
|
||||||
import { subscriptionServiceClient } from "@/grpcweb";
|
import { subscriptionServiceClient } from "@/grpcweb";
|
||||||
import { stringifyPlanType } from "@/stores/v1/subscription";
|
import { useUserStore, useWorkspaceStore } from "@/stores";
|
||||||
import useWorkspaceStore from "@/stores/v1/workspace";
|
import { stringifyPlanType } from "@/stores/subscription";
|
||||||
import { PlanType } from "@/types/proto/api/v1/subscription_service";
|
import { PlanType } from "@/types/proto/api/v1/subscription_service";
|
||||||
import { Role } from "@/types/proto/api/v1/user_service";
|
import { Role } from "@/types/proto/api/v1/user_service";
|
||||||
import useUserStore from "../stores/v1/user";
|
|
||||||
|
|
||||||
const SubscriptionSetting: React.FC = () => {
|
const SubscriptionSetting: React.FC = () => {
|
||||||
const workspaceStore = useWorkspaceStore();
|
const workspaceStore = useWorkspaceStore();
|
||||||
|
@ -2,12 +2,11 @@ import { Alert, Button } from "@mui/joy";
|
|||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import Icon from "@/components/Icon";
|
import Icon from "@/components/Icon";
|
||||||
import { stringifyPlanType } from "@/stores/v1/subscription";
|
import { useUserStore, useWorkspaceStore } from "@/stores";
|
||||||
import useWorkspaceStore from "@/stores/v1/workspace";
|
import { stringifyPlanType } from "@/stores/subscription";
|
||||||
import { Role } from "@/types/proto/api/v1/user_service";
|
import { Role } from "@/types/proto/api/v1/user_service";
|
||||||
import MemberSection from "../components/setting/MemberSection";
|
import MemberSection from "../components/setting/MemberSection";
|
||||||
import WorkspaceSection from "../components/setting/WorkspaceSection";
|
import WorkspaceSection from "../components/setting/WorkspaceSection";
|
||||||
import useUserStore from "../stores/v1/user";
|
|
||||||
|
|
||||||
const WorkspaceSetting: React.FC = () => {
|
const WorkspaceSetting: React.FC = () => {
|
||||||
const workspaceStore = useWorkspaceStore();
|
const workspaceStore = useWorkspaceStore();
|
||||||
|
7
frontend/web/src/stores/index.ts
Normal file
7
frontend/web/src/stores/index.ts
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import useCollectionStore from "./collection";
|
||||||
|
import useShortcutStore from "./shortcut";
|
||||||
|
import useUserStore from "./user";
|
||||||
|
import useViewStore from "./view";
|
||||||
|
import useWorkspaceStore from "./workspace";
|
||||||
|
|
||||||
|
export { useUserStore, useCollectionStore, useShortcutStore, useViewStore, useWorkspaceStore };
|
Loading…
x
Reference in New Issue
Block a user