mirror of https://github.com/openspug/spug
A 便捷导航新增一些默认图标
parent
5bd1f48172
commit
33ec843fa6
|
@ -154,7 +154,6 @@ class SelfView(View):
|
|||
Argument('wx_token', required=False),
|
||||
).parse(request.body)
|
||||
if error is None:
|
||||
print(form)
|
||||
if form.old_password and form.new_password:
|
||||
if request.user.type == 'ldap':
|
||||
return json_response(error='LDAP账户无法修改密码')
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 3.3 KiB |
Binary file not shown.
After Width: | Height: | Size: 6.7 KiB |
Binary file not shown.
After Width: | Height: | Size: 8.6 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
|
@ -64,7 +64,7 @@ function NavIndex(props) {
|
|||
</Col>
|
||||
{records.map(item => (
|
||||
<Col key={item.id} span={6} style={{marginBottom: 24}}>
|
||||
<Card actions={[
|
||||
<Card hoverable actions={[
|
||||
<LeftSquareOutlined onClick={() => handleSort(item, 'up')}/>,
|
||||
<RightSquareOutlined onClick={() => handleSort(item, 'down')}/>,
|
||||
<EditOutlined onClick={() => setRecord(item)}/>
|
||||
|
@ -83,9 +83,10 @@ function NavIndex(props) {
|
|||
{records.map(item => (
|
||||
<Col key={item.id} span={6} style={{marginBottom: 24}}>
|
||||
<Card
|
||||
hoverable
|
||||
actions={item.links.map(x => <a href={x.url} rel="noopener noreferrer" target="_blank">{x.name}</a>)}>
|
||||
<Card.Meta
|
||||
avatar={<Avatar src={item.logo}/>}
|
||||
avatar={<Avatar size="large" src={item.logo}/>}
|
||||
title={item.title}
|
||||
description={item.desc}/>
|
||||
</Card>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* Released under the AGPL-3.0 License.
|
||||
*/
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { Form, Input, Modal, Button, Upload, message } from 'antd';
|
||||
import { Form, Input, Modal, Button, Upload, Avatar, message } from 'antd';
|
||||
import { PlusOutlined, MinusCircleOutlined } from '@ant-design/icons';
|
||||
import { http } from 'libs';
|
||||
import styles from './index.module.less';
|
||||
|
@ -71,6 +71,7 @@ function NavForm(props) {
|
|||
<Form form={form} initialValues={record} labelCol={{span: 5}} wrapperCol={{span: 18}}>
|
||||
<Form.Item required label="导航图标">
|
||||
<Upload
|
||||
accept="image/*"
|
||||
listType="picture-card"
|
||||
fileList={fileList}
|
||||
beforeUpload={beforeUpload}
|
||||
|
@ -83,6 +84,14 @@ function NavForm(props) {
|
|||
</div>
|
||||
)}
|
||||
</Upload>
|
||||
<div className={styles.imgExample}>
|
||||
{['gitlab', 'gitee', 'grafana', 'prometheus', 'wiki'].map(item => (
|
||||
<Avatar
|
||||
key={item}
|
||||
src={`/resource/${item}.png`}
|
||||
onClick={() => setFileList([{uid: 0, thumbUrl: `/resource/${item}.png`}])}/>
|
||||
))}
|
||||
</div>
|
||||
</Form.Item>
|
||||
<Form.Item required name="title" label="导航标题">
|
||||
<Input placeholder="请输入"/>
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
|
||||
.add {
|
||||
cursor: pointer;
|
||||
height: 166px;
|
||||
height: 167px;
|
||||
border: 1px dashed #d9d9d9;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
@ -86,7 +86,7 @@
|
|||
}
|
||||
|
||||
:global(.ant-card) {
|
||||
height: 166px;
|
||||
height: 167px;
|
||||
background-color: #fdfdfd;
|
||||
|
||||
:global(.ant-card-actions) {
|
||||
|
@ -127,4 +127,15 @@
|
|||
|
||||
.minusIcon:hover {
|
||||
color: #ff4d4f;
|
||||
}
|
||||
|
||||
.imgExample {
|
||||
position: absolute;
|
||||
top: 62px;
|
||||
left: 130px;
|
||||
|
||||
:global(.ant-avatar) {
|
||||
cursor: pointer;
|
||||
margin-right: 12px;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue