Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/app/i18n/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,9 @@
"logout": "Log-out",
"referAndEarn": "Empfehlen und verdienen",
"earnReferral": "Verdiene 100 €",
"spaceUsed": "{{space}}% Platz verbraucht"
"spaceUsed": "{{space}}% Platz verbraucht",
"account": "Konto",
"giveFeedback": "Feedback geben"
},
"tabs": {
"account": {
Expand Down
4 changes: 3 additions & 1 deletion src/app/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,9 @@
"logout": "Log out",
"referAndEarn": "Refer and Earn",
"earnReferral": "Earn €100",
"spaceUsed": "{{space}}% space used"
"spaceUsed": "{{space}}% space used",
"account": "Account",
"giveFeedback": "Give Feedback"
},
"tabs": {
"account": {
Expand Down
4 changes: 3 additions & 1 deletion src/app/i18n/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,9 @@
"logout": "Cerrar sesión",
"referAndEarn": "Recomienda y gana",
"earnReferral": "Gana 100 €",
"spaceUsed": "{{space}}% espacio usado"
"spaceUsed": "{{space}}% espacio usado",
"account": "Cuenta",
"giveFeedback": "Enviar comentarios"
},
"tabs": {
"account": {
Expand Down
4 changes: 3 additions & 1 deletion src/app/i18n/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,9 @@
"logout": "Déconnexion",
"referAndEarn": "Parrainez et gagnez",
"earnReferral": "Gagnez 100 €",
"spaceUsed": "{{space}}% d'espace utilisé"
"spaceUsed": "{{space}}% d'espace utilisé",
"account": "Compte",
"giveFeedback": "Donner votre avis"
},
"tabs": {
"account": {
Expand Down
4 changes: 3 additions & 1 deletion src/app/i18n/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,9 @@
"logout": "Disconnettersi",
"referAndEarn": "Invita e guadagna",
"earnReferral": "Guadagna 100 €",
"spaceUsed": "{{space}}% spazio usato"
"spaceUsed": "{{space}}% spazio usato",
"account": "Account",
"giveFeedback": "Invia feedback"
},
"tabs": {
"account": {
Expand Down
4 changes: 3 additions & 1 deletion src/app/i18n/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,9 @@
"logout": "Выйти",
"referAndEarn": "Приглашайте и зарабатывайте",
"earnReferral": "Заработайте 100 €",
"spaceUsed": "{{space}}% памяти использовано"
"spaceUsed": "{{space}}% памяти использовано",
"account": "Аккаунт",
"giveFeedback": "Оставить отзыв"
},
"tabs": {
"account": {
Expand Down
4 changes: 3 additions & 1 deletion src/app/i18n/locales/tw.json
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,9 @@
"logout": "登出",
"referAndEarn": "推薦賺取",
"earnReferral": "賺取 €100",
"spaceUsed": "已使用 {{space}}% 的空間"
"spaceUsed": "已使用 {{space}}% 的空間",
"account": "帳戶",
"giveFeedback": "提供意見回饋"
},
"tabs": {
"account": {
Expand Down
4 changes: 3 additions & 1 deletion src/app/i18n/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,9 @@
"logout": "登出",
"referAndEarn": "推荐赚取",
"earnReferral": "赚取 €100",
"spaceUsed": "已使用储存空间的{{space}}%"
"spaceUsed": "已用存储空间{{space}}%",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The symbols for ‘spaceUsed’ are no longer the same as before, is this change correct?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated the text because it was too long and threw off the layout quite a bit there was a line break that caused the {{space}} text to appear below it, making it look a bit odd. Everything was too cramped. The literal translations change is “Used storage space” -> “Used storage”

"account": "账户",
"giveFeedback": "提供反馈"
},
"tabs": {
"account": {
Expand Down
39 changes: 29 additions & 10 deletions src/views/Home/components/AccountPopover.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { UserSettings } from '@internxt/sdk/dist/shared/types/userSettings';
import { useTranslationContext } from 'app/i18n/provider/TranslationProvider';
import { Desktop, SignOut, Gear, Gift } from '@phosphor-icons/react';
import { Desktop, SignOut, Gear, Gift, User, Megaphone } from '@phosphor-icons/react';
import i18next from 'i18next';
import { ReactNode } from 'react';
import { Popover } from '@internxt/ui';
Expand Down Expand Up @@ -44,14 +44,16 @@ export default function AccountPopover({ className = '', user, plan }: Readonly<

const percentageUsed = Math.round((usage / limit) * 100) || 0;

const separator = <div className="border-translate mx-3 my-0.5 border-gray-10" />;
const separator = <div className="border-translate mx-3 my-0.5 bg-gray-10 h-[1px]" />;

const FEEDBACK_URL = 'https://internxt.userjot.com/';

function onLogout() {
dispatch(userThunks.logoutThunk());
}

const panel = (
<div className="w-52">
<div className="w-56">
<div className="flex items-center p-3">
{avatarWrapper}
<div className="ml-2 min-w-0">
Expand All @@ -76,7 +78,7 @@ export default function AccountPopover({ className = '', user, plan }: Readonly<
</p>
{plan.showUpgrade && (
<button
className="w-full cursor-pointer text-sm font-medium text-primary no-underline"
className="w-min whitespace-nowrap cursor-pointer text-sm font-medium text-primary no-underline"
onClick={() => {
navigationService.openPreferencesDialog({
section: 'account',
Expand All @@ -91,12 +93,20 @@ export default function AccountPopover({ className = '', user, plan }: Readonly<
)}
</div>
{separator}
<Item onClick={() => desktopService.openDownloadAppUrl(translate)}>
<Desktop size={20} />
<p className="ml-3 truncate">{translate('views.account.popover.downloadApp')}</p>
<Item
onClick={() => {
navigationService.openPreferencesDialog({
section: 'account',
subsection: 'account',
workspaceUuid: selectedWorkspace?.workspaceUser.workspaceId,
});
dispatch(uiActions.setIsPreferencesDialogOpen(true));
}}
>
<User size={20} />
<p className="ml-3">{translate('views.account.popover.account')}</p>
</Item>
<button
className="flex w-full cursor-pointer items-center px-3 py-2 text-gray-80 no-underline hover:bg-gray-1 hover:text-gray-80 dark:hover:bg-gray-10"
<Item
onClick={() => {
navigationService.openPreferencesDialog({
section: 'general',
Expand All @@ -108,7 +118,12 @@ export default function AccountPopover({ className = '', user, plan }: Readonly<
>
<Gear size={20} />
<p className="ml-3">{translate('views.account.popover.settings')}</p>
</button>
</Item>
<Item onClick={() => desktopService.openDownloadAppUrl(translate)}>
<Desktop size={20} />
<p className="ml-3 truncate">{translate('views.account.popover.downloadApp')}</p>
</Item>
{separator}
{isReferralEligible && (
<Item
onClick={() => {
Expand All @@ -127,6 +142,10 @@ export default function AccountPopover({ className = '', user, plan }: Readonly<
<p className="ml-3 truncate">{translate('views.account.popover.referAndEarn')}</p>
</Item>
)}
<Item onClick={() => window.open(FEEDBACK_URL, '_blank', 'noopener,noreferrer')}>
<Megaphone size={20} className="-scale-x-100" />
<p className="ml-3 truncate">{translate('views.account.popover.giveFeedback')}</p>
</Item>
{separator}
<Item onClick={onLogout}>
<SignOut size={20} />
Expand Down
Loading