diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2021-11-03 21:38:52 +0100 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2022-03-14 13:58:44 +0100 |
| commit | 8114b12151afd24e04b461edfe9a01cfdc18b6ab (patch) | |
| tree | b11977ef6acd87f16e86f7463d6be6e24f13a765 /gui/src | |
| parent | 511c4eb17c91faf2176f3ff56dbf690589e5a0d0 (diff) | |
| download | mullvadvpn-8114b12151afd24e04b461edfe9a01cfdc18b6ab.tar.xz mullvadvpn-8114b12151afd24e04b461edfe9a01cfdc18b6ab.zip | |
Show device name in settings
Diffstat (limited to 'gui/src')
| -rw-r--r-- | gui/src/renderer/components/Account.tsx | 9 | ||||
| -rw-r--r-- | gui/src/renderer/components/AccountStyles.tsx | 4 | ||||
| -rw-r--r-- | gui/src/renderer/containers/AccountPage.tsx | 1 |
3 files changed, 14 insertions, 0 deletions
diff --git a/gui/src/renderer/components/Account.tsx b/gui/src/renderer/components/Account.tsx index 833a06d1c2..a612f2a07e 100644 --- a/gui/src/renderer/components/Account.tsx +++ b/gui/src/renderer/components/Account.tsx @@ -9,6 +9,7 @@ import { AccountRowLabel, AccountRows, AccountRowValue, + DeviceRowValue, StyledBuyCreditButton, StyledContainer, StyledRedeemVoucherButton, @@ -24,6 +25,7 @@ import { AccountToken } from '../../shared/daemon-rpc-types'; import { BackAction } from './KeyboardNavigation'; interface IProps { + deviceName?: string; accountToken?: AccountToken; accountExpiry?: string; expiryLocale: string; @@ -63,6 +65,13 @@ export default class Account extends React.Component<IProps> { <AccountRows> <AccountRow> <AccountRowLabel> + {messages.pgettext('account-view', 'Device name')} + </AccountRowLabel> + <DeviceRowValue>{this.props.deviceName}</DeviceRowValue> + </AccountRow> + + <AccountRow> + <AccountRowLabel> {messages.pgettext('account-view', 'Account number')} </AccountRowLabel> <AccountRowValue diff --git a/gui/src/renderer/components/AccountStyles.tsx b/gui/src/renderer/components/AccountStyles.tsx index 0e403231da..34ce600fde 100644 --- a/gui/src/renderer/components/AccountStyles.tsx +++ b/gui/src/renderer/components/AccountStyles.tsx @@ -44,6 +44,10 @@ export const AccountRowValue = styled(AccountRowText)(normalText, { color: colors.white, }); +export const DeviceRowValue = styled(AccountRowValue)({ + textTransform: 'capitalize', +}); + export const AccountOutOfTime = styled(AccountRowValue)({ color: colors.red, }); diff --git a/gui/src/renderer/containers/AccountPage.tsx b/gui/src/renderer/containers/AccountPage.tsx index 641374c504..a5251500d0 100644 --- a/gui/src/renderer/containers/AccountPage.tsx +++ b/gui/src/renderer/containers/AccountPage.tsx @@ -7,6 +7,7 @@ import { IHistoryProps, withHistory } from '../lib/history'; import { IReduxState, ReduxDispatch } from '../redux/store'; const mapStateToProps = (state: IReduxState) => ({ + deviceName: state.account.deviceName, accountToken: state.account.accountToken, accountExpiry: state.account.expiry, expiryLocale: state.userInterface.locale, |
