forked from Edon-100/vocabularies-book
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Edon
committed
Dec 24, 2021
1 parent
95a1555
commit dcc04e4
Showing
11 changed files
with
115 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import React, { useEffect } from 'react' | ||
import { selectUi, updateshowNotification } from 'src/store/ui' | ||
import { useModal } from 'react-hooks-use-modal' | ||
import { useSelector } from 'react-redux'; | ||
|
||
const modalStyle: React.CSSProperties = { | ||
backgroundColor: '#fff', | ||
padding: '20px', | ||
width: '200px', | ||
height: '240px', | ||
borderRadius: '10px', | ||
}; | ||
|
||
export const NotificationModal = () => { | ||
const { showNotification } = useSelector(selectUi) | ||
|
||
useEffect(() => { | ||
showNotification? open() : close() | ||
}, [showNotification]) | ||
|
||
const [Modal, open, close, isOpen] = useModal('root', { | ||
preventScroll: true, | ||
closeOnOverlayClick: true | ||
}) | ||
return ( | ||
<div> | ||
<Modal> | ||
<div style={modalStyle}> | ||
<h3>更新内容</h3> | ||
<div> | ||
1、修复句子发音Bug | ||
</div> | ||
</div> | ||
</Modal> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,17 @@ | ||
import { tableNames, audioBaseUrl } from './constant' | ||
import { wordModel } from './wordModel' | ||
import { readFileSync } from 'fs' | ||
import * as path from 'path' | ||
|
||
;(window as any).services = { | ||
constanst: { | ||
tableNames, | ||
audioBaseUrl | ||
}, | ||
wordModel | ||
wordModel, | ||
getAppVerson: function () { | ||
const data = | ||
readFileSync(path.resolve(__dirname, '../plugin.json'), 'utf-8') || '{}' | ||
return JSON.parse(data)?.version | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters