Skip to content

Commit

Permalink
licensing coming soon
Browse files Browse the repository at this point in the history
  • Loading branch information
ankushKun committed Aug 22, 2024
1 parent 1d85b3d commit c7de08c
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 4 deletions.
38 changes: 37 additions & 1 deletion next_app/src/components/menubar/components/publish-template.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ import {
DialogTitle,
DialogTrigger,
} from "@/components/ui/dialog"
import {
Select,
SelectContent,
SelectGroup,
SelectItem,
SelectLabel,
SelectTrigger,
SelectValue,
} from "@/components/ui/select"
import Arweave from "arweave";
import { Input } from "@/components/ui/input";
import { toast } from "sonner";
Expand All @@ -36,6 +45,7 @@ export default function PublishTemplateBtn() {
const [tquantity, setTquantity] = useState<number>(1)
const [loading, setLoading] = useState(false)
const [open, setOpen] = useState(false)
const [license, setLicense] = useState<string | null>(null)

const project = globalState.activeProject && manager.getProject(globalState.activeProject)
const files = project && project.files
Expand Down Expand Up @@ -213,10 +223,36 @@ export default function PublishTemplateBtn() {

</div>
<div>

<Label htmlFor="quantity" className="px-2 text-lg">Number of copies</Label>
<Input id="quantity" placeholder="Enter the number of copies you want to mint" type="number" min={1} defaultValue={1} onChange={(e) => setTquantity(parseInt(e.target.value))} />
</div>

</div>
<div>
<Label htmlFor="license" className="px-2 text-lg">Licensing <span className="text-sm text-muted-foreground">(coming soon)</span></Label>
<Select disabled onValueChange={v => setLicense(v)}>
<SelectTrigger className="">
<SelectValue placeholder="Select a License" />
</SelectTrigger>
<SelectContent>
<SelectGroup>
<SelectItem value="none">Unlicensed</SelectItem>
</SelectGroup>
<SelectGroup>
<SelectLabel>Universal Data License</SelectLabel>
<SelectItem value="com-dev">Commercial Use + Derivations</SelectItem>
<SelectItem value="non-com-dev">Non-Commercial Use + Derivations</SelectItem>
<SelectItem value="non-com-non-dev">Non-Commercial Use + No Derivations</SelectItem>
</SelectGroup>
{/* <SelectGroup>
<SelectLabel>OSS License</SelectLabel>
<SelectItem value="mit">MIT</SelectItem>
<SelectItem value="apache">Apache</SelectItem>
<SelectItem value="gpl">GPL</SelectItem>
</SelectGroup> */}
</SelectContent>
</Select>

</div>

<div className="flex gap-4 px-2">
Expand Down
6 changes: 3 additions & 3 deletions next_app/src/components/ui/select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const SelectTrigger = React.forwardRef<
<SelectPrimitive.Trigger
ref={ref}
className={cn(
"flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
"flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
className
)}
{...props}
Expand Down Expand Up @@ -75,7 +75,7 @@ const SelectContent = React.forwardRef<
className={cn(
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
position === "popper" &&
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
className
)}
position={position}
Expand All @@ -86,7 +86,7 @@ const SelectContent = React.forwardRef<
className={cn(
"p-1",
position === "popper" &&
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
)}
>
{children}
Expand Down

0 comments on commit c7de08c

Please sign in to comment.