Skip to content

Commit b823e27

Browse files
authored
Merge pull request #5822 from thematters/develop
Release: v6.6.0
2 parents bcffbad + d815691 commit b823e27

File tree

8 files changed

+179
-91
lines changed

8 files changed

+179
-91
lines changed

package-lock.json

Lines changed: 80 additions & 80 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "matters-web",
3-
"version": "6.5.0",
3+
"version": "6.6.0",
44
"description": "codebase of Matters' website",
55
"author": "Matters <hi@matters.town>",
66
"engines": {
@@ -84,7 +84,7 @@
8484
"lodash": "^4.17.21",
8585
"lottie-react": "^2.4.1",
8686
"multiformats": "^13.3.7",
87-
"next": "^15.3.3",
87+
"next": "15.3.6",
8888
"next-pwa": "^5.6.0",
8989
"next-seo": "^6.8.0",
9090
"nprogress": "^0.2.0",

src/common/enums/storage.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ export const STORAGE_KEY_BILLBOARD = '__BILLBOARD'
66

77
export const STORAGE_KEY_CIRCLE_BANNER = '__CIRCLE_BANNER'
88

9+
export const STORAGE_KEY_EDITOR_OPTION_DRAWER = '__EDITOR_OPTION_DRAWER'
10+
911
export const STORAGE_KEY_SEARCH_HISTORY = '__SEARCH_HISTORY'
1012

1113
export const REFERRAL_QUERY_REFERRAL_KEY = 'referral'

src/components/Drawer/Buttons.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Button, ButtonProps } from '~/components'
22

33
export type DrawerTextButtonProps = {
44
text: React.ReactNode
5-
color?: 'black'
5+
color?: 'black' | 'greyDarker'
66
} & ButtonProps
77

88
export const TextButton: React.FC<DrawerTextButtonProps> = ({
@@ -19,6 +19,13 @@ export const TextButton: React.FC<DrawerTextButtonProps> = ({
1919
textActiveColor: 'greyDarker',
2020
}
2121
break
22+
case 'greyDarker':
23+
buttonProps = {
24+
...buttonProps,
25+
textColor: 'greyDarker',
26+
textActiveColor: 'black',
27+
}
28+
break
2229
}
2330

2431
return <Button {...buttonProps}>{text}</Button>

src/views/ArticleDetail/Edit/OptionDrawer/index.tsx

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { useEffect, useState } from 'react'
2-
import { useIntl } from 'react-intl'
2+
import { FormattedMessage, useIntl } from 'react-intl'
33

4+
import IconRight from '@/public/static/icons/24px/right.svg'
45
import { KEYVALUE } from '~/common/enums'
5-
import { Drawer, useNativeEventListener } from '~/components'
6+
import { Drawer, Icon, TextIcon, useNativeEventListener } from '~/components'
67

78
import { getOptionTabByType, OptionTab } from '../Hooks'
89
import { OptionContent, OptionContentProps } from '../OptionContent'
@@ -71,6 +72,25 @@ export const OptionDrawer: React.FC<OptionDrawerProps> = ({
7172
<Drawer.Header
7273
title={title || defaultTitle}
7374
closeDrawer={toggleDrawer}
75+
rightBtn={
76+
<Drawer.TextButton
77+
color="greyDarker"
78+
onClick={toggleDrawer}
79+
aria-label={intl.formatMessage({
80+
defaultMessage: 'Collapse',
81+
id: 'W/V6+Y',
82+
})}
83+
text={
84+
<TextIcon
85+
size={20}
86+
icon={<Icon icon={IconRight} size={24} />}
87+
placement="left"
88+
>
89+
<FormattedMessage defaultMessage="Collapse" id="W/V6+Y" />
90+
</TextIcon>
91+
}
92+
/>
93+
}
7494
fixedWidth
7595
/>
7696
<Drawer.Content fixedWidth>

0 commit comments

Comments
 (0)