fixes #2151, apply secure cookie session only if using SSL (https)

This commit is contained in:
Amruth Pillai
2025-01-14 09:45:57 +01:00
parent 21af624096
commit a32def2086
122 changed files with 721 additions and 669 deletions

View File

@ -11,7 +11,7 @@ import {
RichInput,
} from "@reactive-resume/ui";
import { useForm } from "react-hook-form";
import { z } from "zod";
import type { z } from "zod";
import { AiActions } from "@/client/components/ai-actions";

View File

@ -11,7 +11,7 @@ import {
RichInput,
} from "@reactive-resume/ui";
import { useForm } from "react-hook-form";
import { z } from "zod";
import type { z } from "zod";
import { AiActions } from "@/client/components/ai-actions";

View File

@ -1,7 +1,8 @@
import { zodResolver } from "@hookform/resolvers/zod";
import { t } from "@lingui/macro";
import { X } from "@phosphor-icons/react";
import { CustomSection, customSectionSchema, defaultCustomSection } from "@reactive-resume/schema";
import type { CustomSection } from "@reactive-resume/schema";
import { customSectionSchema, defaultCustomSection } from "@reactive-resume/schema";
import {
Badge,
BadgeInput,
@ -17,7 +18,7 @@ import {
import { AnimatePresence, motion } from "framer-motion";
import { useState } from "react";
import { useForm } from "react-hook-form";
import { z } from "zod";
import type { z } from "zod";
import { AiActions } from "@/client/components/ai-actions";
import { useDialog } from "@/client/stores/dialog";

View File

@ -11,7 +11,7 @@ import {
RichInput,
} from "@reactive-resume/ui";
import { useForm } from "react-hook-form";
import { z } from "zod";
import type { z } from "zod";
import { AiActions } from "@/client/components/ai-actions";

View File

@ -11,7 +11,7 @@ import {
RichInput,
} from "@reactive-resume/ui";
import { useForm } from "react-hook-form";
import { z } from "zod";
import type { z } from "zod";
import { AiActions } from "@/client/components/ai-actions";

View File

@ -16,7 +16,7 @@ import {
import { AnimatePresence, motion } from "framer-motion";
import { useState } from "react";
import { useForm } from "react-hook-form";
import { z } from "zod";
import type { z } from "zod";
import { SectionDialog } from "../sections/shared/section-dialog";

View File

@ -11,7 +11,7 @@ import {
Slider,
} from "@reactive-resume/ui";
import { useForm } from "react-hook-form";
import { z } from "zod";
import type { z } from "zod";
import { SectionDialog } from "../sections/shared/section-dialog";

View File

@ -12,7 +12,7 @@ import {
Input,
} from "@reactive-resume/ui";
import { useForm } from "react-hook-form";
import { z } from "zod";
import type { z } from "zod";
import { BrandIcon } from "@/client/components/brand-icon";

View File

@ -17,7 +17,7 @@ import {
import { AnimatePresence, motion } from "framer-motion";
import { useState } from "react";
import { useForm } from "react-hook-form";
import { z } from "zod";
import type { z } from "zod";
import { AiActions } from "@/client/components/ai-actions";

View File

@ -11,7 +11,7 @@ import {
RichInput,
} from "@reactive-resume/ui";
import { useForm } from "react-hook-form";
import { z } from "zod";
import type { z } from "zod";
import { AiActions } from "@/client/components/ai-actions";

View File

@ -11,7 +11,7 @@ import {
RichInput,
} from "@reactive-resume/ui";
import { useForm } from "react-hook-form";
import { z } from "zod";
import type { z } from "zod";
import { AiActions } from "@/client/components/ai-actions";

View File

@ -17,7 +17,7 @@ import {
import { AnimatePresence, motion } from "framer-motion";
import { useState } from "react";
import { useForm } from "react-hook-form";
import { z } from "zod";
import type { z } from "zod";
import { SectionDialog } from "../sections/shared/section-dialog";

View File

@ -11,7 +11,7 @@ import {
RichInput,
} from "@reactive-resume/ui";
import { useForm } from "react-hook-form";
import { z } from "zod";
import type { z } from "zod";
import { AiActions } from "@/client/components/ai-actions";

View File

@ -1,6 +1,6 @@
import { t } from "@lingui/macro";
import { Plus, PlusCircle } from "@phosphor-icons/react";
import {
import type {
Award,
Certification,
CustomSection,

View File

@ -1,7 +1,7 @@
import { t, Trans } from "@lingui/macro";
import { createId } from "@paralleldrive/cuid2";
import { DotsSixVertical, Envelope, Plus, X } from "@phosphor-icons/react";
import { CustomField as ICustomField } from "@reactive-resume/schema";
import type { CustomField as ICustomField } from "@reactive-resume/schema";
import {
Button,
Input,

View File

@ -1,13 +1,6 @@
import { t } from "@lingui/macro";
import {
AspectRatio,
Checkbox,
Input,
Label,
ToggleGroup,
ToggleGroupItem,
Tooltip,
} from "@reactive-resume/ui";
import type { AspectRatio } from "@reactive-resume/ui";
import { Checkbox, Input, Label, ToggleGroup, ToggleGroupItem, Tooltip } from "@reactive-resume/ui";
import { useMemo } from "react";
import { useResumeStore } from "@/client/stores/resume";

View File

@ -1,7 +1,7 @@
import type { DragEndEvent } from "@dnd-kit/core";
import {
closestCenter,
DndContext,
DragEndEvent,
KeyboardSensor,
PointerSensor,
useSensor,
@ -16,7 +16,7 @@ import {
} from "@dnd-kit/sortable";
import { t } from "@lingui/macro";
import { Plus } from "@phosphor-icons/react";
import { SectionItem, SectionKey, SectionWithItem } from "@reactive-resume/schema";
import type { SectionItem, SectionKey, SectionWithItem } from "@reactive-resume/schema";
import { Button } from "@reactive-resume/ui";
import { cn } from "@reactive-resume/utils";
import { AnimatePresence, motion } from "framer-motion";

View File

@ -2,7 +2,7 @@ import { t } from "@lingui/macro";
import { createId } from "@paralleldrive/cuid2";
import { CopySimple, PencilSimple, Plus } from "@phosphor-icons/react";
import { VisuallyHidden } from "@radix-ui/react-visually-hidden";
import { SectionItem, SectionWithItem } from "@reactive-resume/schema";
import type { SectionItem, SectionWithItem } from "@reactive-resume/schema";
import {
AlertDialog,
AlertDialogAction,
@ -25,9 +25,10 @@ import {
import { produce } from "immer";
import get from "lodash.get";
import { useEffect } from "react";
import { UseFormReturn } from "react-hook-form";
import type { UseFormReturn } from "react-hook-form";
import { DialogName, useDialog } from "@/client/stores/dialog";
import type { DialogName } from "@/client/stores/dialog";
import { useDialog } from "@/client/stores/dialog";
import { useResumeStore } from "@/client/stores/resume";
type Props<T extends SectionItem> = {

View File

@ -1,3 +1,4 @@
import type { IconProps } from "@phosphor-icons/react";
import {
Article,
Books,
@ -7,7 +8,6 @@ import {
GameController,
GraduationCap,
HandHeart,
IconProps,
Medal,
PuzzlePiece,
ShareNetwork,
@ -15,8 +15,10 @@ import {
User,
Users,
} from "@phosphor-icons/react";
import { defaultSection, SectionKey, SectionWithItem } from "@reactive-resume/schema";
import { Button, ButtonProps, Tooltip } from "@reactive-resume/ui";
import type { SectionKey, SectionWithItem } from "@reactive-resume/schema";
import { defaultSection } from "@reactive-resume/schema";
import type { ButtonProps } from "@reactive-resume/ui";
import { Button, Tooltip } from "@reactive-resume/ui";
import get from "lodash.get";
import { useResumeStore } from "@/client/stores/resume";

View File

@ -10,7 +10,8 @@ import {
Plus,
TrashSimple,
} from "@phosphor-icons/react";
import { defaultSections, SectionKey, SectionWithItem } from "@reactive-resume/schema";
import type { SectionKey, SectionWithItem } from "@reactive-resume/schema";
import { defaultSections } from "@reactive-resume/schema";
import {
Button,
DropdownMenu,

View File

@ -1,6 +1,7 @@
import { t } from "@lingui/macro";
import { Tag } from "@phosphor-icons/react";
import { URL, urlSchema } from "@reactive-resume/schema";
import type { URL } from "@reactive-resume/schema";
import { urlSchema } from "@reactive-resume/schema";
import {
Button,
Input,

View File

@ -1,10 +1,8 @@
import type { DragEndEvent, DragOverEvent, DragStartEvent } from "@dnd-kit/core";
import {
closestCenter,
DndContext,
DragEndEvent,
DragOverEvent,
DragOverlay,
DragStartEvent,
KeyboardSensor,
PointerSensor,
useDroppable,
@ -22,13 +20,8 @@ import { t } from "@lingui/macro";
import { ArrowCounterClockwise, DotsSixVertical, Plus, TrashSimple } from "@phosphor-icons/react";
import { defaultMetadata } from "@reactive-resume/schema";
import { Button, Portal, Tooltip } from "@reactive-resume/ui";
import {
cn,
LayoutLocator,
moveItemInLayout,
parseLayoutLocator,
SortablePayload,
} from "@reactive-resume/utils";
import type { LayoutLocator, SortablePayload } from "@reactive-resume/utils";
import { cn, moveItemInLayout, parseLayoutLocator } from "@reactive-resume/utils";
import get from "lodash.get";
import { useState } from "react";

View File

@ -1,7 +1,8 @@
/* eslint-disable lingui/no-unlocalized-strings */
import { t } from "@lingui/macro";
import { Button, Combobox, ComboboxOption, Label, Slider, Switch } from "@reactive-resume/ui";
import type { ComboboxOption } from "@reactive-resume/ui";
import { Button, Combobox, Label, Slider, Switch } from "@reactive-resume/ui";
import { cn, fonts } from "@reactive-resume/utils";
import { useCallback, useEffect, useState } from "react";
import webfontloader from "webfontloader";

View File

@ -1,8 +1,8 @@
import type { IconProps } from "@phosphor-icons/react";
import {
Code,
DiamondsFour,
DownloadSimple,
IconProps,
Info,
Layout,
Note,
@ -13,7 +13,8 @@ import {
Translate,
TrendUp,
} from "@phosphor-icons/react";
import { Button, ButtonProps, Tooltip } from "@reactive-resume/ui";
import type { ButtonProps } from "@reactive-resume/ui";
import { Button, Tooltip } from "@reactive-resume/ui";
export type MetadataKey =
| "template"