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:
Justin Edmund 2024-01-08 04:07:19 -08:00 committed by GitHub
parent 06c7192f25
commit 9ad2b64e2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 60 additions and 27 deletions

View file

@ -78,6 +78,18 @@ const UpdatesPage = () => {
return ( return (
<div className={classes}> <div className={classes}>
<h1>{common('about.segmented_control.updates')}</h1> <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 <ContentUpdate
version="2023-12L" version="2023-12L"
dateString="2023/12/31" dateString="2023/12/31"

View file

@ -184,6 +184,30 @@ const JobSection = (props: Props) => {
</div> </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 // Render: JSX components
return ( return (
<section className={styles.job}> <section className={styles.job}>
@ -196,25 +220,7 @@ const JobSection = (props: Props) => {
onAccessorySelected={handleAccessorySelected} onAccessorySelected={handleAccessorySelected}
/> />
<div className={styles.details}> <div className={styles.details}>
{props.editable ? ( {renderJobDropdown()}
<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>
)}
<ul className={skillContainerClasses}> <ul className={skillContainerClasses}>
{[...Array(numSkills)].map((e, i) => ( {[...Array(numSkills)].map((e, i) => (

View file

@ -80,6 +80,7 @@ const Party = (props: Props) => {
? JSON.parse(cookie as string) ? JSON.parse(cookie as string)
: null : null
// Unset edit key and make the party not editable on first load
let editable = false let editable = false
unsetEditKey() unsetEditKey()
@ -98,7 +99,7 @@ const Party = (props: Props) => {
editable = true editable = true
// Also set edit key header // 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 // Methods: Creating a new party
async function createParty(details?: DetailsObject) { async function createParty(details?: DetailsObject) {
let payload = {} let payload = formatDetailsObject(details ?? {})
if (details) payload = formatDetailsObject(details)
return await api.endpoints.parties.create(payload).then((response) => { return await api.endpoints.parties.create(payload).then((response) => {
storeParty(response.data.party) storeParty(response.data.party)
@ -213,7 +213,7 @@ const Party = (props: Props) => {
// Store the edit key in local storage // Store the edit key in local storage
if (remix.edit_key) { if (remix.edit_key) {
storeEditKey(remix.id, remix.edit_key) storeEditKey(remix.id, remix.edit_key)
setEditKey(remix.id, remix.user) setEditKey(remix.id)
} }
router.push(`/p/${remix.shortcode}`) router.push(`/p/${remix.shortcode}`)
@ -288,10 +288,15 @@ const Party = (props: Props) => {
appState.party.detailsVisible = false appState.party.detailsVisible = false
// Store the edit key in local storage // Handle the state of the edit key
if (team.edit_key) { if (!team.user) {
storeEditKey(team.id, team.edit_key) if (team.edit_key) {
setEditKey(team.id, team.user) storeEditKey(team.id, team.edit_key)
} else if (team.local_id) {
setEditKey(team.local_id)
}
} else {
unsetEditKey()
} }
// Populate state // Populate state

View file

@ -19,6 +19,11 @@
"uncap": "Uncap" "uncap": "Uncap"
}, },
"versions": { "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": { "2023-12U2": {
"features": [ "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!", "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!",

View file

@ -19,6 +19,11 @@
"uncap": "上限解放" "uncap": "上限解放"
}, },
"versions": { "versions": {
"2024-01U": {
"features": [
"ログアウトしたままのユーザーがキャラクターまたは召喚石のタブから編成を作成できない不具合を修正"
]
},
"2023-12U2": { "2023-12U2": {
"features": [ "features": [
"更新の間隔が開いてしまって申し訳ございませんー仕事が忙しくなったし、社会的な義務も増えたし、別のアプリの開発も続きました。granblue.teamの開発が終わってないのでこれからもよろしくお願いします", "更新の間隔が開いてしまって申し訳ございませんー仕事が忙しくなったし、社会的な義務も増えたし、別のアプリの開発も続きました。granblue.teamの開発が終わってないのでこれからもよろしくお願いします",