mirror of
https://github.com/APIParkLab/APIPark.git
synced 2026-06-12 18:11:34 +08:00
frontend:服务详情宽度
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 3.9 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 3.9 KiB |
@@ -2,7 +2,8 @@ import {
|
||||
ConfigProvider,
|
||||
Dropdown,
|
||||
MenuProps,
|
||||
App} from 'antd';
|
||||
App,
|
||||
Button} from 'antd';
|
||||
import Logo from '@common/assets/layout-logo.png';
|
||||
import AvatarPic from '@common/assets/default-avatar.png'
|
||||
import { routerKeyMap, TOTAL_MENU_ITEMS } from "./Navigation";
|
||||
@@ -19,6 +20,8 @@ import { ResetPsw, ResetPswHandle } from './ResetPsw.tsx';
|
||||
import { BasicResponse, STATUS_CODE } from '@common/const/const.ts';
|
||||
import { UserInfoType, UserProfileHandle } from '@common/const/type.ts';
|
||||
import { useFetch } from '@common/hooks/http.ts';
|
||||
import { QuestionCircleOutlined } from '@ant-design/icons';
|
||||
import { Icon } from '@iconify/react/dist/iconify.js';
|
||||
|
||||
const themeToken = {
|
||||
bgLayout:'#17163E;',
|
||||
@@ -125,18 +128,16 @@ const themeToken = {
|
||||
{
|
||||
key: '2',
|
||||
label: (
|
||||
<a target="_blank" rel="noopener noreferrer" onClick={()=>navigator('/userProfile/changepsw')}>
|
||||
账号设置
|
||||
</a>
|
||||
),
|
||||
<Button key="changePsw" type="text" className="border-none p-0 flex items-center bg-transparent " onClick={()=>navigator('/userProfile/changepsw')}>
|
||||
账号设置
|
||||
</Button>)
|
||||
},
|
||||
{
|
||||
key: '3',
|
||||
label: (
|
||||
<a className="block leading-[32px]" target="_blank" rel="noopener noreferrer" onClick={logOut}>
|
||||
退出登录
|
||||
</a>
|
||||
),
|
||||
<Button key="logout" type="text" className="border-none p-0 flex items-center bg-transparent " onClick={logOut}>
|
||||
退出登录
|
||||
</Button>)
|
||||
},
|
||||
];
|
||||
|
||||
@@ -218,19 +219,19 @@ const themeToken = {
|
||||
);
|
||||
},
|
||||
}}
|
||||
// actionsRender={(props) => {
|
||||
// if (props.isMobile) return [];
|
||||
// if (typeof window === 'undefined') return [];
|
||||
// return [
|
||||
// <Button className="mr-[20px]">
|
||||
// <span className='flex items-center'><QuestionCircleOutlined className="mr-[4px]" />帮助文档</span>
|
||||
// </Button>
|
||||
// ];
|
||||
// }}
|
||||
actionsRender={(props) => {
|
||||
if (props.isMobile) return [];
|
||||
if (typeof window === 'undefined') return [];
|
||||
return [
|
||||
<Button className=" text-[#ffffffb3] hover:text-[#fff] border-none" type="default" ghost onClick={()=>{window.open('https://docs.apipark.com','_blank')}}>
|
||||
<span className='flex items-center gap-[8px]'> <Icon icon="ic:baseline-help" width="14" height="14"/>文档</span>
|
||||
</Button>
|
||||
];
|
||||
}}
|
||||
headerTitleRender={() => (
|
||||
<div className="w-[192px] flex items-center">
|
||||
<img
|
||||
className="h-[20px] cursor-pointer"
|
||||
className="h-[20px] cursor-pointer "
|
||||
src={Logo}
|
||||
onClick={()=> navigator(mainPage)}
|
||||
/>
|
||||
|
||||
@@ -73,7 +73,7 @@ export const ResetPsw = forwardRef<ResetPswHandle,ResetPswProps>((props,ref)=>{
|
||||
layout='vertical'
|
||||
form={form}
|
||||
scrollToFirstError
|
||||
className="mx-auto mt-mbase "
|
||||
className="mx-auto mt-mbase ml-mbase"
|
||||
name="resetPsw"
|
||||
// labelCol={{ span: 8 }}
|
||||
// wrapperCol={{ span: 10}}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.7 KiB |
@@ -80,7 +80,7 @@
|
||||
.apipark-layout-layout{
|
||||
|
||||
.apipark-layout-layout-bg-list{
|
||||
background:#17163E;
|
||||
background-image: radial-gradient(circle farthest-corner at 450px 350px, #050eb7, #17163e 500px);
|
||||
}
|
||||
.ant-layout-header.apipark-layout-layout-header{
|
||||
backdrop-filter: unset !important;
|
||||
|
||||
@@ -732,11 +732,17 @@ p{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.ant-drawer-footer{
|
||||
padding:16px 20px !important
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.ant-modal-body .pr-PAGE_INSIDE_X{
|
||||
padding-right: 0 !important;
|
||||
}
|
||||
|
||||
.g6-tooltip {
|
||||
padding: 10px 6px;
|
||||
color: #444;
|
||||
@@ -849,9 +855,10 @@ p{
|
||||
}
|
||||
}
|
||||
|
||||
/* .ant-dropdown .ant-dropdown-menu{
|
||||
border-radius: 10px;
|
||||
padding: 10px;
|
||||
|
||||
.ant-dropdown .ant-dropdown-menu{
|
||||
/* border-radius: 10px;
|
||||
padding: 10px; */
|
||||
li.ant-dropdown-menu-item{
|
||||
padding:0 !important;
|
||||
>button.ant-btn{
|
||||
@@ -861,13 +868,14 @@ p{
|
||||
}
|
||||
>span.ant-dropdown-menu-title-content{
|
||||
padding:0px !important;
|
||||
min-width: 80px;
|
||||
/* padding:0px 12px !important;
|
||||
/* min-width: 80px; */
|
||||
/* padding:0px 12px !important; */
|
||||
height:32px !important;
|
||||
line-height: 32px !important;
|
||||
.ant-btn{
|
||||
width:100%;
|
||||
padding:0px 12px !important;
|
||||
justify-content:flex-start;
|
||||
}
|
||||
.ant-btn-default:not(:disabled):not(.ant-btn-disabled):hover{
|
||||
color:var(--text-color) !important;
|
||||
@@ -875,7 +883,7 @@ p{
|
||||
}
|
||||
}
|
||||
|
||||
} */
|
||||
}
|
||||
.ant-dropdown-button{
|
||||
.ant-btn-link{
|
||||
color:var(--text-color) !important;
|
||||
|
||||
@@ -231,7 +231,7 @@ const SystemConfig = forwardRef<SystemConfigHandle>((_,ref) => {
|
||||
labelAlign='left'
|
||||
scrollToFirstError
|
||||
form={form}
|
||||
className="mx-auto pr-PAGE_INSIDE_X "
|
||||
className="w-full pr-PAGE_INSIDE_X "
|
||||
name="systemConfig"
|
||||
onFinish={onFinish}
|
||||
autoComplete="off"
|
||||
@@ -256,7 +256,7 @@ const SystemConfig = forwardRef<SystemConfigHandle>((_,ref) => {
|
||||
<Form.Item<SystemConfigFieldType>
|
||||
label="API 调用前缀"
|
||||
name="prefix"
|
||||
extra="选填,作为服务内所有服务的API的前缀,比如host/{sys_name}/{service_name}/{api_path},一旦保存无法修改"
|
||||
extra="选填,作为服务内所有API的前缀,比如host/{service_name}/{api_path},一旦保存无法修改"
|
||||
rules={[
|
||||
{
|
||||
validator: validateUrlSlash,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { forwardRef, useEffect, useImperativeHandle, useState} from "react";
|
||||
import {App, Button, Divider, Form, Input, Row, Select} from "antd";
|
||||
import {App, Button, Form, Input, Row, Select} from "antd";
|
||||
import {Link, useLocation, useNavigate, useParams} from "react-router-dom";
|
||||
import {RouterParams} from "@core/components/aoplatform/RenderRoutes.tsx";
|
||||
import { v4 as uuidv4 } from 'uuid'
|
||||
@@ -125,7 +125,6 @@ const TeamConfig= forwardRef<TeamConfigHandle,TeamConfigProps>((props,ref) => {
|
||||
setOnEdit(false);
|
||||
form.setFieldsValue({id:uuidv4()}); // 清空 initialValues
|
||||
}
|
||||
// setPageType(currentUrl.split('/')[1] === 'myteam'? 'myteam':'manage')
|
||||
return (form.setFieldsValue({}))
|
||||
}, [teamId]);
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ const ChangePsw= () => {
|
||||
labelAlign='left'
|
||||
name="changePsw"
|
||||
scrollToFirstError
|
||||
className="mx-auto "
|
||||
className="mx-auto pl-[10px] "
|
||||
autoComplete="off"
|
||||
form={form}
|
||||
onFinish={savePsw}
|
||||
@@ -92,7 +92,7 @@ const ChangePsw= () => {
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
className="border-none bg-transparent pt-btnrbase mb-0 pb-0"
|
||||
className="border-none bg-transparent pt-btnrbase mb-0 pb-0 pl-0"
|
||||
>
|
||||
<WithPermission access=''><Button type="primary" htmlType="submit" >
|
||||
修改密码
|
||||
|
||||
@@ -19,7 +19,6 @@ export enum SERVICE_HUB_LIST_ACTIONS {
|
||||
SET_SERVICES='SET_SERVICES',
|
||||
SET_SELECTED_CATE = 'SET_SELECTED_CATE',
|
||||
SET_SELECTED_TAG = 'SET_SELECTED_TAG',
|
||||
SET_SELECTED_PARTITION = 'SET_SELECTED_PARTITION',
|
||||
SET_KEYWORD = 'SET_KEYWORD',
|
||||
LIST_LOADING = 'LIST_LOADING'
|
||||
}
|
||||
@@ -31,7 +30,6 @@ export type ServiceHubListActionType =
|
||||
| { type: SERVICE_HUB_LIST_ACTIONS.SET_SERVICES, payload: ServiceHubTableListItem[] }
|
||||
| { type: SERVICE_HUB_LIST_ACTIONS.SET_SELECTED_CATE, payload: string[] }
|
||||
| { type: SERVICE_HUB_LIST_ACTIONS.SET_SELECTED_TAG, payload: string[] }
|
||||
| { type: SERVICE_HUB_LIST_ACTIONS.SET_SELECTED_PARTITION, payload: string[] }
|
||||
| { type: SERVICE_HUB_LIST_ACTIONS.SET_KEYWORD, payload: string }
|
||||
| { type: SERVICE_HUB_LIST_ACTIONS.LIST_LOADING, payload: boolean }
|
||||
|
||||
@@ -42,10 +40,8 @@ export const initialServiceHubListState = {
|
||||
showServicesList: [] as ServiceHubTableListItem[],
|
||||
selectedCate: [] as string[],
|
||||
selectedTag: [] as string[],
|
||||
selectedPartition: [] as string[],
|
||||
keyword: '',
|
||||
getCateAndTagData:false,
|
||||
getPartitionData:false,
|
||||
listLoading:false,
|
||||
};
|
||||
|
||||
@@ -63,8 +59,6 @@ export const initialServiceHubListState = {
|
||||
return { ...state, selectedCate: action.payload };
|
||||
case SERVICE_HUB_LIST_ACTIONS.SET_SELECTED_TAG:
|
||||
return { ...state, selectedTag: action.payload };
|
||||
case SERVICE_HUB_LIST_ACTIONS.SET_SELECTED_PARTITION:
|
||||
return { ...state, selectedPartition: action.payload };
|
||||
case SERVICE_HUB_LIST_ACTIONS.SET_KEYWORD:
|
||||
return { ...state, keyword: action.payload };
|
||||
case SERVICE_HUB_LIST_ACTIONS.LIST_LOADING:
|
||||
@@ -75,7 +69,7 @@ export const initialServiceHubListState = {
|
||||
}
|
||||
|
||||
export const filterServiceList = (dataSet: typeof initialServiceHubListState)=>{
|
||||
if(!dataSet.getCateAndTagData || !dataSet.getPartitionData){
|
||||
if(!dataSet.getCateAndTagData ){
|
||||
return dataSet.servicesList
|
||||
}else{
|
||||
return dataSet.servicesList.filter((x)=>{
|
||||
@@ -83,7 +77,6 @@ export const initialServiceHubListState = {
|
||||
if(!dataSet.selectedTag || dataSet.selectedTag.length === 0) return false
|
||||
if((!x.tags || !x.tags.length )&& dataSet.selectedTag.indexOf('empty') === -1) return false
|
||||
if(x.tags && x.tags.length && !x.tags.some(tag => dataSet.selectedTag.includes(tag.id))) return false;
|
||||
if(!dataSet.selectedPartition || dataSet.selectedPartition.length === 0) return false
|
||||
if( dataSet.keyword && !x.name.includes(dataSet.keyword)) return false
|
||||
return true
|
||||
})
|
||||
|
||||
@@ -142,7 +142,6 @@ const ManagementConfig = forwardRef<ManagementConfigHandle,ManagementConfigProps
|
||||
<Form.Item<ManagementConfigFieldType>
|
||||
label="应用 ID"
|
||||
name="id"
|
||||
extra="应用ID(app_id)可用于检索服务或日志"
|
||||
rules={[{ required: true, message: '必填项' ,whitespace:true }]}
|
||||
>
|
||||
<Input className="w-INPUT_NORMAL" placeholder="请输入" disabled={type === 'edit'}/>
|
||||
|
||||
Reference in New Issue
Block a user