mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
WIP(shops): customizations route
This commit is contained in:
71
website/client/src/components/shops/customizations/index.vue
Normal file
71
website/client/src/components/shops/customizations/index.vue
Normal 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>
|
||||
@@ -14,6 +14,12 @@
|
||||
>
|
||||
{{ $t('quests') }}
|
||||
</router-link>
|
||||
<router-link
|
||||
class="nav-link"
|
||||
:to="{ name: 'customizations' }"
|
||||
>
|
||||
{{ $t('customizations') }}
|
||||
</router-link>
|
||||
<router-link
|
||||
class="nav-link"
|
||||
:to="{ name: 'seasonal' }"
|
||||
|
||||
@@ -60,6 +60,7 @@ const ChallengeDetail = () => import(/* webpackChunkName: "challenges" */ '@/com
|
||||
const ShopsContainer = () => import(/* webpackChunkName: "shops" */'@/components/shops/index');
|
||||
const MarketPage = () => import(/* webpackChunkName: "shops-market" */'@/components/shops/market/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 TimeTravelersPage = () => import(/* webpackChunkName: "shops-timetravelers" */'@/components/shops/timeTravelers/index');
|
||||
|
||||
@@ -111,6 +112,7 @@ const router = new VueRouter({
|
||||
children: [
|
||||
{ name: 'market', path: 'market', component: MarketPage },
|
||||
{ name: 'quests', path: 'quests', component: QuestsPage },
|
||||
{ name: 'customizations', path: 'customizations', component: CustomizationsPage },
|
||||
{ name: 'seasonal', path: 'seasonal', component: SeasonalPage },
|
||||
{ name: 'time', path: 'time', component: TimeTravelersPage },
|
||||
],
|
||||
|
||||
@@ -235,8 +235,8 @@
|
||||
"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",
|
||||
"submitQuestion": "Submit Question",
|
||||
"reportPlayer": "Report Player",
|
||||
"whyReportingPlayer": "Why are you reporting this player?",
|
||||
"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 Habitica’s 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 Habitica’s Community Guidelines.",
|
||||
"customizations": "Customizations"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user