Skip to content

Commit

Permalink
1.7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
hoothin committed Nov 10, 2023
1 parent be0fb15 commit 1b72dcd
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Version.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const version = "1.7.3";
export const version = "1.7.4";
6 changes: 6 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ window.setLang = (_lang) => {
inPageWordsAddStyles: '自定义关键词CSS,数组内按顺序指向对应关键词',
defaultPicker: '自动开启元素选择',
defaultPickerTips: '打开搜索输入框时自动开启元素选择',
emptyAfterCloseInput: '关闭时清空高亮',
emptyAfterCloseInputTips: '关闭搜索输入框时清空高亮关键词',
altToHighlight: 'Alt 划选立即高亮',
altToHighlightTips: '使用搜索输入框的页内搜索功能时,使用 Alt 划选后立即高亮',
disableInputOnWords: '划选文字时不弹出搜索输入框',
Expand Down Expand Up @@ -348,6 +350,8 @@ window.setLang = (_lang) => {
inPageWordsAddStyles: '自定義關鍵詞CSS,數組内按順序指向對應關鍵詞',
defaultPicker: '自動開啟元素選擇',
defaultPickerTips: '打開搜尋輸入框時自動開啟元素選擇',
emptyAfterCloseInput: '關閉時清空高亮',
emptyAfterCloseInputTips: '關閉搜尋輸入框時清空高亮關鍵字',
altToHighlight: 'Alt 劃選立即高亮',
altToHighlightTips: '使用搜索輸入框的頁內搜尋功能時,使用 Alt 劃選後立即高亮',
disableInputOnWords: '劃選文字時不彈出搜尋輸入框',
Expand Down Expand Up @@ -646,6 +650,8 @@ window.setLang = (_lang) => {
inPageWordsAddStyles: 'Custom keyword CSS, input an array target each keyword',
defaultPicker: 'Auto enable element selection',
defaultPickerTips: 'Automatically enable element selection when opening the search input box',
emptyAfterCloseInput: 'Clear the highlight when closing',
emptyAfterCloseInputTips: 'Clear the highlighted keywords when closing the search input box',
altToHighlight: 'Alt swipe to highlight immediately',
altToHighlightTips: 'When using the in-page search function under search input, highlight immediately with Alt after selection',
disableInputOnWords: 'No search input when something is selected',
Expand Down
14 changes: 14 additions & 0 deletions src/page/General.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ export default function General() {
if (typeof window.searchData.prefConfig.numPerLine === "undefined") {
window.searchData.prefConfig.numPerLine = 7;
}
if (typeof window.searchData.prefConfig.emptyAfterCloseInput === "undefined") {
window.searchData.prefConfig.emptyAfterCloseInput = false;
}
const [state, setState] = React.useState(
window.searchData.prefConfig
);
Expand Down Expand Up @@ -1396,6 +1399,17 @@ export default function General() {
label={window.i18n('defaultPickerTips')}
/>
</FormControl>
<Typography gutterBottom component="div">
<h4>{window.i18n('emptyAfterCloseInput')}</h4>
</Typography>
<FormControl sx={{ m: 1, minWidth: 80 }}>
<FormControlLabel
control={
<Switch checked={state.emptyAfterCloseInput} onChange={handleCheckChange} name="emptyAfterCloseInput" />
}
label={window.i18n('emptyAfterCloseInputTips')}
/>
</FormControl>
</Paper>
<Paper elevation={5} sx={{ padding: '20px', marginTop: '20px' }}>
<Typography gutterBottom component="div">
Expand Down

0 comments on commit 1b72dcd

Please sign in to comment.