Skip to content

Commit

Permalink
Merge pull request #330 from lockdown-systems/322-remove-premium-for-…
Browse files Browse the repository at this point in the history
…paid

Only show premium badges if the user is not paying for premium
  • Loading branch information
micahflee authored Dec 8, 2024
2 parents 15d4b76 + 853f84e commit 925de9b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
3 changes: 2 additions & 1 deletion src/renderer/src/views/x/AccountXView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,8 @@ onUnmounted(async () => {
:model="unref(model)" @set-state="setState($event)" @update-account="updateAccount" />

<XWizardDeleteOptionsPage v-if="model.state == State.WizardDeleteOptionsDisplay"
:model="unref(model)" @update-account="updateAccount" @set-state="setState($event)" />
:model="unref(model)" :user-authenticated="userAuthenticated" :user-premium="userPremium"
@update-account="updateAccount" @set-state="setState($event)" />

<XWizardReviewPage v-if="model.state == State.WizardReviewDisplay" :model="unref(model)"
@set-state="setState($event)" @update-account="updateAccount" @start-jobs="startJobs" />
Expand Down
21 changes: 14 additions & 7 deletions src/renderer/src/views/x/XWizardDeleteOptionsPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import XLastImportOrBuildComponent from './XLastImportOrBuildComponent.vue';
// Props
const props = defineProps<{
model: AccountXViewModel;
userAuthenticated: boolean;
userPremium: boolean;
}>();
// Emits
Expand Down Expand Up @@ -187,7 +189,8 @@ onMounted(async () => {
</div>
</div>
</div>
<span class="premium badge badge-primary">Premium</span>
<span v-if="!userAuthenticated || !userPremium"
class="premium badge badge-primary">Premium</span>
</div>
<div class="d-flex align-items-center justify-content-between">
<div class="d-flex align-items-center flex-nowrap">
Expand All @@ -214,7 +217,8 @@ onMounted(async () => {
</div>
</div>
</div>
<span class="premium badge badge-primary">Premium</span>
<span v-if="!userAuthenticated || !userPremium"
class="premium badge badge-primary">Premium</span>
</div>
<div class="d-flex align-items-center justify-content-between">
<div class="d-flex align-items-center flex-nowrap">
Expand All @@ -241,7 +245,8 @@ onMounted(async () => {
</div>
</div>
</div>
<span class="premium badge badge-primary">Premium</span>
<span v-if="!userAuthenticated || !userPremium"
class="premium badge badge-primary">Premium</span>
</div>
</div>
</div>
Expand Down Expand Up @@ -284,7 +289,8 @@ onMounted(async () => {
</div>
</div>
</div>
<span class="premium badge badge-primary">Premium</span>
<span v-if="!userAuthenticated || !userPremium"
class="premium badge badge-primary">Premium</span>
</div>
</div>
</div>
Expand All @@ -300,7 +306,7 @@ onMounted(async () => {
</label>
<span class="ms-2 text-muted">(recommended)</span>
</div>
<span class="premium badge badge-primary">Premium</span>
<span v-if="!userAuthenticated || !userPremium" class="premium badge badge-primary">Premium</span>
</div>
</div>

Expand All @@ -314,7 +320,8 @@ onMounted(async () => {
</label>
</div>
<div class="d-flex align-items-center flex-nowrap">
<span class="premium badge badge-primary">Premium</span>
<span v-if="!userAuthenticated || !userPremium"
class="premium badge badge-primary">Premium</span>
</div>
</div>
<div class="indent">
Expand All @@ -335,7 +342,7 @@ onMounted(async () => {
</label>
</div>
</div>
<span class="premium badge badge-primary">Premium</span>
<span v-if="!userAuthenticated || !userPremium" class="premium badge badge-primary">Premium</span>
</div>
<div class="indent">
<small class="form-text text-muted">
Expand Down

0 comments on commit 925de9b

Please sign in to comment.