Skip to content

Commit 01deb8a

Browse files
authored
Merge pull request #1738 from ThingEngineering/main
Deploy
2 parents 74c188a + 9fc144b commit 01deb8a

File tree

7 files changed

+210
-167
lines changed

7 files changed

+210
-167
lines changed

apps/frontend/components/home/table/head/HomeTableHeadItems.svelte

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010

1111
<style lang="scss">
1212
td {
13+
--image-border-width: 2px;
14+
--padding-left: 0;
15+
--padding-right: 0;
1316
--width: 2rem;
1417
1518
word-spacing: -0.2ch;
@@ -18,11 +21,12 @@
1821

1922
{#each settingsState.activeView.homeItems as itemId (itemId)}
2023
{@const itemIdString = itemId.toString()}
24+
{@const item = wowthingData.items.items[itemId]}
2125
<td
22-
class="sortable sorted-{getSortState(itemIdString)}"
26+
class="sortable sorted-{getSortState(itemIdString)} quality{item?.quality || 1}-border"
2327
data-tooltip={wowthingData.items.items[itemId].name}
2428
onclick={() => setSortState(itemIdString)}
2529
>
26-
<WowthingImage name="item/{itemId}" size={16} border={1} />
30+
<WowthingImage name="item/{itemId}" size={16} border={2} />
2731
</td>
2832
{/each}
Lines changed: 13 additions & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,11 @@
11
<script lang="ts">
22
import { getCharacterTableContext } from '@/components/character-table/context';
33
import { Constants } from '@/data/constants';
4-
import { imageStrings } from '@/data/icons';
54
import { expansionProfessionConcentration } from '@/data/professions/cooldowns';
65
import { professionMoxie } from '@/data/professions/moxie';
7-
import { Region } from '@/enums/region';
8-
import { settingsState } from '@/shared/state/settings.svelte';
9-
import { wowthingData } from '@/shared/stores/data';
10-
import { timeStore } from '@/shared/stores/time';
11-
import { componentTooltip } from '@/shared/utils/tooltips/component-tooltip.svelte';
12-
import { getCurrencyData } from '@/utils/characters/get-currency-data';
136
import type { CharacterProps } from '@/types/props';
147
15-
import Tooltip from '@/components/tooltips/professions/TooltipProfessions.svelte';
16-
import WowthingImage from '@/shared/components/images/sources/WowthingImage.svelte';
8+
import Profession from './HomeTableRowProfessionsV2Profession.svelte';
179
1810
let { character }: CharacterProps = $props();
1911
@@ -49,18 +41,6 @@
4941
(fields.includes('concentration') && anyConcentration[1] ? 1 : 0) +
5042
(fields.includes('moxie') && anyMoxie[1] ? 1 : 0),
5143
]);
52-
53-
function statusClass(fullIsBad: boolean, percent: number) {
54-
if (percent >= 100) {
55-
return fullIsBad ? 'status-fail' : 'status-success';
56-
} else if (percent >= 75) {
57-
return fullIsBad ? 'status-warn' : 'status-shrug';
58-
} else if (percent > 25 && percent < 75) {
59-
return fullIsBad ? 'status-shrug' : 'status-warn';
60-
} else {
61-
return fullIsBad ? 'status-success' : 'status-fail';
62-
}
63-
}
6444
</script>
6545

6646
<style lang="scss">
@@ -78,125 +58,26 @@
7858
.professions {
7959
display: grid;
8060
width: 100%;
81-
}
82-
.profession {
83-
align-items: center;
84-
align-self: center;
85-
display: grid;
86-
flex-wrap: nowrap;
87-
gap: 0.4rem;
88-
grid-template-columns: repeat(var(--columns), var(--profession-width));
89-
padding: 0 0.3rem;
9061
91-
> * {
92-
width: var(--profession-width);
93-
}
94-
}
95-
a {
96-
--image-margin-top: 0;
97-
98-
align-items: center;
99-
color: var(--color-body-text);
100-
display: flex;
101-
justify-content: space-between;
102-
}
103-
.concentration,
104-
.moxie {
105-
align-items: center;
106-
display: flex;
107-
gap: 0.2rem;
108-
justify-content: space-between;
109-
110-
&:not(:first-child) {
111-
--image-margin-top: 0;
62+
:global(> :not(:first-child)) {
63+
border-left: 1px solid var(--border-color);
11264
}
11365
}
11466
</style>
11567

11668
<td class="b-l">
11769
<div class="professions" style:grid-template-columns="{columnCounts[0]}fr {columnCounts[1]}fr">
11870
{#each professions as [profession, charProfession, current], index (profession.id)}
119-
{@const currentSkill = charProfession?.skillCurrent || 0}
120-
<div
121-
class="profession"
122-
class:b-l={index > 0}
123-
style:--columns={columnCounts[index]}
124-
data-id={profession.id}
125-
>
126-
<a
127-
href="#/characters/{Region[character.realm.region].toLowerCase()}-{character
128-
.realm.slug}/{character.name}/professions/{profession.slug}"
129-
use:componentTooltip={{
130-
component: Tooltip,
131-
props: {
132-
character,
133-
profession,
134-
},
135-
}}
136-
>
137-
<WowthingImage name={imageStrings[profession.slug]} size={20} border={1} />
138-
<span
139-
class:status-fail={!current || currentSkill === 0}
140-
class:status-success={current &&
141-
currentSkill > 0 &&
142-
currentSkill >= charProfession.skillMax}
143-
>
144-
{currentSkill || '---'}
145-
</span>
146-
</a>
147-
148-
{#if current}
149-
{#each fields as field (field)}
150-
{#if field === 'concentration' && anyConcentration[index]}
151-
{@const concCurrency = wowthingData.static.currencyById.get(
152-
concentrationData[profession.id]
153-
)}
154-
{#if concCurrency}
155-
{@const { amount, percent, tooltip } = getCurrencyData(
156-
$timeStore,
157-
character,
158-
concCurrency
159-
)}
160-
{@const status = statusClass(
161-
settingsState.value.professions.fullConcentrationIsBad,
162-
percent
163-
)}
164-
<div class="concentration {status}" data-tooltip={tooltip}>
165-
<WowthingImage
166-
name="currency/{concCurrency.id}"
167-
size={20}
168-
border={1}
169-
/>
170-
<span>{amount}</span>
171-
</div>
172-
{:else}
173-
<div class="concentration"></div>
174-
{/if}
175-
{:else if field === 'moxie' && anyMoxie[index]}
176-
{@const moxieCurrency = wowthingData.static.currencyById.get(
177-
professionMoxie[profession.id]
178-
)}
179-
{#if moxieCurrency}
180-
{@const { amount, tooltip } = getCurrencyData(
181-
$timeStore,
182-
character,
183-
moxieCurrency
184-
)}
185-
<div class="moxie" data-tooltip={tooltip}>
186-
<WowthingImage
187-
name="currency/{moxieCurrency.id}"
188-
size={20}
189-
border={1}
190-
/>
191-
<span>{amount}</span>
192-
</div>
193-
{:else}
194-
<div class="moxie"></div>
195-
{/if}
196-
{/if}
197-
{/each}
198-
{/if}
199-
</div>
71+
<Profession
72+
columns={columnCounts[index]}
73+
showConcentration={anyConcentration[index]}
74+
showMoxie={anyMoxie[index]}
75+
{character}
76+
{charProfession}
77+
{fields}
78+
{profession}
79+
{current}
80+
/>
20081
{/each}
20182
</div>
20283
</td>
Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
<script lang="ts">
2+
import { Constants } from '@/data/constants';
3+
import { imageStrings } from '@/data/icons';
4+
import { expansionProfessionConcentration } from '@/data/professions/cooldowns';
5+
import { professionMoxie } from '@/data/professions/moxie';
6+
import { Region } from '@/enums/region';
7+
import { settingsState } from '@/shared/state/settings.svelte';
8+
import { timeState } from '@/shared/state/time.svelte';
9+
import { wowthingData } from '@/shared/stores/data';
10+
import { componentTooltip } from '@/shared/utils/tooltips/component-tooltip.svelte';
11+
import { getCurrencyData } from '@/utils/characters/get-currency-data';
12+
import type { StaticDataProfession } from '@/shared/stores/static/types';
13+
import type { CharacterSubProfession } from '@/types';
14+
import type { CharacterProps } from '@/types/props';
15+
16+
import Tooltip from '@/components/tooltips/professions/TooltipProfessions.svelte';
17+
import WowthingImage from '@/shared/components/images/sources/WowthingImage.svelte';
18+
19+
type Props = CharacterProps & {
20+
charProfession: CharacterSubProfession;
21+
columns: number;
22+
current: boolean;
23+
fields: string[];
24+
profession: StaticDataProfession;
25+
showConcentration: boolean;
26+
showMoxie: boolean;
27+
};
28+
let {
29+
character,
30+
charProfession,
31+
columns,
32+
current,
33+
fields,
34+
profession,
35+
showConcentration,
36+
showMoxie,
37+
}: Props = $props();
38+
39+
const concentrationData = expansionProfessionConcentration[Constants.expansion];
40+
41+
let currentSkill = $derived(charProfession.skillCurrent || 0);
42+
43+
let concCurrency = $derived(
44+
wowthingData.static.currencyById.get(concentrationData[profession.id])
45+
);
46+
let concData = $derived(
47+
concCurrency && getCurrencyData(timeState.slowTime, character, concCurrency)
48+
);
49+
50+
let moxieCurrency = $derived(
51+
wowthingData.static.currencyById.get(professionMoxie[profession.id])
52+
);
53+
let moxieData = $derived(
54+
moxieCurrency && getCurrencyData(timeState.slowTime, character, moxieCurrency)
55+
);
56+
57+
function statusClass(fullIsBad: boolean, percent: number) {
58+
if (percent >= 100) {
59+
return fullIsBad ? 'status-fail' : 'status-success';
60+
} else if (percent >= 75) {
61+
return fullIsBad ? 'status-warn' : 'status-shrug';
62+
} else if (percent > 25 && percent < 75) {
63+
return fullIsBad ? 'status-shrug' : 'status-warn';
64+
} else {
65+
return fullIsBad ? 'status-success' : 'status-fail';
66+
}
67+
}
68+
</script>
69+
70+
<style lang="scss">
71+
.profession {
72+
align-items: center;
73+
align-self: center;
74+
display: grid;
75+
flex-wrap: nowrap;
76+
gap: 0.4rem;
77+
grid-template-columns: repeat(var(--columns), var(--profession-width));
78+
padding: 0 0.3rem;
79+
80+
> * {
81+
width: var(--profession-width);
82+
}
83+
}
84+
a {
85+
--image-margin-top: 0;
86+
87+
align-items: center;
88+
color: var(--color-body-text);
89+
display: flex;
90+
justify-content: space-between;
91+
}
92+
.concentration,
93+
.moxie {
94+
align-items: center;
95+
display: flex;
96+
gap: 0.2rem;
97+
justify-content: space-between;
98+
99+
&:not(:first-child) {
100+
--image-margin-top: 0;
101+
}
102+
}
103+
</style>
104+
105+
<div class="profession" style:--columns={columns} data-id={profession.id}>
106+
<a
107+
href="#/characters/{Region[character.realm.region].toLowerCase()}-{character.realm
108+
.slug}/{character.name}/professions/{profession.slug}"
109+
use:componentTooltip={{
110+
component: Tooltip,
111+
props: {
112+
character,
113+
profession,
114+
},
115+
}}
116+
>
117+
<WowthingImage name={imageStrings[profession.slug]} size={20} border={1} />
118+
<span
119+
class:status-fail={!current || currentSkill === 0}
120+
class:status-success={current &&
121+
currentSkill > 0 &&
122+
currentSkill >= charProfession.skillMax}
123+
>
124+
{currentSkill || '---'}
125+
</span>
126+
</a>
127+
128+
{#if current}
129+
{#each fields as field (field)}
130+
{#if field === 'concentration' && showConcentration}
131+
{#if concData}
132+
{@const { amount, percent, tooltip } = concData}
133+
{@const status = statusClass(
134+
settingsState.value.professions.fullConcentrationIsBad,
135+
percent
136+
)}
137+
<div class="concentration {status}" data-tooltip={tooltip}>
138+
<WowthingImage name="currency/{concCurrency.id}" size={20} border={1} />
139+
<span>{amount}</span>
140+
</div>
141+
{:else}
142+
<div class="concentration"></div>
143+
{/if}
144+
{:else if field === 'moxie' && showMoxie}
145+
{#if moxieData}
146+
{@const { amount, tooltip } = moxieData}
147+
<div class="moxie" data-tooltip={tooltip}>
148+
<WowthingImage name="currency/{moxieCurrency.id}" size={20} border={1} />
149+
<span>{amount}</span>
150+
</div>
151+
{:else}
152+
<div class="moxie"></div>
153+
{/if}
154+
{/if}
155+
{/each}
156+
{/if}
157+
</div>

apps/frontend/data/tasks/11-midnight/delves.ts

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,20 @@ export const midDelves: Task = {
3030
subChoresAnyOrder: true,
3131
questReset: DbResetType.Weekly,
3232
questResetForced: true,
33-
subChores: [
34-
{
35-
key: 'get',
36-
name: 'Get Bounty',
37-
questIds: [86371],
38-
},
39-
{
40-
key: 'use',
41-
name: 'Use Bounty',
42-
questIds: [92887],
43-
},
44-
],
33+
questIds: [86371],
34+
// This seems wrong, I got no tracking quest for using the map or looting the box
35+
// subChores: [
36+
// {
37+
// key: 'get',
38+
// name: 'Get Bounty',
39+
// questIds: [86371],
40+
// },
41+
// {
42+
// key: 'use',
43+
// name: 'Use Bounty',
44+
// questIds: [92887],
45+
// },
46+
// ],
4547
},
4648
{
4749
key: 'gilded',

0 commit comments

Comments
 (0)