mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-06-30 01:51:37 +02:00
Fix spell correction prompt showing (#483)
This commit is contained in:
@@ -130,7 +130,7 @@ export const CookieDialog = ({ cookieJarId }: Props) => {
|
|||||||
return key !== nextCookieKey;
|
return key !== nextCookieKey;
|
||||||
});
|
});
|
||||||
|
|
||||||
patchModel(cookieJar, { cookies: [...nextCookies, nextCookie] });
|
void patchModel(cookieJar, { cookies: [...nextCookies, nextCookie] });
|
||||||
setSelectedCookieKey(nextCookieKey);
|
setSelectedCookieKey(nextCookieKey);
|
||||||
setEditingCookieKey(null);
|
setEditingCookieKey(null);
|
||||||
setDraftCookie(null);
|
setDraftCookie(null);
|
||||||
@@ -210,7 +210,7 @@ export const CookieDialog = ({ cookieJarId }: Props) => {
|
|||||||
setEditingCookieKey(null);
|
setEditingCookieKey(null);
|
||||||
setDraftCookie(null);
|
setDraftCookie(null);
|
||||||
setDraftExpiresInput("");
|
setDraftExpiresInput("");
|
||||||
patchModel(cookieJar, { cookies: [] });
|
void patchModel(cookieJar, { cookies: [] });
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</TableHeaderCell>
|
</TableHeaderCell>
|
||||||
@@ -276,7 +276,7 @@ export const CookieDialog = ({ cookieJarId }: Props) => {
|
|||||||
setDraftCookie(null);
|
setDraftCookie(null);
|
||||||
setDraftExpiresInput("");
|
setDraftExpiresInput("");
|
||||||
}
|
}
|
||||||
patchModel(cookieJar, {
|
void patchModel(cookieJar, {
|
||||||
cookies: cookieJar.cookies.filter(
|
cookies: cookieJar.cookies.filter(
|
||||||
(c2: Cookie) => cookieKey(c2) !== key,
|
(c2: Cookie) => cookieKey(c2) !== key,
|
||||||
),
|
),
|
||||||
@@ -570,6 +570,8 @@ function CookieTextInput({
|
|||||||
return (
|
return (
|
||||||
<input
|
<input
|
||||||
autoFocus={autoFocus}
|
autoFocus={autoFocus}
|
||||||
|
autoCapitalize="off"
|
||||||
|
autoCorrect="off"
|
||||||
className={cookieInputClassName}
|
className={cookieInputClassName}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
onChange={(event) => onChange(event.target.value)}
|
onChange={(event) => onChange(event.target.value)}
|
||||||
@@ -585,6 +587,8 @@ function CookieTextInput({
|
|||||||
function CookieTextarea({ onChange, value }: { onChange: (value: string) => void; value: string }) {
|
function CookieTextarea({ onChange, value }: { onChange: (value: string) => void; value: string }) {
|
||||||
return (
|
return (
|
||||||
<textarea
|
<textarea
|
||||||
|
autoCapitalize="off"
|
||||||
|
autoCorrect="off"
|
||||||
className={classNames(cookieInputClassName, "min-h-[5rem] resize-y")}
|
className={classNames(cookieInputClassName, "min-h-[5rem] resize-y")}
|
||||||
onChange={(event) => onChange(event.target.value)}
|
onChange={(event) => onChange(event.target.value)}
|
||||||
value={value}
|
value={value}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { patchModel, workspaceMetasAtom, workspacesAtom } from "@yaakapp-internal/models";
|
import { patchModel, workspaceMetasAtom, workspacesAtom } from "@yaakapp-internal/models";
|
||||||
import { Banner, HStack, InlineCode, VStack } from "@yaakapp-internal/ui";
|
import { Banner, HStack, InlineCode } from "@yaakapp-internal/ui";
|
||||||
import { useAtomValue } from "jotai";
|
import { useAtomValue } from "jotai";
|
||||||
import { useAuthTab } from "../hooks/useAuthTab";
|
import { useAuthTab } from "../hooks/useAuthTab";
|
||||||
import { useHeadersTab } from "../hooks/useHeadersTab";
|
import { useHeadersTab } from "../hooks/useHeadersTab";
|
||||||
|
|||||||
@@ -580,6 +580,10 @@ function getExtensions({
|
|||||||
|
|
||||||
return [
|
return [
|
||||||
...baseExtensions, // Must be first
|
...baseExtensions, // Must be first
|
||||||
|
EditorView.contentAttributes.of({
|
||||||
|
autocapitalize: "off",
|
||||||
|
autocorrect: "off",
|
||||||
|
}),
|
||||||
EditorView.domEventHandlers({
|
EditorView.domEventHandlers({
|
||||||
focus: () => {
|
focus: () => {
|
||||||
onFocus.current?.();
|
onFocus.current?.();
|
||||||
|
|||||||
@@ -55,6 +55,8 @@ export function KeyValueRow({
|
|||||||
const textToCopy =
|
const textToCopy =
|
||||||
copyText ??
|
copyText ??
|
||||||
(typeof children === "string" || typeof children === "number" ? `${children}` : null);
|
(typeof children === "string" || typeof children === "number" ? `${children}` : null);
|
||||||
|
const copyTitle =
|
||||||
|
typeof label === "string" || typeof label === "number" ? `Copy ${label}` : "Copy value";
|
||||||
const resolvedRightSlot =
|
const resolvedRightSlot =
|
||||||
rightSlot ??
|
rightSlot ??
|
||||||
(enableCopy && textToCopy != null ? (
|
(enableCopy && textToCopy != null ? (
|
||||||
@@ -62,7 +64,7 @@ export function KeyValueRow({
|
|||||||
text={textToCopy}
|
text={textToCopy}
|
||||||
className="text-text-subtle"
|
className="text-text-subtle"
|
||||||
size="2xs"
|
size="2xs"
|
||||||
title={`Copy ${label}`}
|
title={copyTitle}
|
||||||
iconSize="sm"
|
iconSize="sm"
|
||||||
/>
|
/>
|
||||||
) : null);
|
) : null);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useGitFileDiffForCommit, useGitLog, useGitMutations } from "@yaakapp-internal/git";
|
import { useGitFileDiffForCommit, useGitLog, useGitMutations } from "@yaakapp-internal/git";
|
||||||
import type { GitCommit } from "@yaakapp-internal/git";
|
import type { GitCommit } from "@yaakapp-internal/git";
|
||||||
import { InlineCode, SplitLayout } from "@yaakapp-internal/ui";
|
import { SplitLayout } from "@yaakapp-internal/ui";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import { formatDistanceToNowStrict } from "date-fns";
|
import { formatDistanceToNowStrict } from "date-fns";
|
||||||
import { useCallback, useEffect, useMemo, useState } from "react";
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import type {
|
|||||||
WebsocketRequest,
|
WebsocketRequest,
|
||||||
Workspace,
|
Workspace,
|
||||||
} from "@yaakapp-internal/models";
|
} from "@yaakapp-internal/models";
|
||||||
import { Banner, HStack, Icon, IconButton, InlineCode, SplitLayout } from "@yaakapp-internal/ui";
|
import { Banner, HStack, Icon, InlineCode, SplitLayout } from "@yaakapp-internal/ui";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import { useCallback, useMemo, useState } from "react";
|
import { useCallback, useMemo, useState } from "react";
|
||||||
import { modelToYaml } from "../../lib/diffYaml";
|
import { modelToYaml } from "../../lib/diffYaml";
|
||||||
|
|||||||
@@ -364,6 +364,8 @@ function TreeItem_<T extends { id: string }>({
|
|||||||
ref={handleEditFocus}
|
ref={handleEditFocus}
|
||||||
defaultValue={defaultValue}
|
defaultValue={defaultValue}
|
||||||
placeholder={placeholder}
|
placeholder={placeholder}
|
||||||
|
autoCapitalize="off"
|
||||||
|
autoCorrect="off"
|
||||||
className="bg-transparent outline-none w-full cursor-text"
|
className="bg-transparent outline-none w-full cursor-text"
|
||||||
onBlur={handleEditBlur}
|
onBlur={handleEditBlur}
|
||||||
onKeyDown={handleEditKeyDown}
|
onKeyDown={handleEditKeyDown}
|
||||||
|
|||||||
Reference in New Issue
Block a user