Skip to content

Commit

Permalink
Merge branch 'hotfix/2.7.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
Lakeyzer committed Dec 29, 2022
2 parents cdced33 + 6be7d6b commit c1f3615
Show file tree
Hide file tree
Showing 9 changed files with 186 additions and 19,544 deletions.
19,512 changes: 49 additions & 19,463 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.7.1",
"version": "2.7.2",
"name": "harmless_key",
"description": "A Dungeons and Dragons Combat Tracker",
"productName": "Harmless Key",
Expand Down
17 changes: 9 additions & 8 deletions src/components/ToolsPage.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
<template>
<hk-card>
<div class="card-header" slot="header">

<h1>{{ title }} for D&D 5e</h1>
<slot name='action_btn'/>
</div>
<div slot="image" class="card-image written" :style="{ backgroundImage: `url(${img})` }">
D&D {{ title }}
</div>
<div class="card-body">

<SignedIn v-if="user" />
<slot />

</div>
<div slot="footer" class="card-footer">
<slot btn_classes="full-width" name='action_btn' />
Expand All @@ -20,21 +18,24 @@
</template>

<script>
import { mapGetters } from "vuex";
import SignedIn from "./userContent/SignedIn.vue";
export default {
name: 'ToolsPage',
components: {
SignedIn
},
props: {
title: String,
bg_img: String,
},
computed: {
...mapGetters(["user"]),
img() {
return require(`assets/_img/atmosphere/tool-header/${this.bg_img}`)
}
},
data() {
return {
}
}
}
}
</script>

Expand Down
13 changes: 10 additions & 3 deletions src/components/combat/DemoFinished.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
<hk-card header="Thanks for trying our demo">
<div class="card-body">
<h3>We hope you were impressed by the possibilities</h3>
<p>This is exactly how you can run your custom created encounters in our app. With your own players, and monsters from the SRD or created by you.</p>
<p v-if="!user">This is exactly how you can run your custom created encounters in our app. With your own players, and monsters from the SRD or created by you.</p>
<p v-else>Since you have an account, you can start your own campaign and run your encounters from there.</p>
<a @click="reload" class="btn bg-neutral-5">
<i aria-hidden="true" class="far fa-sync-alt"></i> Reset encounter
<q-tooltip anchor="top middle" self="center middle">
Expand All @@ -15,21 +16,27 @@
</div>

<template slot="footer">
<router-link class="btn btn-square btn-block btn-lg bg-green" to="/sign-up">Create Account Now</router-link>
<router-link v-if="!user" class="btn btn-square btn-block btn-lg bg-green" to="/sign-up">Create Account Now</router-link>
<router-link v-else class="btn btn-square btn-block btn-lg bg-green" to="/content">Create custom content</router-link>
</template>
</hk-card>
</div>
</div>
</template>

<script>
import { mapGetters } from "vuex";
export default {
name: 'DemoFinished',
name: "DemoFinished",
data() {
return {
}
},
computed: {
...mapGetters(["user"])
},
methods: {
reload() {
this.$router.go();
Expand Down
100 changes: 54 additions & 46 deletions src/components/combat/DemoOverlay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,29 @@
enter-active-class="animated animate__slideInBottom"
leave-active-class="animated animate__slideOutBottom"
>
<div class="grid bg-neutral-8" :class="{ hide: !showInfo }">
<div class="">
<h3>
<a class="btn btn-sm bg-neutral-5" @click="reset_demo()">
<i aria-hidden="true" class="far fa-sync-alt"></i>
<q-tooltip anchor="top middle" self="center middle">
Reset
</q-tooltip>
</a>
Demo Encounter
</h3>
This demo encounter has all the functionality our encounter tracker has. If you create an account you can make your own encounters and run them just like this, but with your custom content.<br/>
Create your personal account now and run your D&D encounters smoother than ever.
</div>
<div class="create">
<router-link to="/sign-up" class="btn btn-lg bg-green">Create Account</router-link>
<div class="banner bg-neutral-8" :class="{ hide: !showInfo }">
<h3>
<a class="btn btn-sm bg-neutral-5" @click="reset_demo()">
<i aria-hidden="true" class="far fa-sync-alt"></i>
<q-tooltip anchor="top middle" self="center middle">
Reset
</q-tooltip>
</a>
Demo Encounter
</h3>
<div class="d-flex justify-content-between items-center">
<template v-if="!user">
This demo encounter has all the functionality our encounter tracker has.
If you create an account you can make your own encounters and run them just like this, but with your custom content.<br/>
Create your personal account now and run your D&D encounters smoother than ever.
</template>
<span v-else class="orange">
Now that you've created an account you can start a campaign and run your custom encounters from there.
</span>
<div class="button">
<router-link v-if="!user" to="/sign-up" class="btn btn-lg bg-green">Create Account</router-link>
<router-link v-else to="/content" class="btn btn-lg bg-green">Create custom content</router-link>
</div>
</div>
</div>
</transition>
Expand All @@ -31,7 +38,7 @@
</template>

<script>
import { mapActions } from "vuex";
import { mapActions, mapGetters } from "vuex";
export default {
name: 'DemoOverlay',
Expand All @@ -40,6 +47,9 @@
showInfo: true
}
},
computed: {
...mapGetters(["user"]),
},
methods: {
...mapActions(["reset_demo"])
}
Expand All @@ -55,46 +65,44 @@
z-index: 999;
.grid {
display: grid;
grid-template-columns: 1fr max-content;
grid-template-rows: max-content;
.banner {
padding: 20px;
box-shadow: 0px 0px 15px $black;
transition: bottom .5s linear;
grid-gap: 20px;
&.hide {
display:none;
}
.create {
align-self: center;
.d-flex {
gap: 15px;
.button {
min-width: 250px;
}
}
}
.toggle {
position: absolute;
position: absolute;
top: -50px;
right: 5px;
height: 50px;
width: 50px;
z-index: 97;
text-align: center;
transition: right .5s linear;
display: block;
cursor: pointer;
line-height: 50px;
color:$neutral-1 !important;
i {
transition: transform .5s linear;
}
right: 5px;
height: 50px;
width: 50px;
z-index: 97;
text-align: center;
transition: right .5s linear;
display: block;
cursor: pointer;
line-height: 50px;
color:$neutral-1 !important;
&.show {
i {
transform: rotate(180deg);
}
}
}
i {
transition: transform .5s linear;
}
&.show {
i {
transform: rotate(180deg);
}
}
}
}
</style>
12 changes: 12 additions & 0 deletions src/components/userContent/SignedIn.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<template>
<q-banner class="bg-neutral-7 mb-3 white" rounded inline-actions>
<q-icon slot="avatar" name="fas fa-user-circle" />
<strong>Thanks for creating an account!</strong><br/>
<small>
Now that you're signed in you can use our tools from your custom content page.
</small>
<template slot="action">
<q-btn color="green" no-caps label="Your content" to="/content" />
</template>
</q-banner>
</template>
18 changes: 16 additions & 2 deletions src/views/RunEncounter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
</template>
</div>
<q-dialog v-model="demo_dialog" persistent>
<hk-card header="Choose encounter">
<hk-card v-if="!user || continue_demo" header="Choose encounter">
<div class="card-body text-center">
<p>Would you like to use our demo encounter or build your own custom encounter?</p>
<button class="btn btn-block mb-2" @click="demo_dialog = false">
Expand All @@ -97,6 +97,18 @@
</router-link>
</div>
</hk-card>
<hk-card v-else header="Create custom content">
<div class="card-body text-center">
<h2>This is our demo encounter.</h2>
<p>When signed in you can create Campaigns and run your custom Encounters from there.</p>
<router-link to="/content/campaigns" class="btn bg-green btn-block mb-2">
Go to campaigns
</router-link>
<button class="btn btn-sm btn-block btn-clear" @click="continue_demo = true">
Continue demo
</button>
</div>
</hk-card>
</q-dialog>
<q-resize-observer @resize="setSize" />
</q-no-ssr>
Expand Down Expand Up @@ -150,7 +162,8 @@
width: 0,
audio_notification: false,
loading: true,
demo_dialog: false
demo_dialog: false,
continue_demo: false
}
},
beforeMount() {
Expand All @@ -174,6 +187,7 @@
},
computed: {
...mapGetters([
"user",
"encounter",
"campaigns",
"entities",
Expand Down
53 changes: 32 additions & 21 deletions src/views/Tools/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,47 @@
<div class="card-header" slot="header">
<h1><i aria-hidden="true" class="fas fa-tools mr-2" /> D&D 5e Tools</h1>
</div>
<div class="card-body row q-col-gutter-md">
<div v-for="(tool, key) in tools" class="col-12 col-sm-6 col-md-4" :key="key">
<router-link :to="tool.url">
<hk-card class="full-height tool">
<div slot="image" class="card-image" :style="[ tool.image ? { backgroundImage: `url(${require(`src/assets/_img/atmosphere/medium/${tool.image}`)})` } : '' ]">
<i :class="tool.icon" aria-hidden="true" />
</div>
<div slot="header" class="card-header written">
{{ tool.title }}
</div>
<div class="card-body">
{{ tool.description }}
</div>
<div slot="footer" class="card-footer">
<div v-if="tool.under_development" class="red full-width text-center">Under development</div>
<button v-else class="btn btn-block">
Use {{ tool.title }}
</button>
</div>
</hk-card>
</router-link>
<div class="card-body">
<SignedIn v-if="user" />
<div class="row q-col-gutter-md">
<div v-for="(tool, key) in tools" class="col-12 col-sm-6 col-md-4" :key="key">
<router-link :to="tool.url">
<hk-card class="full-height tool">
<div slot="image" class="card-image" :style="[ tool.image ? { backgroundImage: `url(${require(`src/assets/_img/atmosphere/medium/${tool.image}`)})` } : '' ]">
<i :class="tool.icon" aria-hidden="true" />
</div>
<div slot="header" class="card-header written">
{{ tool.title }}
</div>
<div class="card-body">
{{ tool.description }}
</div>
<div slot="footer" class="card-footer">
<div v-if="tool.under_development" class="red full-width text-center">Under development</div>
<button v-else class="btn btn-block">
Use {{ tool.title }}
</button>
</div>
</hk-card>
</router-link>
</div>
</div>
</div>
</hk-card>
</template>

<script>
import { mapGetters } from "vuex";
import SignedIn from "src/components/userContent/SignedIn.vue";
export default {
name: 'ToolsOverview',
components: {
SignedIn
},
computed: {
...mapGetters(["user"])
},
data() {
return {
tools: {
Expand Down
3 changes: 3 additions & 0 deletions src/views/UserContent/Encounters/Edit/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
</div>
</hk-card>
<div v-else>
<SignedIn v-if="user && demo" />
<div v-if="demo" class="d-flex justify-between items-center mb-3">
<h1 class="written mb-0">
Encounter builder for D&D
Expand Down Expand Up @@ -95,6 +96,7 @@
import Overview from "./Overview.vue";
import General from "./General.vue";
import { mapGetters, mapActions } from "vuex";
import SignedIn from "src/components/userContent/SignedIn.vue";
export default {
name: "EditEncounter",
Expand All @@ -104,6 +106,7 @@
Entities,
Overview,
General,
SignedIn,
},
data() {
return {
Expand Down

0 comments on commit c1f3615

Please sign in to comment.