Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customizations Shop WIP #15183

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 2 additions & 5 deletions website/client/src/assets/scss/button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -217,16 +217,13 @@

.btn-show-more {
display: block;
width: 50%;
max-width: 448px;
margin: 0 auto;
margin-top: 12px;
width: 100%;
padding: 8px;
font-size: 14px;
line-height: 1.43;
font-weight: bold;
text-align: center;
background: $gray-600;
background: $gray-500;
color: $gray-200 !important; // Otherwise it gets ignored when used on an A element
box-shadow: none;

Expand Down
20 changes: 15 additions & 5 deletions website/client/src/assets/scss/item.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
// TODO move to item component?

.item, .item-wrapper, .item > div > div {
&:focus-visible {
outline: none;
}
}

.items > div {
display: inline-block;
margin-right: 24px;
Expand All @@ -9,6 +15,15 @@
position: relative;
display: inline-block;
margin-bottom: 12px;

&:focus {
outline: 2px solid $purple-400;
border-radius: 2px;
}

&:hover {
box-shadow: 0 3px 6px 0 rgba($black, 0.16), 0 3px 6px 0 rgba($black, 0.24);
}
}

.items-one-line .item-wrapper {
Expand Down Expand Up @@ -56,11 +71,6 @@
background: $purple-500;
}

&:hover {
box-shadow: 0 3px 6px 0 rgba($black, 0.16), 0 3px 6px 0 rgba($black, 0.24);
border-color: $purple-400;
}

&.highlight {
box-shadow: 0 0 8px 8px rgba($black, 0.16), 0 5px 10px 0 rgba($black, 0.12) !important;
}
Expand Down
27 changes: 23 additions & 4 deletions website/client/src/components/avatar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<span :class="[skinClass, specialMountClass]"></span>
<!-- eslint-disable max-len-->
<span
:class="[member.preferences.size + '_shirt_' + member.preferences.shirt, specialMountClass]"
:class="[shirtClass, specialMountClass]"
></span>
<!-- eslint-enable max-len-->
<span :class="['head_0', specialMountClass]"></span>
Expand All @@ -46,12 +46,10 @@
<template
v-for="type in ['bangs', 'base', 'mustache', 'beard']"
>
<!-- eslint-disable max-len-->
<span
:key="type"
:class="['hair_' + type + '_' + member.preferences.hair[type] + '_' + member.preferences.hair.color, specialMountClass]"
:class="[hairClass(type), specialMountClass]"
></span>
<!-- eslint-enable max-len-->
</template>
<span :class="[getGearClass('body'), specialMountClass]"></span>
<span :class="[getGearClass('eyewear'), specialMountClass]"></span>
Expand Down Expand Up @@ -156,7 +154,7 @@
withBackground: {
type: Boolean,
},
overrideAvatarGear: {

Check warning on line 157 in website/client/src/components/avatar.vue

View workflow job for this annotation

GitHub Actions / client-unit (21.x)

Prop 'overrideAvatarGear' requires default value to be set

Check warning on line 157 in website/client/src/components/avatar.vue

View workflow job for this annotation

GitHub Actions / client-unit (21.x)

Prop 'overrideAvatarGear' requires default value to be set
type: Object,
},
width: {
Expand All @@ -171,7 +169,7 @@
type: String,
default: '0 auto 0 24px',
},
overrideTopPadding: {

Check warning on line 172 in website/client/src/components/avatar.vue

View workflow job for this annotation

GitHub Actions / client-unit (21.x)

Prop 'overrideTopPadding' requires default value to be set

Check warning on line 172 in website/client/src/components/avatar.vue

View workflow job for this annotation

GitHub Actions / client-unit (21.x)

Prop 'overrideTopPadding' requires default value to be set
type: String,
},
showVisualBuffs: {
Expand Down Expand Up @@ -233,10 +231,20 @@
},
skinClass () {
if (!this.member) return '';
if (this.overrideAvatarGear?.skin) {
return `skin_${this.overrideAvatarGear.skin}`;
}
const baseClass = `skin_${this.member.preferences.skin}`;

return `${baseClass}${this.member.preferences.sleep ? '_sleep' : ''}`;
},
shirtClass () {
if (!this.member) return '';
if (this.overrideAvatarGear?.shirt) {
return `${this.member.preferences.size}_shirt_${this.overrideAvatarGear.shirt}`;
}
return `${this.member.preferences.size}_shirt_${this.member.preferences.shirt}`;
},
costumeClass () {
return this.member?.preferences.costume ? 'costume' : 'equipped';
},
Expand Down Expand Up @@ -269,6 +277,17 @@

return result;
},
hairClass (slot) {
if (this.overrideAvatarGear?.hair) {
if (this.overrideAvatarGear.hair[slot]) {
return `hair_${slot}_${this.overrideAvatarGear.hair[slot]}_${this.member.preferences.hair.color}`;
}
if (this.overrideAvatarGear.hair.color) {
return `hair_${slot}_${this.member.preferences.hair[slot]}_${this.overrideAvatarGear.hair.color}`;
}
}
return `hair_${slot}_${this.member.preferences.hair[slot]}_${this.member.preferences.hair.color}`;
},
hideGear (gearType) {
if (!this.member) return true;
if (gearType === 'weapon') {
Expand Down
4 changes: 2 additions & 2 deletions website/client/src/components/avatarModal/body-settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import appearance from '@/../../common/script/content/appearance';
import { subPageMixin } from '../../mixins/subPage';
import { userStateMixin } from '../../mixins/userState';
import { avatarEditorUtilies } from '../../mixins/avatarEditUtilities';
import { avatarEditorUtilities } from '../../mixins/avatarEditUtilities';
import subMenu from './sub-menu';
import customizeOptions from './customize-options';
import gem from '@/assets/svg/gem.svg';
Expand All @@ -51,7 +51,7 @@ export default {
mixins: [
subPageMixin,
userStateMixin,
avatarEditorUtilies,
avatarEditorUtilities,
],
props: [
'editing',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@
<script>
import gem from '@/assets/svg/gem.svg';
import gold from '@/assets/svg/gold.svg';
import { avatarEditorUtilies } from '../../mixins/avatarEditUtilities';
import { avatarEditorUtilities } from '../../mixins/avatarEditUtilities';

export default {
mixins: [
avatarEditorUtilies,
avatarEditorUtilities,
],
props: ['items', 'currentValue', 'fullSet'],
data () {
Expand Down
4 changes: 2 additions & 2 deletions website/client/src/components/avatarModal/extra-settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
import appearance from '@/../../common/script/content/appearance';
import { subPageMixin } from '../../mixins/subPage';
import { userStateMixin } from '../../mixins/userState';
import { avatarEditorUtilies } from '../../mixins/avatarEditUtilities';
import { avatarEditorUtilities } from '../../mixins/avatarEditUtilities';
import subMenu from './sub-menu';
import customizeOptions from './customize-options';
import gem from '@/assets/svg/gem.svg';
Expand All @@ -76,7 +76,7 @@ export default {
mixins: [
subPageMixin,
userStateMixin,
avatarEditorUtilies,
avatarEditorUtilities,
],
props: [
'editing',
Expand Down
4 changes: 2 additions & 2 deletions website/client/src/components/avatarModal/hair-settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ import appearance from '@/../../common/script/content/appearance';
import appearanceSets from '@/../../common/script/content/appearance/sets';
import { subPageMixin } from '../../mixins/subPage';
import { userStateMixin } from '../../mixins/userState';
import { avatarEditorUtilies } from '../../mixins/avatarEditUtilities';
import { avatarEditorUtilities } from '../../mixins/avatarEditUtilities';
import subMenu from './sub-menu';
import customizeOptions from './customize-options';
import gem from '@/assets/svg/gem.svg';
Expand All @@ -97,7 +97,7 @@ export default {
mixins: [
subPageMixin,
userStateMixin,
avatarEditorUtilies,
avatarEditorUtilities,
],
props: [
'editing',
Expand Down
4 changes: 2 additions & 2 deletions website/client/src/components/avatarModal/skin-settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import appearance from '@/../../common/script/content/appearance';
import appearanceSets from '@/../../common/script/content/appearance/sets';
import { subPageMixin } from '../../mixins/subPage';
import { userStateMixin } from '../../mixins/userState';
import { avatarEditorUtilies } from '../../mixins/avatarEditUtilities';
import { avatarEditorUtilities } from '../../mixins/avatarEditUtilities';
import subMenu from './sub-menu';
import customizeOptions from './customize-options';
import gem from '@/assets/svg/gem.svg';
Expand All @@ -56,7 +56,7 @@ export default {
mixins: [
subPageMixin,
userStateMixin,
avatarEditorUtilies,
avatarEditorUtilities,
],
props: [
'editing',
Expand Down
4 changes: 2 additions & 2 deletions website/client/src/components/creatorIntro.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1187,7 +1187,7 @@ import gold from '@/assets/svg/gold.svg';
import arrowRight from '@/assets/svg/arrow_right.svg';
import arrowLeft from '@/assets/svg/arrow_left.svg';
import svgClose from '@/assets/svg/close.svg';
import { avatarEditorUtilies } from '../mixins/avatarEditUtilities';
import { avatarEditorUtilities } from '../mixins/avatarEditUtilities';

export default {
components: {
Expand All @@ -1201,7 +1201,7 @@ export default {
toggleSwitch,
usernameForm,
},
mixins: [guide, notifications, avatarEditorUtilies],
mixins: [guide, notifications, avatarEditorUtilities],
data () {
const backgroundShopSets = shops.getBackgroundShopSets();

Expand Down
6 changes: 6 additions & 0 deletions website/client/src/components/header/menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@
>
{{ $t('quests') }}
</router-link>
<router-link
class="topbar-dropdown-item dropdown-item"
:to="{name: 'customizations'}"
>
{{ $t('customizations') }}
</router-link>
<router-link
class="topbar-dropdown-item dropdown-item"
:to="{name: 'seasonal'}"
Expand Down