Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

only render privacy policy on official site #1789

Merged
merged 1 commit into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions client/src/router.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router";
import { isOfficialSite } from "./util/misc";

Check warning on line 2 in client/src/router.ts

View check run for this annotation

Codecov / codecov/patch

client/src/router.ts#L2

Added line #L2 was not covered by tests

export const routes: RouteRecordRaw[] = [
{
Expand All @@ -16,11 +17,6 @@
name: "room",
component: () => import("./views/Room.vue"),
},
{
path: "/privacypolicy",
name: "privacypolicy",
component: () => import("./views/Privacy.vue"),
},
{
path: "/attribution",
name: "attribution",
Expand All @@ -45,6 +41,15 @@
},
];

// FIXME: only render on official site
if (import.meta.env.DEV || isOfficialSite()) {
routes.push({
path: "/privacypolicy",
name: "privacypolicy",
component: () => import("./views/Privacy.vue"),
});
}

Check warning on line 52 in client/src/router.ts

View check run for this annotation

Codecov / codecov/patch

client/src/router.ts#L44-L52

Added lines #L44 - L52 were not covered by tests
if (import.meta.env.DEV) {
routes.push({
path: "/playground",
Expand Down
4 changes: 4 additions & 0 deletions client/src/util/misc.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
export function enumKeys<O extends object, K extends keyof O = keyof O>(obj: O): K[] {
return Object.keys(obj).filter(k => Number.isNaN(+k)) as K[];
}

export function isOfficialSite(): boolean {
return window.location.hostname.endsWith("opentogethertube.com");
}

Check warning on line 7 in client/src/util/misc.ts

View check run for this annotation

Codecov / codecov/patch

client/src/util/misc.ts#L6-L7

Added lines #L6 - L7 were not covered by tests
3 changes: 2 additions & 1 deletion client/src/views/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
<a class="side-pad" href="https://softe.club">SEC</a> @ Stevens
</v-row>
<v-row no-gutters class="center-shit">
<router-link class="side-pad" to="/privacypolicy">{{
<router-link class="side-pad" to="/privacypolicy" v-if="isOfficialSite()">{{

Check warning on line 165 in client/src/views/Home.vue

View check run for this annotation

Codecov / codecov/patch

client/src/views/Home.vue#L165

Added line #L165 was not covered by tests
$t("footer.privacy-policy")
}}</router-link
><router-link class="side-pad" to="/attribution">{{
Expand All @@ -182,6 +182,7 @@
import { computed } from "vue";
import { createRoomHelper } from "@/util/roomcreator";
import { useStore } from "@/store";
import { isOfficialSite } from "@/util/misc";

Check warning on line 185 in client/src/views/Home.vue

View check run for this annotation

Codecov / codecov/patch

client/src/views/Home.vue#L185

Added line #L185 was not covered by tests

const store = useStore();

Expand Down
27 changes: 21 additions & 6 deletions client/src/views/Privacy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,17 @@
</p>

<p>
OpenTogetherTube is GDPR compliant because of how little information is collected. If,
for some reason, you really want to have the one database row that represents your
account, reach out to me <a href="https://twitter.com/rollthedyc3">on twitter.</a>
OpenTogetherTube is GDPR compliant because of how little information is collected. If
you want your account data, please contact me at
<a href="mailto:carson.mcmanus1+ott-support@gmail.com">
carson.mcmanus1+ott-support@gmail.com
</a>

Check warning on line 38 in client/src/views/Privacy.vue

View check run for this annotation

Codecov / codecov/patch

client/src/views/Privacy.vue#L34-L38

Added lines #L34 - L38 were not covered by tests
</p>

<p>
This site uses the Youtube Data API, and it's usage must comply with the
<a href="https://developers.google.com/youtube/terms/api-services-terms-of-service"
>YouTube API Terms of Service</a
<a href="https://developers.google.com/youtube/terms/api-services-terms-of-service">
YouTube API Terms of Service</a

Check warning on line 44 in client/src/views/Privacy.vue

View check run for this annotation

Codecov / codecov/patch

client/src/views/Privacy.vue#L43-L44

Added lines #L43 - L44 were not covered by tests
>. No personally identifiable information is sent to Youtube. Watching Youtube videos
requires you to agree to the
<a href="https://www.youtube.com/t/terms">Youtube Terms of Service</a>, and
Expand All @@ -49,6 +51,15 @@
information, which includes: video id, video title, video description, video thumbnail,
and video duration. This information is cached for up to 30 days.
</p>

<h1>Contact Info</h1>

<p>
Email:
<a href="mailto:carson.mcmanus1+ott-support@gmail.com">
carson.mcmanus1+ott-support@gmail.com
</a>
</p>

Check warning on line 62 in client/src/views/Privacy.vue

View check run for this annotation

Codecov / codecov/patch

client/src/views/Privacy.vue#L54-L62

Added lines #L54 - L62 were not covered by tests
</v-container>
</template>

Expand All @@ -58,4 +69,8 @@
};
</script>

<style lang="scss" scoped></style>
<style lang="scss" scoped>
p {
margin: 1em 0;
}
</style>

Check warning on line 76 in client/src/views/Privacy.vue

View check run for this annotation

Codecov / codecov/patch

client/src/views/Privacy.vue#L72-L76

Added lines #L72 - L76 were not covered by tests
6 changes: 5 additions & 1 deletion client/src/views/Room.vue
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,9 @@
<v-footer>
<v-container>
<v-row class="center-shit">
<router-link to="/privacypolicy">{{ $t("footer.privacy-policy") }}</router-link>
<router-link to="/privacypolicy" v-if="isOfficialSite()">
{{ $t("footer.privacy-policy") }}
</router-link>
</v-row>
<v-row class="center-shit">
{{ gitCommit }}
Expand Down Expand Up @@ -236,6 +238,7 @@
import { secondsToTimestamp } from "@/util/timestamp";
import { useCaptions, useMediaPlayer, useVolume } from "@/components/composables";
import { useGrants } from "@/components/composables/grants";
import { isOfficialSite } from "@/util/misc";

const VIDEO_CONTROLS_HIDE_TIMEOUT = 3000;

Expand Down Expand Up @@ -673,6 +676,7 @@
store,
roomapi,
granted,
isOfficialSite,

Check warning on line 679 in client/src/views/Room.vue

View check run for this annotation

Codecov / codecov/patch

client/src/views/Room.vue#L679

Added line #L679 was not covered by tests

controlsVisible,
videoControlsHideTimeout,
Expand Down
Loading