mirror of https://github.com/VERT-sh/VERT.git
parent
30bbb764ae
commit
d54094722f
|
|
@ -1,40 +1,28 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
type Props = {
|
import type { HTMLInputAttributes } from "svelte/elements";
|
||||||
class?: string;
|
|
||||||
placeholder?: string;
|
interface Props extends HTMLInputAttributes {
|
||||||
value?: string;
|
|
||||||
disabled?: boolean;
|
|
||||||
extension?: string;
|
extension?: string;
|
||||||
prefix?: string;
|
prefix?: string;
|
||||||
type?: string;
|
}
|
||||||
min?: number;
|
|
||||||
max?: number;
|
|
||||||
};
|
|
||||||
|
|
||||||
let {
|
let {
|
||||||
class: className,
|
class: className,
|
||||||
placeholder = "",
|
|
||||||
value = $bindable(),
|
value = $bindable(),
|
||||||
disabled = false,
|
disabled = false,
|
||||||
extension,
|
extension,
|
||||||
prefix,
|
prefix,
|
||||||
type = "text",
|
...rest
|
||||||
min = 0,
|
|
||||||
max = 100,
|
|
||||||
}: Props = $props();
|
}: Props = $props();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="relative flex w-full {className}">
|
<div class="relative flex w-full {className}">
|
||||||
<input
|
<input
|
||||||
{type}
|
{...rest}
|
||||||
{min}
|
|
||||||
{max}
|
|
||||||
bind:value
|
bind:value
|
||||||
{placeholder}
|
|
||||||
{disabled}
|
|
||||||
class="w-full p-3 rounded-lg bg-panel border-2 border-button
|
class="w-full p-3 rounded-lg bg-panel border-2 border-button
|
||||||
{prefix ? 'pl-[2rem]' : 'pl-3'}
|
{prefix ? 'pl-[2rem]' : 'pl-3'}
|
||||||
{extension ? 'pr-[4rem]' : 'pr-3'}
|
{extension ? 'pr-[4rem]' : 'pr-3'}
|
||||||
{disabled && 'opacity-50 cursor-not-allowed'}"
|
{disabled && 'opacity-50 cursor-not-allowed'}"
|
||||||
/>
|
/>
|
||||||
{#if prefix}
|
{#if prefix}
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
import { VertFile } from "$lib/types";
|
import { VertFile } from "$lib/types";
|
||||||
import Modal from "./Modal.svelte";
|
import Modal from "./Modal.svelte";
|
||||||
import Dropdown from "./Dropdown.svelte";
|
import Dropdown from "./Dropdown.svelte";
|
||||||
|
import FancyInput from "./FancyInput.svelte";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
categories: Categories;
|
categories: Categories;
|
||||||
|
|
@ -406,7 +407,7 @@
|
||||||
|
|
||||||
<div class="flex flex-col gap-2">
|
<div class="flex flex-col gap-2">
|
||||||
<p class="text-sm font-bold">Resolution</p>
|
<p class="text-sm font-bold">Resolution</p>
|
||||||
<input
|
<FancyInput
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="1920x1080 or smth"
|
placeholder="1920x1080 or smth"
|
||||||
class="rounded-lg bg-button text-foreground p-3"
|
class="rounded-lg bg-button text-foreground p-3"
|
||||||
|
|
@ -415,7 +416,7 @@
|
||||||
|
|
||||||
<div class="flex flex-col gap-2">
|
<div class="flex flex-col gap-2">
|
||||||
<p class="text-sm font-bold">Frame Rate (FPS)</p>
|
<p class="text-sm font-bold">Frame Rate (FPS)</p>
|
||||||
<input
|
<FancyInput
|
||||||
type="number"
|
type="number"
|
||||||
placeholder="30"
|
placeholder="30"
|
||||||
class="rounded-lg bg-button text-foreground p-3"
|
class="rounded-lg bg-button text-foreground p-3"
|
||||||
|
|
@ -498,7 +499,7 @@
|
||||||
<!-- search box -->
|
<!-- search box -->
|
||||||
<div class="p-3 w-full">
|
<div class="p-3 w-full">
|
||||||
<div class="relative">
|
<div class="relative">
|
||||||
<input
|
<FancyInput
|
||||||
type="text"
|
type="text"
|
||||||
placeholder={m["convert.dropdown.placeholder"]()}
|
placeholder={m["convert.dropdown.placeholder"]()}
|
||||||
class="flex-grow w-full !pl-11 !pr-3 rounded-lg bg-panel text-foreground"
|
class="flex-grow w-full !pl-11 !pr-3 rounded-lg bg-panel text-foreground"
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
import { m } from "$lib/paraglide/messages";
|
import { m } from "$lib/paraglide/messages";
|
||||||
import { link, sanitize } from "$lib/store/index.svelte";
|
import { link, sanitize } from "$lib/store/index.svelte";
|
||||||
import { VertdInstance, type VertdInner } from "./vertdSettings.svelte";
|
import { VertdInstance, type VertdInner } from "./vertdSettings.svelte";
|
||||||
|
import FancyInput from "$lib/components/functional/FancyInput.svelte";
|
||||||
|
|
||||||
let vertdCommit = $state<string | null>(null);
|
let vertdCommit = $state<string | null>(null);
|
||||||
let abortController: AbortController | null = null;
|
let abortController: AbortController | null = null;
|
||||||
|
|
@ -132,7 +133,7 @@
|
||||||
settingsStyle
|
settingsStyle
|
||||||
/>
|
/>
|
||||||
{#if VertdInstance.instance.innerData().type === "custom"}
|
{#if VertdInstance.instance.innerData().type === "custom"}
|
||||||
<input
|
<FancyInput
|
||||||
type="text"
|
type="text"
|
||||||
placeholder={m["settings.vertd.url_placeholder"]()}
|
placeholder={m["settings.vertd.url_placeholder"]()}
|
||||||
bind:value={settings.vertdURL}
|
bind:value={settings.vertdURL}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue