Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: display text status of invites #572

Closed
wants to merge 2 commits into from
Closed
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
15 changes: 7 additions & 8 deletions src/components/Invites/Invites.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import BackImage from '@media/UI/invite/back.png';
import EditImage from '@media/UI/invite/pencil.png';
import SaveImage from '@media/UI/invite/check-mark.png';
import DeleteImage from '@media/UI/invite/delete.png';
import DollarImage from '@media/UI/invite/dollar-sign.png';
import EmptyImage from '@media/UI/invite/empty.png';
import copy from 'copy-to-clipboard';
import { ConfirmDeleteModal } from '@components/Modals';
Expand Down Expand Up @@ -167,11 +166,15 @@ const Invites: FC<AllInvitesProps> = ({
}

const inviteStatusText = intl.get(InviteStatusText[status]);
const inviteStatusTextShort = intl.get(`${InviteStatusText[status]}_SHORT`);
return {
inviteStatusClass: classes[status],
inviteStatusText: inviteStatusText
? inviteStatusText
: intl.get('STATUS_IS_NOT_AVAILABLE'),
inviteStatusTextShort: inviteStatusTextShort
? inviteStatusTextShort
: intl.get('STATUS_IS_NOT_AVAILABLE_SHORT'),
};
};

Expand Down Expand Up @@ -287,13 +290,9 @@ const Invites: FC<AllInvitesProps> = ({
setInviteAction(invite, InviteMode.Delete)
}
/>
{/*<img*/}
{/* className={getActionClasses(invite)}*/}
{/* width={18}*/}
{/* src={DollarImage.src}*/}
{/* alt="Top Up the invite"*/}
{/* onClick={() => onTopUpInvite && onTopUpInvite(invite)}*/}
{/*/>*/}
<button className="ml-auto text-sm font-medium bg-green-200 text-green-700 py-0.5 px-2 rounded-full shadow-md hover:bg-green-300 focus:outline-none focus:ring-green-400 focus:ring-opacity-75 flex items-center whitespace-nowrap mb-1">
{inviteStatus.inviteStatusTextShort}
</button>
</div>
)}
<div
Expand Down
5 changes: 5 additions & 0 deletions src/locales/ch-CH.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@
"INVITE_NOT_USED_YET": "邀请尚未使用",
"INVITE_IS_PRIVATE": "邀请是私密的",
"STATUS_IS_NOT_AVAILABLE": "状态不可用",
"FDS_ACCOUNT_REGISTERED_SHORT": "已注册",
"USER_LOGGED_IN_VIA_METAMASK_SHORT": "通过MetaMask登录",
"INVITE_NOT_USED_YET_SHORT": "未使用",
"INVITE_IS_PRIVATE_SHORT": "私有",
"STATUS_IS_NOT_AVAILABLE_SHORT": "不可用",
"NO_INVITES_HERE": "这里没有邀请",
"COPY_INVITE": "点击复制邀请",
"URL_COPIED": "URL 已复制",
Expand Down
5 changes: 5 additions & 0 deletions src/locales/de-DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@
"INVITE_NOT_USED_YET": "Einladung noch nicht verwendet",
"INVITE_IS_PRIVATE": "Einladung ist privat",
"STATUS_IS_NOT_AVAILABLE": "Status ist nicht verfügbar",
"FDS_ACCOUNT_REGISTERED_SHORT": "Registriert",
"USER_LOGGED_IN_VIA_METAMASK_SHORT": "Eingeloggt",
"INVITE_NOT_USED_YET_SHORT": "Noch nicht verwendet",
"INVITE_IS_PRIVATE_SHORT": "Privat",
"STATUS_IS_NOT_AVAILABLE_SHORT": "Nicht verfügbar",
"NO_INVITES_HERE": "Keine Einladungen hier",
"COPY_INVITE": "Klicken, um die Einladung zu kopieren",
"URL_COPIED": "URL kopiert",
Expand Down
5 changes: 5 additions & 0 deletions src/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@
"INVITE_NOT_USED_YET": "Invite not used yet",
"INVITE_IS_PRIVATE": "Invite is private",
"STATUS_IS_NOT_AVAILABLE": "Status is not available",
"FDS_ACCOUNT_REGISTERED_SHORT": "Registered",
"USER_LOGGED_IN_VIA_METAMASK_SHORT": "Logged in",
"INVITE_NOT_USED_YET_SHORT": "Not used",
"INVITE_IS_PRIVATE_SHORT": "Private",
"STATUS_IS_NOT_AVAILABLE_SHORT": "N/A",
"NO_INVITES_HERE": "No invites here",
"COPY_INVITE": "Click to copy the invite",
"URL_COPIED": "URL copied",
Expand Down
5 changes: 5 additions & 0 deletions src/locales/es-ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@
"INVITE_NOT_USED_YET": "La invitación aún no ha sido utilizada",
"INVITE_IS_PRIVATE": "La invitación es privada",
"STATUS_IS_NOT_AVAILABLE": "El estado no está disponible",
"FDS_ACCOUNT_REGISTERED_SHORT": "Registrado",
"USER_LOGGED_IN_VIA_METAMASK_SHORT": "Conectado",
"INVITE_NOT_USED_YET_SHORT": "No utilizado",
"INVITE_IS_PRIVATE_SHORT": "Privado",
"STATUS_IS_NOT_AVAILABLE_SHORT": "No disponible",
"NO_INVITES_HERE": "No hay invitaciones aquí",
"COPY_INVITE": "Haga clic para copiar la invitación",
"URL_COPIED": "URL copiada",
Expand Down
5 changes: 5 additions & 0 deletions src/locales/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@
"INVITE_NOT_USED_YET": "L'invitation n'a pas encore été utilisée",
"INVITE_IS_PRIVATE": "L'invitation est privée",
"STATUS_IS_NOT_AVAILABLE": "Le statut n'est pas disponible",
"FDS_ACCOUNT_REGISTERED_SHORT": "Enregistré",
"USER_LOGGED_IN_VIA_METAMASK_SHORT": "Connecté",
"INVITE_NOT_USED_YET_SHORT": "Pas encore utilisé",
"INVITE_IS_PRIVATE_SHORT": "Privé",
"STATUS_IS_NOT_AVAILABLE_SHORT": "Indisponible",
"NO_INVITES_HERE": "Aucune invitation ici",
"COPY_INVITE": "Cliquez pour copier l'invitation",
"URL_COPIED": "URL copiée",
Expand Down
5 changes: 5 additions & 0 deletions src/locales/hu-HU.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@
"INVITE_NOT_USED_YET": "A meghívó még nem lett használva",
"INVITE_IS_PRIVATE": "A meghívó privát",
"STATUS_IS_NOT_AVAILABLE": "Az állapot nem érhető el",
"FDS_ACCOUNT_REGISTERED_SHORT": "Regisztrált",
"USER_LOGGED_IN_VIA_METAMASK_SHORT": "Bejelentkezett",
"INVITE_NOT_USED_YET_SHORT": "Még nem használt",
"INVITE_IS_PRIVATE_SHORT": "Privát",
"STATUS_IS_NOT_AVAILABLE_SHORT": "Nem elérhető",
"NO_INVITES_HERE": "Nincsenek meghívók itt",
"COPY_INVITE": "Kattints a meghívó másolásához",
"URL_COPIED": "URL másolva",
Expand Down
5 changes: 5 additions & 0 deletions src/locales/it-IT.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@
"INVITE_NOT_USED_YET": "Invito non ancora utilizzato",
"INVITE_IS_PRIVATE": "L'invito è privato",
"STATUS_IS_NOT_AVAILABLE": "Lo stato non è disponibile",
"FDS_ACCOUNT_REGISTERED_SHORT": "Registrato",
"USER_LOGGED_IN_VIA_METAMASK_SHORT": "Connesso",
"INVITE_NOT_USED_YET_SHORT": "Non utilizzato",
"INVITE_IS_PRIVATE_SHORT": "Privato",
"STATUS_IS_NOT_AVAILABLE_SHORT": "Non disponibile",
"NO_INVITES_HERE": "Nessun invito qui",
"COPY_INVITE": "Fai clic per copiare l'invito",
"URL_COPIED": "URL copiato",
Expand Down
5 changes: 5 additions & 0 deletions src/locales/jp-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@
"INVITE_NOT_USED_YET": "招待はまだ使用されていません",
"INVITE_IS_PRIVATE": "招待はプライベートです",
"STATUS_IS_NOT_AVAILABLE": "ステータスは利用できません",
"FDS_ACCOUNT_REGISTERED_SHORT": "登録済み",
"USER_LOGGED_IN_VIA_METAMASK_SHORT": "MetaMask経由でログイン",
"INVITE_NOT_USED_YET_SHORT": "未使用",
"INVITE_IS_PRIVATE_SHORT": "非公開",
"STATUS_IS_NOT_AVAILABLE_SHORT": "利用不可",
"NO_INVITES_HERE": "ここには招待がありません",
"COPY_INVITE": "クリックして招待をコピー",
"URL_COPIED": "コピーしました!",
Expand Down
5 changes: 5 additions & 0 deletions src/locales/pt-PT.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@
"INVITE_NOT_USED_YET": "Convite ainda não utilizado",
"INVITE_IS_PRIVATE": "Convite é privado",
"STATUS_IS_NOT_AVAILABLE": "Status não disponível",
"FDS_ACCOUNT_REGISTERED_SHORT": "Registrado",
"USER_LOGGED_IN_VIA_METAMASK_SHORT": "Logado",
"INVITE_NOT_USED_YET_SHORT": "Não utilizado",
"INVITE_IS_PRIVATE_SHORT": "Privado",
"STATUS_IS_NOT_AVAILABLE_SHORT": "Indisponível",
"NO_INVITES_HERE": "Nenhum convite aqui",
"COPY_INVITE": "Clique para copiar o convite",
"URL_COPIED": "URL copiada",
Expand Down
5 changes: 5 additions & 0 deletions src/locales/rs-RS.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@
"INVITE_NOT_USED_YET": "Pozivnica još nije korišćena",
"INVITE_IS_PRIVATE": "Pozivnica je privatna",
"STATUS_IS_NOT_AVAILABLE": "Status nije dostupan",
"FDS_ACCOUNT_REGISTERED_SHORT": "Registrovan",
"USER_LOGGED_IN_VIA_METAMASK_SHORT": "Ulogovan preko MetaMask-a",
"INVITE_NOT_USED_YET_SHORT": "Još nije iskorišćen",
"INVITE_IS_PRIVATE_SHORT": "Privatan",
"STATUS_IS_NOT_AVAILABLE_SHORT": "Nije dostupno",
"NO_INVITES_HERE": "Nema pozivnica ovde",
"COPY_INVITE": "Kliknite da kopirate pozivnicu",
"URL_COPIED": "URL kopiran",
Expand Down
5 changes: 5 additions & 0 deletions src/locales/sl-SI.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@
"INVITE_NOT_USED_YET": "Povabilo še ni uporabljeno",
"INVITE_IS_PRIVATE": "Povabilo je zasebno",
"STATUS_IS_NOT_AVAILABLE": "Status ni na voljo",
"FDS_ACCOUNT_REGISTERED_SHORT": "Registriran",
"USER_LOGGED_IN_VIA_METAMASK_SHORT": "Prijavljen",
"INVITE_NOT_USED_YET_SHORT": "Še ni uporabljeno",
"INVITE_IS_PRIVATE_SHORT": "Zasebno",
"STATUS_IS_NOT_AVAILABLE_SHORT": "Ni na voljo",
"NO_INVITES_HERE": "Tukaj ni povabil",
"COPY_INVITE": "Kliknite za kopiranje povabila",
"URL_COPIED": "URL kopiran",
Expand Down
5 changes: 5 additions & 0 deletions src/locales/tr-TR.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@
"INVITE_NOT_USED_YET": "Davet henüz kullanılmadı",
"INVITE_IS_PRIVATE": "Davet özeldir",
"STATUS_IS_NOT_AVAILABLE": "Durum mevcut değil",
"FDS_ACCOUNT_REGISTERED_SHORT": "Kayıtlı",
"USER_LOGGED_IN_VIA_METAMASK_SHORT": "MetaMask ile giriş yapıldı",
"INVITE_NOT_USED_YET_SHORT": "Henüz kullanılmadı",
"INVITE_IS_PRIVATE_SHORT": "Özel",
"STATUS_IS_NOT_AVAILABLE_SHORT": "Mevcut değil",
"NO_INVITES_HERE": "Burada davet yok",
"COPY_INVITE": "Daveti kopyalamak için tıklayın",
"URL_COPIED": "Kopyalandı!",
Expand Down
Loading