chore: remove buf es generator

This commit is contained in:
Steven
2023-09-17 20:14:45 +08:00
parent 72ca4e74ee
commit d09e3c3658
30 changed files with 13 additions and 1682 deletions

View File

@ -1,7 +1,7 @@
import { Autocomplete, Button, Input, List, ListItem, Option, Select, Typography } from "@mui/joy";
import React, { useRef, useState } from "react";
import { toast } from "react-hot-toast";
import { Resource } from "@/types/proto/api/v2/resource_service_pb";
import { Resource } from "@/types/proto-grpcweb/api/v2/resource_service";
import { useTranslate } from "@/utils/i18n";
import { useResourceStore } from "../store/module";
import { generateDialog } from "./Dialog";

View File

@ -1,4 +1,4 @@
import { Resource } from "@/types/proto/api/v2/resource_service_pb";
import { Resource } from "@/types/proto-grpcweb/api/v2/resource_service";
import Icon from "../Icon";
import ResourceIcon from "../ResourceIcon";

View File

@ -8,7 +8,7 @@ import { TAB_SPACE_WIDTH, UNKNOWN_ID } from "@/helpers/consts";
import { clearContentQueryParam } from "@/helpers/utils";
import { getMatchedNodes } from "@/labs/marked";
import { useFilterStore, useGlobalStore, useMemoStore, useResourceStore, useTagStore, useUserStore } from "@/store/module";
import { Resource } from "@/types/proto/api/v2/resource_service_pb";
import { Resource } from "@/types/proto-grpcweb/api/v2/resource_service";
import { useTranslate } from "@/utils/i18n";
import showCreateResourceDialog from "../CreateResourceDialog";
import Icon from "../Icon";

View File

@ -1,4 +1,4 @@
import { Resource } from "@/types/proto/api/v2/resource_service_pb";
import { Resource } from "@/types/proto-grpcweb/api/v2/resource_service";
import { getResourceUrl } from "@/utils/resource";
import ResourceIcon from "./ResourceIcon";

View File

@ -1,6 +1,6 @@
import classNames from "classnames";
import { absolutifyLink } from "@/helpers/utils";
import { Resource } from "@/types/proto/api/v2/resource_service_pb";
import { Resource } from "@/types/proto-grpcweb/api/v2/resource_service";
import { getResourceType, getResourceUrl } from "@/utils/resource";
import MemoResource from "./MemoResource";
import showPreviewImageDialog from "./PreviewImageDialog";

View File

@ -1,23 +0,0 @@
import { getDateTimeString } from "@/helpers/datetime";
import { Resource } from "@/types/proto/api/v2/resource_service_pb";
import ResourceIcon from "./ResourceIcon";
interface Props {
resource: Resource;
}
const ResourceCard = ({ resource }: Props) => {
return (
<div className="w-full p-2 relative flex flex-col justify-start hover:shadow hover:bg-slate-200 dark:hover:bg-slate-600 rounded-md">
<div className="w-full flex flex-row justify-center items-center pb-2 pt-4 px-2">
<ResourceIcon resource={resource} strokeWidth={0.5} />
</div>
<div className="w-full flex flex-col justify-start items-center px-1 select-none">
<div className="w-full text-base text-center text-ellipsis overflow-hidden line-clamp-3">{resource.filename}</div>
<div className="text-xs text-gray-400 text-center">{getDateTimeString(resource.createdTs)}</div>
</div>
</div>
);
};
export default ResourceCard;

View File

@ -1,6 +1,6 @@
import classNames from "classnames";
import React from "react";
import { Resource } from "@/types/proto/api/v2/resource_service_pb";
import { Resource } from "@/types/proto-grpcweb/api/v2/resource_service";
import { getResourceType, getResourceUrl } from "@/utils/resource";
import Icon from "./Icon";
import showPreviewImageDialog from "./PreviewImageDialog";

View File

@ -4,7 +4,7 @@ import copy from "copy-to-clipboard";
import { useEffect, useState } from "react";
import { toast } from "react-hot-toast";
import useCurrentUser from "@/hooks/useCurrentUser";
import { ListUserAccessTokensResponse, UserAccessToken } from "@/types/proto/api/v2/user_service_pb";
import { ListUserAccessTokensResponse, UserAccessToken } from "@/types/proto-grpcweb/api/v2/user_service";
import { useTranslate } from "@/utils/i18n";
import showCreateAccessTokenDialog from "../CreateAccessTokenDialog";
import { showCommonDialog } from "../Dialog/CommonDialog";