Merge branch 'main' into hosted
This commit is contained in:
commit
b35738524b
@ -36,7 +36,7 @@ import toast from "react-hot-toast";
|
|||||||
import ImportCodeSection from "./components/ImportCodeSection";
|
import ImportCodeSection from "./components/ImportCodeSection";
|
||||||
import { useAuth } from "@clerk/clerk-react";
|
import { useAuth } from "@clerk/clerk-react";
|
||||||
import { useStore } from "./store/store";
|
import { useStore } from "./store/store";
|
||||||
import { Stack } from "./lib/stacks/types";
|
import { Stack } from "./lib/stacks";
|
||||||
|
|
||||||
const IS_OPENAI_DOWN = false;
|
const IS_OPENAI_DOWN = false;
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import {
|
|||||||
import { Textarea } from "./ui/textarea";
|
import { Textarea } from "./ui/textarea";
|
||||||
import OutputSettingsSection from "./OutputSettingsSection";
|
import OutputSettingsSection from "./OutputSettingsSection";
|
||||||
import toast from "react-hot-toast";
|
import toast from "react-hot-toast";
|
||||||
import { Stack } from "../lib/stacks/types";
|
import { Stack } from "../lib/stacks";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
importFromCode: (code: string, stack: Stack) => void;
|
importFromCode: (code: string, stack: Stack) => void;
|
||||||
|
|||||||
@ -8,8 +8,7 @@ import {
|
|||||||
} from "./ui/select";
|
} from "./ui/select";
|
||||||
import { addEvent } from "../lib/analytics";
|
import { addEvent } from "../lib/analytics";
|
||||||
import { Badge } from "./ui/badge";
|
import { Badge } from "./ui/badge";
|
||||||
import { Stack } from "../lib/stacks/types";
|
import { Stack, STACK_DESCRIPTIONS } from "../lib/stacks";
|
||||||
import { STACK_DESCRIPTIONS } from "../lib/stacks/descriptions";
|
|
||||||
|
|
||||||
function generateDisplayComponent(stack: Stack) {
|
function generateDisplayComponent(stack: Stack) {
|
||||||
const stackComponents = STACK_DESCRIPTIONS[stack].components;
|
const stackComponents = STACK_DESCRIPTIONS[stack].components;
|
||||||
@ -57,7 +56,7 @@ function OutputSettingsSection({
|
|||||||
<SelectContent>
|
<SelectContent>
|
||||||
<SelectGroup>
|
<SelectGroup>
|
||||||
{Object.values(Stack).map((stack) => (
|
{Object.values(Stack).map((stack) => (
|
||||||
<SelectItem value={stack}>
|
<SelectItem key={stack} value={stack}>
|
||||||
<div className="flex items-center">
|
<div className="flex items-center">
|
||||||
{generateDisplayComponent(stack)}
|
{generateDisplayComponent(stack)}
|
||||||
{STACK_DESCRIPTIONS[stack].inBeta && (
|
{STACK_DESCRIPTIONS[stack].inBeta && (
|
||||||
|
|||||||
@ -1,4 +1,12 @@
|
|||||||
import { Stack } from "./types";
|
// Keep in sync with backend (prompts/types.py)
|
||||||
|
export enum Stack {
|
||||||
|
HTML_TAILWIND = "html_tailwind",
|
||||||
|
REACT_TAILWIND = "react_tailwind",
|
||||||
|
BOOTSTRAP = "bootstrap",
|
||||||
|
VUE_TAILWIND = "vue_tailwind",
|
||||||
|
IONIC_TAILWIND = "ionic_tailwind",
|
||||||
|
SVG = "svg",
|
||||||
|
}
|
||||||
|
|
||||||
export const STACK_DESCRIPTIONS: {
|
export const STACK_DESCRIPTIONS: {
|
||||||
[key in Stack]: { components: string[]; inBeta: boolean };
|
[key in Stack]: { components: string[]; inBeta: boolean };
|
||||||
@ -1,9 +0,0 @@
|
|||||||
// Keep in sync with backend (prompts/types.py)
|
|
||||||
export enum Stack {
|
|
||||||
HTML_TAILWIND = "html_tailwind",
|
|
||||||
REACT_TAILWIND = "react_tailwind",
|
|
||||||
BOOTSTRAP = "bootstrap",
|
|
||||||
VUE_TAILWIND = "vue_tailwind",
|
|
||||||
IONIC_TAILWIND = "ionic_tailwind",
|
|
||||||
SVG = "svg",
|
|
||||||
}
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
import { Stack } from "./lib/stacks/types";
|
import { Stack } from "./lib/stacks";
|
||||||
|
|
||||||
export enum EditorTheme {
|
export enum EditorTheme {
|
||||||
ESPRESSO = "espresso",
|
ESPRESSO = "espresso",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user