small fixes
This commit is contained in:
@@ -266,7 +266,7 @@ impl<'q> AsAdmin<'q> {
|
|||||||
.execute(self.0)
|
.execute(self.0)
|
||||||
.map(|rows_updated| match rows_updated {
|
.map(|rows_updated| match rows_updated {
|
||||||
1 => (),
|
1 => (),
|
||||||
_ => panic!("RuntimeError: UnclaimItem did not make expected changes"),
|
_ => panic!("RuntimeError: AddPlayer did not make expected changes"),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<PlayerView :id="state.player_id"
|
<PlayerView :id="state.player_id"
|
||||||
v-slot="{ player, loot, notifications, actions }">
|
v-slot="{ player, loot, notifications, actions }">
|
||||||
<main id="app" class="container">
|
<main id="app" class="container">
|
||||||
<header style="padding-bottom: 1.5em;">
|
<header >
|
||||||
<HeaderBar :app_state="state">
|
<HeaderBar :app_state="state">
|
||||||
<template v-slot:title>{{ player.name }}</template>
|
<template v-slot:title>{{ player.name }}</template>
|
||||||
<template v-slot:links>
|
<template v-slot:links>
|
||||||
@@ -103,7 +103,7 @@ export default {
|
|||||||
components: {
|
components: {
|
||||||
PlayerView,
|
PlayerView,
|
||||||
HeaderBar,
|
HeaderBar,
|
||||||
'AddingChest': Chest,
|
'AddingChest': Chest, // Alias to prevent component re-use
|
||||||
Chest,
|
Chest,
|
||||||
Wealth
|
Wealth
|
||||||
},
|
},
|
||||||
@@ -140,3 +140,8 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
header {
|
||||||
|
padding-bottom: 1.5em;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -25,19 +25,19 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<div class="level-item ">
|
<div class="level-item ">
|
||||||
<p class="is-size-4">{{ wealth[3] }}</p>
|
<p class="is-size-4">{{ pp }}</p>
|
||||||
<p class="heading">PP</p>
|
<p class="heading">PP</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="level-item ">
|
<div class="level-item ">
|
||||||
<p class="is-size-4">{{ wealth[2] }}</p>
|
<p class="is-size-4">{{ gp }}</p>
|
||||||
<p class="heading">PO</p>
|
<p class="heading">PO</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="level-item ">
|
<div class="level-item ">
|
||||||
<p class="is-size-4">{{ wealth[1] }}</p>
|
<p class="is-size-4 has-text-grey-light">{{ sp }}</p>
|
||||||
<p class="heading">PA</p>
|
<p class="heading">PA</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="level-item ">
|
<div class="level-item ">
|
||||||
<p class="is-size-4">{{ wealth[0] }}</p>
|
<p class="is-size-4 has-text-grey-light">{{ cp }}</p>
|
||||||
<p class="heading">PC</p>
|
<p class="heading">PC</p>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -69,6 +69,25 @@
|
|||||||
this.editing = false;
|
this.editing = false;
|
||||||
this.edit_value = 0;
|
this.edit_value = 0;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
pp () {
|
||||||
|
return this.wealth[3];
|
||||||
|
},
|
||||||
|
gp () {
|
||||||
|
const gp = this.wealth[2];
|
||||||
|
if (gp < 10) {
|
||||||
|
return "0" + gp;
|
||||||
|
} else {
|
||||||
|
return gp;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
sp () {
|
||||||
|
return this.wealth[1];
|
||||||
|
},
|
||||||
|
cp () {
|
||||||
|
return this.wealth[0];
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user