Skip to content

Commit

Permalink
More sign in options
Browse files Browse the repository at this point in the history
  • Loading branch information
pontusab committed Dec 3, 2023
1 parent 4c86fdf commit bb9b6e2
Show file tree
Hide file tree
Showing 3 changed files with 110 additions and 87 deletions.
47 changes: 37 additions & 10 deletions apps/dashboard/src/app/[locale]/@login/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,18 @@ import {
} from "@midday/ui/accordion";
import { Icons } from "@midday/ui/icons";
import { cookies } from "next/headers";
import { headers } from "next/headers";
import Link from "next/link";
import { userAgent } from "next/server";

export default async function Login() {
const cookieStore = cookies();
const preffered = cookieStore.get(Cookies.PrefferedSignInProvider);
const { device } = userAgent({ headers: headers() });

let prefferedSignInOption = <GoogleSignIn />;
let moreSignInOptions = (
<>
<AppleSignIn />
<SlackSignIn />
<GithubSignIn />
<FigmaSignIn />
</>
);
let moreSignInOptions = null;
let prefferedSignInOption =
device?.vendor === "Apple" ? <AppleSignIn /> : <GoogleSignIn />;

switch (preffered?.value) {
case "apple":
Expand Down Expand Up @@ -77,8 +74,38 @@ export default async function Login() {
);
break;

default:
case "google":
prefferedSignInOption = <GoogleSignIn />;
moreSignInOptions = (
<>
<AppleSignIn />
<GithubSignIn />
<SlackSignIn />
<FigmaSignIn />
</>
);
break;

default:
if (device?.vendor === "Apple") {
moreSignInOptions = (
<>
<GoogleSignIn />
<SlackSignIn />
<GithubSignIn />
<FigmaSignIn />
</>
);
} else {
moreSignInOptions = (
<>
<AppleSignIn />
<SlackSignIn />
<GithubSignIn />
<FigmaSignIn />
</>
);
}
}

return (
Expand Down
64 changes: 31 additions & 33 deletions apps/website/src/app/[locale]/policy/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export default function Policy() {
<p className="leading-7 mt-8">Last updated: October 26, 2023</p>

<p className="leading-7 mt-8">
Midday Labs AB ("us", "we", or "our") operates the Midday
application (hereinafter referred to as the "Service").
Midday AB ("us", "we", or "our") operates the Midday application
(hereinafter referred to as the "Service").
</p>

<p className="leading-7 mt-8">
Expand All @@ -38,7 +38,7 @@ export default function Policy() {
<strong>Service</strong>
</p>
<p className="leading-7 mt-8">
Service is the Midday application operated by Midday Labs AB
Service is the Midday application operated by Midday AB
</p>
</li>
<li>
Expand Down Expand Up @@ -184,7 +184,7 @@ export default function Policy() {

<h2>Use of Data</h2>
<p className="leading-7 mt-8">
Midday Labs AB uses the collected data for various purposes:
Midday AB uses the collected data for various purposes:
</p>
<ul>
<li>To provide and maintain our Service</li>
Expand Down Expand Up @@ -213,13 +213,13 @@ export default function Policy() {
Protection Regulation (GDPR)
</h2>
<p className="leading-7 mt-8">
If you are from the European Economic Area (EEA), Midday Labs AB
legal basis for collecting and using the personal information
described in this Privacy Policy depends on the Personal Data we
collect and the specific context in which we collect it.
If you are from the European Economic Area (EEA), Midday AB legal
basis for collecting and using the personal information described in
this Privacy Policy depends on the Personal Data we collect and the
specific context in which we collect it.
</p>
<p className="leading-7 mt-8">
Midday Labs AB may process your Personal Data because:
Midday AB may process your Personal Data because:
</p>
<ul>
<li>We need to perform a contract with you</li>
Expand All @@ -234,15 +234,15 @@ export default function Policy() {

<h2>Retention of Data</h2>
<p className="leading-7 mt-8">
Midday Labs AB will retain your Personal Data only for as long as is
Midday AB will retain your Personal Data only for as long as is
necessary for the purposes set out in this Privacy Policy. We will
retain and use your Personal Data to the extent necessary to comply
with our legal obligations (for example, if we are required to
retain your data to comply with applicable laws), resolve disputes
and enforce our legal agreements and policies.
</p>
<p className="leading-7 mt-8">
Midday Labs AB will also retain Usage Data for internal analysis
Midday AB will also retain Usage Data for internal analysis
purposes. Usage Data is generally retained for a shorter period of
time, except when this data is used to strengthen the security or to
improve the functionality of our Service, or we are legally
Expand All @@ -266,41 +266,39 @@ export default function Policy() {
such information represents your agreement to that transfer.
</p>
<p className="leading-7 mt-8">
Midday Labs AB will take all the steps reasonably necessary to
ensure that your data is treated securely and in accordance with
this Privacy Policy and no transfer of your Personal Data will take
place to an organisation or a country unless there are adequate
controls in place including the security of your data and other
personal information.
Midday AB will take all the steps reasonably necessary to ensure
that your data is treated securely and in accordance with this
Privacy Policy and no transfer of your Personal Data will take place
to an organisation or a country unless there are adequate controls
in place including the security of your data and other personal
information.
</p>

<h2>Disclosure of Data</h2>
<h3>Business Transaction</h3>
<p className="leading-7 mt-8">
If Midday Labs AB is involved in a merger, acquisition or asset
sale, your Personal Data may be transferred. We will provide notice
before your Personal Data is transferred and becomes subject to a
different Privacy Policy.
If Midday AB is involved in a merger, acquisition or asset sale,
your Personal Data may be transferred. We will provide notice before
your Personal Data is transferred and becomes subject to a different
Privacy Policy.
</p>

<h3>Disclosure for Law Enforcement</h3>
<p className="leading-7 mt-8">
Under certain circumstances, Midday Labs AB may be required to
disclose your Personal Data if required to do so by law or in
response to valid requests by public authorities (e.g. a court or a
government agency).
Under certain circumstances, Midday AB may be required to disclose
your Personal Data if required to do so by law or in response to
valid requests by public authorities (e.g. a court or a government
agency).
</p>

<h3>Legal Requirements</h3>
<p className="leading-7 mt-8">
Midday Labs AB may disclose your Personal Data in the good faith
belief that such action is necessary to:
Midday AB may disclose your Personal Data in the good faith belief
that such action is necessary to:
</p>
<ul>
<li>To comply with a legal obligation</li>
<li>
To protect and defend the rights or property of Midday Labs AB
</li>
<li>To protect and defend the rights or property of Midday AB</li>
<li>
To prevent or investigate possible wrongdoing in connection with
the Service
Expand Down Expand Up @@ -341,9 +339,9 @@ export default function Policy() {
</h2>
<p className="leading-7 mt-8">
If you are a resident of the European Economic Area (EEA), you have
certain data protection rights. Midday Labs AB aims to take
reasonable steps to allow you to correct, amend, delete or limit the
use of your Personal Data.
certain data protection rights. Midday AB aims to take reasonable
steps to allow you to correct, amend, delete or limit the use of
your Personal Data.
</p>
<p className="leading-7 mt-8">
If you wish to be informed about what Personal Data we hold about
Expand Down
86 changes: 42 additions & 44 deletions apps/website/src/app/[locale]/terms/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default function Terms() {
<p className="leading-7 mt-8">
These Terms and Conditions ("Terms", "Terms and Conditions") govern
your relationship with Midday application (the "Service") operated
by Midday Labs AB ("us", "we", or "our").
by Midday AB ("us", "we", or "our").
</p>

<p className="leading-7 mt-8">
Expand Down Expand Up @@ -47,9 +47,9 @@ export default function Terms() {
<p className="leading-7 mt-8">
At the end of each Billing Cycle, your Subscription will
automatically renew under the exact same conditions unless you
cancel it or Midday Labs AB cancels it. You may cancel your
Subscription renewal either through your online account management
page or by contacting Midday Labs AB customer support team.
cancel it or Midday AB cancels it. You may cancel your Subscription
renewal either through your online account management page or by
contacting Midday AB customer support team.
</p>

<p className="leading-7 mt-8">
Expand All @@ -58,31 +58,29 @@ export default function Terms() {
Labs Ab with accurate and complete billing information including
full name, address, state, zip code, telephone number, and a valid
payment method information. By submitting such payment information,
you automatically authorize Midday Labs AB to charge all
Subscription fees incurred through your account to any such payment
instruments.
you automatically authorize Midday AB to charge all Subscription
fees incurred through your account to any such payment instruments.
</p>

<p className="leading-7 mt-8">
Should automatic billing fail to occur for any reason, Midday Labs
AB will issue an electronic invoice indicating that you must proceed
Should automatic billing fail to occur for any reason, Midday AB
will issue an electronic invoice indicating that you must proceed
manually, within a certain deadline date, with the full payment
corresponding to the billing period as indicated on the invoice.
</p>

<h2>Fee Changes</h2>

<p className="leading-7 mt-8">
Midday Labs AB, in its sole discretion and at any time, may modify
the Subscription fees for the Subscriptions. Any Subscription fee
change will become effective at the end of the then-current Billing
Cycle.
Midday AB, in its sole discretion and at any time, may modify the
Subscription fees for the Subscriptions. Any Subscription fee change
will become effective at the end of the then-current Billing Cycle.
</p>

<p className="leading-7 mt-8">
Midday Labs AB will provide you with a reasonable prior notice of
any change in Subscription fees to give you an opportunity to
terminate your Subscription before such change becomes effective.
Midday AB will provide you with a reasonable prior notice of any
change in Subscription fees to give you an opportunity to terminate
your Subscription before such change becomes effective.
</p>

<p className="leading-7 mt-8">
Expand All @@ -96,7 +94,7 @@ export default function Terms() {
<p className="leading-7 mt-8">
Certain refund requests for Subscriptions may be considered by Acre
Labs AB on a case-by-case basis and granted in sole discretion of
Midday Labs AB.
Midday AB.
</p>

<h2>Content</h2>
Expand Down Expand Up @@ -188,26 +186,26 @@ export default function Terms() {
<p className="leading-7 mt-8">
The Service and its original content (excluding Content provided by
users), features and functionality are and will remain the exclusive
property of Midday Labs AB and its licensors. The Service is
protected by copyright, trademark, and other laws of both the Sweden
and foreign countries. Our trademarks and trade dress may not be
used in connection with any product or service without the prior
written consent of Midday Labs AB.
property of Midday AB and its licensors. The Service is protected by
copyright, trademark, and other laws of both the Sweden and foreign
countries. Our trademarks and trade dress may not be used in
connection with any product or service without the prior written
consent of Midday AB.
</p>

<h2>Links To Other Web Sites</h2>

<p className="leading-7 mt-8">
Our Service may contain links to third-party web sites or services
that are not owned or controlled by Midday Labs AB.
that are not owned or controlled by Midday AB.
</p>

<p className="leading-7 mt-8">
Midday Labs AB has no control over, and assumes no responsibility
for, the content, privacy policies, or practices of any third party
web sites or services. You further acknowledge and agree that Acre
Labs Ab shall not be responsible or liable, directly or indirectly,
for any damage or loss caused or alleged to be caused by or in
Midday AB has no control over, and assumes no responsibility for,
the content, privacy policies, or practices of any third party web
sites or services. You further acknowledge and agree that Acre Labs
Ab shall not be responsible or liable, directly or indirectly, for
any damage or loss caused or alleged to be caused by or in
connection with use of or reliance on any such content, goods or
services available on or through any such web sites or services.
</p>
Expand All @@ -234,19 +232,19 @@ export default function Terms() {
<h2>Limitation Of Liability</h2>

<p className="leading-7 mt-8">
In no event shall Midday Labs AB, nor its directors, employees,
partners, agents, suppliers, or affiliates, be liable for any
indirect, incidental, special, consequential or punitive damages,
including without limitation, loss of profits, data, use, goodwill,
or other intangible losses, resulting from (i) your access to or use
of or inability to access or use the Service; (ii) any conduct or
content of any third party on the Service; (iii) any content
obtained from the Service; and (iv) unauthorized access, use or
alteration of your transmissions or content, whether based on
warranty, contract, tort (including negligence) or any other legal
theory, whether or not we have been informed of the possibility of
such damage, and even if a remedy set forth herein is found to have
failed of its essential purpose.
In no event shall Midday AB, nor its directors, employees, partners,
agents, suppliers, or affiliates, be liable for any indirect,
incidental, special, consequential or punitive damages, including
without limitation, loss of profits, data, use, goodwill, or other
intangible losses, resulting from (i) your access to or use of or
inability to access or use the Service; (ii) any conduct or content
of any third party on the Service; (iii) any content obtained from
the Service; and (iv) unauthorized access, use or alteration of your
transmissions or content, whether based on warranty, contract, tort
(including negligence) or any other legal theory, whether or not we
have been informed of the possibility of such damage, and even if a
remedy set forth herein is found to have failed of its essential
purpose.
</p>

<h2>Disclaimer</h2>
Expand All @@ -261,9 +259,9 @@ export default function Terms() {
</p>

<p className="leading-7 mt-8">
Midday Labs AB its subsidiaries, affiliates, and its licensors do
not warrant that a) the Service will function uninterrupted, secure
or available at any particular time or location; b) any errors or
Midday AB its subsidiaries, affiliates, and its licensors do not
warrant that a) the Service will function uninterrupted, secure or
available at any particular time or location; b) any errors or
defects will be corrected; c) the Service is free of viruses or
other harmful components; or d) the results of using the Service
will meet your requirements.
Expand Down

0 comments on commit bb9b6e2

Please sign in to comment.