From 4ee1e39a4ace78b497d887c8331d785c7a1084d5 Mon Sep 17 00:00:00 2001 From: alexsparkes Date: Sun, 7 Aug 2022 21:22:08 +0100 Subject: [PATCH] fix: welcome modal scroll problem on lower res --- .../modals/welcome/WelcomeSections.jsx | 69 ++++++++++++------- src/components/modals/welcome/welcome.scss | 46 ++++++++++--- 2 files changed, 79 insertions(+), 36 deletions(-) diff --git a/src/components/modals/welcome/WelcomeSections.jsx b/src/components/modals/welcome/WelcomeSections.jsx index c0715dce..1149e164 100644 --- a/src/components/modals/welcome/WelcomeSections.jsx +++ b/src/components/modals/welcome/WelcomeSections.jsx @@ -28,7 +28,7 @@ export default class WelcomeSections extends PureComponent { importedSettings: [], }; this.changeWelcomeImg = this.changeWelcomeImg.bind(this); - this.welcomeImages = 4; + this.welcomeImages = 3; } changeTheme(type) { @@ -88,7 +88,7 @@ export default class WelcomeSections extends PureComponent { let welcomeImage = this.state.welcomeImage; this.setState({ - welcomeImage: welcomeImage < 4 ? ++welcomeImage : 0, + welcomeImage: welcomeImage < 3 ? ++welcomeImage : 0, }); this.timeout = setTimeout(this.changeWelcomeImg, 3000); @@ -121,10 +121,6 @@ export default class WelcomeSections extends PureComponent { const intro = ( <> {this.getMessage('modals.welcome.sections.intro.title')} - - {this.getMessage('modals.welcome.sections.intro.description')} - -

#shareyourmue

+ +

#shareyourmue

+
+
👏
+ + {this.getMessage('modals.welcome.sections.intro.description')} + +
); @@ -144,7 +148,7 @@ export default class WelcomeSections extends PureComponent { {this.getMessage('modals.welcome.sections.language.description')}{' '} @@ -161,7 +165,9 @@ export default class WelcomeSections extends PureComponent { const theme = ( <> {this.getMessage('modals.welcome.sections.theme.title')} -

{this.getMessage('modals.welcome.sections.theme.description')}

+ + {this.getMessage('modals.welcome.sections.theme.description')} +
this.changeTheme('auto')}> @@ -177,9 +183,9 @@ export default class WelcomeSections extends PureComponent { {this.getMessage('modals.main.settings.sections.appearance.theme.dark')}
-

{this.getMessage('modals.welcome.tip')}

-

{this.getMessage('modals.welcome.sections.theme.tip')}

+ {this.getMessage('modals.welcome.tip')} + {this.getMessage('modals.welcome.sections.theme.tip')} ); @@ -188,10 +194,12 @@ export default class WelcomeSections extends PureComponent { {this.getMessage('modals.welcome.sections.settings.title')} -

{this.getMessage('modals.welcome.sections.settings.description')}

+ + {this.getMessage('modals.welcome.sections.settings.description')} + this.importSettings(e)} /> -

{this.getMessage('modals.welcome.tip')}

-

{this.getMessage('modals.welcome.sections.settings.tip')}

+ {this.getMessage('modals.welcome.tip')} + {this.getMessage('modals.welcome.sections.settings.tip')} ); @@ -210,13 +218,17 @@ export default class WelcomeSections extends PureComponent { {this.getMessage('modals.welcome.sections.privacy.title')} -

{this.getMessage('modals.welcome.sections.privacy.description')}

+ + {this.getMessage('modals.welcome.sections.privacy.description')} + -

{this.getMessage('modals.welcome.sections.privacy.offline_mode_description')}

+ + {this.getMessage('modals.welcome.sections.privacy.offline_mode_description')} + -

{this.getMessage('modals.welcome.sections.privacy.ddg_proxy_description')}

-

+ + {this.getMessage('modals.welcome.sections.privacy.ddg_proxy_description')} + + {this.getMessage('modals.welcome.sections.privacy.links.title')} -

+
{this.getMessage('modals.welcome.sections.privacy.links.privacy_policy')} -
-
+ {this.getMessage('modals.welcome.sections.final.title')} -

{this.getMessage('modals.welcome.sections.final.description')}

-

{this.getMessage('modals.welcome.sections.final.changes')}

-

{this.getMessage('modals.welcome.sections.final.changes_description')}

+ + {this.getMessage('modals.welcome.sections.final.description')} + + {this.getMessage('modals.welcome.sections.final.changes')} + + {this.getMessage('modals.welcome.sections.final.changes_description')} +
this.props.switchTab(1)}> diff --git a/src/components/modals/welcome/welcome.scss b/src/components/modals/welcome/welcome.scss index 88cd878d..0f0494ae 100644 --- a/src/components/modals/welcome/welcome.scss +++ b/src/components/modals/welcome/welcome.scss @@ -1,10 +1,19 @@ @import '../main/scss/index.scss'; @import 'scss/variables'; +.welcomemodal { + @include themed() { + background-color: t($modal-background); + } +} + .welcomeContent { @include themed() { background-color: t($modal-background); } + .MuiFormControlLabel-root { + margin-right: 0; + } @extend %tabText; height: 80vh; width: clamp(60vw, 1200px, 90vw); @@ -25,7 +34,12 @@ } } section:nth-child(2) { + display: flex; + flex-flow: column; + justify-content: space-between; + overflow-y: auto; .buttons { + z-index: 999; backdrop-filter: blur(2px); position: sticky; bottom: 0; @@ -41,6 +55,7 @@ display: flex; flex-flow: column; padding: 25px; + gap: 20px; } } } @@ -142,6 +157,9 @@ border: none; outline: none; padding: 50px; + display: flex; + flex-flow: column; + align-items: center; @include themed() { background: t($modal-sidebar); color: t($color); @@ -172,17 +190,11 @@ a.privacy { } .examples { - display: flex; - flex-wrap: wrap; - flex-direction: column; - align-items: center; - img { - width: clamp(20rem, 300px, 40rem); - height: auto !important; - display: block; - margin: 30px; - border-radius: 12px; + width: 60%; + @include themed() { + border-radius: t($borderRadius); + } } } @@ -227,3 +239,17 @@ a.privacy { background-color: rgba(65, 71, 84, 0.9); } } + +.welcomePart { + display: flex; + flex-flow: row; + align-items: center; + .text { + display: flex; + flex-flow: column; + } + button { + @include modal-button(standard); + width: 150px; + } +} \ No newline at end of file