|
@@ -54,7 +54,7 @@ |
|
|
<section class="form inputs special"> |
|
|
<section class="form inputs special"> |
|
|
<h3>Subscriptions</h3> |
|
|
<h3>Subscriptions</h3> |
|
|
<label for="">Standard Plan ($49/month)</label> |
|
|
<label for="">Standard Plan ($49/month)</label> |
|
|
<button @click="unsubscribe">Unsubscribe</button> |
|
|
|
|
|
|
|
|
<button @click="() => unsubing = true">Unsubscribe</button> |
|
|
<label for="">Newsletter</label> |
|
|
<label for="">Newsletter</label> |
|
|
<button @click="changeNewsSub"> |
|
|
<button @click="changeNewsSub"> |
|
|
{{props.user.newsletter ? "Unsubscribe" : "Subscribe"}} |
|
|
{{props.user.newsletter ? "Unsubscribe" : "Subscribe"}} |
|
@@ -81,6 +81,8 @@ |
|
|
<button>Confirm</button> |
|
|
<button>Confirm</button> |
|
|
</Dialog> |
|
|
</Dialog> |
|
|
|
|
|
|
|
|
|
|
|
<UnsubPrompt v-if="unsubing" :token="token" @close="() => unsubing = false"/> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
@@ -88,10 +90,12 @@ |
|
|
import { ref, watch, onMounted } from "vue" |
|
|
import { ref, watch, onMounted } from "vue" |
|
|
import Dialog from "./dialog.vue" |
|
|
import Dialog from "./dialog.vue" |
|
|
import Dropdown from "./dropdown.vue" |
|
|
import Dropdown from "./dropdown.vue" |
|
|
|
|
|
import UnsubPrompt from "./unsubscribe.vue" |
|
|
|
|
|
|
|
|
let avatar = ref(null) // the canvas element |
|
|
let avatar = ref(null) // the canvas element |
|
|
let letterhead = ref(null) // the canvas element |
|
|
let letterhead = ref(null) // the canvas element |
|
|
let ready = ref(false) |
|
|
let ready = ref(false) |
|
|
|
|
|
let unsubing = ref(false) |
|
|
let avatarChanged = ref(false) |
|
|
let avatarChanged = ref(false) |
|
|
let avatarError = ref('') |
|
|
let avatarError = ref('') |
|
|
let letterheadError = ref('') |
|
|
let letterheadError = ref('') |
|
@@ -278,9 +282,6 @@ function getLocations(e) { |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function unsubscribe() { |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function changeNewsSub() { |
|
|
function changeNewsSub() { |
|
|
fetch(`/api/user/newsletter`, |
|
|
fetch(`/api/user/newsletter`, |
|
|
{method: 'GET', |
|
|
{method: 'GET', |
|
|