refactor: lint formatting and fixes #6
@@ -307,7 +307,9 @@ export function ComposeCanvas({
|
|||||||
lastWidth = nextWidth;
|
lastWidth = nextWidth;
|
||||||
syncViewport();
|
syncViewport();
|
||||||
});
|
});
|
||||||
resizeObserver.observe(wrapperRef.current!);
|
if (wrapperRef.current) {
|
||||||
|
resizeObserver.observe(wrapperRef.current);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
initCanvas().then();
|
initCanvas().then();
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
XCircleIcon,
|
XCircleIcon,
|
||||||
} from "@phosphor-icons/react";
|
} from "@phosphor-icons/react";
|
||||||
import { Modal } from "../ui/Modal";
|
import { Modal } from "../ui/Modal";
|
||||||
import type { CanvasStyle } from "./ComposeCanvas.tsx";
|
import type { CanvasStyle } from "./ComposeCanvas";
|
||||||
|
|
||||||
interface ToolBarProps {
|
interface ToolBarProps {
|
||||||
onAddImage: () => void;
|
onAddImage: () => void;
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ import {
|
|||||||
ShieldCheckIcon,
|
ShieldCheckIcon,
|
||||||
WarningIcon,
|
WarningIcon,
|
||||||
} from "@phosphor-icons/react";
|
} from "@phosphor-icons/react";
|
||||||
import Logo from "../Logo.tsx";
|
import Logo from "../Logo";
|
||||||
import { Modal } from "../ui/Modal";
|
import { Modal } from "../ui/Modal";
|
||||||
import Saajan from "../ui/Saajan.tsx";
|
import Saajan from "../ui/Saajan";
|
||||||
|
|
||||||
export default function WelcomeModal({
|
export default function WelcomeModal({
|
||||||
setShowWelcome,
|
setShowWelcome,
|
||||||
@@ -53,7 +53,7 @@ export default function WelcomeModal({
|
|||||||
href="https://www.privacyguides.org/en/passwords/"
|
href="https://www.privacyguides.org/en/passwords/"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
className="link link-primary-content"
|
className="link link-primary-content"
|
||||||
rel="noopener"
|
rel="noopener noreferrer"
|
||||||
>
|
>
|
||||||
password manager
|
password manager
|
||||||
</a>{" "}
|
</a>{" "}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import "@fontsource-variable/playwrite-hr-lijeva/wght.css";
|
|||||||
import "@fontsource-variable/jost/wght.css";
|
import "@fontsource-variable/jost/wght.css";
|
||||||
import "@fontsource-variable/playfair-display/wght.css";
|
import "@fontsource-variable/playfair-display/wght.css";
|
||||||
|
|
||||||
import App from "./App.tsx";
|
import App from "./App";
|
||||||
|
|
||||||
const root = document.getElementById("root");
|
const root = document.getElementById("root");
|
||||||
if (root) {
|
if (root) {
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ import { ReactLenis } from "lenis/react";
|
|||||||
import { AnimatePresence, motion, useScroll, useTransform } from "motion/react";
|
import { AnimatePresence, motion, useScroll, useTransform } from "motion/react";
|
||||||
import { useEffect, useRef, useState } from "react";
|
import { useEffect, useRef, useState } from "react";
|
||||||
import stamp from "../assets/envelope/stamp.png";
|
import stamp from "../assets/envelope/stamp.png";
|
||||||
import Logo from "../components/Logo.tsx";
|
import Logo from "../components/Logo";
|
||||||
import { Modal } from "../components/ui/Modal";
|
import { Modal } from "../components/ui/Modal";
|
||||||
|
|
||||||
import "@fontsource/kavivanar/index.css";
|
import "@fontsource/kavivanar/index.css";
|
||||||
@@ -35,7 +35,7 @@ import "@fontsource/architects-daughter/index.css";
|
|||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
|
|
||||||
function HorizontalScroll({ children }: { children: React.ReactNode }) {
|
function HorizontalScroll({ children }: { children: React.ReactNode }) {
|
||||||
const ref = useRef(null);
|
const ref = useRef<HTMLDivElement>(null);
|
||||||
const { scrollYProgress } = useScroll({ target: ref });
|
const { scrollYProgress } = useScroll({ target: ref });
|
||||||
const x = useTransform(scrollYProgress, [0, 1], ["0%", "-50%"]);
|
const x = useTransform(scrollYProgress, [0, 1], ["0%", "-50%"]);
|
||||||
|
|
||||||
@@ -257,7 +257,7 @@ function SpecsSection() {
|
|||||||
</a>{" "}
|
</a>{" "}
|
||||||
for the <span className="font-hand text-primary">keys</span>.
|
for the <span className="font-hand text-primary">keys</span>.
|
||||||
</h2>
|
</h2>
|
||||||
<p className="text-sm md:text-xl leading-relaxed">
|
<div className="text-sm md:text-xl leading-relaxed">
|
||||||
This means, both the{" "}
|
This means, both the{" "}
|
||||||
<span className="font-display text-info">encryption</span> and{" "}
|
<span className="font-display text-info">encryption</span> and{" "}
|
||||||
<span className="font-display text-info">decryption</span> runs on
|
<span className="font-display text-info">decryption</span> runs on
|
||||||
@@ -288,8 +288,8 @@ function SpecsSection() {
|
|||||||
<span className="italic">only you</span>—hold the very thing
|
<span className="italic">only you</span>—hold the very thing
|
||||||
that opens that box,{" "}
|
that opens that box,{" "}
|
||||||
<span className="font-mono text-accent">your password</span>.
|
<span className="font-mono text-accent">your password</span>.
|
||||||
</p>
|
</div>
|
||||||
<p className="text-xs md:text-lg text-right w-full flex items-center justify-end gap-4 leading-relaxed text-neutral-content/80">
|
<div className="text-xs md:text-lg text-right w-full flex items-center justify-end gap-4 leading-relaxed text-neutral-content/80">
|
||||||
<span>
|
<span>
|
||||||
Nothing on the server is readable without your actual password.
|
Nothing on the server is readable without your actual password.
|
||||||
<br />
|
<br />
|
||||||
@@ -304,14 +304,14 @@ function SpecsSection() {
|
|||||||
(unless this happens)
|
(unless this happens)
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
<div className="w-18 h-18 flex shrink-0 items-center justify-center bg-success/20 rounded-full p-0 ">
|
<div className="w-18 h-18 flex shrink-0 items-center justify-end bg-success/20 rounded-full p-0 ">
|
||||||
<VaultIcon
|
<VaultIcon
|
||||||
size={36}
|
size={36}
|
||||||
weight="duotone"
|
weight="duotone"
|
||||||
className="text-neutral-content"
|
className="text-neutral-content"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</p>
|
</div>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
type={"button"}
|
type={"button"}
|
||||||
|
|||||||
@@ -7,19 +7,19 @@ import {
|
|||||||
} from "@phosphor-icons/react";
|
} from "@phosphor-icons/react";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { useLocation, useNavigate } from "react-router-dom";
|
import { useLocation, useNavigate } from "react-router-dom";
|
||||||
import { DrawerSection } from "../components/drawer/DrawerSection.tsx";
|
import { DrawerSection } from "../components/drawer/DrawerSection";
|
||||||
import { LetterItem } from "../components/drawer/LetterItem.tsx";
|
import { LetterItem } from "../components/drawer/LetterItem";
|
||||||
import { PasskeyModal } from "../components/drawer/PasskeyModal.tsx";
|
import { PasskeyModal } from "../components/drawer/PasskeyModal";
|
||||||
import { WelcomeLetterOverlay } from "../components/drawer/WelcomeLetterOverlay.tsx";
|
import { WelcomeLetterOverlay } from "../components/drawer/WelcomeLetterOverlay";
|
||||||
import Logo from "../components/Logo";
|
import Logo from "../components/Logo";
|
||||||
import Saajan from "../components/ui/Saajan.tsx";
|
import Saajan from "../components/ui/Saajan";
|
||||||
import { PATHS } from "../config/routes";
|
import { PATHS } from "../config/routes";
|
||||||
import { useAuth } from "../hooks/useAuth";
|
import { useAuth } from "../hooks/useAuth";
|
||||||
import { useLetters } from "../hooks/useLetters";
|
import { useLetters } from "../hooks/useLetters";
|
||||||
import {
|
import {
|
||||||
formatRelativeDate,
|
formatRelativeDate,
|
||||||
formatRelativeDateWithoutTime,
|
formatRelativeDateWithoutTime,
|
||||||
} from "../utils/dateFormat.ts";
|
} from "../utils/dateFormat";
|
||||||
|
|
||||||
export default function Drawer() {
|
export default function Drawer() {
|
||||||
const { user, logout } = useAuth();
|
const { user, logout } = useAuth();
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ import { useRef, useState } from "react";
|
|||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import Logo from "../components/Logo";
|
import Logo from "../components/Logo";
|
||||||
import { EnvelopeReveal } from "../components/reader/EnvelopeReveal";
|
import { EnvelopeReveal } from "../components/reader/EnvelopeReveal";
|
||||||
import Saajan from "../components/ui/Saajan.tsx";
|
import Saajan from "../components/ui/Saajan";
|
||||||
import { ROUTES } from "../config/routes.ts";
|
import { ROUTES } from "../config/routes";
|
||||||
import { formatDate } from "../utils/dateFormat.ts";
|
import { formatDate } from "../utils/dateFormat";
|
||||||
|
|
||||||
import "@fontsource/space-mono/index.css";
|
import "@fontsource/space-mono/index.css";
|
||||||
import "@fontsource/architects-daughter/index.css";
|
import "@fontsource/architects-daughter/index.css";
|
||||||
|
|||||||
Reference in New Issue
Block a user