Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit e773bb0

Browse files
authored
refactor(works): add navi demo (#1198)
1 parent 41d75bd commit e773bb0

File tree

2 files changed

+148
-3
lines changed

2 files changed

+148
-3
lines changed

src/containers/content/WorksContent/FilterBar.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { FC, memo } from 'react'
22

3-
import { mockNaviCatalogTags } from '@/utils/mock'
3+
import { mockWorksNaviCatalogTags } from '@/utils/mock'
44

5-
// import FiltersMenu from '@/widgets/FiltersMenu'
5+
import NoticeBar from '@/widgets/NoticeBar'
66
import NaviCatalog from '@/widgets/NaviCatalog'
77

88
// import { VIEW } from './constant'
@@ -19,11 +19,18 @@ type TProps = {
1919
const FilterBar: FC<TProps> = ({ activeView }) => {
2020
return (
2121
<Wrapper>
22+
<NoticeBar
23+
type="notice"
24+
content="因作品数量有限,当前分类仅做参考展示。"
25+
bottom={15}
26+
left={-25}
27+
noBg
28+
/>
2229
<FilterWrapper>
2330
<NaviCatalog
2431
title="类别筛选"
2532
withDivider={false}
26-
tags={mockNaviCatalogTags()}
33+
tags={mockWorksNaviCatalogTags()}
2734
/>
2835
</FilterWrapper>
2936
{/* <Br bottom={40} /> */}

utils/mock.ts

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,144 @@ export const mockFilterMenuTags = (): TFilterTag[] => {
370370
]
371371
}
372372

373+
export const mockWorksNaviCatalogTags = (): TNaviTag[] => {
374+
return [
375+
// 生产力 start
376+
{
377+
id: 'efficiency',
378+
raw: 'efficiency',
379+
title: '效率工具',
380+
extra: ['效率工具'],
381+
},
382+
{
383+
id: 'manage',
384+
raw: 'manage',
385+
title: '项目管理',
386+
extra: ['效率工具', '项目管理'],
387+
},
388+
{
389+
id: 'remote',
390+
raw: 'remote',
391+
title: '远程协作',
392+
extra: ['效率工具', '远程协作'],
393+
},
394+
{
395+
id: 'browser',
396+
raw: 'browser',
397+
title: '浏览器插件',
398+
extra: ['效率工具', '浏览器插件'],
399+
},
400+
{
401+
id: 'diagram',
402+
raw: 'diagram',
403+
title: '流程图',
404+
extra: ['效率工具', '流程图'],
405+
},
406+
{
407+
id: 'GTD',
408+
raw: 'GTD',
409+
title: 'GTD',
410+
extra: ['效率工具', 'GTD'],
411+
},
412+
{
413+
id: 'notes',
414+
raw: 'notes',
415+
title: '写作 / 笔记',
416+
extra: ['效率工具', '写作 / 笔记'],
417+
},
418+
419+
{
420+
id: 'mate',
421+
raw: 'mate',
422+
title: '开发伴侣',
423+
extra: ['开发伴侣'],
424+
},
425+
{
426+
id: 'cmd',
427+
raw: 'cmd',
428+
title: '命令行',
429+
icon: `${ICON_CMD}/navi/shell.svg`,
430+
extra: ['开发伴侣', '命令行'],
431+
},
432+
{
433+
id: 'convert',
434+
raw: 'convert',
435+
title: '格式转换',
436+
extra: ['开发伴侣', '格式转换'],
437+
},
438+
439+
{
440+
id: 'editor',
441+
raw: 'editor',
442+
title: '编辑器',
443+
extra: ['开发伴侣', '编辑器'],
444+
},
445+
446+
{
447+
id: 'docs',
448+
raw: 'docs',
449+
title: '文档生成',
450+
extra: ['开发伴侣', '文档生成'],
451+
},
452+
453+
{
454+
id: 'capture',
455+
raw: 'capture',
456+
title: '抓包工具',
457+
extra: ['开发伴侣', '抓包工具'],
458+
},
459+
460+
{
461+
id: 'radar',
462+
raw: 'radar',
463+
title: '信息获取',
464+
extra: ['信息获取'],
465+
},
466+
467+
{
468+
id: 'email',
469+
raw: 'email',
470+
title: '邮件管理',
471+
extra: ['信息获取', '邮件管理'],
472+
},
473+
474+
{
475+
id: 'podcast',
476+
raw: 'podcast',
477+
title: '播客',
478+
extra: ['信息获取', '播客'],
479+
},
480+
481+
{
482+
id: 'ref',
483+
raw: 'ref',
484+
title: '论文 / 文献',
485+
extra: ['信息获取', '论文 / 文献'],
486+
},
487+
488+
{
489+
id: 'privacy',
490+
raw: 'privacy',
491+
title: '隐私 & 安全',
492+
extra: ['隐私 & 安全'],
493+
},
494+
495+
{
496+
id: 'design',
497+
raw: 'design',
498+
title: '设计工具',
499+
extra: ['设计工具'],
500+
},
501+
502+
{
503+
id: 'opendata',
504+
raw: 'opendata',
505+
title: '公共数据',
506+
extra: ['公共数据'],
507+
},
508+
]
509+
}
510+
373511
export const mockNaviCatalogTags = (): TNaviTag[] => {
374512
return [
375513
// 生产力 start

0 commit comments

Comments
 (0)