diff --git a/components/builds/BuildCard.tsx b/components/builds/BuildCard.tsx index 25dd47ba8..61566f9a5 100644 --- a/components/builds/BuildCard.tsx +++ b/components/builds/BuildCard.tsx @@ -11,6 +11,7 @@ import { import { Plural, t, Trans } from "@lingui/macro"; import { Ability, Prisma } from "@prisma/client"; import ModeImage from "components/common/ModeImage"; +import MyIconButton from "components/common/MyIconButton"; import UserAvatar from "components/common/UserAvatar"; import WeaponImage from "components/common/WeaponImage"; import { getEmojiFlag } from "countries-list"; @@ -114,13 +115,12 @@ const BuildCard: React.FC = ({ ) : null} - setApView(!apView)} - aria-label="Set build card view" - fontSize="20px" + popup={apView ? t`Show abilities` : t`Show ability points`} icon={} + fontSize="20px" mr="0.5em" /> = ({ )} > - } mr="0.5em" @@ -141,13 +140,11 @@ const BuildCard: React.FC = ({ {onEdit && ( - onEdit(build)} - aria-label="Edit build" - fontSize="20px" icon={} + fontSize="20px" ml="0.5em" /> )} @@ -201,7 +198,7 @@ const BuildCard: React.FC = ({ if (build.modes.length === 0 && !build.description) return null; return ( - + void; + icon: React.ReactElement; + popup: string; +} + +const MyIconButton: React.FC> = ({ + onClick, + icon, + popup, + ...props +}) => { + const { secondaryBgColor } = useMyTheme(); + return ( + + + + + + {popup} + + + + ); +}; + +export default MyIconButton; diff --git a/locale/de/messages.json b/locale/de/messages.json index 60c9dd86c..4adeb48d7 100644 --- a/locale/de/messages.json +++ b/locale/de/messages.json @@ -7,6 +7,10 @@ "Enemy has not reached the 50 point mark or there is more than 30 seconds on the clock": "", "Intensity": "", "Maker of the build has finished in the top 500 of X Rank with this weapon": "", + "Show abilities": "", + "Show ability points": "", + "Show in Build Analyzer": "", + "Edit build": "", "{otherBuildCount, plural, one {Show # more build by {username}} other {Show # more builds by {username}}}": "", "Included": "", "Min AP": "", diff --git a/locale/el/messages.json b/locale/el/messages.json index 1a11b5e0d..8dabc8d82 100644 --- a/locale/el/messages.json +++ b/locale/el/messages.json @@ -7,6 +7,10 @@ "Enemy has not reached the 50 point mark or there is more than 30 seconds on the clock": "", "Intensity": "", "Maker of the build has finished in the top 500 of X Rank with this weapon": "", + "Show abilities": "", + "Show ability points": "", + "Show in Build Analyzer": "", + "Edit build": "", "{otherBuildCount, plural, one {Show # more build by {username}} other {Show # more builds by {username}}}": "", "Included": "", "Min AP": "", diff --git a/locale/en/messages.json b/locale/en/messages.json index f72d2790d..8146bbf28 100644 --- a/locale/en/messages.json +++ b/locale/en/messages.json @@ -7,6 +7,10 @@ "Enemy has not reached the 50 point mark or there is more than 30 seconds on the clock": "Enemy has not reached the 50 point mark or there is more than 30 seconds on the clock", "Intensity": "Intensity", "Maker of the build has finished in the top 500 of X Rank with this weapon": "Maker of the build has finished in the top 500 of X Rank with this weapon", + "Show abilities": "Show abilities", + "Show ability points": "Show ability points", + "Show in Build Analyzer": "Show in Build Analyzer", + "Edit build": "Edit build", "{otherBuildCount, plural, one {Show # more build by {username}} other {Show # more builds by {username}}}": "{otherBuildCount, plural, one {Show # more build by {username}} other {Show # more builds by {username}}}", "Included": "Included", "Min AP": "Min AP", diff --git a/locale/es/messages.json b/locale/es/messages.json index 1aa2ce98f..847332f34 100644 --- a/locale/es/messages.json +++ b/locale/es/messages.json @@ -7,6 +7,10 @@ "Enemy has not reached the 50 point mark or there is more than 30 seconds on the clock": "", "Intensity": "", "Maker of the build has finished in the top 500 of X Rank with this weapon": "", + "Show abilities": "", + "Show ability points": "", + "Show in Build Analyzer": "", + "Edit build": "", "{otherBuildCount, plural, one {Show # more build by {username}} other {Show # more builds by {username}}}": "", "Included": "", "Min AP": "", diff --git a/locale/fr/messages.json b/locale/fr/messages.json index 399740148..6999c20ea 100644 --- a/locale/fr/messages.json +++ b/locale/fr/messages.json @@ -7,6 +7,10 @@ "Enemy has not reached the 50 point mark or there is more than 30 seconds on the clock": "", "Intensity": "", "Maker of the build has finished in the top 500 of X Rank with this weapon": "", + "Show abilities": "", + "Show ability points": "", + "Show in Build Analyzer": "", + "Edit build": "", "{otherBuildCount, plural, one {Show # more build by {username}} other {Show # more builds by {username}}}": "", "Included": "", "Min AP": "", diff --git a/locale/it/messages.json b/locale/it/messages.json index 501003874..d5dba8bee 100644 --- a/locale/it/messages.json +++ b/locale/it/messages.json @@ -7,6 +7,10 @@ "Enemy has not reached the 50 point mark or there is more than 30 seconds on the clock": "", "Intensity": "", "Maker of the build has finished in the top 500 of X Rank with this weapon": "", + "Show abilities": "", + "Show ability points": "", + "Show in Build Analyzer": "", + "Edit build": "", "{otherBuildCount, plural, one {Show # more build by {username}} other {Show # more builds by {username}}}": "", "Included": "", "Min AP": "", diff --git a/locale/ja/messages.json b/locale/ja/messages.json index 65c674970..4c8926182 100644 --- a/locale/ja/messages.json +++ b/locale/ja/messages.json @@ -7,6 +7,10 @@ "Enemy has not reached the 50 point mark or there is more than 30 seconds on the clock": "", "Intensity": "", "Maker of the build has finished in the top 500 of X Rank with this weapon": "", + "Show abilities": "", + "Show ability points": "", + "Show in Build Analyzer": "", + "Edit build": "", "{otherBuildCount, plural, one {Show # more build by {username}} other {Show # more builds by {username}}}": "", "Included": "", "Min AP": "", diff --git a/locale/ko/messages.json b/locale/ko/messages.json index 5a7c50974..8c2efe086 100644 --- a/locale/ko/messages.json +++ b/locale/ko/messages.json @@ -7,6 +7,10 @@ "Enemy has not reached the 50 point mark or there is more than 30 seconds on the clock": "", "Intensity": "", "Maker of the build has finished in the top 500 of X Rank with this weapon": "", + "Show abilities": "", + "Show ability points": "", + "Show in Build Analyzer": "", + "Edit build": "", "{otherBuildCount, plural, one {Show # more build by {username}} other {Show # more builds by {username}}}": "", "Included": "", "Min AP": "", diff --git a/locale/nl/messages.json b/locale/nl/messages.json index 65c674970..4c8926182 100644 --- a/locale/nl/messages.json +++ b/locale/nl/messages.json @@ -7,6 +7,10 @@ "Enemy has not reached the 50 point mark or there is more than 30 seconds on the clock": "", "Intensity": "", "Maker of the build has finished in the top 500 of X Rank with this weapon": "", + "Show abilities": "", + "Show ability points": "", + "Show in Build Analyzer": "", + "Edit build": "", "{otherBuildCount, plural, one {Show # more build by {username}} other {Show # more builds by {username}}}": "", "Included": "", "Min AP": "", diff --git a/locale/pt/messages.json b/locale/pt/messages.json index 3a7ac0221..6e28f23b6 100644 --- a/locale/pt/messages.json +++ b/locale/pt/messages.json @@ -7,6 +7,10 @@ "Enemy has not reached the 50 point mark or there is more than 30 seconds on the clock": "", "Intensity": "", "Maker of the build has finished in the top 500 of X Rank with this weapon": "", + "Show abilities": "", + "Show ability points": "", + "Show in Build Analyzer": "", + "Edit build": "", "{otherBuildCount, plural, one {Show # more build by {username}} other {Show # more builds by {username}}}": "", "Included": "", "Min AP": "", diff --git a/locale/ru/messages.json b/locale/ru/messages.json index 65c674970..4c8926182 100644 --- a/locale/ru/messages.json +++ b/locale/ru/messages.json @@ -7,6 +7,10 @@ "Enemy has not reached the 50 point mark or there is more than 30 seconds on the clock": "", "Intensity": "", "Maker of the build has finished in the top 500 of X Rank with this weapon": "", + "Show abilities": "", + "Show ability points": "", + "Show in Build Analyzer": "", + "Edit build": "", "{otherBuildCount, plural, one {Show # more build by {username}} other {Show # more builds by {username}}}": "", "Included": "", "Min AP": "", diff --git a/locale/sv/messages.json b/locale/sv/messages.json index da48efead..7fe8d5485 100644 --- a/locale/sv/messages.json +++ b/locale/sv/messages.json @@ -7,6 +7,10 @@ "Enemy has not reached the 50 point mark or there is more than 30 seconds on the clock": "", "Intensity": "Intensitet", "Maker of the build has finished in the top 500 of X Rank with this weapon": "", + "Show abilities": "", + "Show ability points": "", + "Show in Build Analyzer": "", + "Edit build": "", "{otherBuildCount, plural, one {Show # more build by {username}} other {Show # more builds by {username}}}": "", "Included": "", "Min AP": "",