Skip to content
Snippets Groups Projects
Commit c31fea71 authored by Aaron Dötsch's avatar Aaron Dötsch
Browse files

changes

parent bddca299
Branches
No related tags found
No related merge requests found
......@@ -5,6 +5,7 @@
import { browser } from '$app/environment';
import { setLocale, LL } from '$lib/i18n/i18n-svelte';
import { loadLocaleAsync } from '$lib/i18n/i18n-util.async';
import { onDestroy } from 'svelte';
$: pathname = $page.url.pathname;
......@@ -23,7 +24,7 @@
const firstPath = $page.url.pathname;
let showModal = false;
let unsubscribe = ()=>{};
unsubscribe = firstPath !== "/rabatte" ? ()=>{} : page.subscribe(page=>{
unsubscribe = !browser || firstPath !== "/rabatte" || localStorage.getItem("didShowDiscountLeaveWarning") === "1" ? ()=>{} : page.subscribe(page=>{
if(page.url.pathname !== "/rabatte"){
unsubscribe();
showModal = true;
......@@ -31,7 +32,9 @@
});
function acceptWarning(){
showModal = false;
localStorage.setItem("didShowDiscountLeaveWarning", "1");
}
onDestroy(unsubscribe);
let showLanguageDropdown = false;
</script>
......
......@@ -174,9 +174,9 @@ const de = {
},
},
DiscountLeaveWarning: { // Warnung, wenn man von /rabatte woanders hin navigiert
Title: "Achtung Achtung!",
Title: "Achtung!",
Content: "Die Seite zur Übersicht der Rabatte steht allen Fachschaften und somit allen Erstis zur Verfügung. Alle weiteren Seiten dieser Website sind nur für Erstis der Fachschaft Mathematik/Physik/Informatik (inklusive derer Lehramtserstis und WiMa-Erstis) gedacht. Solltest du dieser Fachschaft nicht zugehören, ist der restliche Inhalt für dich nicht relevant.",
Accept: "Zur Kenntnis genommen", // Knopf zum zur-Kenntnis-nehmen
Accept: "Verstanden", // Knopf zum zur-Kenntnis-nehmen
},
ESWE: {
Headline: "Erstsemesterwochenende",
......
......@@ -174,6 +174,11 @@ const en = {
NoResults: "There are no discounts for your search", // Anzeigetext, wenn kein Ergebnis der Suche entspricht
},
},
DiscountLeaveWarning: { // Warnung, wenn man von /rabatte woanders hin navigiert
Title: "Attention!",
Content: "The discount overview is accessible to freshers of all student councils. All other pages on this website are intended only for freshers of the Student Council Mathematics/Physics/Computer Science (including teacher training and business mathematics freshers). If you do not belong to this student council, the remaining content is not relevant to you.",
Accept: "Acknowledged", // Knopf zum zur-Kenntnis-nehmen
},
ESWE: {
Headline: "Freshers' Weekend",
},
......
......@@ -597,7 +597,7 @@ type RootTranslation = {
}
DiscountLeaveWarning: {
/**
* A​c​h​t​u​n​g​ ​A​c​h​t​u​n​g​!
* A​c​h​t​u​n​g​!
*/
Title: string
/**
......@@ -605,7 +605,7 @@ type RootTranslation = {
*/
Content: string
/**
* Z​u​r​ ​K​e​n​n​t​n​i​s​ ​g​e​n​o​m​m​e​n
* V​e​r​s​t​a​n​d​e​n
*/
Accept: string
}
......@@ -1309,7 +1309,7 @@ export type TranslationFunctions = {
}
DiscountLeaveWarning: {
/**
* Achtung Achtung!
* Achtung!
*/
Title: () => LocalizedString
/**
......@@ -1317,7 +1317,7 @@ export type TranslationFunctions = {
*/
Content: () => LocalizedString
/**
* Zur Kenntnis genommen
* Verstanden
*/
Accept: () => LocalizedString
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment