Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Commit

Permalink
fix: revert terms (#1004)
Browse files Browse the repository at this point in the history
This reverts the terms pr I accidentally merged earlier.
  • Loading branch information
lennartkloock authored Jan 25, 2024
1 parent c0a9a38 commit 070a2b3
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 275 deletions.
2 changes: 1 addition & 1 deletion .env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ VITE_APP_ENV=dev
VITE_APP_TITLE="7TV (Dev)"
VITE_APP_API_GQL="http://localhost:3000/v3/gql"
VITE_APP_API_GQL_WS="ws://localhost:3000/v3/gql"
VITE_APP_API_EVENTS="ws://localhost:3777/v3"
VITE_APP_API_EVENTS="ws://localhost:3700/v3"
VITE_APP_API_REST="http://localhost:3100/v3"
VITE_APP_API_EGVAULT="http://localhost:3444"
VITE_APP_OLD="http://localhost:4205"
Expand Down
4 changes: 2 additions & 2 deletions src/apollo/query/user.query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ export namespace userForUserPageQuery {
}

export const userEmoteSetsQuery = gql`
query GetUserEmoteSets($id: ObjectID!, $entitledSets: Boolean) {
query GetUserEmoteSets($id: ObjectID!) {
user(id: $id) {
id
emote_sets(entitled: $entitledSets) {
emote_sets {
id
name
flags
Expand Down
6 changes: 0 additions & 6 deletions src/router/legal.route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,4 @@ export const LegalRoute = [
props: true,
component: () => import("@/views/legal/LegalTerms.vue"),
},
{
path: "/legal/sales",
name: "LegalSales",
props: true,
component: () => import("@/views/legal/LegalSales.vue"),
},
] as RouteRecordRaw[];
2 changes: 1 addition & 1 deletion src/views/context/UserContext.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ query.onResult((res) => {
// Relation: Emote Sets
useQuery<userEmoteSetsQuery.Result, userEmoteSetsQuery.Variables>(
userEmoteSetsQuery,
() => ({ id: ctx.user.id, entitledSets: true }),
() => ({ id: ctx.user.id }),
() => ({ enabled: ok2.value && !!ctx.user.id }),
).onResult((res) => {
ctx.emoteSets = res.data.user?.emote_sets ?? [];
Expand Down
185 changes: 0 additions & 185 deletions src/views/legal/LegalSales.vue

This file was deleted.

23 changes: 2 additions & 21 deletions src/views/store/StorePurchase.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,9 @@
</span>
</div>

<div class="terms-agreement">
<Checkbox v-model="termsOk" />
<span
>I agree to the
<RouterLink target="_blank" :to="{ name: 'LegalSales' }">Terms and Conditions of Sale</RouterLink>.
</span>
</div>

<Button
class="checkout-button"
:disabled="!termsOk || !selectedMethod || !formData || (gift && !recipient)"
:disabled="!selectedMethod || !formData || (gift && !recipient)"
color="accent"
:label="t('store.checkout_button', { AMOUNT: `€${Number(egv.currentPlan.price) / 100}` })"
@click="checkout"
Expand All @@ -73,7 +65,6 @@ import { useModal } from "@/store/modal";
import { User } from "@/structures/User";
import PurchaseSuccessModal from "@/views/store/PurchaseSuccessModal.vue";
import Logo from "@/components/base/Logo.vue";
import Checkbox from "@/components/form/Checkbox.vue";
import Button from "@/components/utility/Button.vue";
import Icon from "@/components/utility/Icon.vue";
import LoginButton from "@/components/utility/LoginButton.vue";
Expand All @@ -88,8 +79,6 @@ const actor = useActor();
const route = useRoute();
const egv = useEgVault();
const termsOk = ref(false);
const gift: boolean = route.query.gift === "1";
const selectedMethod = ref("stripe");
Expand Down Expand Up @@ -169,7 +158,7 @@ const modal = useModal();
// Waiting for message from transaction window
const onMessage = (ev: MessageEvent) => {
const w = ev.target as Window;
if (!w || typeof ev.data !== "string") {
if (!w) {
return undefined;
}
Expand Down Expand Up @@ -280,12 +269,4 @@ main.store-purchase {
font-size: 1.5rem;
}
}
.terms-agreement {
margin: 1rem 0.25rem;
}
.terms-agreement > * {
display: inline-block;
}
</style>
Loading

0 comments on commit 070a2b3

Please sign in to comment.