Skip to content

Commit

Permalink
[ALS-532] Move TOS flag from branding to env variables (#357)
Browse files Browse the repository at this point in the history
  • Loading branch information
srpiatt authored Jan 31, 2025
1 parent b2f47ac commit 126a7ed
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/lib/assets/configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
}
],
"footer": {
"showTerms": true,
"showSitemap": true,
"excludeSitemapOn": ["/explorer", "/discover"],
"links": [
Expand Down
8 changes: 5 additions & 3 deletions src/lib/components/Footer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const modalStore = getModalStore();
import { page } from '$app/stores';
import { branding } from '$lib/configuration';
import { branding, features } from '$lib/configuration';
import { user } from '$lib/stores/User';
import TermsModal from '$lib/components/modals/TermsModal.svelte';
Expand Down Expand Up @@ -49,8 +49,10 @@
{/if}
<footer id="main-footer" class="flex relative">
<ul>
{#if branding?.footer?.showTerms}
<li><button class="hover:underline" on:click={openTermsModal}>Terms of Service</button></li>
{#if features.termsOfService}
<li>
<button class="hover:underline text-xs" on:click={openTermsModal}>Terms of Service</button>
</li>
{/if}
{#each branding?.footer?.links as link}
<li>
Expand Down
1 change: 1 addition & 0 deletions src/lib/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ export const features: Indexable = {
dashboard: import.meta.env?.VITE_DASHBOARD === 'true',
dashboardDrawer: import.meta.env?.VITE_DASHBOARD_DRAWER === 'true',
confirmDownload: import.meta.env?.VITE_CONFIRM_DOWNLOAD === 'true',
termsOfService: import.meta.env?.VITE_ENABLE_TOS === 'true',
};

export const settings: Indexable = {
Expand Down
1 change: 0 additions & 1 deletion src/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export interface SiteMapConfig {

export interface FooterConfig {
showSitemap: boolean;
showTerms?: boolean;
excludeSitemapOn: string[];
links: Array<{
title: string;
Expand Down

0 comments on commit 126a7ed

Please sign in to comment.