WIP(shops): customizations route

This commit is contained in:
Sabe Jones
2024-02-14 17:49:26 -06:00
parent 1a3c2f64e4
commit 5a48436eff
4 changed files with 85 additions and 6 deletions

View File

@@ -0,0 +1,71 @@
<template>
<div class="row market">
<div class="standard-sidebar">
<filter-sidebar>
<filter-group />
</filter-sidebar>
</div>
<div class="standard-page p-0">
<div
class="background"
:style="{'background-image': imageURLs.background}"
>
<div
class="npc"
:style="{'background-image': imageURLs.npc}"
>
</div>
</div>
</div>
</div>
</template>
<style lang="scss" scoped>
.background, .npc {
height: 216px;
}
.npc {
background-repeat: no-repeat;
}
</style>
<script>
import { mapState } from '@/libs/store';
import FilterSidebar from '@/components/ui/filterSidebar';
import FilterGroup from '@/components/ui/filterGroup';
export default {
components: {
FilterGroup,
FilterSidebar,
},
computed: {
...mapState({
// content: 'content',
// user: 'user.data',
currentEventList: 'worldState.data.currentEventList',
}),
imageURLs () {
const currentEvent = this.currentEventList.find(event => Boolean(event.season));
if (!currentEvent) {
return {
background: 'url(/static/npc/normal/market_background.png)',
npc: 'url(/static/npc/normal/market_npc.png)',
};
}
return {
background: `url(/static/npc/${currentEvent.season}/market_background.png)`,
npc: `url(/static/npc/${currentEvent.season}/market_banner_npc.png)`,
};
},
},
mounted () {
this.$store.dispatch('common:setTitle', {
subSection: this.$t('customizations'),
section: this.$t('shops'),
});
},
};
</script>

View File

@@ -3,26 +3,32 @@
<secondary-menu class="col-12"> <secondary-menu class="col-12">
<router-link <router-link
class="nav-link" class="nav-link"
:to="{name: 'market'}" :to="{ name: 'market' }"
exact="exact" exact="exact"
> >
{{ $t('market') }} {{ $t('market') }}
</router-link> </router-link>
<router-link <router-link
class="nav-link" class="nav-link"
:to="{name: 'quests'}" :to="{ name: 'quests' }"
> >
{{ $t('quests') }} {{ $t('quests') }}
</router-link> </router-link>
<router-link <router-link
class="nav-link" class="nav-link"
:to="{name: 'seasonal'}" :to="{ name: 'customizations' }"
>
{{ $t('customizations') }}
</router-link>
<router-link
class="nav-link"
:to="{ name: 'seasonal' }"
> >
{{ $t('titleSeasonalShop') }} {{ $t('titleSeasonalShop') }}
</router-link> </router-link>
<router-link <router-link
class="nav-link" class="nav-link"
:to="{name: 'time'}" :to="{ name: 'time' }"
> >
{{ $t('titleTimeTravelers') }} {{ $t('titleTimeTravelers') }}
</router-link> </router-link>

View File

@@ -60,6 +60,7 @@ const ChallengeDetail = () => import(/* webpackChunkName: "challenges" */ '@/com
const ShopsContainer = () => import(/* webpackChunkName: "shops" */'@/components/shops/index'); const ShopsContainer = () => import(/* webpackChunkName: "shops" */'@/components/shops/index');
const MarketPage = () => import(/* webpackChunkName: "shops-market" */'@/components/shops/market/index'); const MarketPage = () => import(/* webpackChunkName: "shops-market" */'@/components/shops/market/index');
const QuestsPage = () => import(/* webpackChunkName: "shops-quest" */'@/components/shops/quests/index'); const QuestsPage = () => import(/* webpackChunkName: "shops-quest" */'@/components/shops/quests/index');
const CustomizationsPage = () => import(/* webpackChunkName: "shops-customizations" */'@/components/shops/customizations/index');
const SeasonalPage = () => import(/* webpackChunkName: "shops-seasonal" */'@/components/shops/seasonal/index'); const SeasonalPage = () => import(/* webpackChunkName: "shops-seasonal" */'@/components/shops/seasonal/index');
const TimeTravelersPage = () => import(/* webpackChunkName: "shops-timetravelers" */'@/components/shops/timeTravelers/index'); const TimeTravelersPage = () => import(/* webpackChunkName: "shops-timetravelers" */'@/components/shops/timeTravelers/index');
@@ -111,6 +112,7 @@ const router = new VueRouter({
children: [ children: [
{ name: 'market', path: 'market', component: MarketPage }, { name: 'market', path: 'market', component: MarketPage },
{ name: 'quests', path: 'quests', component: QuestsPage }, { name: 'quests', path: 'quests', component: QuestsPage },
{ name: 'customizations', path: 'customizations', component: CustomizationsPage },
{ name: 'seasonal', path: 'seasonal', component: SeasonalPage }, { name: 'seasonal', path: 'seasonal', component: SeasonalPage },
{ name: 'time', path: 'time', component: TimeTravelersPage }, { name: 'time', path: 'time', component: TimeTravelersPage },
], ],

View File

@@ -235,8 +235,8 @@
"questionDescriptionText": "It's okay to ask your questions in your primary language if you aren't comfortable speaking in English.", "questionDescriptionText": "It's okay to ask your questions in your primary language if you aren't comfortable speaking in English.",
"questionPlaceholder": "Ask your question here", "questionPlaceholder": "Ask your question here",
"submitQuestion": "Submit Question", "submitQuestion": "Submit Question",
"reportPlayer": "Report Player",
"whyReportingPlayer": "Why are you reporting this player?", "whyReportingPlayer": "Why are you reporting this player?",
"whyReportingPlayerPlaceholder": "Reason for report", "whyReportingPlayerPlaceholder": "Reason for report",
"playerReportModalBody": "You should only report a player who violates the <%= firstLinkStart %>Community Guidelines<%= linkEnd %> and/or <%= secondLinkStart %>Terms of Service<%= linkEnd %>. Submitting a false report is a violation of Habiticas Community Guidelines." "playerReportModalBody": "You should only report a player who violates the <%= firstLinkStart %>Community Guidelines<%= linkEnd %> and/or <%= secondLinkStart %>Terms of Service<%= linkEnd %>. Submitting a false report is a violation of Habiticas Community Guidelines.",
"customizations": "Customizations"
} }