@@ -339,7 +339,7 @@ GeneralPart.propTypes = {
339339 updateConfig : PropTypes . func . isRequired ,
340340}
341341
342- function FeaturePages ( ) {
342+ function FeaturePages ( { config , updateConfig } ) {
343343 const { t } = useTranslation ( )
344344 const [ backgroundPermission , setBackgroundPermission ] = useState ( false )
345345
@@ -369,19 +369,21 @@ function FeaturePages() {
369369 >
370370 { t ( 'Open Conversation Page' ) }
371371 </ button >
372- < button
373- type = "button"
374- onClick = { ( ) => {
375- Browser . windows . create ( {
376- url : Browser . runtime . getURL ( 'IndependentPanel.html' ) ,
377- type : 'popup' ,
378- width : 500 ,
379- height : 650 ,
380- } )
381- } }
382- >
383- { t ( 'Open Conversation Window' ) }
384- </ button >
372+ { ! isMobile ( ) && (
373+ < button
374+ type = "button"
375+ onClick = { ( ) => {
376+ Browser . windows . create ( {
377+ url : Browser . runtime . getURL ( 'IndependentPanel.html' ) ,
378+ type : 'popup' ,
379+ width : 500 ,
380+ height : 650 ,
381+ } )
382+ } }
383+ >
384+ { t ( 'Open Conversation Window' ) }
385+ </ button >
386+ ) }
385387 { ! isMobile ( ) && ! isFirefox ( ) && ! isSafari ( ) && (
386388 < label >
387389 < input
@@ -402,10 +404,28 @@ function FeaturePages() {
402404 { t ( 'Keep Conversation Window in Background' ) }
403405 </ label >
404406 ) }
407+ { ! isMobile ( ) && (
408+ < label >
409+ < input
410+ type = "checkbox"
411+ checked = { config . alwaysCreateNewConversationWindow }
412+ onChange = { ( e ) => {
413+ const checked = e . target . checked
414+ updateConfig ( { alwaysCreateNewConversationWindow : checked } )
415+ } }
416+ />
417+ { t ( 'Always Create New Conversation Window' ) }
418+ </ label >
419+ ) }
405420 </ div >
406421 )
407422}
408423
424+ FeaturePages . propTypes = {
425+ config : PropTypes . object . isRequired ,
426+ updateConfig : PropTypes . func . isRequired ,
427+ }
428+
409429function AdvancedPart ( { config, updateConfig } ) {
410430 const { t } = useTranslation ( )
411431
@@ -703,7 +723,7 @@ function Popup() {
703723 < GeneralPart config = { config } updateConfig = { updateConfig } />
704724 </ TabPanel >
705725 < TabPanel >
706- < FeaturePages />
726+ < FeaturePages config = { config } updateConfig = { updateConfig } />
707727 </ TabPanel >
708728 < TabPanel >
709729 < SelectionTools config = { config } updateConfig = { updateConfig } />
0 commit comments