Skip to content

Commit

Permalink
Merge branch 'main' into ui_changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rishipatel9 authored Oct 13, 2024
2 parents c540e17 + 2028fe3 commit f6c71c4
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 22 deletions.
5 changes: 4 additions & 1 deletion .github/ISSUE_TEMPLATE/ossgg_sidequest.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name: oss.gg hack submission 🕹️
description: "Submit your contribution for the for the oss.gg hackathon"
title: "[oss.gg hackathon]"
labels: 🕹️ oss.gg, player submission
labels:
- "🕹️ oss.gg, player submission"
- "Needs Approval"

assignees: []
body:
- type: textarea
Expand Down
24 changes: 13 additions & 11 deletions apps/dashboard/app/(app)/apis/[apiId]/settings/delete-api.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
"use client";
import { Button } from "@/components/ui/button";
import type React from "react";
import { useState } from "react";

import { Card, CardDescription, CardFooter, CardHeader, CardTitle } from "@/components/ui/card";
import { Input } from "@/components/ui/input";
import { toast } from "@/components/ui/toaster";

import { Loading } from "@/components/dashboard/loading";
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
import { Button } from "@/components/ui/button";
import { Card, CardDescription, CardFooter, CardHeader, CardTitle } from "@/components/ui/card";
import {
Dialog,
DialogContent,
Expand All @@ -25,13 +19,16 @@ import {
FormLabel,
FormMessage,
} from "@/components/ui/form";
import { Input } from "@/components/ui/input";
import { toast } from "@/components/ui/toaster";
import { trpc } from "@/lib/trpc/client";
import { cn } from "@/lib/utils";
import { zodResolver } from "@hookform/resolvers/zod";
import { useRouter } from "next/navigation";
import type React from "react";
import { useState } from "react";
import { useForm } from "react-hook-form";
import { z } from "zod";

import { cn } from "@/lib/utils";
import { revalidate } from "./actions";

type Props = {
Expand Down Expand Up @@ -84,6 +81,11 @@ export const DeleteApi: React.FC<Props> = ({ api, keys }) => {
deleteApi.mutate({ apiId: api.id });
}

function handleDialogOpenChange(newState: boolean) {
setOpen(newState);
form.reset();
}

return (
<>
<Card
Expand Down Expand Up @@ -116,7 +118,7 @@ export const DeleteApi: React.FC<Props> = ({ api, keys }) => {
) : null}
</CardFooter>
</Card>
<Dialog open={open} onOpenChange={(o) => setOpen(o)}>
<Dialog open={open} onOpenChange={handleDialogOpenChange}>
<DialogContent className="border-alert">
<DialogHeader>
<DialogTitle>Delete API</DialogTitle>
Expand Down
2 changes: 1 addition & 1 deletion apps/dashboard/components/ui/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(
<input
type={type}
className={cn(
"flex h-8 w-full rounded-md border border-border bg-background px-3 py-2 text-sm focus:border-primary placeholder:text-content-subtle focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
"flex h-8 w-full rounded-md border border-border bg-background px-3 py-2 text-sm focus:border-primary hover:border-primary/30 placeholder:text-content-subtle focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
className,
)}
ref={ref}
Expand Down
13 changes: 6 additions & 7 deletions apps/www/app/templates/client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -400,13 +400,12 @@ export function TemplatesClient() {
<AvatarImage src={template.authors} />
</Avatar> */}

<div className="flex flex-row w-full h-24 sm:mb-4 md:mb-0">
<p className="content-end justify-start w-full text-xs leading-6 text-left text-white">
{template.authors.join(", ")}
</p>
<div className="content-end justify-end">
{" "}
<ArrowRight className="text-white/40" />
<div className="flex flex-row w-full h-24 sm:mb-4 md:mb-0 items-end">
<div className="flex items-center justify-between w-full">
<p className="text-xs leading-6 text-left text-white">
{template.authors.join(", ")}
</p>
<ArrowRight strokeWidth={1.5} className="size-5 text-gray-400" />
</div>
</div>
</div>
Expand Down
15 changes: 14 additions & 1 deletion apps/www/app/templates/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const frameworks = [
"Rocket",
"Oak",
"FastAPI",
"NestJS",
] as const;
export type Framework = StrArrayToUnion<typeof frameworks>;
// id -> label
Expand Down Expand Up @@ -54,7 +55,19 @@ export type Template = {
};

export const templates: Record<string, Template> = {
"pytho-fastapi": {
"typescript-nestjs": {
title: "Protect your NestJS API with Unkey",
description: "Starter kit for NestJS protected by Unkey",
authors: ["djnovin"],
repository: "https://github.com/djnovin/unkey-ts-nestjs",

image: "/images/templates/typescript-nestjs.png",
readmeUrl:
"https://raw.githubusercontent.com/djnovin/unkey-ts-nestjs/refs/heads/main/README.md",
language: "Typescript",
framework: "NestJS",
},
"python-fastapi": {
title: "Secure your Fast API",
description: "Learn how to setup Fast API with Unkey and protect your routes",
authors: ["harshsbhat"],
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions oss.gg/3_follow_the_unkey_x_account.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ Your turn 👇
» 11-October-2024 by [Devang Rakholiya](@Devang0907)
» Link to Account: https://x.com/Devang0907

» 13-October-2024 by [Atharva Deshmukh](@atharva-3000)
» Link to Account: https://x.com/0x_atharva

» 12-October-2024 by [Saketh Pavan](@Sakethpavan)
» Link to Account: https://x.com/Sakethpavan1

Expand Down
2 changes: 1 addition & 1 deletion oss.gg/6_record_onboarding.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ Your turn 👇

////////////////////////////

» 01-October-2024 by YOUR NAME
» 10-October-2024 by Teddy ASSIH

---

0 comments on commit f6c71c4

Please sign in to comment.