Skip to content

Commit

Permalink
Weather effects for patrons only
Browse files Browse the repository at this point in the history
  • Loading branch information
Lakeyzer committed Nov 17, 2023
1 parent 88efa5d commit 0ff1941
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/components/campaign/share/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,16 @@
</q-tab-panel>

<q-tab-panel name="weather">
<Weather v-model="weather" class="pb-4" />
<Weather v-model="weather" class="pb-4" :disabled="tier.name === 'Free'" />
<div class="actions">
<button class="btn bg-neutral-5" @click="clearWeather">Clear</button>
<button class="btn" :disabled="isEmpty(weather)" @click="setWeather">Set</button>
<template v-if="tier.name !== 'Free'">
<button class="btn bg-neutral-5" @click="clearWeather">Clear</button>
<button class="btn" :disabled="isEmpty(weather)" @click="setWeather">Set</button>
</template>
<template v-else>
<button v-if="!isEmpty(weather)" class="btn bg-neutral-5" @click="clearWeather">Clear</button>
<router-link v-else to="/patreon" class="btn bg-patreon-red">Get a subscription</router-link>
</template>
</div>
</q-tab-panel>
</q-tab-panels>
Expand All @@ -185,7 +191,7 @@

<script>
import { generateYoutubeEmbedUrl } from "src/utils/generalFunctions";
import Weather from "src/components/encounters/Weather";
import Weather from "src/components/encounters/Weather.vue";
import Sharing from "./Sharing.vue";
import { mapGetters, mapActions } from "vuex";
import { isEmpty } from "lodash";
Expand Down Expand Up @@ -229,7 +235,7 @@ export default {
};
},
computed: {
...mapGetters(["broadcast"]),
...mapGetters(["broadcast", "tier"]),
},
methods: {
...mapActions(["setDrawer"]),
Expand Down
6 changes: 6 additions & 0 deletions src/components/encounters/Weather.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
v-model="weather.smoke"
indeterminate-value="something-else"
:false-value="null"
:disable="disabled"
/>
</div>
</q-item-label>
Expand All @@ -30,6 +31,7 @@
:max="3"
markers
:dark="$store.getters.theme === 'dark'"
:disable="disabled"
/>
</q-item-section>
</q-item>
Expand All @@ -44,6 +46,10 @@ export default {
type: Object,
required: true,
},
disabled: {
type: Boolean,
default: false,
}
},
data() {
return {
Expand Down

0 comments on commit 0ff1941

Please sign in to comment.