mirror of
https://github.com/gabehf/Koito.git
synced 2026-03-07 21:48:18 -08:00
QOL changes to client (#165)
This commit is contained in:
parent
e7ba34710c
commit
c59c6c3baa
4 changed files with 46 additions and 30 deletions
|
|
@ -19,7 +19,7 @@ interface Props {
|
|||
}
|
||||
|
||||
export default function MergeModal(props: Props) {
|
||||
const [query, setQuery] = useState("");
|
||||
const [query, setQuery] = useState(props.currentTitle);
|
||||
const [data, setData] = useState<SearchResponse>();
|
||||
const [debouncedQuery, setDebouncedQuery] = useState(query);
|
||||
const [mergeTarget, setMergeTarget] = useState<{ title: string; id: number }>(
|
||||
|
|
@ -101,11 +101,12 @@ export default function MergeModal(props: Props) {
|
|||
<input
|
||||
type="text"
|
||||
autoFocus
|
||||
defaultValue={props.currentTitle}
|
||||
// i find my stupid a(n) logic to be a little silly so im leaving it in even if its not optimal
|
||||
placeholder={`Search for a${
|
||||
props.type.toLowerCase()[0] === "a" ? "n" : ""
|
||||
} ${props.type.toLowerCase()} to be merged into the current ${props.type.toLowerCase()}`}
|
||||
placeholder={`Search for a${props.type.toLowerCase()[0] === "a" ? "n" : ""
|
||||
} ${props.type.toLowerCase()} to be merged into the current ${props.type.toLowerCase()}`}
|
||||
className="w-full mx-auto fg bg rounded p-2"
|
||||
onFocus={(e) => { setQuery(e.target.value); e.target.select()}}
|
||||
onChange={(e) => setQuery(e.target.value)}
|
||||
/>
|
||||
<SearchResults selectorMode data={data} onSelect={toggleSelect} />
|
||||
|
|
@ -128,7 +129,7 @@ export default function MergeModal(props: Props) {
|
|||
>
|
||||
Merge Items
|
||||
</button>
|
||||
<div className="flex gap-2 mt-3">
|
||||
<div className="flex items-center gap-2 mt-3">
|
||||
<input
|
||||
type="checkbox"
|
||||
name="reverse-merge-order"
|
||||
|
|
@ -139,7 +140,7 @@ export default function MergeModal(props: Props) {
|
|||
</div>
|
||||
{(props.type.toLowerCase() === "album" ||
|
||||
props.type.toLowerCase() === "artist") && (
|
||||
<div className="flex gap-2 mt-3">
|
||||
<div className="flex items-center gap-2 mt-3">
|
||||
<input
|
||||
type="checkbox"
|
||||
name="replace-image"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue