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

feat: stats ui + inventory theme #166

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions src/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,28 @@ function update_all(
hat,
cloak,
pet,

available_points,
vitality,
strength,
chance,
intelligence,
wisdom,
agility,
} = character;

// @ts-ignore
if (selected_character.value.available_points !== available_points ||
selected_character.value.vitality !== vitality ||
selected_character.value.strength !== strength ||
selected_character.value.chance !== chance ||
selected_character.value.intelligence !== intelligence ||
selected_character.value.wisdom !== wisdom ||
selected_character.value.agility !== agility
) {
selected_character.value = current_character(state);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rather than using the expensive current_character function
image

You could assign { vitality, strength, .. } to selected_character.value

}

let equipment_changed = false;

// @ts-ignore
Expand Down
9 changes: 9 additions & 0 deletions src/assets/translations/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,15 @@ APP_CHARACTER_CREATE_OK: Character created!
APP_CHARACTER_CREATE_ERROR: Error while creating character
APP_CHARACTER_NO_CHARACTERS: You must lock a character to play

APP_CHARACTER_STAT_LIFE_POINT: Life Points
APP_CHARACTER_STAT_PA: Action Points
APP_CHARACTER_STAT_PM: Movement Points
APP_CHARACTER_STAT_EXP: Experience
APP_CHARACTER_STAT_ENERGY: Energy
APP_CHARACTER_STAT_LEVEL: Level
APP_CHARACTER_STAT_CHARACTERISTICS: Characteristics
APP_CHARACTER_STAT_CAPITAL: Capital

APP_GAME_CHAT_COPY_ADDRESS: Copy address
APP_GAME_CHAT_COPIED: Address copied to clipboard
APP_GAME_CHAT_NO_CHARACTER: You must select a character first
Expand Down
9 changes: 9 additions & 0 deletions src/assets/translations/fr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,15 @@ APP_CHARACTER_CREATE_OK: Personnage créé !
APP_CHARACTER_CREATE_ERROR: Erreur lors de la création du personnage
APP_CHARACTER_NO_CHARACTERS: Vous devez verrouiller un personnage pour jouer

APP_CHARACTER_STAT_LIFE_POINT: Points de vie
APP_CHARACTER_STAT_PA: Points d'actions
APP_CHARACTER_STAT_PM: Points de mouvements
APP_CHARACTER_STAT_EXP: Experience
APP_CHARACTER_STAT_ENERGY: Energie
APP_CHARACTER_STAT_LEVEL: Niveau
APP_CHARACTER_STAT_CHARACTERISTICS: Caractéristiques
APP_CHARACTER_STAT_CAPITAL: Capital

APP_GAME_CHAT_COPY_ADDRESS: Copier l'adresse
APP_GAME_CHAT_COPIED: Adresse copiée dans le presse-papiers
APP_GAME_CHAT_NO_CHARACTER: Vous devez d'abord sélectionner un personnage
Expand Down
9 changes: 9 additions & 0 deletions src/assets/translations/jp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,15 @@ APP_CHARACTER_CREATE_OK: キャラクターが作成されました!
APP_CHARACTER_CREATE_ERROR: キャラクターの作成中にエラーが発生しました
APP_CHARACTER_NO_CHARACTERS: プレイするにはキャラクターをロックする必要があります

APP_CHARACTER_STAT_LIFE_POINT: ライフポイント
APP_CHARACTER_STAT_PA: アクションポイント
APP_CHARACTER_STAT_PM: ムーブポイント
APP_CHARACTER_STAT_EXP: 経験値
APP_CHARACTER_STAT_ENERGY: エネルギー
APP_CHARACTER_STAT_LEVEL: レベル
APP_CHARACTER_STAT_CHARACTERISTICS: 特性
APP_CHARACTER_STAT_CAPITAL: キャピタル

APP_GAME_CHAT_COPY_ADDRESS: アドレスをコピー
APP_GAME_CHAT_COPIED: アドレスがクリップボードにコピーされました
APP_GAME_CHAT_NO_CHARACTER: まずキャラクターを選択する必要があります
Expand Down
10 changes: 8 additions & 2 deletions src/components/cards/equipment-slot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,17 @@ img.slot-img
padding .5em
filter grayscale(1)
opacity .3
position absolute;
z-index 1;
Comment on lines +147 to +148
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

semi-colon are not needed in stylus, does the npm run format pickup on those change?


img.equipped-img
width 100%
height 100%
object-fit contain
cursor pointer
position absolute;
z-index 1;
padding 2px

.slot
pointer-events none
Expand All @@ -158,8 +163,9 @@ img.equipped-img
height 100%
top 0
left 0
box-shadow: inset 0 0 15px 0 #212121
border 1px solid #212121
box-shadow: inset 0 0 5px 0 #212121db
border 2px solid #ddd8c9
background #8d8980;
&.highlighted
box-shadow: inset 0 0 15px 0 #F9A825
border 1px solid #F9A825
Expand Down
2 changes: 2 additions & 0 deletions src/components/cards/item-description.vue
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ const stats = computed(() => {
overflow hidden
position relative
height 250px
color #514a3c
.header
display flex
flex-flow row nowrap
Expand Down Expand Up @@ -171,6 +172,7 @@ const stats = computed(() => {
text-transform uppercase
font-size .9em
.right-content
color white
overflow hidden
overflow-y scroll
height calc(100% - .5em)
Expand Down
14 changes: 7 additions & 7 deletions src/components/cards/item-equipments.vue
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ const is_dragging_pet = computed(() => {
.item-equipments
position relative
grid-area perso
border 5px double #212121
background linear-gradient(to bottom, #212121, rgba(#455A64, .7) 50%)
border 3px solid #ffffff;
background #514a3ccc
border-radius 12px
display flex
flex-flow row nowrap
Expand Down Expand Up @@ -262,34 +262,34 @@ const is_dragging_pet = computed(() => {
position relative
.title
grid-area title
width 80px
width 74px
height @width
margin-right 1em
.amulet
grid-area amulet
.weapon
grid-area weapon
width 80px
width 74px
height @width
margin-left 1em
.left_ring
grid-area left_ring
.belt
grid-area belt
width 80px
width 74px
height @width
margin-top 1em
.right_ring
grid-area right_ring
.boots
grid-area boots
width 80px
width 74px
height @width
.right
display flex
flex-flow column nowrap
>*
width 80px
width 74px
height @width
margin-bottom 5px
position relative
Expand Down
2 changes: 2 additions & 0 deletions src/components/cards/item-inventory.vue
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,8 @@ const items = computed(() => {
overflow hidden
overflow-y auto
padding .5em
background #beb998cc
border-radius 0 0 9px 9px
.item
position relative
cursor pointer
Expand Down
Loading