Skip to content

Commit

Permalink
updated tour texts
Browse files Browse the repository at this point in the history
  • Loading branch information
onmax committed Mar 5, 2022
1 parent 287b2e7 commit f041efe
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
3 changes: 2 additions & 1 deletion src/components/Tour.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
<WorldCheckIcon />
</template>
<template v-slot:account_icon>
<svg width="14" height="21" style="height: inherit; margin-bottom: -3px;" fill="none"
<svg width="14" height="21" style="height: inherit; margin-bottom: -3px;"
fill="none"
xmlns="http://www.w3.org/2000/svg">
<g opacity=".7">
<rect x=".75" y=".75" width="12.5" height="19.5"
Expand Down
2 changes: 1 addition & 1 deletion src/lib/tour/onboarding/03_FirstTransactionStep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export function getFirstTransactionStep({ isSmallScreen, txsLen }: IOnboardingGe
: '.vue-recycle-scroller__item-view:nth-child(2)'}`;
},
content: getOnboardingTexts(OnboardingTourStep.FIRST_TRANSACTION)[
txsLen.value <= 1 ? 'default' : 'alternative'],
txsLen.value === 1 ? 'default' : 'alternative'],
params: {
get placement() {
return isSmallScreen.value ? 'bottom-start' : 'left';
Expand Down
6 changes: 4 additions & 2 deletions src/lib/tour/onboarding/05_WalletBalanceStep.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { useAddressStore } from '@/stores/Address';
import { useBtcAddressStore } from '@/stores/BtcAddress';
import { defaultTooltipModifiers } from '..';
import { IOnboardingGetStepFnArgs, ITourStep, IWalletHTMLElements, OnboardingTourStep } from '../types';
Expand Down Expand Up @@ -41,7 +42,8 @@ export function getWalletBalanceStep({ isSmallScreen }: IOnboardingGetStepFnArgs
};

const { accountBalance: btcAccountBalance } = useBtcAddressStore();
const hasBitcoin = () => btcAccountBalance.value > 0;
const { accountBalance: nimAccountBalance } = useAddressStore();
const hasOnlyNim = () => nimAccountBalance.value > 0 && btcAccountBalance.value === 0;

return {
path: '/',
Expand All @@ -50,7 +52,7 @@ export function getWalletBalanceStep({ isSmallScreen }: IOnboardingGetStepFnArgs
return `${IWalletHTMLElements.ACCOUNT_OVERVIEW_BALANCE} .balance-distribution
${!isSmallScreen.value ? '.btc .tooltip .bar' : ''}`;
},
content: getOnboardingTexts(OnboardingTourStep.WALLET_BALANCE)[!hasBitcoin() ? 'default' : 'alternative'],
content: getOnboardingTexts(OnboardingTourStep.WALLET_BALANCE)[hasOnlyNim() ? 'default' : 'alternative'],
params: {
get placement() {
return isSmallScreen.value ? 'bottom' : 'right';
Expand Down
8 changes: 5 additions & 3 deletions src/lib/tour/onboarding/07_AccountOptionsStep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,20 @@ export function getAccountOptionsStep({ isSmallScreen, isLargeScreen }: IOnboard
return isLargeScreen.value ? '/accounts' : '/accounts?sidebar=true';
},
tooltip: {
target: IWalletHTMLElements.MODAL_PAGE,
get target() {
return isSmallScreen.value ? IWalletHTMLElements.MODAL_ACCOUNT_PICTURE : IWalletHTMLElements.MODAL_PAGE;
},
content: getOnboardingTexts(OnboardingTourStep.ACCOUNT_OPTIONS).default,
params: {
get placement() {
return isSmallScreen.value ? 'top' : 'right';
return isSmallScreen.value ? 'bottom-start' : 'right';
},
get modifiers() {
return [
{
name: 'offset',
options: {
offset: [0, 16],
offset: [isSmallScreen.value ? -13.5 : 0, 16],
},
},
{
Expand Down
7 changes: 2 additions & 5 deletions src/lib/tour/onboarding/OnboardingTourTexts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ const texts: ITourStepTexts<OnboardingTourStep> = {
$t('Currently you have 100% NIM, and no BTC.'),
],
alternative: [
// TODO Implement this
$t('Check the bar-chart to see how your addresses compose your total balance.'),
],
},
Expand All @@ -64,14 +63,12 @@ const texts: ITourStepTexts<OnboardingTourStep> = {
[OnboardingTourStep.ACCOUNT_OPTIONS]: {
default: [
$t('Create, switch and log out of accounts.'),
$t('All security relevant actions can be found here too.'),
$t('Security options and backup can be found here.'),
],
},
// TODO Review these
[OnboardingTourStep.BACKUP_OPTION_FROM_OPTIONS]: {
default: [
$t('You can always create a new backup.'),
$t('Simply click your account and select ‘Create backup’.'),
$t('You can always create a new backup. Simply click your account and select ‘Create backup’.'),
],
},
[OnboardingTourStep.ONBOARDING_COMPLETED]: {
Expand Down

0 comments on commit f041efe

Please sign in to comment.