diff --git a/.gitignore b/.gitignore index 9bb7f6d8..46792764 100644 --- a/.gitignore +++ b/.gitignore @@ -58,6 +58,7 @@ public/images/mastery* public/images/updates* public/images/guidebooks* public/images/raids* +public/images/gacha* # Typescript v1 declaration files typings/ diff --git a/README.md b/README.md index 038da0cb..537a8726 100644 --- a/README.md +++ b/README.md @@ -57,15 +57,21 @@ root ├─ chara-main/ ├─ chara-grid/ ├─ chara-square/ +├─ guidebooks/ ├─ jobs/ ├─ job-icons/ +├─ job-portraits/ ├─ job-skills/ +├─ labels/ ├─ mastery/ +├─ placeholders/ +├─ raids/ ├─ summon-main/ ├─ summon-grid/ ├─ summon-square/ ├─ updates/ ├─ weapon-main/ ├─ weapon-grid/ +├─ weapon-keys/ ├─ weapon-square/ ``` diff --git a/components/ElementToggle/index.scss b/components/ElementToggle/index.scss index 595458df..d1910810 100644 --- a/components/ElementToggle/index.scss +++ b/components/ElementToggle/index.scss @@ -47,32 +47,32 @@ &.fire { background: var(--fire-bg); - color: var(--fire-text); + color: var(--fire-hover-text); } &.water { background: var(--water-bg); - color: var(--water-text); + color: var(--water-hover-text); } &.earth { background: var(--earth-bg); - color: var(--earth-text); + color: var(--earth-hover-text); } &.wind { background: var(--wind-bg); - color: var(--wind-text); + color: var(--wind-hover-text); } &.dark { background: var(--dark-bg); - color: var(--dark-text); + color: var(--dark-hover-text); } &.light { background: var(--light-bg); - color: var(--light-text); + color: var(--light-hover-text); } } } diff --git a/components/FilterBar/index.scss b/components/FilterBar/index.scss index 5cfb852f..3bb8821e 100644 --- a/components/FilterBar/index.scss +++ b/components/FilterBar/index.scss @@ -102,6 +102,23 @@ } } + .Filter.Button { + justify-content: center; + + .Text { + display: none; + width: auto; + + @include breakpoint(tablet) { + display: block; + } + + @include breakpoint(phone) { + display: block; + } + } + } + .UserInfo { align-items: center; display: flex; diff --git a/components/FilterBar/index.tsx b/components/FilterBar/index.tsx index 5d94deb9..9d69cca8 100644 --- a/components/FilterBar/index.tsx +++ b/components/FilterBar/index.tsx @@ -181,6 +181,7 @@ const FilterBar = (props: Props) => { className={filterButtonClasses} blended={true} leftAccessoryIcon={} + text={t('filters.name')} onClick={() => setFilterModalOpen(true)} /> diff --git a/components/Header/index.tsx b/components/Header/index.tsx index 3a5ccbe5..5bd6d940 100644 --- a/components/Header/index.tsx +++ b/components/Header/index.tsx @@ -7,7 +7,6 @@ import classNames from 'classnames' import clonedeep from 'lodash.clonedeep' import Link from 'next/link' -import api from '~utils/api' import { accountState, initialAccountState } from '~utils/accountState' import { appState, initialAppState } from '~utils/appState' import { getLocalId } from '~utils/localId' @@ -32,11 +31,8 @@ import Tooltip from '~components/common/Tooltip' import * as Switch from '@radix-ui/react-switch' import ChevronIcon from '~public/icons/Chevron.svg' -import LinkIcon from '~public/icons/Link.svg' import MenuIcon from '~public/icons/Menu.svg' -import RemixIcon from '~public/icons/Remix.svg' import PlusIcon from '~public/icons/Add.svg' -import SaveIcon from '~public/icons/Save.svg' import './index.scss' @@ -51,7 +47,6 @@ const Header = () => { const localeData = retrieveLocaleCookies() // State management - const [copyToastOpen, setCopyToastOpen] = useState(false) const [remixToastOpen, setRemixToastOpen] = useState(false) const [loginModalOpen, setLoginModalOpen] = useState(false) const [signupModalOpen, setSignupModalOpen] = useState(false) @@ -64,7 +59,6 @@ const Header = () => { const [originalName, setOriginalName] = useState('') // Snapshots - const { account } = useSnapshot(accountState) const { party: partySnapshot } = useSnapshot(appState) // Subscribe to app state to listen for party name and @@ -108,15 +102,6 @@ const Header = () => { setRightMenuOpen(false) } - // Methods: Event handlers (Copy toast) - function handleCopyToastOpenChanged(open: boolean) { - setCopyToastOpen(open) - } - - function handleCopyToastCloseClicked() { - setCopyToastOpen(false) - } - // Methods: Event handlers (Remix toasts) function handleRemixToastOpenChanged(open: boolean) { setRemixToastOpen(open) @@ -142,23 +127,6 @@ const Header = () => { router.push(router.asPath, undefined, { locale: language }) } - function copyToClipboard() { - const path = router.asPath.split('/')[1] - - if (path === 'p') { - const el = document.createElement('input') - el.value = window.location.href - el.id = 'url-input' - document.body.appendChild(el) - - el.select() - document.execCommand('copy') - el.remove() - - setCopyToastOpen(true) - } - } - function logout() { // Close menu closeRightMenu() @@ -188,84 +156,6 @@ const Header = () => { router.push('/new') } - function remixTeam() { - setOriginalName(partySnapshot.name ? partySnapshot.name : t('no_title')) - - if (partySnapshot.shortcode) { - const body = getLocalId() - api - .remix({ shortcode: partySnapshot.shortcode, body: body }) - .then((response) => { - const remix = response.data.party - - // Store the edit key in local storage - if (remix.edit_key) { - storeEditKey(remix.id, remix.edit_key) - setEditKey(remix.id, remix.user) - } - - router.push(`/p/${remix.shortcode}`) - setRemixToastOpen(true) - }) - } - } - - function toggleFavorite() { - if (partySnapshot.favorited) unsaveFavorite() - else saveFavorite() - } - - function saveFavorite() { - if (partySnapshot.id) - api.saveTeam({ id: partySnapshot.id }).then((response) => { - if (response.status == 201) appState.party.favorited = true - }) - else console.error('Failed to save team: No party ID') - } - - function unsaveFavorite() { - if (partySnapshot.id) - api.unsaveTeam({ id: partySnapshot.id }).then((response) => { - if (response.status == 200) appState.party.favorited = false - }) - else console.error('Failed to unsave team: No party ID') - } - - // Rendering: Elements - const pageTitle = () => { - let title = '' - let hasAccessory = false - - const path = router.asPath.split('/')[1] - if (path === 'p') { - hasAccessory = true - if (appState.party && appState.party.name) { - title = appState.party.name - } else { - title = t('no_title') - } - } else { - title = '' - } - - return title !== '' ? ( - -