Skip to content

Commit

Permalink
添加更显眼的介绍
Browse files Browse the repository at this point in the history
  • Loading branch information
lewis617 committed Aug 22, 2019
1 parent e912048 commit d447781
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions site/theme/en-US.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ module.exports = {
'app.docs.components.icon.category.data': 'Data Icons',
'app.docs.components.icon.category.other': 'Application Icons',
'app.docs.components.icon.category.logo': 'Brand and Logos',
'app.docs.components.icon.pic-searcher.intro':
'AI Search by image is online, welcome to use! 🎉',
'app.docs.components.icon.pic-searcher.title': 'Search by image',
'app.docs.components.icon.pic-searcher.placeholder':
'Click or drag or paste file to this area to upload',
Expand Down
4 changes: 3 additions & 1 deletion site/theme/static/icon-pic-searcher.less
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@
text-align: center;
border: 1px solid @border-color-base;
border-radius: 4px;

> img {
max-width: 50px;
max-height: 50px;
}
}

.icon-pic-search-result {
padding: 20px 10px 0px 0px;
margin-top: 10px;

> div {
display: flex;
Expand All @@ -37,6 +38,7 @@
> i {
margin: 10px 20px 10px 0;
font-size: 30px;

:hover {
color: @link-hover-color;
}
Expand Down
6 changes: 2 additions & 4 deletions site/theme/template/IconDisplay/IconPicSearcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ interface iconObject {
}

class PicSearcher extends Component<PicSearcherProps, PicSearcherState> {
copyId?: number;

state = {
loading: false,
modalVisible: false,
Expand All @@ -39,7 +37,6 @@ class PicSearcher extends Component<PicSearcherProps, PicSearcherState> {

componentWillUnmount() {
document.removeEventListener('paste', this.onPaste);
window.clearTimeout(this.copyId);
}

onPaste = (event: ClipboardEvent) => {
Expand Down Expand Up @@ -118,7 +115,7 @@ class PicSearcher extends Component<PicSearcherProps, PicSearcherState> {
return (
<div className="icon-pic-searcher">
<Popover
content={messages[`app.docs.components.icon.pic-searcher.title`]}
content={messages[`app.docs.components.icon.pic-searcher.intro`]}
visible={popoverVisible}
>
<Icon type="camera" className="icon-pic-btn" onClick={this.toggleModal} />
Expand All @@ -130,6 +127,7 @@ class PicSearcher extends Component<PicSearcherProps, PicSearcherState> {
onCancel={this.toggleModal}
>
<Dragger
accept="image/jpeg, image/png"
listType="picture"
customRequest={(o: any) => this.uploadFile(o.file)}
fileList={fileList}
Expand Down
1 change: 1 addition & 0 deletions site/theme/zh-CN.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ module.exports = {
'app.docs.components.icon.category.data': '数据类图标',
'app.docs.components.icon.category.other': '网站通用图标',
'app.docs.components.icon.category.logo': '品牌和标识',
'app.docs.components.icon.pic-searcher.intro': 'AI 截图搜索上线了,快来体验吧!🎉',
'app.docs.components.icon.pic-searcher.title': '按图片搜索',
'app.docs.components.icon.pic-searcher.placeholder': '点击/拖拽/粘贴上传',
'app.docs.components.icon.pic-searcher.server-error': '识别服务暂不可用',
Expand Down

0 comments on commit d447781

Please sign in to comment.