This repository was archived by the owner on Nov 8, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 7 files changed +58
-17
lines changed Expand file tree Collapse file tree 7 files changed +58
-17
lines changed Original file line number Diff line number Diff line change 1- import { createGlobalStyle } from 'styled-components'
1+ import { createGlobalStyle , css } from 'styled-components'
22import { theme , cs } from '@utils'
33import normalize from './normalize'
44
@@ -18,7 +18,7 @@ const GlobalStyle = createGlobalStyle`
1818 body {
1919 ${ cs . media . mobile `
2020 position: relative;
21- ` } ;
21+ `} ;
2222 }
2323 *::-moz-selection {
2424 background-color: ${ theme ( 'selectionBg' ) } !important;
@@ -138,6 +138,33 @@ const GlobalStyle = createGlobalStyle`
138138 padding: 0 1px;
139139 color: ${ theme ( 'searchHighlight.doramonFg' ) } ;
140140 }
141+
142+ ${ ( { isMacOS } ) =>
143+ isMacOS ||
144+ css `
145+ ::-webkit-scrollbar {
146+ background: transparent;
147+ width: 4px;
148+ }
149+ ::-webkit-scrollbar-button {
150+ background: transparent;
151+ }
152+ ::-webkit-scrollbar-track {
153+ background: transparent;
154+ }
155+ ::-webkit-scrollbar-track-piece {
156+ background: transparent;
157+ }
158+ ::-webkit-scrollbar-thumb {
159+ background: ${ theme ( 'banner.title' ) } ;
160+ }
161+ ::-webkit-scrollbar-corner {
162+ background: grey;
163+ }
164+ ::-webkit-resizer {
165+ background: grey;
166+ }
167+ ` } ;
141168`
142169
143170export default GlobalStyle
Original file line number Diff line number Diff line change @@ -9,23 +9,32 @@ import { ThemeProvider } from 'styled-components'
99import Helmet from 'react-helmet'
1010
1111import { connectStore } from '@utils'
12+ import { usePlatform } from '@hooks'
1213
1314// import MarkDownStyle from './MarkDownStyle'
1415import CodeSyxHighlight from './CodeSyxHighlight'
1516import AntUIOverWrite from './AntUIOverWrite'
1617import GlobalStyle from './GlobalStyle'
1718
18- const ThemeContainer = ( { children, theme : { themeData } } ) => (
19- < ThemeProvider theme = { themeData } >
20- < React . Fragment >
21- < Helmet meta = { [ { name : 'theme-color' , content : themeData . mobileTab } ] } />
22- < div > { children } </ div >
23- < CodeSyxHighlight />
24- < AntUIOverWrite />
25- < GlobalStyle />
26- </ React . Fragment >
27- </ ThemeProvider >
28- )
19+ const ThemeContainer = ( { children, theme : { themeData } } ) => {
20+ const { isMacOS } = usePlatform ( )
21+
22+ console . log ( 'isMacOS: ' , isMacOS )
23+
24+ return (
25+ < ThemeProvider theme = { themeData } >
26+ < React . Fragment >
27+ < Helmet
28+ meta = { [ { name : 'theme-color' , content : themeData . mobileTab } ] }
29+ />
30+ < div > { children } </ div >
31+ < CodeSyxHighlight />
32+ < AntUIOverWrite />
33+ < GlobalStyle isMacOS = { isMacOS } />
34+ </ React . Fragment >
35+ </ ThemeProvider >
36+ )
37+ }
2938
3039export default connectStore ( ThemeContainer )
3140
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ const UserListerContainer = ({ userLister }) => {
6464
6565 return (
6666 < Modal width = "700px" show = { show } showCloseBtn onClose = { onClose } >
67- < Wrapper >
67+ < Wrapper id = "userlist-scroller" >
6868 < HeaderInfo
6969 type = { type }
7070 brief = { brief }
Original file line number Diff line number Diff line change @@ -167,6 +167,9 @@ export const useInit = _store => {
167167 // log('effect init')
168168 sub$ = sr71$ . data ( ) . subscribe ( $solver ( DataSolver , ErrSolver ) )
169169
170+ /* eslint-disable no-undef */
171+ // OverlayScrollbars(document.getElementById('userlist-scroller'), {})
172+
170173 return ( ) => {
171174 // log('effect uninit')
172175 sr71$ . stop ( )
Original file line number Diff line number Diff line change @@ -3,7 +3,9 @@ import styled from 'styled-components'
33// import Img from '@components/Img'
44import { cs } from '@utils'
55
6- export const Wrapper = styled . div `
6+ export const Wrapper = styled . div . attrs ( ( { id } ) => ( {
7+ id,
8+ } ) ) `
79 padding: 20px;
810`
911export const MsgWrapper = styled . div `
Original file line number Diff line number Diff line change 11{
22 "name" : " coderplanets_web" ,
3- "version" : " 0.4 .0" ,
3+ "version" : " 0.3 .0" ,
44 "license" : " Apache License 2.0" ,
55 "scripts" : {
66 "build.prod" : " cross-env NODE_ENV=production next build" ,
Original file line number Diff line number Diff line change 11{
22 "name" : " coderplanets_web" ,
3- "version" : " 0.4.0-canary.0 " ,
3+ "version" : " 0.4.0" ,
44 "license" : " Apache License 2.0" ,
55 "scripts" : {
66 "dev" : " cross-env NODE_ENV=dev node server.js" ,
You can’t perform that action at this time.
0 commit comments