Skip to content

Commit

Permalink
feat: added campaign order planets list if there is no active major o…
Browse files Browse the repository at this point in the history
…rder
  • Loading branch information
dualsaber committed Apr 25, 2024
1 parent 8bd3121 commit 77e2c52
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 9 deletions.
Binary file modified helldivers.widget.zip
Binary file not shown.
33 changes: 24 additions & 9 deletions index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { getPlanetEvents, getAssignments } from "./lib/api"

// CONFIGS
const REFRESH_INTERVAL = 15
const VERSION = "v1.1.0"
const VERSION = "v1.2.0"

export const initialState = {
loading: 1,
Expand Down Expand Up @@ -52,6 +52,13 @@ const title_main = css`
text-align: center;
margin-bottom: 10px;
`
const title_main_normal = css`
color: #fff;
font-size: 12px;
font-weight: bold;
text-align: center;
margin-bottom: 10px;
`
const title_top = css``
const title_bottom = css`
display: flex;
Expand Down Expand Up @@ -150,16 +157,24 @@ export const render = ({ loading, planets, order }) => {
</div>
) : (
<div>
{order.title ? (
{order.title || planets.length ? (
<div>
<div className={title_main}>
<div className={title_top}>{order.title}</div>
<div className={title_bottom}>
<div>
{order.current_amount}/{order.max_amount}
</div>
<div>{order.countdown}</div>
<div className={order.title ? title_main : title_main_normal}>
<div className={title_top}>
{order.title
? order.title
: planets.length
? "Campaign Order"
: null}
</div>
{order.title && (
<div className={title_bottom}>
<div>
{order.current_amount}/{order.max_amount}
</div>
<div>{order.countdown}</div>
</div>
)}
</div>
{planets.map(planet => {
return (
Expand Down

0 comments on commit 77e2c52

Please sign in to comment.