Skip to content

Commit f0fcd52

Browse files
committed
Merge commit 'refs/pull/3470/head' of https://github.com/BitBoxSwiss/bitbox-wallet-app into release-v4.48.1
2 parents 09995d7 + 57ebe29 commit f0fcd52

File tree

23 files changed

+125
-172
lines changed

23 files changed

+125
-172
lines changed

frontends/web/src/app.module.css

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,6 @@
1212
padding-right: env(safe-area-inset-right, 0);
1313
}
1414

15-
.contentContainer {
16-
flex: 1;
17-
overflow-y: auto;
18-
display: flex;
19-
flex-direction: column;
20-
}
21-
22-
.appRouter {
23-
flex: 1;
24-
display: flex;
25-
flex-direction: column;
26-
}
27-
2815
@media (max-width: 900px) {
2916
.appContent {
3017
position: absolute;

frontends/web/src/app.tsx

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ import { AuthRequired } from './components/auth/authrequired';
4343
import { WCSigningRequest } from './components/wallet-connect/incoming-signing-request';
4444
import { Providers } from './contexts/providers';
4545
import { BottomNavigation } from './components/bottom-navigation/bottom-navigation';
46-
import { GlobalBanners } from '@/components/banners';
4746
import styles from './app.module.css';
4847

4948
export const App = () => {
@@ -203,16 +202,13 @@ export const App = () => {
203202
return null;
204203
})
205204
}
206-
<div id="content-container" className={styles.contentContainer}>
207-
<GlobalBanners />
208-
<AppRouter
209-
accounts={accounts}
210-
activeAccounts={activeAccounts}
211-
deviceIDs={deviceIDs}
212-
devices={devices}
213-
devicesKey={devicesKey}
214-
/>
215-
</div>
205+
<AppRouter
206+
accounts={accounts}
207+
activeAccounts={activeAccounts}
208+
deviceIDs={deviceIDs}
209+
devices={devices}
210+
devicesKey={devicesKey}
211+
/>
216212
<RouterWatcher />
217213
</div>
218214
{showBottomNavigation && (

frontends/web/src/components/banners/banner.module.css

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,3 @@
55
.link:focus {
66
outline-color: inherit;
77
}
8-
9-
.container > div {
10-
flex-shrink: 0;
11-
margin: 0 auto;
12-
margin-top: var(--spacing-default);
13-
max-width: var(--content-width);
14-
padding: var(--space-default);
15-
padding-bottom: 0;
16-
padding-top: 0;
17-
width: 100%;
18-
}
19-
20-
@media (max-width: 768px) {
21-
.container > div {
22-
padding: 0 var(--space-half);
23-
}
24-
25-
.container > div:last-child > div {
26-
margin-bottom: 0;
27-
}
28-
}
29-

frontends/web/src/components/banners/index.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,17 @@ import { Update } from './update';
1919
import { Banner } from './banner';
2020
import { MobileDataWarning } from './mobiledatawarning';
2121
import { Offline } from './offline';
22-
import styles from './banner.module.css';
2322

2423
export const GlobalBanners = () => {
2524
return (
26-
<div className={styles.container}>
25+
<>
2726
<Testing />
2827
<Update />
2928
<Banner msgKey="bitbox01" />
3029
<Banner msgKey="bitbox02" />
3130
<Banner msgKey="bitbox02nova" />
3231
<MobileDataWarning />
3332
<Offline />
34-
</div>
33+
</>
3534
);
3635
};

frontends/web/src/components/terms/terms.module.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
justify-content: center;
99
margin: 0 auto;
1010
overflow: auto;
11-
padding: 0 var(--space-half) var(--header-height) var(--space-half);
11+
padding: 0 var(--space-half) 0 var(--space-half);
1212
width: 100%;
1313
}
1414

@@ -24,7 +24,7 @@
2424
font-family: var(--font-family);
2525
flex-grow: 0;
2626
flex-shrink: 1;
27-
margin: var(--space-default) 0;
27+
margin: 0 0 var(--space-default) 0;
2828
max-width: 660px;
2929
overflow: auto;
3030
padding: var(--space-quarter) 1em 1em 1em;

frontends/web/src/hooks/scrolltotop.ts

Lines changed: 0 additions & 33 deletions
This file was deleted.

frontends/web/src/routes/account/account.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ import { A } from '@/components/anchor/anchor';
4545
import { getConfig, setConfig } from '@/utils/config';
4646
import { i18n } from '@/i18n/i18n';
4747
import { ContentWrapper } from '@/components/contentwrapper/contentwrapper';
48+
import { GlobalBanners } from '@/components/banners';
4849
import { View, ViewContent, ViewHeader } from '@/components/view/view';
4950
import { Transaction } from '@/components/transactions/transaction';
5051
import { TransactionDetails } from '@/components/transactions/details';
@@ -253,6 +254,7 @@ const RemountAccount = ({
253254
<GuidedContent>
254255
<Main>
255256
<ContentWrapper>
257+
<GlobalBanners />
256258
<Status hidden={!hasCard} type="warning">
257259
{t('warning.sdcard')}
258260
</Status>

frontends/web/src/routes/account/summary/accountssummary.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import { AppContext } from '@/contexts/AppContext';
3838
import { getAccountsByKeystore, isAmbiguousName } from '@/routes/account/utils';
3939
import { RatesContext } from '@/contexts/RatesContext';
4040
import { ContentWrapper } from '@/components/contentwrapper/contentwrapper';
41+
import { GlobalBanners } from '@/components/banners';
4142

4243
type TProps = {
4344
accounts: accountApi.IAccount[];
@@ -174,6 +175,7 @@ export const AccountsSummary = ({
174175
<GuidedContent>
175176
<Main>
176177
<ContentWrapper>
178+
<GlobalBanners />
177179
<Status hidden={!hasCard} type="warning">
178180
{t('warning.sdcard')}
179181
</Status>

frontends/web/src/routes/bitsurance/widget.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import { alertUser } from '@/components/alert/Alert';
3030
import { BitsuranceGuide } from './guide';
3131
import { getBitsuranceURL } from '@/api/bitsurance';
3232
import { convertScriptType } from '@/utils/request-addess';
33-
import { useScrollToTop } from '@/hooks/scrolltotop';
3433
import style from './widget.module.css';
3534

3635
type TProps = {
@@ -40,7 +39,6 @@ type TProps = {
4039
export const BitsuranceWidget = ({ code }: TProps) => {
4140
const navigate = useNavigate();
4241
const { t } = useTranslation();
43-
const scrollToTop = useScrollToTop();
4442

4543
const [height, setHeight] = useState(0);
4644
const [iframeLoaded, setIframeLoaded] = useState(false);
@@ -185,10 +183,7 @@ export const BitsuranceWidget = ({ code }: TProps) => {
185183
<div ref={ref} className={style.container}>
186184
{ !agreedTerms ? (
187185
<BitsuranceTerms
188-
onAgreedTerms={() => {
189-
setAgreedTerms(true);
190-
scrollToTop();
191-
}}
186+
onAgreedTerms={() => setAgreedTerms(true)}
192187
/>
193188
) : (
194189
<div style={{ height }}>

frontends/web/src/routes/device/no-device-connected.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ import { useTranslation } from 'react-i18next';
1818
import type { TPagePropsWithSettingsTabs } from '../settings/types';
1919
import { Bluetooth } from '@/components/bluetooth/bluetooth';
2020
import { GuideWrapper, GuidedContent, Header, Main } from '@/components/layout';
21+
import { ContentWrapper } from '@/components/contentwrapper/contentwrapper';
2122
import { ViewContent, View } from '@/components/view/view';
23+
import { GlobalBanners } from '@/components/banners';
2224
import { MobileHeader } from '@/routes/settings/components/mobile-header';
2325
import { WithSettingsTabs } from '@/routes/settings/components/tabs';
2426
import { ManageDeviceGuide } from './bitbox02/settings-guide';
@@ -34,6 +36,9 @@ export const NoDeviceConnected = ({
3436
<Main>
3537
<GuideWrapper>
3638
<GuidedContent>
39+
<ContentWrapper>
40+
<GlobalBanners />
41+
</ContentWrapper>
3742
<Header
3843
hideSidebarToggler
3944
title={

0 commit comments

Comments
 (0)