Skip to content

Commit

Permalink
remove heroicons, add note & disable login page
Browse files Browse the repository at this point in the history
  • Loading branch information
danreeves committed Dec 27, 2023
1 parent 2688b03 commit 732d6d2
Show file tree
Hide file tree
Showing 13 changed files with 105 additions and 324 deletions.
1 change: 1 addition & 0 deletions app/img/steam_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions app/img/xbox_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 3 additions & 9 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Disclosure } from "@headlessui/react"
import { Bars3Icon, XMarkIcon } from "@heroicons/react/24/outline"
import { Link, NavLink, Outlet } from "@remix-run/react"
import type { User } from "./services/auth.server"
import { ThemeToggle } from "~/components/ThemeToggle"
Expand All @@ -11,6 +10,7 @@ import {
DropdownMenuContent,
DropdownMenuItem,
} from "~/components/ui/dropdown-menu"
import { X, Menu } from "lucide-react"

const navigation = [
{ name: "Armoury", href: "/armoury" },
Expand Down Expand Up @@ -112,15 +112,9 @@ export default function Layout({ user }: { user: User | null }) {
>
<span className="sr-only">Open main menu</span>
{open ? (
<XMarkIcon
className="block h-6 w-6"
aria-hidden="true"
/>
<X className="block h-6 w-6" aria-hidden="true" />
) : (
<Bars3Icon
className="block h-6 w-6"
aria-hidden="true"
/>
<Menu className="block h-6 w-6" aria-hidden="true" />
)}
</Disclosure.Button>
</div>
Expand Down
127 changes: 72 additions & 55 deletions app/routes/_pages.login.tsx
Original file line number Diff line number Diff line change
@@ -1,70 +1,87 @@
import { json } from "@remix-run/node"
import { Link } from "@remix-run/react"
import { AlertTriangle } from "lucide-react"
import { Button } from "~/components/ui/button"
import steamLogo from "~/img/steam_logo.svg"
import xboxLogo from "~/img/xbox_logo.svg"

export const loader = async () => {
return json({ title: "Sign In" })
}

export default function LogIn() {
return (
<div className="grid grid-cols-1 gap-4 md:grid-cols-2">
<div className="rounded-lg border bg-card text-card-foreground shadow-sm p-4">
<h2 className="mb-2 font-heading text-lg">Sign In with</h2>
<>
<div
className="flex rounded-lg bg-yellow-100 p-4 text-sm text-yellow-700 mb-4 max-w-3xl mx-auto"
role="alert"
>
<AlertTriangle className="mr-3 inline h-5 w-5" aria-hidden="true" />
<div>
<p className="font-medium">No longer accepting sign ups!</p>
<p>
FatShark have made changes that prevent the DTAuth mod from working,
so the site will be disabled until a new authentication method is
available. The{" "}
<Link className="underline" to="/extension">
Armoury Exchange Extension
</Link>{" "}
is still working and available.
</p>
</div>
</div>
<div className="grid grid-cols-1 gap-4 md:grid-cols-2">
<div className="rounded-lg border bg-card text-card-foreground shadow-sm p-4">
<h2 className="mb-2 font-heading text-lg">Sign In with</h2>

<div className="mb-6 mt-6 flex items-center gap-4">
<Button variant="outline" asChild>
<a className="flex-grow" href="/auth/steam">
<SteamIcon className="color-black dark:invert h-4 w-4 mr-2" />{" "}
Steam
</a>
</Button>
<div className="mb-6 mt-6 flex items-center gap-4">
<Button variant="outline" disabled className="flex-grow">
{/* <a className="flex-grow" href="/auth/steam"> */}
<>
<img alt="" src={steamLogo} className="h-4 w-4 mr-1" /> Steam
</>
{/* </a> */}
</Button>

<Button variant="outline" disabled className="flex-grow">
Xbox (Coming Soon)
</Button>
</div>
<Button variant="outline" disabled className="flex-grow">
<img alt="" src={xboxLogo} className="h-4 w-4 mr-1" /> Xbox
</Button>
</div>

<h2 className="mb-2 font-heading text-lg">Disclaimer</h2>
<p className="mb-6">
This website is not affiliated with or endorsed by Fatshark. This
website uses unofficial access to your account and has full permission
to it. Use at your own risk. This website has <strong>no</strong>{" "}
access to your Steam or Xbox account, only your Darktide account.
</p>
</div>
<div className="rounded-lg border bg-card text-card-foreground shadow-sm p-4">
<h2 className="mb-2 font-heading text-lg">Why?</h2>
<p className="mb-6">
Sign in with your account and then authorise using the{" "}
<a
className="underline"
href="https://www.nexusmods.com/warhammer40kdarktide/mods/178"
>
DTAuth mod
</a>{" "}
to enable managing your account from this website.{" "}
</p>
<p className="font-bold">Features:</p>
<ul className="mb-6 ml-5 list-square">
<li>Use the weapon shops!</li>
<li>Track and reroll your contracts!</li>
<li>View the mission board! Mission ID history</li>
<li>Manage your inventories, loadouts & builds</li>
<li>Notifications or auto-purchasing items</li>
</ul>
<h2 className="mb-2 font-heading text-lg">Disclaimer</h2>
<p className="mb-6">
This website is not affiliated with or endorsed by Fatshark. This
website uses unofficial access to your account and has full
permission to it. Use at your own risk. This website has{" "}
<strong>no</strong> access to your Steam or Xbox account, only your
Darktide account.
</p>
</div>
<div className="rounded-lg border bg-card text-card-foreground shadow-sm p-4">
<p className="mb-6">
Sign in with your account and then authorise using the{" "}
<a
className="underline"
href="https://www.nexusmods.com/warhammer40kdarktide/mods/178"
>
DTAuth mod
</a>{" "}
to enable managing your account from this website.{" "}
</p>
<p className="font-bold">Features:</p>
<ul className="mb-6 ml-5 list-square">
<li>Use the weapon shops!</li>
<li>Track and reroll your contracts!</li>
<li>View the mission board! Mission ID history!</li>
<li>
<b>TODO:</b> Manage your inventories, loadouts & builds
</li>
<li>
<b>TODO:</b> Notifications or auto-purchasing items
</li>
</ul>
</div>
</div>
</div>
)
}

function SteamIcon({ className }: { className?: string }) {
return (
<svg className={className} viewBox="0 0 88.5 88.5">
<g>
<path d="M44.1,0C20.8,0,1.8,17.9,0,40.7l23.7,9.8c2-1.4,4.4-2.2,7-2.2c0.2,0,0.5,0,0.7,0L42,33.1c0-0.1,0-0.1,0-0.2 c0-9.2,7.5-16.7,16.7-16.7c9.2,0,16.7,7.5,16.7,16.7s-7.5,16.7-16.7,16.7c-0.1,0-0.3,0-0.4,0l-15,10.7c0,0.2,0,0.4,0,0.6 c0,6.9-5.6,12.5-12.5,12.5c-6.1,0-11.1-4.3-12.3-10.1l-17-7c5.2,18.6,22.3,32.2,42.6,32.2c24.4,0,44.2-19.8,44.2-44.2 C88.3,19.8,68.5,0,44.1,0" />
<path d="M27.7,67.1l-5.4-2.2c1,2,2.6,3.7,4.8,4.6c4.8,2,10.3-0.3,12.3-5.1c1-2.3,1-4.9,0-7.2c-1-2.3-2.8-4.1-5.1-5.1 c-2.3-1-4.8-0.9-6.9-0.1l5.6,2.3c3.5,1.5,5.2,5.5,3.7,9C35.3,66.9,31.2,68.6,27.7,67.1" />
<path d="M69.8,32.8c0-6.1-5-11.1-11.1-11.1c-6.1,0-11.1,5-11.1,11.1c0,6.1,5,11.1,11.1,11.1 C64.8,43.9,69.8,39,69.8,32.8 M50.3,32.8c0-4.6,3.7-8.3,8.4-8.3s8.4,3.7,8.4,8.3s-3.7,8.3-8.4,8.3S50.3,37.4,50.3,32.8" />
</g>
</svg>
</>
)
}
4 changes: 2 additions & 2 deletions app/routes/_pages.settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { deleteAuthToken, getAuthToken } from "~/services/db/authtoken.server"
import { authenticator } from "~/services/auth.server"
import { Form, useLoaderData } from "@remix-run/react"

import { TrashIcon } from "@heroicons/react/24/outline"
import { Button } from "~/components/ui/button"
import { Trash2 } from "lucide-react"

export async function loader({ request }: LoaderFunctionArgs) {
let user = await authenticator.isAuthenticated(request, {
Expand Down Expand Up @@ -39,7 +39,7 @@ export default function Settings() {
<div className="p-4 rounded-lg border bg-card text-card-foreground shadow-smw">
<Form method="post" className="flex flex-row items-center gap-6">
<Button variant="destructive" type="submit" disabled={!hasAuthToken}>
<TrashIcon className="block h-6 w-6" aria-hidden="true" />
<Trash2 className="block h-6 w-6" aria-hidden="true" />
Delete authentication token
</Button>

Expand Down
6 changes: 3 additions & 3 deletions app/routes/armoury.$character.contracts.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { CircleStackIcon, Square2StackIcon } from "@heroicons/react/24/outline"
import { Form, useLoaderData, useNavigation } from "@remix-run/react"
import type { ActionFunctionArgs, LoaderFunctionArgs } from "@remix-run/node"
import { json } from "@remix-run/node"
Expand All @@ -15,6 +14,7 @@ import {
} from "~/services/darktide.server"
import { twMerge } from "tailwind-merge"
import useLocale from "~/hooks/locale"
import { Coins, Layers3 } from "lucide-react"

export async function action({ params, request }: ActionFunctionArgs) {
let { character: characterId } = zx.parseParams(params, {
Expand Down Expand Up @@ -191,13 +191,13 @@ export default function Contracts() {
<div>Refreshes in {timeLeft}</div>
<div className="flex flex-row gap-4">
<div className="flex items-center">
<CircleStackIcon className="mr-1 h-4 w-4" aria-hidden />{" "}
<Coins className="mr-1 h-4 w-4" aria-hidden />{" "}
{data.wallet?.credits?.balance.amount.toLocaleString(locale) ??
"--"}{" "}
credits
</div>
<div className="flex items-center">
<Square2StackIcon className="mr-1 h-4 w-4" aria-hidden />{" "}
<Layers3 className="mr-1 h-4 w-4" aria-hidden />{" "}
{data.wallet?.marks?.balance.amount.toLocaleString(locale) ?? "--"}{" "}
marks
</div>
Expand Down
Loading

0 comments on commit 732d6d2

Please sign in to comment.