-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
171 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,4 +21,7 @@ S3_UPLOAD_REGION=eu-central-1 | |
S3_UPLOAD_SECRET=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | ||
|
||
# Get from https://felt.com/ => Settings | ||
FELT_TOKEN=felt_pat_AAAAAAAAAAAAAAAAAAAAAA | ||
FELT_TOKEN=felt_pat_AAAAAAAAAAAAAAAAAAAAAA | ||
|
||
# Admin mail address, mails are sent to | ||
[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
# Check for updates to GitHub Actions every week | ||
interval: "weekly" | ||
target-branch: "dependabot" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<div align="center"><br><br> | ||
<h1 align="center">Trassenscout (beta)</h1> | ||
<h1 align="center">Trassenscout (Beta)</h1> | ||
</div> | ||
|
||
> Trassenscout (beta) supports administrations in the process of evaluating and building cycle highways and in perspective other route based infrastructure. | ||
> Trassenscout (Beta) aids administrations in evaluating and developing cycle highways and other similar route-based infrastructure. | ||
> | ||
> Please contact [email protected] to learn more. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
import Mailjet from "node-mailjet" | ||
import previewEmail from "preview-email" | ||
import { getPrdOrStgDomain } from "src/core/components/links/getDomain" | ||
|
||
type UserCreationMailer = { | ||
userMail: string | ||
userId: number | ||
userFirstname: string | null | ||
userLastname: string | null | ||
} | ||
|
||
export function userCreationMailer({ | ||
userMail, | ||
userId, | ||
userFirstname, | ||
userLastname, | ||
}: UserCreationMailer) { | ||
const origin = getPrdOrStgDomain() | ||
|
||
// mailjet format | ||
const msg = { | ||
From: { Email: "<[email protected]>", Name: "Trassenscout" }, | ||
To: [{ Email: process.env.ADMIN_EMAIL }], | ||
Subject: "User hat sich registriert", | ||
TextPart: ` | ||
Liebes Trassenscout-Team, | ||
ein neuer Nutzer-Account wurde erstellt, bitte prüfen und einem Projekt zuordnen: | ||
Name: ${userFirstname} ${userLastname} | ||
E-Mail: ${userMail} | ||
Hier können die Rechte vergeben werden: ${origin}/admin/memberships | ||
Viele Grüße | ||
Dein Trassenscout-Nachrichtendienst | ||
`, | ||
HTMLPart: ` | ||
<p>Liebes Trassenscout-Team,</p> | ||
<p>ein neuer Nutzer-Account wurde erstellt, bitte prüfen und einem Projekt zuordnen:</p> | ||
<ul> | ||
<li>Name: ${userFirstname} ${userLastname}</li> | ||
<li>E-Mail: ${userMail}</li> | ||
</ul> | ||
<p>Hier können die Rechte vergeben werden: <a href="${origin}/admin/memberships">Zugriffsrechte-Verwaltung</a></p> | ||
<p>Viele Grüße<br/> | ||
Dein Trassenscout-Nachrichtendienst</p> | ||
`, | ||
} | ||
|
||
return { | ||
async send() { | ||
if (process.env.NODE_ENV === "production") { | ||
const mailjet = Mailjet.apiConnect( | ||
// @ts-ignore | ||
process.env.MAILJET_APIKEY_PUBLIC, | ||
process.env.MAILJET_APIKEY_PRIVATE, | ||
) | ||
const request = mailjet.post("send", { version: "v3.1" }).request({ Messages: [msg] }) | ||
request | ||
.then((result) => { | ||
console.log(result.body) | ||
}) | ||
.catch((err) => { | ||
console.error(err.statusCode) | ||
}) | ||
} else { | ||
// Preview email in the browser | ||
var { From, To, Subject, TextPart, HTMLPart } = msg | ||
await previewEmail({ | ||
from: `${From.Name} <${From.Email}>`, | ||
// @ts-ignore | ||
to: `${To[0]?.Name || ""} <${To[0].Email}>`, | ||
subject: Subject, | ||
text: TextPart, | ||
html: HTMLPart, | ||
}) | ||
} | ||
}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { SubsectionWithPosition } from "src/subsections/queries/getSubsection" | ||
import { BaseMap } from "./BaseMap" | ||
import { subsectionsBbox } from "./utils" | ||
|
||
type Props = { subsections: SubsectionWithPosition[] } | ||
|
||
export const ProjectMapFallback: React.FC<Props> = ({ subsections }) => { | ||
return ( | ||
<section className="mt-3 relative"> | ||
<BaseMap | ||
id="mainMap" | ||
initialViewState={{ | ||
bounds: subsectionsBbox(subsections), | ||
fitBoundsOptions: { padding: 60 }, | ||
}} | ||
/> | ||
<div className="inset-x-0 mx-4 bg-white/80 p-4 px-8 text-center absolute bottom-12 font-sans"> | ||
Noch keine Planungsabschnitte angelegt | ||
</div> | ||
</section> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters