Merge pull request #79 from VAR-Virtual-Air-Rescue/staging
added more delay to moodle ID lookup
This commit was merged in pull request #79.
This commit is contained in:
@@ -13,7 +13,7 @@ export default function () {
|
||||
BtnIcon={<DiscordLogoIcon />}
|
||||
btnHref="https://discord.com/invite/x6FAMY7DW6"
|
||||
btnLabel="Beitreten"
|
||||
description="Tritt unserem Discord-Server bei, um mit der Community in Kontakt zu bleiben, Unterstützung zu erhalten und über die neuesten Updates informiert zu werden. Wenn du beigetreten bist kannst du in deinen Einstellugnen dein VAR-Konto mit deinem Discord-Konto verknüpfen umd eine Rolle zu erhalten."
|
||||
description="Tritt unserem Discord-Server bei, um mit der Community in Kontakt zu bleiben, Unterstützung zu erhalten und über die neuesten Updates informiert zu werden. Wenn du beigetreten bist, kannst du in deinen Einstellungen dein VAR-Konto mit deinem Discord-Konto verknüpfen und eine Rolle erhalten."
|
||||
/>
|
||||
<ResourceCard
|
||||
image={Desktop}
|
||||
@@ -21,7 +21,7 @@ export default function () {
|
||||
BtnIcon={<Download />}
|
||||
btnHref="https://cdn.virtualairrescue.com/desktop/setup.exe"
|
||||
btnLabel="Herunterladen"
|
||||
description="Verwende diesen Client, um dich mit dem VAR-Netzwerk zu verbinden. Wenn du dich verbindest kannst du einen Push-To-Talk key setzen um den Funk zu bedienen. Wenn du als Pilot fliegen möchtest wird deine Position aus dem Simulator an unser Tracker-System übertragen."
|
||||
description="Verwende diesen Client, um dich mit dem VAR-Netzwerk zu verbinden. Wenn du dich verbindest, kannst du einen Push-To-Talk Key setzen, um den Funk zu bedienen. Wenn du als Pilot fliegen möchtest, wird deine Position aus dem Simulator an unser Tracker-System übertragen."
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -116,12 +116,12 @@ export const ProfileForm = ({
|
||||
})}
|
||||
>
|
||||
<h2 className="card-title">
|
||||
<MixerHorizontalIcon className="w-5 h-5" /> Persönliche Informationen
|
||||
<MixerHorizontalIcon className="h-5 w-5" /> Persönliche Informationen
|
||||
</h2>
|
||||
<div className="text-left">
|
||||
{!canEdit && (
|
||||
<div className="text-left">
|
||||
<h2 className="text-lg text-warning card-title">
|
||||
<h2 className="text-warning card-title text-lg">
|
||||
Du kannst deine Stammdaten nicht bearbeiten!
|
||||
</h2>
|
||||
<p className="text-sm text-gray-400">
|
||||
@@ -133,8 +133,8 @@ export const ProfileForm = ({
|
||||
)}
|
||||
{canEdit && (
|
||||
<>
|
||||
<label className="floating-label w-full mb-5 mt-5">
|
||||
<span className="text-lg flex items-center gap-2">
|
||||
<label className="floating-label mb-5 mt-5 w-full">
|
||||
<span className="flex items-center gap-2 text-lg">
|
||||
<PersonIcon /> Vorname
|
||||
</span>
|
||||
<input
|
||||
@@ -148,8 +148,8 @@ export const ProfileForm = ({
|
||||
{form.formState.errors.firstname && (
|
||||
<p className="text-error">{form.formState.errors.firstname.message}</p>
|
||||
)}
|
||||
<label className="floating-label w-full mt-4">
|
||||
<span className="text-lg flex items-center gap-2">
|
||||
<label className="floating-label mt-4 w-full">
|
||||
<span className="flex items-center gap-2 text-lg">
|
||||
<PersonIcon /> Nachname
|
||||
</span>
|
||||
<input
|
||||
@@ -169,10 +169,10 @@ export const ProfileForm = ({
|
||||
{...form.register("settingsHideLastname")}
|
||||
className="checkbox"
|
||||
/>
|
||||
Initialien des Nachnamens verstecken
|
||||
Anfangsbuchstaben des Nachnamens verstecken
|
||||
</label>
|
||||
<label className="floating-label w-full mt-4">
|
||||
<span className="text-lg flex items-center gap-2">
|
||||
<label className="floating-label mt-4 w-full">
|
||||
<span className="flex items-center gap-2 text-lg">
|
||||
<EnvelopeClosedIcon /> E-Mail
|
||||
</span>
|
||||
<input
|
||||
@@ -255,13 +255,13 @@ export const SocialForm = ({
|
||||
})}
|
||||
>
|
||||
<h2 className="card-title mb-5">
|
||||
<Link2Icon className="w-5 h-5" /> Verbindungen & Benachrichtigungen
|
||||
<Link2Icon className="h-5 w-5" /> Verbindungen & Benachrichtigungen
|
||||
</h2>
|
||||
<div>
|
||||
<div>
|
||||
{discordAccount ? (
|
||||
<Button
|
||||
className="btn-success btn-block btn-outline group transition-all duration-0 hover:btn-error"
|
||||
className="btn-success btn-block btn-outline hover:btn-error group transition-all duration-0"
|
||||
isLoading={isLoading}
|
||||
onClick={async () => {
|
||||
setIsLoading(true);
|
||||
@@ -270,7 +270,7 @@ export const SocialForm = ({
|
||||
setIsLoading(false);
|
||||
}}
|
||||
>
|
||||
<DiscordLogoIcon className="w-5 h-5" />
|
||||
<DiscordLogoIcon className="h-5 w-5" />
|
||||
<span className="group-hover:hidden">Verbunden mit {discordAccount.username}</span>
|
||||
<span className="hidden group-hover:inline">
|
||||
Verbindung trennen{isLoading && "..."}
|
||||
@@ -279,15 +279,15 @@ export const SocialForm = ({
|
||||
) : (
|
||||
<a href={process.env.NEXT_PUBLIC_DISCORD_URL}>
|
||||
<button type="button" className="btn btn-primary btn-block" onSubmit={() => false}>
|
||||
<DiscordLogoIcon className="w-5 h-5" /> Mit Discord verbinden
|
||||
<DiscordLogoIcon className="h-5 w-5" /> Mit Discord verbinden
|
||||
</button>
|
||||
</a>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<div className="content-center">
|
||||
<label className="floating-label w-full mt-5">
|
||||
<span className="text-lg flex items-center gap-2">
|
||||
<label className="floating-label mt-5 w-full">
|
||||
<span className="flex items-center gap-2 text-lg">
|
||||
<PaperPlaneIcon /> VATSIM-CID
|
||||
</span>
|
||||
<input
|
||||
@@ -298,7 +298,7 @@ export const SocialForm = ({
|
||||
/>
|
||||
</label>
|
||||
<p
|
||||
className="label mt-2 w-full text-wrap text-left tooltip"
|
||||
className="label tooltip mt-2 w-full text-wrap text-left"
|
||||
data-tip="Wenn du dein VATSIM-CID hier angibst, wirst du dein Vorname, das Initial des Nachnamens
|
||||
und dein VATSIM-CID öffentlich in einer Tabelle angezeigt. Dies dient der
|
||||
Nachvollziehbarkeit für Vatsim-Supervisor"
|
||||
@@ -309,7 +309,7 @@ export const SocialForm = ({
|
||||
<p className="text-error">{form.formState.errors.vatsimCid.message}</p>
|
||||
)}
|
||||
</div>
|
||||
<div className="card-actions justify-center pt-6 mt-auto">
|
||||
<div className="card-actions mt-auto justify-center pt-6">
|
||||
<Button
|
||||
className="btn-sm btn-wide btn-outline btn-primary"
|
||||
isLoading={vatsimLoading}
|
||||
@@ -329,12 +329,12 @@ export const DeleteForm = ({ user, penaltys }: { user: User; penaltys: Penalty[]
|
||||
return (
|
||||
<div className="card-body">
|
||||
<h2 className="card-title mb-5">
|
||||
<CircleAlert className="w-5 h-5" /> Danger-Zone
|
||||
<CircleAlert className="h-5 w-5" /> Danger-Zone
|
||||
</h2>
|
||||
{!userCanDelete && (
|
||||
<div className="text-left">
|
||||
<h2 className="text-lg text-warning">Du kannst dein Konto zurzeit nicht löschen!</h2>
|
||||
<p className="text-sm text-gray-400 ">
|
||||
<h2 className="text-warning text-lg">Du kannst dein Konto zurzeit nicht löschen!</h2>
|
||||
<p className="text-sm text-gray-400">
|
||||
Scheinbar hast du aktuell zurzeit aktive Strafen. Um unsere Community zu schützen kannst
|
||||
du einen Account erst löschen wenn deine Strafe nicht mehr aktiv ist
|
||||
</p>
|
||||
@@ -342,7 +342,7 @@ export const DeleteForm = ({ user, penaltys }: { user: User; penaltys: Penalty[]
|
||||
)}
|
||||
{userCanDelete && (
|
||||
<div
|
||||
className="tooltip flex-1 min-w-[250px] tooltip-warning"
|
||||
className="tooltip tooltip-warning min-w-[250px] flex-1"
|
||||
data-tip="Achtung! Dies löscht deinen Account und alle zugehörigen Daten. Dieser Vorgang ist nicht rückgängig zu machen."
|
||||
>
|
||||
<Button
|
||||
@@ -397,11 +397,11 @@ export const PasswordForm = (): React.JSX.Element => {
|
||||
})}
|
||||
>
|
||||
<h2 className="card-title">
|
||||
<LockClosedIcon className="w-5 h-5" /> Password Ändern
|
||||
<LockClosedIcon className="h-5 w-5" /> Password Ändern
|
||||
</h2>
|
||||
<div className="">
|
||||
<label className="floating-label w-full mt-5 mb-5">
|
||||
<span className="text-lg flex items-center gap-2">
|
||||
<label className="floating-label mb-5 mt-5 w-full">
|
||||
<span className="flex items-center gap-2 text-lg">
|
||||
<LockOpen2Icon /> Aktuelles Passwort
|
||||
</span>
|
||||
<input
|
||||
@@ -414,8 +414,8 @@ export const PasswordForm = (): React.JSX.Element => {
|
||||
{form.formState.errors.password && (
|
||||
<p className="text-error">{form.formState.errors.password.message}</p>
|
||||
)}
|
||||
<label className="floating-label w-full mb-5">
|
||||
<span className="text-lg flex items-center gap-2">
|
||||
<label className="floating-label mb-5 w-full">
|
||||
<span className="flex items-center gap-2 text-lg">
|
||||
<LockOpen1Icon /> Neues Passwort
|
||||
</span>
|
||||
<input
|
||||
@@ -429,7 +429,7 @@ export const PasswordForm = (): React.JSX.Element => {
|
||||
<p className="text-error">{form.formState.errors.newPassword?.message}</p>
|
||||
)}
|
||||
<label className="floating-label w-full">
|
||||
<span className="text-lg flex items-center gap-2">
|
||||
<span className="flex items-center gap-2 text-lg">
|
||||
<LockOpen1Icon /> Passwort wiederholen
|
||||
</span>
|
||||
<input
|
||||
|
||||
@@ -51,7 +51,7 @@ export const GET = async (req: NextRequest) => {
|
||||
participatingEvents.forEach(async (p) => {
|
||||
await inscribeToMoodleCourse(p.Event.finisherMoodleCourseId!, moodleUser?.id);
|
||||
});
|
||||
}, 1000);
|
||||
}, 10000);
|
||||
|
||||
return NextResponse.json({
|
||||
...user,
|
||||
|
||||
@@ -49,7 +49,9 @@ export const getMoodleUserById = async (id: string) => {
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
const u = user[0];
|
||||
|
||||
return (
|
||||
(u as {
|
||||
id: number;
|
||||
|
||||
Reference in New Issue
Block a user