From 85a9413979dff5162d8e4e14aa6efc66c9bc71f2 Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Tue, 20 Jun 2023 21:39:00 +0100 Subject: [PATCH] Implement user request/registration --- dockerfile | 3 +- src/routes/more/+page.svelte | 1 + src/routes/more/reg/+page.svelte | 110 ++++++++++++++++++++++++ src/routes/more/reg/submit/+page.svelte | 72 ++++++++++++++++ 4 files changed, 185 insertions(+), 1 deletion(-) create mode 100644 src/routes/more/reg/+page.svelte create mode 100644 src/routes/more/reg/submit/+page.svelte diff --git a/dockerfile b/dockerfile index a3ddff1..2a7c984 100644 --- a/dockerfile +++ b/dockerfile @@ -9,4 +9,5 @@ COPY . ./ RUN npm run build FROM nginx:alpine-slim -COPY --from=build /app/build /usr/share/nginx/html \ No newline at end of file +COPY --from=build /app/build /usr/share/nginx/html +RUN chown -R nginx:nginx /usr/share/nginx/html \ No newline at end of file diff --git a/src/routes/more/+page.svelte b/src/routes/more/+page.svelte index cd22d46..198751c 100644 --- a/src/routes/more/+page.svelte +++ b/src/routes/more/+page.svelte @@ -5,6 +5,7 @@ const links = [ {title: "Your Data", path: "/more/data"}, + {title: "Registration", path: "/more/reg"}, {title: "Location Reference Code Lookup", path: "/more/corpus"}, {title: "Reason Code Lookup", path: "/more/reasons"}, {title: "Privacy Policy", path: "/more/privacy"}, diff --git a/src/routes/more/reg/+page.svelte b/src/routes/more/reg/+page.svelte new file mode 100644 index 0000000..a183683 --- /dev/null +++ b/src/routes/more/reg/+page.svelte @@ -0,0 +1,110 @@ + + +{#if isLoading} + +{/if} + +
+{#if state == "unreg"} +

The staff version of OwlBoard offers several extra features:

+
    +
  • Access the Train Finder
  • +
  • Access the PIS Finder
  • +
  • More detailed departure boards:
  • +
      +
    • Non-Passenger movements
    • +
    • Hidden platform numbers
    • +
    • Display up to 40 services
    • +
    +
+

To register, you will need to enter a work email address to receive a confirmation email

+
+ +{:else if state == "sent"} +

An email has been sent, click the link in the email to activate your profile.

+

When you click the link, your authorisation key will be automatically be stored in your browser.

+

If you use multiple browsers, you will only be logged in using the browser you open the link with.

+

You will be able to register again using the same email address

+{:else if state == "unauth"} +

The email address you entered does not belong to an authorised business.

+

If you think this is an error, you can report an issue in the 'More' menu.

+{:else if state == "error"} +

There was an error processing your request.

+

Check that the email you entered was correct or try again later.

+{:else if state == "reg"} +

You are already registered for OwlBoard

+{/if} +