From 2e7afa9bb03f4b44c4838e314bb9964647b7a8ff Mon Sep 17 00:00:00 2001 From: Artus Date: Tue, 1 Oct 2019 16:18:30 +0200 Subject: [PATCH] small fixes --- lootalot_db/src/lib.rs | 2 +- lootalot_front/src/App.vue | 9 ++++++-- lootalot_front/src/components/Wealth.vue | 27 ++++++++++++++++++++---- 3 files changed, 31 insertions(+), 7 deletions(-) diff --git a/lootalot_db/src/lib.rs b/lootalot_db/src/lib.rs index 76d1ccf..92ad60d 100644 --- a/lootalot_db/src/lib.rs +++ b/lootalot_db/src/lib.rs @@ -266,7 +266,7 @@ impl<'q> AsAdmin<'q> { .execute(self.0) .map(|rows_updated| match rows_updated { 1 => (), - _ => panic!("RuntimeError: UnclaimItem did not make expected changes"), + _ => panic!("RuntimeError: AddPlayer did not make expected changes"), }) } diff --git a/lootalot_front/src/App.vue b/lootalot_front/src/App.vue index 38f11a5..7048ec6 100644 --- a/lootalot_front/src/App.vue +++ b/lootalot_front/src/App.vue @@ -2,7 +2,7 @@
-
+
@@ -69,6 +69,25 @@ this.editing = false; 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]; + }, } }