Skip to content

Commit 00b6d56

Browse files
committed
Merge branch 'feedback-link'
2 parents ac88bfa + 9bae201 commit 00b6d56

File tree

8 files changed

+119
-2
lines changed

8 files changed

+119
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Changelog
22

33
## Unreleased
4+
- Add feedback link to guide and about settings
45

56
## v4.49.0
67
- Bundle BitBox02 Nova firmware version v9.24.0

backend/backend.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ var fixedURLWhitelist = []string{
7777
"https://bitbox.swiss/",
7878
"https://shop.bitbox.swiss/",
7979
"https://shiftcrypto.support/",
80+
"https://support.bitbox.swiss",
8081
// Exchange rates.
8182
"https://www.coingecko.com/",
8283
// Block explorers.

frontends/web/src/components/guide/guide.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { CloseXWhite } from '@/components/icon';
2222
import { AppContext } from '@/contexts/AppContext';
2323
import { Button } from '@/components/forms';
2424
import style from './guide.module.css';
25-
25+
import { getFeedbackLink, getSupportLink } from '@/utils/url_constants';
2626

2727
export type TProps = {
2828
children?: ReactNode;
@@ -54,9 +54,16 @@ const Guide = ({ children, title = t('guide.title') }: TProps) => {
5454
<div className={style.content}>
5555
{children}
5656
<div className={style.appendix}>
57+
{t('guide.appendix.feedback.text')}
58+
{' '}
59+
<A className={style.link} href={getFeedbackLink()}>
60+
{t('guide.appendix.feedback.link')}
61+
</A>
62+
<br />
63+
<br />
5764
{t('guide.appendix.text')}
5865
{' '}
59-
<A className={style.link} href="https://bitbox.swiss/support/">
66+
<A className={style.link} href={getSupportLink()}>
6067
{t('guide.appendix.link')}
6168
</A>
6269
<br />

frontends/web/src/locales/en/app.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,6 +1039,10 @@
10391039
}
10401040
},
10411041
"appendix": {
1042+
"feedback": {
1043+
"link": "Let us know.",
1044+
"text": "Have feedback?"
1045+
},
10421046
"link": "Contact us!",
10431047
"questionService": "Having issues with {{serviceName}}?",
10441048
"text": "Another question?",
@@ -1376,6 +1380,14 @@
13761380
"about": {
13771381
"appVersion": {
13781382
"title": "App version"
1383+
},
1384+
"feedbackLink": {
1385+
"description": "If you have general feedback",
1386+
"title": "Feedback"
1387+
},
1388+
"supportLink": {
1389+
"description": "If you have an issue or need help",
1390+
"title": "Support"
13791391
}
13801392
},
13811393
"advancedSettings": {

frontends/web/src/routes/settings/about.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ import { Entry } from '@/components/guide/entry';
2525
import { TPagePropsWithSettingsTabs } from './types';
2626
import { ContentWrapper } from '@/components/contentwrapper/contentwrapper';
2727
import { GlobalBanners } from '@/components/banners';
28+
import { FeedbackLink } from './components/about/feedback-link-setting';
29+
import { SupportLink } from './components/about/support-link-setting';
2830

2931
export const About = ({ devices, hasAccounts }: TPagePropsWithSettingsTabs) => {
3032
const { t } = useTranslation();
@@ -47,6 +49,8 @@ export const About = ({ devices, hasAccounts }: TPagePropsWithSettingsTabs) => {
4749
<ViewContent fullWidth>
4850
<WithSettingsTabs devices={devices} hideMobileMenu hasAccounts={hasAccounts}>
4951
<AppVersion />
52+
<FeedbackLink />
53+
<SupportLink />
5054
</WithSettingsTabs>
5155
</ViewContent>
5256
</View>
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/**
2+
* Copyright 2025 Shift Crypto AG
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
import { useTranslation } from 'react-i18next';
18+
import { open } from '@/api/system';
19+
import { SettingsItem } from '@/routes/settings/components/settingsItem/settingsItem';
20+
import { getFeedbackLink } from '@/utils/url_constants';
21+
22+
export const FeedbackLink = () => {
23+
const { t } = useTranslation();
24+
25+
return (
26+
<SettingsItem
27+
settingName={t('newSettings.about.feedbackLink.title')}
28+
secondaryText={t('newSettings.about.feedbackLink.description')}
29+
displayedValue={'bitbox.swiss/feedback'}
30+
onClick={() => open(getFeedbackLink())}
31+
/>
32+
);
33+
};
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/**
2+
* Copyright 2025 Shift Crypto AG
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
import { useTranslation } from 'react-i18next';
18+
import { open } from '@/api/system';
19+
import { SettingsItem } from '@/routes/settings/components/settingsItem/settingsItem';
20+
import { getSupportLink } from '@/utils/url_constants';
21+
22+
export const SupportLink = () => {
23+
const { t } = useTranslation();
24+
25+
return (
26+
<SettingsItem
27+
settingName={t('newSettings.about.supportLink.title')}
28+
secondaryText={t('newSettings.about.supportLink.description')}
29+
displayedValue={'support.bitbox.swiss'}
30+
onClick={() => open(getSupportLink())}
31+
/>
32+
);
33+
};

frontends/web/src/utils/url_constants.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,35 @@
1414
* limitations under the License.
1515
*/
1616

17+
import { i18n } from '@/i18n/i18n';
18+
1719
export const URL_CONSTANTS = {
1820
DOWNLOAD_LINK_GLOBAL: 'https://bitbox.swiss/download/?source=bitboxapp',
1921
DOWNLOAD_LINK_DE: 'https://bitbox.swiss/de/download/?source=bitboxapp',
2022
DOWNLOAD_LINK_ES: 'https://bitbox.swiss/es/descargar/?source=bitboxapp',
2123
DOWNLOAD_LINK_IT: 'https://bitbox.swiss/it/download/?source=bitboxapp'
2224
};
25+
26+
export const getFeedbackLink = (): string => {
27+
switch (i18n.resolvedLanguage) {
28+
case 'de':
29+
return 'https://bitbox.swiss/de/feedback/';
30+
case 'it':
31+
return 'https://bitbox.swiss/it/feedback/';
32+
case 'es':
33+
return 'https://bitbox.swiss/es/feedback/';
34+
default:
35+
return 'https://bitbox.swiss/feedback/';
36+
}
37+
};
38+
39+
export const getSupportLink = (): string => {
40+
switch (i18n.resolvedLanguage) {
41+
case 'de':
42+
return 'https://support.bitbox.swiss/de_DE/';
43+
case 'es':
44+
return 'https://support.bitbox.swiss/es_ES/';
45+
default:
46+
return 'https://support.bitbox.swiss/';
47+
}
48+
};

0 commit comments

Comments
 (0)