chore: migrate fe 250724
This commit is contained in:
parent
5300947c43
commit
12f7762797
|
|
@ -14,6 +14,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
// @ts-nocheck
|
// @ts-nocheck
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
// @ts-nocheck
|
// @ts-nocheck
|
||||||
|
|
|
||||||
|
|
@ -11,14 +11,13 @@
|
||||||
left: 0;
|
left: 0;
|
||||||
|
|
||||||
display: none;
|
display: none;
|
||||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
||||||
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
.btn-container {
|
.btn-container {
|
||||||
display: grid;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.description {
|
.description {
|
||||||
|
|
|
||||||
|
|
@ -21,9 +21,7 @@ import { explore } from '@coze-studio/api-schema';
|
||||||
import { useSpaceList } from '@coze-foundation/space-store';
|
import { useSpaceList } from '@coze-foundation/space-store';
|
||||||
import { I18n } from '@coze-arch/i18n';
|
import { I18n } from '@coze-arch/i18n';
|
||||||
import { Image, Input, Modal, Space, Toast } from '@coze-arch/coze-design';
|
import { Image, Input, Modal, Space, Toast } from '@coze-arch/coze-design';
|
||||||
import { ProductEntityType } from '@coze-arch/bot-api/product_api';
|
import { type ProductEntityType } from '@coze-arch/bot-api/product_api';
|
||||||
|
|
||||||
import { cozeBaseUrl } from '@/const/url';
|
|
||||||
|
|
||||||
import { type CardInfoProps } from '../type';
|
import { type CardInfoProps } from '../type';
|
||||||
import { CardTag } from '../components/tag';
|
import { CardTag } from '../components/tag';
|
||||||
|
|
@ -36,15 +34,6 @@ import styles from './index.module.less';
|
||||||
|
|
||||||
export type TemplateCardProps = ProductInfo;
|
export type TemplateCardProps = ProductInfo;
|
||||||
|
|
||||||
const PATH_MAP: Partial<
|
|
||||||
Record<explore.product_common.ProductEntityType, string>
|
|
||||||
> = {
|
|
||||||
[ProductEntityType.BotTemplate]: 'agent',
|
|
||||||
[ProductEntityType.WorkflowTemplateV2]: 'workflow',
|
|
||||||
[ProductEntityType.ImageflowTemplateV2]: 'workflow',
|
|
||||||
[ProductEntityType.ProjectTemplate]: 'project',
|
|
||||||
};
|
|
||||||
|
|
||||||
export const TemplateCard: FC<TemplateCardProps> = props => {
|
export const TemplateCard: FC<TemplateCardProps> = props => {
|
||||||
const [visible, setVisible] = useState(false);
|
const [visible, setVisible] = useState(false);
|
||||||
return (
|
return (
|
||||||
|
|
@ -64,25 +53,10 @@ export const TemplateCard: FC<TemplateCardProps> = props => {
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setVisible(true);
|
setVisible(true);
|
||||||
}}
|
}}
|
||||||
|
className="w-full"
|
||||||
>
|
>
|
||||||
{I18n.t('copy')}
|
{I18n.t('copy')}
|
||||||
</CardButton>
|
</CardButton>
|
||||||
<CardButton
|
|
||||||
onClick={() => {
|
|
||||||
const pathPrefix = PATH_MAP[props.meta_info.entity_type] || '';
|
|
||||||
const pathSuffix = [
|
|
||||||
ProductEntityType.WorkflowTemplateV2,
|
|
||||||
ProductEntityType.ImageflowTemplateV2,
|
|
||||||
].includes(props.meta_info.entity_type)
|
|
||||||
? `?entity_type=${props.meta_info.entity_type}`
|
|
||||||
: '';
|
|
||||||
window.open(
|
|
||||||
`${cozeBaseUrl}/template/${pathPrefix}/${props.meta_info.id}${pathSuffix}`,
|
|
||||||
);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{I18n.t('plugin_usage_limits_modal_view_details')}
|
|
||||||
</CardButton>
|
|
||||||
</Space>
|
</Space>
|
||||||
</div>
|
</div>
|
||||||
{visible ? (
|
{visible ? (
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ export const LoginPage: FC = () => {
|
||||||
<div className="mt-[12px] flex justify-center">
|
<div className="mt-[12px] flex justify-center">
|
||||||
<a
|
<a
|
||||||
data-testid="login.link.terms"
|
data-testid="login.link.terms"
|
||||||
href="https://spdx.org/licenses/Apache-2.0.html"
|
href="https://github.com/coze-dev/coze-studio?tab=Apache-2.0-1-ov-file"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
className="no-underline coz-fg-hglt"
|
className="no-underline coz-fg-hglt"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue