diff --git a/assets/js/components/Sponsor.story.vue b/assets/js/components/Sponsor.story.vue index b0c3d2d21..fc7a1bed0 100644 --- a/assets/js/components/Sponsor.story.vue +++ b/assets/js/components/Sponsor.story.vue @@ -7,8 +7,14 @@ import Sponsor from "./Sponsor.vue"; + + + + + + diff --git a/assets/js/components/Sponsor.vue b/assets/js/components/Sponsor.vue index 6eb34cce2..4b03b590c 100644 --- a/assets/js/components/Sponsor.vue +++ b/assets/js/components/Sponsor.vue @@ -1,39 +1,53 @@ - + - {{ $t("footer.sponsor.titleSponsor") }} + {{ $t(`footer.sponsor.${isVictronDevice ? "titleVictron" : "titleSponsor"}`) }} + + + {{ $t(`footer.sponsor.${isVictronDevice ? "victron" : "thanks"}`, { sponsor }) }} - {{ $t("footer.sponsor.thanks", { sponsor }) }} {{ $t("footer.sponsor.confetti") }} - + {{ $t("footer.sponsor.sticker") }} + + {{ $t("footer.sponsor.becomeSponsorExtended") }} + - + - {{ $t("footer.sponsor.titleNoSponsor") }} + + {{ $t(`footer.sponsor.${isTrial ? "titleTrial" : "titleNoSponsor"}`) }} - {{ $t("footer.sponsor.supportUs") }} + {{ $t(`footer.sponsor.${isTrial ? "trial" : "supportUs"}`) }} @@ -50,12 +64,28 @@ import confetti from "canvas-confetti"; import "@h2d2/shopicons/es/regular/heart"; import "@h2d2/shopicons/es/regular/stars"; +import "@h2d2/shopicons/es/regular/clock"; +import { docsPrefix } from "../i18n"; export default { name: "Sponsor", props: { sponsor: String, }, + computed: { + isTrial() { + return this.sponsor === "trial"; + }, + isVictronDevice() { + return this.sponsor === "victron-device"; + }, + isIndividual() { + return this.sponsor && !this.isTrial && !this.isVictronDevice; + }, + sponsorLink() { + return `${docsPrefix()}/docs/sponsorship`; + }, + }, methods: { surprise: function () { const $el = this.$refs.confetti; diff --git a/i18n/de.toml b/i18n/de.toml index 694e24bfe..b4c551041 100644 --- a/i18n/de.toml +++ b/i18n/de.toml @@ -163,6 +163,7 @@ total = "gesamt" [footer.sponsor] becomeSponsor = "Sponsor werden" +becomeSponsorExtended = "Unterstütze uns direkt. Es gibt auch Sticker." confetti = "Lust auf Konfetti?" confettiPromise = "Es gibt auch Sticker und digitales Konfetti" sticker = "… oder evcc Sticker?" @@ -170,6 +171,10 @@ supportUs = "Unsere Mission: Sonne tanken zum Standard machen. Hilf uns und unte thanks = "Vielen Dank, {sponsor}! Dein Beitrag hilft, evcc weiterzuentwickeln." titleNoSponsor = "Unterstütze uns" titleSponsor = "Du bist Unterstützer" +titleTrial = "Testmodus" +titleVictron = "Unterstützt von Victron Energy" +trial = "Du befindest dich im Testmodus und kannst alle Funktionen nutzen. Wir freuen uns, wenn du Sponsor wirst." +victron = "Du verwendest evcc auf Victron Energy Hardware und hast Zugriff auf alle Funktionen." [footer.telemetry] optIn = "Ich möchte meine Ladedaten teilen." diff --git a/i18n/en.toml b/i18n/en.toml index 2aff5e369..6384c65f7 100644 --- a/i18n/en.toml +++ b/i18n/en.toml @@ -161,14 +161,19 @@ tabTitle = "My data" total = "all time" [footer.sponsor] -becomeSponsor = "Become a Sponsor" +becomeSponsor = "Become a sponsor" +becomeSponsorExtended = "Support us directly to get stickers." confetti = "Ready for confetti?" confettiPromise = "You get stickers and digital confetti" sticker = "… or evcc stickers?" -supportUs = "Our mission is to make solar the norm. Help evcc by paying what it is worth to you." +supportUs = "Our mission is to make solar charging the norm. Help evcc by paying what it is worth to you." thanks = "Thank you, {sponsor}! Your contribution helps develop evcc further." titleNoSponsor = "Support us" titleSponsor = "You are a supporter" +titleTrial = "Trial mode" +titleVictron = "Sponsored by Victron Energy" +trial = "You are in trial mode and can use all features. Please consider supporting the project." +victron = "You're using evcc on Victron Energy hardware and have access to all features." [footer.telemetry] optIn = "I want to contribute my data."
- {{ $t("footer.sponsor.titleSponsor") }} + {{ $t(`footer.sponsor.${isVictronDevice ? "titleVictron" : "titleSponsor"}`) }} +
+ {{ $t(`footer.sponsor.${isVictronDevice ? "victron" : "thanks"}`, { sponsor }) }}
{{ $t("footer.sponsor.thanks", { sponsor }) }}
- {{ $t("footer.sponsor.titleNoSponsor") }} + + {{ $t(`footer.sponsor.${isTrial ? "titleTrial" : "titleNoSponsor"}`) }}
{{ $t("footer.sponsor.supportUs") }}
{{ $t(`footer.sponsor.${isTrial ? "trial" : "supportUs"}`) }}