diff --git a/components/party/Party/index.tsx b/components/party/Party/index.tsx
index 90b4f0fb..45c6ae3f 100644
--- a/components/party/Party/index.tsx
+++ b/components/party/Party/index.tsx
@@ -7,7 +7,7 @@ import clonedeep from 'lodash.clonedeep'
import Alert from '~components/common/Alert'
import PartySegmentedControl from '~components/party/PartySegmentedControl'
-import PartyDetails from '~components/party/PartyDetails'
+import PartyFooter from '~components/party/PartyFooter'
import PartyHeader from '~components/party/PartyHeader'
import WeaponGrid from '~components/weapon/WeaponGrid'
import SummonGrid from '~components/summon/SummonGrid'
@@ -265,6 +265,15 @@ const Party = (props: Props) => {
appState.party.jobSkills = team.job_skills
appState.party.accessory = team.accessory
+ appState.party.chargeAttack = team.charge_attack
+ appState.party.fullAuto = team.full_auto
+ appState.party.autoGuard = team.auto_guard
+ appState.party.autoSummon = team.auto_summon
+ appState.party.clearTime = team.clear_time
+ appState.party.buttonCount = team.button_count
+ appState.party.chainCount = team.chain_count
+ appState.party.turnCount = team.turn_count
+
appState.party.id = team.id
appState.party.shortcode = team.shortcode
appState.party.extra = team.extra
@@ -445,7 +454,7 @@ const Party = (props: Props) => {
- .PlayerButton {
- opacity: 1;
- }
+ &:hover > .PlayerButton {
+ opacity: 1;
+ }
- & > iframe {
- width: 100%;
- height: 100%;
- position: absolute;
- top: 0;
- left: 0;
- }
+ & > iframe {
+ width: 100%;
+ height: 100%;
+ position: absolute;
+ top: 0;
+ left: 0;
+ }
- /* Play button */
- & > .PlayerButton {
- background: none;
- border: none;
- background-image: url('/icons/youtube.svg');
- width: 68px;
- height: 68px;
- opacity: 0.8;
- transition: all 0.2s cubic-bezier(0, 0, 0.2, 1);
- }
+ /* Play button */
+ & > .PlayerButton {
+ background: none;
+ border: none;
+ background-image: url('/icons/youtube.svg');
+ width: 68px;
+ height: 68px;
+ opacity: 0.8;
+ transition: all 0.2s cubic-bezier(0, 0, 0.2, 1);
+ }
- & > .PlayerButton,
- & > .PlayerButton:before {
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate3d(-50%, -50%, 0);
- }
+ & > .PlayerButton,
+ & > .PlayerButton:before {
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate3d(-50%, -50%, 0);
+ }
- /* Post-click styles */
- &.lyt-activated {
- cursor: unset;
- }
- &.lyt-activated::before,
- &.lyt-activated > .PlayerButton {
- opacity: 0;
- pointer-events: none;
- }
+ /* Post-click styles */
+ &.lyt-activated {
+ cursor: unset;
+ }
+ &.lyt-activated::before,
+ &.lyt-activated > .PlayerButton {
+ opacity: 0;
+ pointer-events: none;
}
}
}
diff --git a/components/party/PartyDetails/index.tsx b/components/party/PartyFooter/index.tsx
similarity index 89%
rename from components/party/PartyDetails/index.tsx
rename to components/party/PartyFooter/index.tsx
index f2039977..78450225 100644
--- a/components/party/PartyDetails/index.tsx
+++ b/components/party/PartyFooter/index.tsx
@@ -1,5 +1,6 @@
import React, { useEffect, useState } from 'react'
import { useRouter } from 'next/router'
+import { useSnapshot } from 'valtio'
import { useTranslation } from 'next-i18next'
import clonedeep from 'lodash.clonedeep'
@@ -27,10 +28,12 @@ interface Props {
updateCallback: (details: DetailsObject) => void
}
-const PartyDetails = (props: Props) => {
+const PartyFooter = (props: Props) => {
const { t } = useTranslation('common')
const router = useRouter()
+ const { party } = useSnapshot(appState)
+
const youtubeUrlRegex =
/(?:https:\/\/www\.youtube\.com\/watch\?v=|https:\/\/youtu\.be\/)([\w-]+)/g
@@ -40,16 +43,10 @@ const PartyDetails = (props: Props) => {
const [embeddedDescription, setEmbeddedDescription] =
useState()
- const readOnlyClasses = classNames({
- PartyDetails: true,
- ReadOnly: true,
- Visible: !open,
- })
-
useEffect(() => {
// Extract the video IDs from the description
- if (appState.party.description) {
- const videoIds = extractYoutubeVideoIds(appState.party.description)
+ if (party.description) {
+ const videoIds = extractYoutubeVideoIds(party.description)
// Fetch the video titles for each ID
const fetchPromises = videoIds.map(({ id }) => fetchYoutubeData(id))
@@ -58,7 +55,7 @@ const PartyDetails = (props: Props) => {
Promise.all(fetchPromises).then((videoTitles) => {
// Replace the video URLs in the description with LiteYoutubeEmbed elements
const newDescription = reactStringReplace(
- appState.party.description,
+ party.description,
youtubeUrlRegex,
(match, i) => (
{
} else {
setEmbeddedDescription('')
}
- }, [appState.party.description])
+ }, [party.description])
async function fetchYoutubeData(videoId: string) {
return await youtube
@@ -173,14 +170,6 @@ const PartyDetails = (props: Props) => {
})
}
- const readOnly = () => {
- return (
-
- {embeddedDescription}
-
- )
- }
-
const remixSection = () => {
return (
@@ -192,10 +181,14 @@ const PartyDetails = (props: Props) => {
return (
<>
-
+
+
+ {embeddedDescription}
+
+
{remixes && remixes.length > 0 ? remixSection() : ''}
>
)
}
-export default PartyDetails
+export default PartyFooter