Skip to content

Commit 126a7ed

Browse files
authored
[ALS-532] Move TOS flag from branding to env variables (#357)
1 parent b2f47ac commit 126a7ed

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

src/lib/assets/configuration.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
}
3838
],
3939
"footer": {
40-
"showTerms": true,
4140
"showSitemap": true,
4241
"excludeSitemapOn": ["/explorer", "/discover"],
4342
"links": [

src/lib/components/Footer.svelte

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
const modalStore = getModalStore();
44
55
import { page } from '$app/stores';
6-
import { branding } from '$lib/configuration';
6+
import { branding, features } from '$lib/configuration';
77
import { user } from '$lib/stores/User';
88
99
import TermsModal from '$lib/components/modals/TermsModal.svelte';
@@ -49,8 +49,10 @@
4949
{/if}
5050
<footer id="main-footer" class="flex relative">
5151
<ul>
52-
{#if branding?.footer?.showTerms}
53-
<li><button class="hover:underline" on:click={openTermsModal}>Terms of Service</button></li>
52+
{#if features.termsOfService}
53+
<li>
54+
<button class="hover:underline text-xs" on:click={openTermsModal}>Terms of Service</button>
55+
</li>
5456
{/if}
5557
{#each branding?.footer?.links as link}
5658
<li>

src/lib/configuration.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ export const features: Indexable = {
141141
dashboard: import.meta.env?.VITE_DASHBOARD === 'true',
142142
dashboardDrawer: import.meta.env?.VITE_DASHBOARD_DRAWER === 'true',
143143
confirmDownload: import.meta.env?.VITE_CONFIRM_DOWNLOAD === 'true',
144+
termsOfService: import.meta.env?.VITE_ENABLE_TOS === 'true',
144145
};
145146

146147
export const settings: Indexable = {

src/lib/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ export interface SiteMapConfig {
2121

2222
export interface FooterConfig {
2323
showSitemap: boolean;
24-
showTerms?: boolean;
2524
excludeSitemapOn: string[];
2625
links: Array<{
2726
title: string;

0 commit comments

Comments
 (0)