-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
226 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
import dayjs from 'dayjs'; | ||
|
||
import HubImg from '@/components/HubImg.jsx'; | ||
import TimeBadge from '@/components/TimeBadge.jsx'; | ||
import HubPanelWrap from '@/components/HubPanelWrap.jsx'; | ||
import { cdn } from '@/services/utilities'; | ||
|
||
const corpus = cdn('svg/factions/corpus.svg'); | ||
const corrupted = cdn('svg/factions/corrupted.svg'); | ||
const grineer = cdn('svg/factions/grineer.svg'); | ||
const infested = cdn('svg/factions/infested.svg'); | ||
const sentient = cdn('svg/factions/sentient.svg'); | ||
const narmer = cdn('svg/factions/narmer2.svg'); | ||
|
||
const styles = { | ||
inline: { | ||
display: 'inline', | ||
}, | ||
missionType: { | ||
filter: 'invert(100%)', | ||
'margin-top': '-3px', | ||
'margin-right': '5px', | ||
width: '25px', | ||
height: '25px', | ||
}, | ||
}; | ||
const tooltips = { | ||
'v-b-tooltip.top': true, | ||
}; | ||
|
||
export default { | ||
name: 'SortiePanel', | ||
components: { | ||
TimeBadge, | ||
HubImg, | ||
HubPanelWrap, | ||
}, | ||
props: { | ||
sortie: { | ||
type: Object, | ||
default: () => { | ||
return {}; | ||
}, | ||
}, | ||
}, | ||
computed: { | ||
headertext() { | ||
return this.$props.sortie?.missions?.length ? this.$t('sortie.hunt.header') : this.$t('sortie.header'); | ||
}, | ||
factionImg() { | ||
const fImg = { | ||
corpus, | ||
grineer, | ||
infested, | ||
infestation: infested, | ||
corrupted, | ||
orokin: corrupted, | ||
sentient, | ||
narmer, | ||
}; | ||
return fImg[this.$props.sortie?.faction?.toLowerCase()] || corrupted; | ||
}, | ||
missions() { | ||
return (this.$props.sortie?.variants?.length ? this.$props.sortie.variants : this.$props.sortie.missions) || []; | ||
}, | ||
}, | ||
render() { | ||
const now = dayjs().toISOString(); | ||
return ( | ||
<HubPanelWrap title={this.headertext} class="sortie"> | ||
<b-list-group> | ||
<b-list-group-item style={styles.inline} class="list-group-item-borderless pb-0"> | ||
<span class="pull-left"> | ||
<h4 class="my-0"> | ||
<HubImg | ||
src={this.factionImg} | ||
name={this.sortie.faction} | ||
style={styles.missionType} | ||
width="20px" | ||
height="20px" | ||
/> | ||
{this.sortie.boss} | ||
</h4> | ||
</span> | ||
<TimeBadge starttime={now} endtime={this.sortie.expiry} interval={1000} /> | ||
</b-list-group-item> | ||
{this.missions.map((mission, index) => { | ||
return ( | ||
<b-list-group-item | ||
key={`sortie-${index}`} | ||
style={styles.inline} | ||
class={{ | ||
'list-group-item-borderless': index !== this.missions.length - 1, | ||
'pb-0': index !== this.missions.length - 1, | ||
'list-group-item-borderbottom': index === this.missions.length - 1, | ||
}} | ||
> | ||
<div class="ml-3"> | ||
<span class="pull-left pr-2"> | ||
<b> | ||
{mission.missionType || mission.type} - {mission.node} | ||
</b> | ||
</span> | ||
<span {...tooltips} title={mission.modifierDescription} class="pull-left"> | ||
{mission.modifier} | ||
</span> | ||
</div> | ||
</b-list-group-item> | ||
); | ||
})} | ||
</b-list-group> | ||
</HubPanelWrap> | ||
); | ||
}, | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,14 @@ | ||
globals: | ||
cy: readonly | ||
it: readonly | ||
describe: readonly | ||
beforeEach: readonly | ||
expect: readonly | ||
env: | ||
mocha: true | ||
cypress/globals: true | ||
plugins: | ||
- cypress | ||
rules: | ||
cypress/no-assigning-return-values: error | ||
cypress/no-unnecessary-waiting: 0 | ||
cypress/assertion-before-screenshot: warn | ||
cypress/no-force: warn | ||
cypress/no-async-tests: error | ||
cypress/no-pause: error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
478d4ec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
warframe-hub – ./
warframe-hub-wfcd.vercel.app
warframe-hub-git-dev-wfcd.vercel.app
hub.warframestat.us