2016-09-18 19:51:20 +00:00
|
|
|
<template lang="pug">
|
2016-11-18 18:20:25 +00:00
|
|
|
#app-header.row
|
2017-03-18 17:33:08 +00:00
|
|
|
avatar#header-avatar(:user="user")
|
2017-03-06 19:09:34 +00:00
|
|
|
div
|
2016-11-18 18:20:25 +00:00
|
|
|
span.character-name {{user.profile.name}}
|
|
|
|
|
span.character-level Lvl {{user.stats.lvl}}
|
2017-03-06 19:09:34 +00:00
|
|
|
.progress-container.d-flex
|
2016-11-18 18:20:25 +00:00
|
|
|
img.icon(src="~assets/header/png/health@3x.png")
|
2017-03-06 19:09:34 +00:00
|
|
|
.progress
|
Client Redesign: Inventory pages, secondary menu, misc css and design items (#8631)
* add colors palette
* add secondary menu component and style it
* add box shadow to secondary menu
* misc css, fixes for secondary menu
* client: add equipment page with grouping, css: add some styles
* add typography
* more equipment
* stable: fix linting
* equipment: add styles (lots of general styles too)
* remove duplicate google fonts loading
* add dropdowns
* design: white search input background, remove gray from items
* start adding drawer and selected indicator
* wip equipment
* fix equipment
* equipment: correctly bind new properties on items.gear.equipped
* equipment: fix vue binding. version 2
* equipment: fix vue binding. version 3
* back to first fix for equip op, fix for sourcemaps, send http request when an item is equipped, load bootstrap-vue components where needed
* checkboxes and radio buttons
* correctly renders selected items in first postion during the first render
* add search
* general changes, constants part of app state, add popovers
* add toggle switch, rename css
* correct offset
* upgrade deps
* upgrade deps
* drawer and lot of other work
* update equipping mechanism
* finish equipment
* fix compilation and upgrade deps
* use v-show in place of v-if to fix ui issues
* v-show -> v-if
* fix linting in test/client
* fix es6 compilation in test/client
* fix babel compilation for tests
* fix groupsUtilities mixin tests
* client: buttons
* client: buttons: fix colors
* client: finish buttons and dropdowns
* upgrade bootstrap-vue, finish buttons and dropdowns
* fix tasks page layout
* misc fixes for buttons
* add textareas
* fix app menu
* add inputs
* fixes for toggleSwitch
* typography
* checkboxes and radio buttons
* add checkbox icon
* fix equip.js
* extract strings to newClient.json
* add Popover above 'Use Costume' / 'Auto Equip' slider - disable item select if costume-mode and 'useCostume' isn't active
* show "you have disabled your costume" error above the drawer items
* check errorMessage for null
* hide star if costume not enabled
* fix errorMessage (!errorMessage seems not to work for string)
* show minimize / expand icon - always centered by css
* drawer test
* drawer: fix centering on large screens
* fix show more button
* add margin when two dropdowns are next to each other
* adjust the page padding based on the drawer, misc fixes
* drawer fixes
2017-05-16 19:09:55 +00:00
|
|
|
.progress-bar.bg-danger(:style="{width: `${percent(user.stats.hp, MAX_HEALTH)}%`}")
|
|
|
|
|
span {{user.stats.hp | round}} / {{MAX_HEALTH}}
|
2017-03-06 19:09:34 +00:00
|
|
|
.progress-container.d-flex
|
2016-11-18 18:20:25 +00:00
|
|
|
img.icon(src="~assets/header/png/experience@3x.png")
|
2017-03-06 19:09:34 +00:00
|
|
|
.progress
|
|
|
|
|
.progress-bar.bg-warning(:style="{width: `${percent(user.stats.exp, toNextLevel)}%`}")
|
2016-11-18 18:20:25 +00:00
|
|
|
span {{user.stats.exp | round}} / {{toNextLevel}}
|
2017-03-06 19:09:34 +00:00
|
|
|
.progress-container.d-flex(ng-if="user.flags.classSelected && !user.preferences.disableClasses")
|
2016-11-18 18:20:25 +00:00
|
|
|
img.icon(src="~assets/header/png/magic@3x.png")
|
2017-03-06 19:09:34 +00:00
|
|
|
.progress
|
|
|
|
|
.progress-bar(:style="{width: `${percent(user.stats.mp, maxMP)}%`}")
|
2016-11-18 18:20:25 +00:00
|
|
|
span {{user.stats.mp | round}} / {{maxMP}}
|
2016-09-18 19:51:20 +00:00
|
|
|
</template>
|
|
|
|
|
|
Client Redesign: Inventory pages, secondary menu, misc css and design items (#8631)
* add colors palette
* add secondary menu component and style it
* add box shadow to secondary menu
* misc css, fixes for secondary menu
* client: add equipment page with grouping, css: add some styles
* add typography
* more equipment
* stable: fix linting
* equipment: add styles (lots of general styles too)
* remove duplicate google fonts loading
* add dropdowns
* design: white search input background, remove gray from items
* start adding drawer and selected indicator
* wip equipment
* fix equipment
* equipment: correctly bind new properties on items.gear.equipped
* equipment: fix vue binding. version 2
* equipment: fix vue binding. version 3
* back to first fix for equip op, fix for sourcemaps, send http request when an item is equipped, load bootstrap-vue components where needed
* checkboxes and radio buttons
* correctly renders selected items in first postion during the first render
* add search
* general changes, constants part of app state, add popovers
* add toggle switch, rename css
* correct offset
* upgrade deps
* upgrade deps
* drawer and lot of other work
* update equipping mechanism
* finish equipment
* fix compilation and upgrade deps
* use v-show in place of v-if to fix ui issues
* v-show -> v-if
* fix linting in test/client
* fix es6 compilation in test/client
* fix babel compilation for tests
* fix groupsUtilities mixin tests
* client: buttons
* client: buttons: fix colors
* client: finish buttons and dropdowns
* upgrade bootstrap-vue, finish buttons and dropdowns
* fix tasks page layout
* misc fixes for buttons
* add textareas
* fix app menu
* add inputs
* fixes for toggleSwitch
* typography
* checkboxes and radio buttons
* add checkbox icon
* fix equip.js
* extract strings to newClient.json
* add Popover above 'Use Costume' / 'Auto Equip' slider - disable item select if costume-mode and 'useCostume' isn't active
* show "you have disabled your costume" error above the drawer items
* check errorMessage for null
* hide star if costume not enabled
* fix errorMessage (!errorMessage seems not to work for string)
* show minimize / expand icon - always centered by css
* drawer test
* drawer: fix centering on large screens
* fix show more button
* add margin when two dropdowns are next to each other
* adjust the page padding based on the drawer, misc fixes
* drawer fixes
2017-05-16 19:09:55 +00:00
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
@import '~client/assets/scss/colors.scss';
|
|
|
|
|
|
|
|
|
|
// TODO move to colors.scss if used in other places
|
|
|
|
|
$header-dark-background: #271B3D;
|
|
|
|
|
$header-text-color: #D5C8FF;
|
|
|
|
|
|
2017-03-06 19:09:34 +00:00
|
|
|
/* TODO refactor: only partially ported from SemanticUI; */
|
2016-11-18 18:20:25 +00:00
|
|
|
#app-header {
|
2017-03-06 19:09:34 +00:00
|
|
|
padding-left: 14px;
|
2016-11-18 18:20:25 +00:00
|
|
|
margin-top: 56px;
|
Client Redesign: Inventory pages, secondary menu, misc css and design items (#8631)
* add colors palette
* add secondary menu component and style it
* add box shadow to secondary menu
* misc css, fixes for secondary menu
* client: add equipment page with grouping, css: add some styles
* add typography
* more equipment
* stable: fix linting
* equipment: add styles (lots of general styles too)
* remove duplicate google fonts loading
* add dropdowns
* design: white search input background, remove gray from items
* start adding drawer and selected indicator
* wip equipment
* fix equipment
* equipment: correctly bind new properties on items.gear.equipped
* equipment: fix vue binding. version 2
* equipment: fix vue binding. version 3
* back to first fix for equip op, fix for sourcemaps, send http request when an item is equipped, load bootstrap-vue components where needed
* checkboxes and radio buttons
* correctly renders selected items in first postion during the first render
* add search
* general changes, constants part of app state, add popovers
* add toggle switch, rename css
* correct offset
* upgrade deps
* upgrade deps
* drawer and lot of other work
* update equipping mechanism
* finish equipment
* fix compilation and upgrade deps
* use v-show in place of v-if to fix ui issues
* v-show -> v-if
* fix linting in test/client
* fix es6 compilation in test/client
* fix babel compilation for tests
* fix groupsUtilities mixin tests
* client: buttons
* client: buttons: fix colors
* client: finish buttons and dropdowns
* upgrade bootstrap-vue, finish buttons and dropdowns
* fix tasks page layout
* misc fixes for buttons
* add textareas
* fix app menu
* add inputs
* fixes for toggleSwitch
* typography
* checkboxes and radio buttons
* add checkbox icon
* fix equip.js
* extract strings to newClient.json
* add Popover above 'Use Costume' / 'Auto Equip' slider - disable item select if costume-mode and 'useCostume' isn't active
* show "you have disabled your costume" error above the drawer items
* check errorMessage for null
* hide star if costume not enabled
* fix errorMessage (!errorMessage seems not to work for string)
* show minimize / expand icon - always centered by css
* drawer test
* drawer: fix centering on large screens
* fix show more button
* add margin when two dropdowns are next to each other
* adjust the page padding based on the drawer, misc fixes
* drawer fixes
2017-05-16 19:09:55 +00:00
|
|
|
background: $purple-50;
|
2016-11-18 18:20:25 +00:00
|
|
|
height: 192px;
|
Client Redesign: Inventory pages, secondary menu, misc css and design items (#8631)
* add colors palette
* add secondary menu component and style it
* add box shadow to secondary menu
* misc css, fixes for secondary menu
* client: add equipment page with grouping, css: add some styles
* add typography
* more equipment
* stable: fix linting
* equipment: add styles (lots of general styles too)
* remove duplicate google fonts loading
* add dropdowns
* design: white search input background, remove gray from items
* start adding drawer and selected indicator
* wip equipment
* fix equipment
* equipment: correctly bind new properties on items.gear.equipped
* equipment: fix vue binding. version 2
* equipment: fix vue binding. version 3
* back to first fix for equip op, fix for sourcemaps, send http request when an item is equipped, load bootstrap-vue components where needed
* checkboxes and radio buttons
* correctly renders selected items in first postion during the first render
* add search
* general changes, constants part of app state, add popovers
* add toggle switch, rename css
* correct offset
* upgrade deps
* upgrade deps
* drawer and lot of other work
* update equipping mechanism
* finish equipment
* fix compilation and upgrade deps
* use v-show in place of v-if to fix ui issues
* v-show -> v-if
* fix linting in test/client
* fix es6 compilation in test/client
* fix babel compilation for tests
* fix groupsUtilities mixin tests
* client: buttons
* client: buttons: fix colors
* client: finish buttons and dropdowns
* upgrade bootstrap-vue, finish buttons and dropdowns
* fix tasks page layout
* misc fixes for buttons
* add textareas
* fix app menu
* add inputs
* fixes for toggleSwitch
* typography
* checkboxes and radio buttons
* add checkbox icon
* fix equip.js
* extract strings to newClient.json
* add Popover above 'Use Costume' / 'Auto Equip' slider - disable item select if costume-mode and 'useCostume' isn't active
* show "you have disabled your costume" error above the drawer items
* check errorMessage for null
* hide star if costume not enabled
* fix errorMessage (!errorMessage seems not to work for string)
* show minimize / expand icon - always centered by css
* drawer test
* drawer: fix centering on large screens
* fix show more button
* add margin when two dropdowns are next to each other
* adjust the page padding based on the drawer, misc fixes
* drawer fixes
2017-05-16 19:09:55 +00:00
|
|
|
color: $header-text-color;
|
2016-11-18 18:20:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.character-name {
|
|
|
|
|
display: block;
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
margin-top: 32px;
|
|
|
|
|
line-height: 1.5;
|
Client Redesign: Inventory pages, secondary menu, misc css and design items (#8631)
* add colors palette
* add secondary menu component and style it
* add box shadow to secondary menu
* misc css, fixes for secondary menu
* client: add equipment page with grouping, css: add some styles
* add typography
* more equipment
* stable: fix linting
* equipment: add styles (lots of general styles too)
* remove duplicate google fonts loading
* add dropdowns
* design: white search input background, remove gray from items
* start adding drawer and selected indicator
* wip equipment
* fix equipment
* equipment: correctly bind new properties on items.gear.equipped
* equipment: fix vue binding. version 2
* equipment: fix vue binding. version 3
* back to first fix for equip op, fix for sourcemaps, send http request when an item is equipped, load bootstrap-vue components where needed
* checkboxes and radio buttons
* correctly renders selected items in first postion during the first render
* add search
* general changes, constants part of app state, add popovers
* add toggle switch, rename css
* correct offset
* upgrade deps
* upgrade deps
* drawer and lot of other work
* update equipping mechanism
* finish equipment
* fix compilation and upgrade deps
* use v-show in place of v-if to fix ui issues
* v-show -> v-if
* fix linting in test/client
* fix es6 compilation in test/client
* fix babel compilation for tests
* fix groupsUtilities mixin tests
* client: buttons
* client: buttons: fix colors
* client: finish buttons and dropdowns
* upgrade bootstrap-vue, finish buttons and dropdowns
* fix tasks page layout
* misc fixes for buttons
* add textareas
* fix app menu
* add inputs
* fixes for toggleSwitch
* typography
* checkboxes and radio buttons
* add checkbox icon
* fix equip.js
* extract strings to newClient.json
* add Popover above 'Use Costume' / 'Auto Equip' slider - disable item select if costume-mode and 'useCostume' isn't active
* show "you have disabled your costume" error above the drawer items
* check errorMessage for null
* hide star if costume not enabled
* fix errorMessage (!errorMessage seems not to work for string)
* show minimize / expand icon - always centered by css
* drawer test
* drawer: fix centering on large screens
* fix show more button
* add margin when two dropdowns are next to each other
* adjust the page padding based on the drawer, misc fixes
* drawer fixes
2017-05-16 19:09:55 +00:00
|
|
|
color: $white;
|
2016-11-18 18:20:25 +00:00
|
|
|
font-weight: bold;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.character-level {
|
|
|
|
|
display: block;
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
margin-top: 4px;
|
|
|
|
|
margin-bottom: 20px;
|
|
|
|
|
line-height: 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#header-avatar {
|
|
|
|
|
margin-top: 24px;
|
2017-03-06 20:09:19 +00:00
|
|
|
margin-right: 1rem;
|
2016-11-18 18:20:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.progress-container {
|
|
|
|
|
margin-bottom: 12px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.progress-container > span {
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
margin-left: 10px;
|
|
|
|
|
line-height: 1em;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.progress-container > .icon {
|
|
|
|
|
width: 12px;
|
|
|
|
|
height: 12px;
|
|
|
|
|
margin-right: 10px;
|
|
|
|
|
}
|
|
|
|
|
|
2017-03-06 19:09:34 +00:00
|
|
|
.progress-container > .progress {
|
2016-11-18 18:20:25 +00:00
|
|
|
width: 203px;
|
|
|
|
|
margin: 0px;
|
|
|
|
|
border-radius: 0px;
|
|
|
|
|
height: 12px;
|
Client Redesign: Inventory pages, secondary menu, misc css and design items (#8631)
* add colors palette
* add secondary menu component and style it
* add box shadow to secondary menu
* misc css, fixes for secondary menu
* client: add equipment page with grouping, css: add some styles
* add typography
* more equipment
* stable: fix linting
* equipment: add styles (lots of general styles too)
* remove duplicate google fonts loading
* add dropdowns
* design: white search input background, remove gray from items
* start adding drawer and selected indicator
* wip equipment
* fix equipment
* equipment: correctly bind new properties on items.gear.equipped
* equipment: fix vue binding. version 2
* equipment: fix vue binding. version 3
* back to first fix for equip op, fix for sourcemaps, send http request when an item is equipped, load bootstrap-vue components where needed
* checkboxes and radio buttons
* correctly renders selected items in first postion during the first render
* add search
* general changes, constants part of app state, add popovers
* add toggle switch, rename css
* correct offset
* upgrade deps
* upgrade deps
* drawer and lot of other work
* update equipping mechanism
* finish equipment
* fix compilation and upgrade deps
* use v-show in place of v-if to fix ui issues
* v-show -> v-if
* fix linting in test/client
* fix es6 compilation in test/client
* fix babel compilation for tests
* fix groupsUtilities mixin tests
* client: buttons
* client: buttons: fix colors
* client: finish buttons and dropdowns
* upgrade bootstrap-vue, finish buttons and dropdowns
* fix tasks page layout
* misc fixes for buttons
* add textareas
* fix app menu
* add inputs
* fixes for toggleSwitch
* typography
* checkboxes and radio buttons
* add checkbox icon
* fix equip.js
* extract strings to newClient.json
* add Popover above 'Use Costume' / 'Auto Equip' slider - disable item select if costume-mode and 'useCostume' isn't active
* show "you have disabled your costume" error above the drawer items
* check errorMessage for null
* hide star if costume not enabled
* fix errorMessage (!errorMessage seems not to work for string)
* show minimize / expand icon - always centered by css
* drawer test
* drawer: fix centering on large screens
* fix show more button
* add margin when two dropdowns are next to each other
* adjust the page padding based on the drawer, misc fixes
* drawer fixes
2017-05-16 19:09:55 +00:00
|
|
|
background-color: $header-dark-background;
|
2016-11-18 18:20:25 +00:00
|
|
|
}
|
|
|
|
|
|
2017-03-06 19:09:34 +00:00
|
|
|
.progress-container > .progress > .progress-bar {
|
2016-11-18 18:20:25 +00:00
|
|
|
border-radius: 0px;
|
|
|
|
|
height: 12px;
|
|
|
|
|
min-width: 0px;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|
2016-09-18 19:51:20 +00:00
|
|
|
<script>
|
2016-11-18 18:20:25 +00:00
|
|
|
import Avatar from './avatar';
|
2017-03-18 17:33:08 +00:00
|
|
|
import { mapState } from 'client/libs/store';
|
2016-09-20 16:58:02 +00:00
|
|
|
|
2016-11-18 18:20:25 +00:00
|
|
|
import { toNextLevel } from '../../common/script/statHelpers';
|
|
|
|
|
import statsComputed from '../../common/script/libs/statsComputed';
|
|
|
|
|
import percent from '../../common/script/libs/percent';
|
|
|
|
|
|
2016-09-18 19:51:20 +00:00
|
|
|
export default {
|
2016-11-18 18:20:25 +00:00
|
|
|
components: {
|
|
|
|
|
Avatar,
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
percent,
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
Client Redesign: Inventory pages, secondary menu, misc css and design items (#8631)
* add colors palette
* add secondary menu component and style it
* add box shadow to secondary menu
* misc css, fixes for secondary menu
* client: add equipment page with grouping, css: add some styles
* add typography
* more equipment
* stable: fix linting
* equipment: add styles (lots of general styles too)
* remove duplicate google fonts loading
* add dropdowns
* design: white search input background, remove gray from items
* start adding drawer and selected indicator
* wip equipment
* fix equipment
* equipment: correctly bind new properties on items.gear.equipped
* equipment: fix vue binding. version 2
* equipment: fix vue binding. version 3
* back to first fix for equip op, fix for sourcemaps, send http request when an item is equipped, load bootstrap-vue components where needed
* checkboxes and radio buttons
* correctly renders selected items in first postion during the first render
* add search
* general changes, constants part of app state, add popovers
* add toggle switch, rename css
* correct offset
* upgrade deps
* upgrade deps
* drawer and lot of other work
* update equipping mechanism
* finish equipment
* fix compilation and upgrade deps
* use v-show in place of v-if to fix ui issues
* v-show -> v-if
* fix linting in test/client
* fix es6 compilation in test/client
* fix babel compilation for tests
* fix groupsUtilities mixin tests
* client: buttons
* client: buttons: fix colors
* client: finish buttons and dropdowns
* upgrade bootstrap-vue, finish buttons and dropdowns
* fix tasks page layout
* misc fixes for buttons
* add textareas
* fix app menu
* add inputs
* fixes for toggleSwitch
* typography
* checkboxes and radio buttons
* add checkbox icon
* fix equip.js
* extract strings to newClient.json
* add Popover above 'Use Costume' / 'Auto Equip' slider - disable item select if costume-mode and 'useCostume' isn't active
* show "you have disabled your costume" error above the drawer items
* check errorMessage for null
* hide star if costume not enabled
* fix errorMessage (!errorMessage seems not to work for string)
* show minimize / expand icon - always centered by css
* drawer test
* drawer: fix centering on large screens
* fix show more button
* add margin when two dropdowns are next to each other
* adjust the page padding based on the drawer, misc fixes
* drawer fixes
2017-05-16 19:09:55 +00:00
|
|
|
...mapState({
|
|
|
|
|
user: 'user.data',
|
|
|
|
|
MAX_HEALTH: 'constants.MAX_HEALTH',
|
|
|
|
|
}),
|
2016-11-18 18:20:25 +00:00
|
|
|
maxMP () {
|
|
|
|
|
return statsComputed(this.user).maxMP;
|
|
|
|
|
},
|
|
|
|
|
toNextLevel () { // Exp to next level
|
|
|
|
|
return toNextLevel(this.user.stats.lvl);
|
|
|
|
|
},
|
|
|
|
|
},
|
2016-09-18 19:51:20 +00:00
|
|
|
};
|
2016-11-18 18:20:25 +00:00
|
|
|
</script>
|