2024/01 Update (#398)
* Adds Celestial Weapons and final Evoker uncaps * Fixes a bug that prevented logged out users from creating new parties from the Character or Summon tabs
This commit is contained in:
parent
06c7192f25
commit
9ad2b64e2d
5 changed files with 60 additions and 27 deletions
|
|
@ -78,6 +78,18 @@ const UpdatesPage = () => {
|
|||
return (
|
||||
<div className={classes}>
|
||||
<h1>{common('about.segmented_control.updates')}</h1>
|
||||
<ContentUpdate
|
||||
version="2024-01U"
|
||||
dateString="2024/01/05"
|
||||
event="events.content"
|
||||
newItems={{
|
||||
weapon: ['1040025400', '1040816300'],
|
||||
}}
|
||||
uncappedItems={{
|
||||
character: ['3040167000', '3040166000'],
|
||||
}}
|
||||
numNotes={1}
|
||||
/>
|
||||
<ContentUpdate
|
||||
version="2023-12L"
|
||||
dateString="2023/12/31"
|
||||
|
|
|
|||
|
|
@ -184,6 +184,30 @@ const JobSection = (props: Props) => {
|
|||
</div>
|
||||
)
|
||||
|
||||
const renderJobDropdown = () => {
|
||||
if (props.editable) {
|
||||
return (
|
||||
<JobDropdown
|
||||
currentJob={party.job?.id}
|
||||
onChange={receiveJob}
|
||||
ref={selectRef}
|
||||
/>
|
||||
)
|
||||
} else {
|
||||
return (
|
||||
<div className={styles.name}>
|
||||
{party.job && (
|
||||
<img
|
||||
alt={party.job.name[locale]}
|
||||
src={`${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/job-icons/${party.job.granblue_id}.png`}
|
||||
/>
|
||||
)}
|
||||
<h3>{party.job ? party.job.name[locale] : t('no_job')}</h3>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// Render: JSX components
|
||||
return (
|
||||
<section className={styles.job}>
|
||||
|
|
@ -196,25 +220,7 @@ const JobSection = (props: Props) => {
|
|||
onAccessorySelected={handleAccessorySelected}
|
||||
/>
|
||||
<div className={styles.details}>
|
||||
{props.editable ? (
|
||||
<JobDropdown
|
||||
currentJob={party.job?.id}
|
||||
onChange={receiveJob}
|
||||
ref={selectRef}
|
||||
/>
|
||||
) : (
|
||||
<div className={styles.name}>
|
||||
{party.job ? (
|
||||
<img
|
||||
alt={party.job.name[locale]}
|
||||
src={`${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/job-icons/${party.job.granblue_id}.png`}
|
||||
/>
|
||||
) : (
|
||||
''
|
||||
)}
|
||||
<h3>{party.job ? party.job.name[locale] : t('no_job')}</h3>
|
||||
</div>
|
||||
)}
|
||||
{renderJobDropdown()}
|
||||
|
||||
<ul className={skillContainerClasses}>
|
||||
{[...Array(numSkills)].map((e, i) => (
|
||||
|
|
|
|||
|
|
@ -80,6 +80,7 @@ const Party = (props: Props) => {
|
|||
? JSON.parse(cookie as string)
|
||||
: null
|
||||
|
||||
// Unset edit key and make the party not editable on first load
|
||||
let editable = false
|
||||
unsetEditKey()
|
||||
|
||||
|
|
@ -98,7 +99,7 @@ const Party = (props: Props) => {
|
|||
editable = true
|
||||
|
||||
// Also set edit key header
|
||||
setEditKey(props.team.id, props.team.user)
|
||||
setEditKey(props.team.id)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -109,8 +110,7 @@ const Party = (props: Props) => {
|
|||
|
||||
// Methods: Creating a new party
|
||||
async function createParty(details?: DetailsObject) {
|
||||
let payload = {}
|
||||
if (details) payload = formatDetailsObject(details)
|
||||
let payload = formatDetailsObject(details ?? {})
|
||||
|
||||
return await api.endpoints.parties.create(payload).then((response) => {
|
||||
storeParty(response.data.party)
|
||||
|
|
@ -213,7 +213,7 @@ const Party = (props: Props) => {
|
|||
// Store the edit key in local storage
|
||||
if (remix.edit_key) {
|
||||
storeEditKey(remix.id, remix.edit_key)
|
||||
setEditKey(remix.id, remix.user)
|
||||
setEditKey(remix.id)
|
||||
}
|
||||
|
||||
router.push(`/p/${remix.shortcode}`)
|
||||
|
|
@ -288,10 +288,15 @@ const Party = (props: Props) => {
|
|||
|
||||
appState.party.detailsVisible = false
|
||||
|
||||
// Store the edit key in local storage
|
||||
if (team.edit_key) {
|
||||
storeEditKey(team.id, team.edit_key)
|
||||
setEditKey(team.id, team.user)
|
||||
// Handle the state of the edit key
|
||||
if (!team.user) {
|
||||
if (team.edit_key) {
|
||||
storeEditKey(team.id, team.edit_key)
|
||||
} else if (team.local_id) {
|
||||
setEditKey(team.local_id)
|
||||
}
|
||||
} else {
|
||||
unsetEditKey()
|
||||
}
|
||||
|
||||
// Populate state
|
||||
|
|
|
|||
|
|
@ -19,6 +19,11 @@
|
|||
"uncap": "Uncap"
|
||||
},
|
||||
"versions": {
|
||||
"2024-01U": {
|
||||
"features": [
|
||||
"Fixed a bug that prevented logged out users from creating teams if they started from the Character or Summon tabs"
|
||||
]
|
||||
},
|
||||
"2023-12U2": {
|
||||
"features": [
|
||||
"Sorry for the longer spaces between updates—life has been a bit busy. Work has gotten a lot busier, I have more social obligations, and am working on another app. I haven't abandoned granblue.team though. Thanks for your patience!",
|
||||
|
|
|
|||
|
|
@ -19,6 +19,11 @@
|
|||
"uncap": "上限解放"
|
||||
},
|
||||
"versions": {
|
||||
"2024-01U": {
|
||||
"features": [
|
||||
"ログアウトしたままのユーザーがキャラクターまたは召喚石のタブから編成を作成できない不具合を修正"
|
||||
]
|
||||
},
|
||||
"2023-12U2": {
|
||||
"features": [
|
||||
"更新の間隔が開いてしまって申し訳ございませんー仕事が忙しくなったし、社会的な義務も増えたし、別のアプリの開発も続きました。granblue.teamの開発が終わってないのでこれからもよろしくお願いします!",
|
||||
|
|
|
|||
Loading…
Reference in a new issue