Skip to content

Commit

Permalink
feat: improve recruit support
Browse files Browse the repository at this point in the history
  • Loading branch information
GalvinGao committed Aug 16, 2022
1 parent 3d69aaf commit 44d13d5
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 25 deletions.
8 changes: 8 additions & 0 deletions src/components/global/ItemIcon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@
>
mdi-lamp
</v-icon>
<v-icon
v-else-if="item.itemType === 'RECRUIT_TAG'"
:class="furniturePadding"
class="cyan item-icon--special white--text"
:size="30 * ratio"
>
mdi-ticket-confirmation
</v-icon>
<v-icon
v-else-if="item.itemId !== 'furni' && !item.spriteCoord"
:class="furniturePadding"
Expand Down
50 changes: 27 additions & 23 deletions src/components/stats/DataTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,8 @@
>
<v-row
align="center"
class="cursor-pointer item-name pl-1"
@click="redirectItem(props.item.item.itemId)"
:class="{'cursor-pointer': !isRecruit, 'pointer-events-none': isRecruit, 'item-name pl-1': true}"
@click="!isRecruit && redirectItem(props.item.item.itemId)"
>
<Item
:item="props.item.item"
Expand All @@ -313,12 +313,14 @@
{{ strings.translate(props.item.item, "name") }}
</span>
<v-icon
v-if="!isRecruit"
x-small
class="ml-1 item-name--chevron"
>
mdi-link
</v-icon>
<v-divider
v-if="!isRecruit"
class="mx-4 item-name--line"
/>
</v-row>
Expand Down Expand Up @@ -398,34 +400,36 @@
<DataTableFluctuationVisualizer :item="props.item" />
</td> -->

<NullableTableCell
:value="props.item.apPPR"
:class="tableCellClasses"
/>

<template v-if="type === 'item'">
<template v-if="!isRecruit">
<NullableTableCell
:value="props.item.stage.apCost"
:class="`${tableCellClasses} ${dark ? 'orange--text text--lighten-1' : 'deep-orange--text text--darken-3 font-weight-bold'}`"
:value="props.item.apPPR"
:class="tableCellClasses"
/>

<template v-if="type === 'item'">
<NullableTableCell
:value="props.item.stage.apCost"
:class="`${tableCellClasses} ${dark ? 'orange--text text--lighten-1' : 'deep-orange--text text--darken-3 font-weight-bold'}`"
/>
<NullableTableCell
:value="props.item.stage.minClearTime"
:transformer="formatDuration"
:class="tableCellClasses"
/>
</template>

<NullableTableCell
:value="props.item.stage.minClearTime"
:value="props.item.itemPerTime"
:transformer="formatDuration"
:class="tableCellClasses"
/>
</template>

<NullableTableCell
:value="props.item.itemPerTime"
:transformer="formatDuration"
:class="tableCellClasses"
/>

<td
:class="tableCellClasses"
>
{{ formatDate(props.item) }}
</td>
<td
:class="tableCellClasses"
>
{{ formatDate(props.item) }}
</td>
</template>
</tr>
</template>
<!-- <template #item.percentage="{item}">-->
Expand Down
4 changes: 4 additions & 0 deletions src/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -808,3 +808,7 @@
.tabular-num {
font-variant: tabular-nums;
}

.pointer-events-none {
pointer-events: none !important;
}
4 changes: 2 additions & 2 deletions vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ module.exports = {
devServer: {
proxy: {
"/PenguinStats": {
// target: "https://penguin-stats.io/",
target: "http://localhost:9010/",
target: "https://penguin-stats.io/",
// target: "http://localhost:9010/",
},
},
},
Expand Down

0 comments on commit 44d13d5

Please sign in to comment.