Skip to content

Commit

Permalink
Merge pull request #61 from Luzefiru/staging
Browse files Browse the repository at this point in the history
feat: add Android support

#minor
  • Loading branch information
Luzefiru authored Jun 9, 2024
2 parents f3c3757 + ab40e15 commit 71041d7
Show file tree
Hide file tree
Showing 27 changed files with 645 additions and 201 deletions.
Binary file removed public/gif/tutorial.gif
Binary file not shown.
9 changes: 0 additions & 9 deletions scripts/get-url.ps1

This file was deleted.

48 changes: 4 additions & 44 deletions src/app/(main-layout)/convene/[name]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
"use client";

import { BannerTypeSlug, BannerTypeSlugEnum } from "@/types/BannerTypeSlugEnum";
import { Sidebar } from "@/components/ui/sidebar";
import { BannerStatsCard } from "@/components/convenes/banner-stats-card";
import { bannerMetadata } from "@/data/banners";
import { notFound } from "next/navigation";
import { Button } from "@/components/ui/button";
import { usePullHistory } from "@/contexts/pullHistoryContext";
import { Import } from "lucide-react";
import Link from "next/link";

export default function Page({
params,
Expand All @@ -19,42 +12,9 @@ export default function Page({
notFound();
}

const {
limitedCharacterStats,
limitedWeaponStats,
permanentCharacterStats,
permanentWeaponStats,
starterStats,
starterSelectorStats,
} = usePullHistory();

const banner = {
"limited-character": limitedCharacterStats,
"limited-weapon": limitedWeaponStats,
"permanent-character": permanentCharacterStats,
"permanent-weapon": permanentWeaponStats,
"starter-selector": starterSelectorStats,
starter: starterStats,
};
return <BannerStatsCard {...bannerMetadata[params.name]} />;
}

return (
<div className="flex flex-col h-full justify-between">
<div className="flex h-full flex-col lg:flex-row gap-8 lg:gap-12 desktop:gap-16">
<Sidebar />
<section className="w-full">
<div className="justify-around md:justify-end w-full md:w-auto mb-4 hidden lg:flex">
<Button asChild variant="default" size="lg">
<Link href="/import">
<Import className="mr-2 h-4 w-4" /> Import
</Link>
</Button>
</div>
<BannerStatsCard
stats={banner[params.name]}
{...bannerMetadata[params.name]}
/>
</section>
</div>
</div>
);
export async function generateStaticParams() {
return Object.keys(bannerMetadata) as BannerTypeSlugEnum[];
}
24 changes: 23 additions & 1 deletion src/app/(main-layout)/convene/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { Metadata } from "next";
import { Import } from "lucide-react";
import { Sidebar } from "@/components/ui/sidebar";
import { Button } from "@/components/ui/button";
import Link from "next/link";

export const metadata: Metadata = {
title: "Wuwa Tracker | History",
Expand All @@ -11,5 +15,23 @@ export default function ConveneLayout({
}: Readonly<{
children: React.ReactNode;
}>) {
return <>{children}</>;
return (
<>
<div className="flex flex-col h-full justify-between">
<div className="flex h-full flex-col lg:flex-row gap-8 lg:gap-12 desktop:gap-16">
<Sidebar />
<section className="w-full">
<div className="justify-around md:justify-end w-full md:w-auto mb-4 hidden lg:flex">
<Button asChild variant="default" size="lg">
<Link href="/import">
<Import className="mr-2 h-4 w-4" /> Import
</Link>
</Button>
</div>
{children}
</section>
</div>
</div>
</>
);
}
34 changes: 9 additions & 25 deletions src/app/(main-layout)/import/page.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,9 @@
"use client";

import { useRouter } from "next/navigation";
import Link from "next/link";
import { Button } from "@/components/ui/button";
import { ImportTutorial } from "@/components/convenes/import-tutorial";
import { ChevronLeft } from "lucide-react";
import getFirstConveneBannerHref from "@/lib/getFirstConveneBannerHref";
import TutorialTabs from "@/components/import/tutorial-tabs";

export default function Import() {
const router = useRouter();

const handleBack = () => {
router.push("/");
};

const redirectToHistory = () => {
router.push(getFirstConveneBannerHref());
};

return (
<div className="flex flex-col h-full w-full gap-3 max-w-screen-lg justify-self-center">
<div className="flex flex-col md:flex-row justify-between items-center gap-4 text-center sm:text-start">
Expand All @@ -25,23 +12,20 @@ export default function Import() {
Import Convene History
</h2>
<p className="text-muted-foreground">
Note: This method is only confirmed to work with Windows 10 and
above.
Select your platform and follow the tutorial to start tracking your
Convene history!
</p>
</div>

<div className="flex justify-around md:justify-end w-full md:w-auto">
<Button
variant="outline"
size="lg"
className="gap-2 pr-10"
onClick={handleBack}
>
<ChevronLeft className="h-5 w-5" /> Back
<Button asChild variant="outline" size="lg" className="gap-2 pr-10">
<Link href="/">
<ChevronLeft className="h-5 w-5" /> Back
</Link>
</Button>
</div>
</div>
<ImportTutorial redirectToHistory={redirectToHistory} />
<TutorialTabs />
</div>
);
}
File renamed without changes.
4 changes: 2 additions & 2 deletions src/app/(main-layout)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ export default function LandingPage() {
statistics will automatically refresh whenever you pull.
</p>

<div className="flex flex-col mb-8 lg:mb-16 space-y-4 sm:flex-row sm:justify-center sm:space-y-0 sm:space-x-4">
<div className="flex items-center flex-col mb-8 lg:mb-16 space-y-4 sm:flex-row sm:justify-center sm:space-y-0 sm:space-x-4">
<Button size="lg" asChild>
<Link href="/import">Import Tutorial</Link>
</Button>
<Button size="lg" asChild variant="ghost">
<Button size="lg" asChild variant="ghost" className="h-11">
<Link href={getFirstConveneBannerHref()}>
Go to History <ArrowRight className="ml-2 h-5 w-5" />{" "}
</Link>
Expand Down
44 changes: 38 additions & 6 deletions src/app/(main-layout)/privacy-policy/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { Metadata } from "next";
import Link from "next/link";

export const metadata: Metadata = {
title: "Privacy Policy | Wuwa Tracker",
title: "Wuwa Tracker | Privacy Policy",
description:
"This privacy policy document outlines the types of personal information that is received and collected by Wuwa Tracker and how it is used. Wuwa Tracker is a pity counter for Wuthering Waves, using the up-to-date data with global statistics and more.",
};
Expand Down Expand Up @@ -37,16 +38,25 @@ export default function PrivacyPolicy() {
<p className="leading-7 [&:not(:first-child)]:mt-6 dark:text-muted-foreground">
By using Wuwa Tracker, you consent to the use of local storage for
storing application data. You can clear your browser&apos;s local
storage at any time through your browser settings, which will remove
any stored data associated with Wuwa Tracker.
storage at any time through the{" "}
<Link
className="text-yellow-500 hover:text-yellow-600"
href="/settings"
target="_blank"
>
Settings page
</Link>{" "}
or your own browser settings, which will remove any stored data
associated with Wuwa Tracker.
</p>
<h2 className="mt-10 scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight transition-colors first:mt-0">
Analytics
</h2>
<p className="leading-7 [&:not(:first-child)]:mt-6 dark:text-muted-foreground">
Wuwa Tracker uses Vercel Analytics to collect and analyze data about
how our application is used. This information helps us understand user
behavior, improve our application, and enhance user experience.
Wuwa Tracker uses Vercel Analytics and Speed Insights to collect and
analyze data about how our application is used. This information helps
us understand user behavior, improve our application, and enhance user
experience.
</p>
<p className="leading-7 [&:not(:first-child)]:mt-6 dark:text-muted-foreground">
Vercel Analytics collects data such as page views, clicks, and other
Expand All @@ -59,6 +69,28 @@ export default function PrivacyPolicy() {
application. The data collected through Vercel Analytics is used
solely for analytics purposes and is not shared with third parties.
</p>
<h2 className="mt-10 scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight transition-colors first:mt-0">
Supabase Auth and Database
</h2>
<p className="leading-7 [&:not(:first-child)]:mt-6 dark:text-muted-foreground">
Wuwa Tracker uses Supabase Auth for authentication and Supabase&apos;s
database services to store users&apos; Convene data. This data is used
for backup purposes and to enhance application features, ensuring a
better user experience.
</p>
<p className="leading-7 [&:not(:first-child)]:mt-6 dark:text-muted-foreground">
The data stored in the Supabase database includes your Convene History
URL and Wuthering Waves player ID. This data is used solely for the
improvement and welfare of the user and is securely stored and
managed. Supabase employs industry-standard security measures to
protect your data.
</p>
<p className="leading-7 [&:not(:first-child)]:mt-6 dark:text-muted-foreground">
By using Wuwa Tracker, you consent to the use of Supabase Auth and
database for storing your data. We are committed to ensuring that your
data remains secure and is used only for enhancing your experience
with Wuwa Tracker.
</p>
<h2 className="mt-10 scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight transition-colors first:mt-0">
Changes to This Privacy Policy
</h2>
Expand Down
15 changes: 15 additions & 0 deletions src/app/(main-layout)/terms-and-conditions/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Metadata } from "next";

export const metadata: Metadata = {
title: "Wuwa Tracker | Privacy Policy",
description:
"Understand how Wuwa Tracker works and what data is being stored and utilized to enhance your user experience. Wuwa Tracker pity counter for Wuthering Waves, using the up-to-date data with global statistics and more. Share your pulls with your friends and track your account!",
};

export default function PrivacyPolicyLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return <>{children}</>;
}
106 changes: 106 additions & 0 deletions src/app/(main-layout)/terms-and-conditions/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
import { Metadata } from "next";
import Link from "next/link";

export const metadata: Metadata = {
title: "Terms & Conditions | Wuwa Tracker",
description:
"These terms and conditions outline the rules and regulations for the use of Wuwa Tracker's website and services.",
};

export default function TermsAndConditions() {
return (
<div className="flex flex-col items-center h-full w-full gap-16 py-8">
<div className="flex flex-col sm:text-start max-w-screen-md">
<div>
<h1 className="scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl">
Terms & Conditions
</h1>
<p className="leading-7 dark:text-muted-foreground [&:not(:first-child)]:mt-4">
These terms and conditions outline the rules and regulations for the
use of Wuwa Tracker&apos;s website and services.
</p>
</div>
<h2 className="mt-10 scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight transition-colors first:mt-0">
Acceptance of Terms
</h2>
<p className="leading-7 [&:not(:first-child)]:mt-6 dark:text-muted-foreground">
By using our website, you agree to comply with and be bound by the
following terms and conditions. Please review these terms carefully.
If you do not agree with these terms, you should not use our website.
</p>
<p className="leading-7 [&:not(:first-child)]:mt-6 dark:text-muted-foreground">
By accessing and using Wuwa Tracker, you accept and agree to be bound
by the terms and provision of this agreement. In addition, when using
Wuwa Tracker&apos;s services, you shall be subject to any posted
guidelines or rules applicable to such services.
</p>
<h2 className="mt-10 scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight transition-colors first:mt-0">
Changes to Terms
</h2>
<p className="leading-7 [&:not(:first-child)]:mt-6 dark:text-muted-foreground">
We reserve the right to update or modify these terms at any time
without prior notice. Your continued use of the app after any such
changes constitutes your acceptance of the new terms and conditions.
</p>
<h2 className="mt-10 scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight transition-colors first:mt-0">
User Accounts
</h2>
<p className="leading-7 [&:not(:first-child)]:mt-6 dark:text-muted-foreground">
To use certain features of our app, you may be required to create an
account using Google OAuth to access our cloud sync feature.
</p>
<h2 className="mt-10 scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight transition-colors first:mt-0">
Privacy Policy
</h2>
<p className="leading-7 [&:not(:first-child)]:mt-6 dark:text-muted-foreground">
Your use of Wuwa Tracker is also governed by our{" "}
<Link
className="text-yellow-500 hover:text-yellow-600"
href="/privacy-policy"
target="_blank"
>
Privacy Policy
</Link>
. Please review our Privacy Policy, which explains how we collect,
use, and protect your information. By using our app, you consent to
the practices described in the Privacy Policy.
</p>
<h2 className="mt-10 scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight transition-colors first:mt-0">
User Conduct
</h2>
<p className="leading-7 [&:not(:first-child)]:mt-6 dark:text-muted-foreground">
You agree to use the app only for lawful purposes and in a way that
does not infringe the rights of, restrict, or inhibit anyone
else&apos;s use and enjoyment of the app. Prohibited behavior includes
harassing or causing distress or inconvenience to any other user,
transmitting obscene or offensive content, or disrupting the normal
flow of dialogue within our app.
</p>
<h2 className="mt-10 scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight transition-colors first:mt-0">
Intellectual Property
</h2>
<p className="leading-7 [&:not(:first-child)]:mt-6 dark:text-muted-foreground">
All content, trademarks, service marks, trade names, logos, and icons
are the property of their respective owners and/or its licensors and
are protected by copyright and other intellectual property laws.
</p>
<h2 className="mt-10 scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight transition-colors first:mt-0">
Limitation of Liability
</h2>
<p className="leading-7 [&:not(:first-child)]:mt-6 dark:text-muted-foreground">
Wuwa Tracker will not be liable for any indirect, incidental, special,
consequential, or punitive damages, or any loss of profits or
revenues, whether incurred directly or indirectly, or any loss of
data, use, goodwill, or other intangible losses, resulting from your
use of the app.
</p>
<p className="leading-7 [&:not(:first-child)]:mt-6 dark:text-muted-foreground">
Additionally, Wuwa Tracker is not liable for any account bans or other
related issues that may occur as a result of using our website, as we
are an external service and are not officially associated with
Wuthering Waves in any way.
</p>
</div>
</div>
);
}
2 changes: 1 addition & 1 deletion src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
--accent: 217.2 32.6% 17.5%;
--accent-foreground: 210 40% 98%;

--destructive: 0 62.8% 30.6%;
--destructive: 0 70.8% 45.6%;
--destructive-foreground: 210 40% 98%;

--border: 217 32.6% 17.5%;
Expand Down
2 changes: 1 addition & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function RootLayout({
children: React.ReactNode;
}>) {
return (
<html lang="en">
<html lang="en" className="scroll-smooth">
<body className={inter.className}>
<UserContextProvider>
<PullHistoryContextProvider>
Expand Down
6 changes: 6 additions & 0 deletions src/app/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@
<changefreq>yearly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>https://wuwatracker.tech/terms-and-conditions</loc>
<lastmod>2024-06-01T00:00:00.000Z</lastmod>
<changefreq>yearly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>https://wuwatracker.tech/convene/limited-character</loc>
<lastmod>2024-06-01T00:00:00.000Z</lastmod>
Expand Down
Loading

0 comments on commit 71041d7

Please sign in to comment.