mirror of
https://github.com/modrinth/code.git
synced 2026-08-31 03:55:59 +00:00
refactor: StyledInput refactor -> Input components (#6733)
* feat: align style * feat: new input components * refactor: migrate to new input components * refactor: rename component * prepr * chore: group inputs like buttons * fix: lint * feat: docs * fix: lint * fix: bugs * prepr * fix slug + adjust create server project --------- Co-authored-by: Prospector <6166773+Prospector@users.noreply.github.com>
This commit is contained in:
@@ -48,7 +48,7 @@
|
||||
To confirm this transfer, type
|
||||
<span class="font-bold text-contrast">{{ organization.name }}</span> below
|
||||
</p>
|
||||
<StyledInput
|
||||
<Input
|
||||
v-model="confirmationText"
|
||||
:placeholder="`Enter ${organization.name}`"
|
||||
wrapper-class="w-full"
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { RightArrowIcon, TransferIcon, XIcon } from '@modrinth/assets'
|
||||
import { Admonition, Avatar, Button, NewModal, StyledInput } from '@modrinth/ui'
|
||||
import { Admonition, Avatar, Button, Input, NewModal } from '@modrinth/ui'
|
||||
import { computed, ref } from 'vue'
|
||||
|
||||
const props = defineProps<{
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
To confirm this transfer, type
|
||||
<span class="font-bold text-contrast">{{ project.name }}</span> below
|
||||
</p>
|
||||
<StyledInput
|
||||
<Input
|
||||
v-model="confirmationText"
|
||||
:placeholder="`Enter ${project.name}`"
|
||||
wrapper-class="w-full"
|
||||
@@ -79,7 +79,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { RightArrowIcon, TransferIcon, XIcon } from '@modrinth/assets'
|
||||
import { Admonition, Avatar, Button, NewModal, StyledInput } from '@modrinth/ui'
|
||||
import { Admonition, Avatar, Button, Input, NewModal } from '@modrinth/ui'
|
||||
import { computed, ref } from 'vue'
|
||||
|
||||
const props = defineProps<{
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<BookmarkIcon aria-hidden="true" :fill="saved ? 'currentColor' : 'none'" />
|
||||
</template>
|
||||
<template #panel>
|
||||
<StyledInput
|
||||
<Input
|
||||
v-model="displayCollectionsSearch"
|
||||
:placeholder="formatMessage(commonMessages.searchPlaceholder)"
|
||||
wrapper-class="menu-search"
|
||||
@@ -60,7 +60,7 @@ import {
|
||||
ButtonLink,
|
||||
Checkbox,
|
||||
commonMessages,
|
||||
StyledInput,
|
||||
Input,
|
||||
TeleportPopoutMenu,
|
||||
useVIntl,
|
||||
} from '@modrinth/ui'
|
||||
|
||||
@@ -6,9 +6,9 @@ import {
|
||||
Button,
|
||||
injectModrinthClient,
|
||||
injectNotificationManager,
|
||||
Input,
|
||||
NewModal,
|
||||
ServerNotice,
|
||||
StyledInput,
|
||||
TagItem,
|
||||
} from '@modrinth/ui'
|
||||
import { ref } from 'vue'
|
||||
@@ -175,7 +175,7 @@ defineExpose({ show, hide })
|
||||
<span v-else class="mb-2"> No nodes assigned yet </span>
|
||||
</div>
|
||||
<div class="flex w-[45rem] items-center gap-2">
|
||||
<StyledInput
|
||||
<Input
|
||||
id="server-assign-field"
|
||||
v-model="inputField"
|
||||
wrapper-class="w-full"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<label for="days" class="flex flex-col gap-1">
|
||||
<span class="text-lg font-semibold text-contrast"> Days to credit </span>
|
||||
</label>
|
||||
<StyledInput
|
||||
<Input
|
||||
id="days"
|
||||
v-model="days"
|
||||
wrapper-class="w-32"
|
||||
@@ -36,12 +36,7 @@
|
||||
<span class="text-lg font-semibold text-contrast"> Node hostnames </span>
|
||||
</label>
|
||||
<div class="flex items-center gap-2">
|
||||
<StyledInput
|
||||
id="node-input"
|
||||
v-model="nodeInput"
|
||||
wrapper-class="w-32"
|
||||
autocomplete="off"
|
||||
/>
|
||||
<Input id="node-input" v-model="nodeInput" wrapper-class="w-32" autocomplete="off" />
|
||||
<Button
|
||||
type="quiet"
|
||||
color="blue"
|
||||
@@ -95,13 +90,7 @@
|
||||
class="text-muted flex flex-col gap-2 rounded-lg border border-surface-5 bg-button-bg p-4"
|
||||
>
|
||||
<span>Hi {user.name},</span>
|
||||
<StyledInput
|
||||
id="message-batch"
|
||||
v-model="message"
|
||||
multiline
|
||||
:rows="3"
|
||||
input-class="!bg-surface-3"
|
||||
/>
|
||||
<Textarea id="message-batch" v-model="message" :rows="3" input-class="!bg-surface-3" />
|
||||
<span>
|
||||
To make up for it, we've added {{ days }} day{{ pluralize(days) }} to your Modrinth
|
||||
Servers subscription.
|
||||
@@ -134,9 +123,10 @@ import {
|
||||
Combobox,
|
||||
injectModrinthClient,
|
||||
injectNotificationManager,
|
||||
Input,
|
||||
NewModal,
|
||||
StyledInput,
|
||||
TagItem,
|
||||
Textarea,
|
||||
Toggle,
|
||||
} from '@modrinth/ui'
|
||||
import { DEFAULT_CREDIT_EMAIL_MESSAGE } from '@modrinth/utils/utils.ts'
|
||||
|
||||
@@ -25,10 +25,9 @@
|
||||
</span>
|
||||
<span>Server IDs (one per line or comma-separated.)</span>
|
||||
</label>
|
||||
<StyledInput
|
||||
<Textarea
|
||||
id="server-ids"
|
||||
v-model="serverIdsInput"
|
||||
multiline
|
||||
:rows="4"
|
||||
input-class="bg-surface-3"
|
||||
placeholder="123e4569-e89b-12d3-a456-426614174005 123e9569-e89b-12d3-a456-413678919876"
|
||||
@@ -48,7 +47,7 @@
|
||||
<span>Add nodes to transfer (comma or space-separated).</span>
|
||||
</label>
|
||||
<div class="flex items-center gap-2">
|
||||
<StyledInput
|
||||
<Input
|
||||
id="node-input"
|
||||
v-model="nodeInput"
|
||||
wrapper-class="w-64"
|
||||
@@ -89,7 +88,7 @@
|
||||
<span class="text-lg font-semibold text-contrast">Tag transferred nodes</span>
|
||||
<span>Optional tag to add to the transferred nodes.</span>
|
||||
</label>
|
||||
<StyledInput
|
||||
<Input
|
||||
id="tag-nodes"
|
||||
v-model="tagNodes"
|
||||
wrapper-class="max-w-[12rem]"
|
||||
@@ -117,7 +116,7 @@
|
||||
<span>Optional preferred node tags for node selection.</span>
|
||||
</label>
|
||||
<div class="flex items-center gap-2">
|
||||
<StyledInput
|
||||
<Input
|
||||
id="tag-input"
|
||||
v-model="tagInput"
|
||||
wrapper-class="w-40"
|
||||
@@ -153,7 +152,7 @@
|
||||
:format-label="(item) => scheduleOptionLabels[item]"
|
||||
:capitalize="false"
|
||||
/>
|
||||
<StyledInput
|
||||
<DateInput
|
||||
v-if="scheduleOption === 'later'"
|
||||
v-model="scheduledDate"
|
||||
type="datetime-local"
|
||||
@@ -170,10 +169,9 @@
|
||||
</span>
|
||||
<span>Provide a reason for this transfer batch.</span>
|
||||
</label>
|
||||
<StyledInput
|
||||
<Textarea
|
||||
id="reason"
|
||||
v-model="reason"
|
||||
multiline
|
||||
:rows="2"
|
||||
input-class="bg-surface-3"
|
||||
placeholder="Node maintenance scheduled"
|
||||
@@ -205,11 +203,13 @@ import {
|
||||
Button,
|
||||
Chips,
|
||||
Combobox,
|
||||
DateInput,
|
||||
injectModrinthClient,
|
||||
injectNotificationManager,
|
||||
Input,
|
||||
NewModal,
|
||||
StyledInput,
|
||||
TagItem,
|
||||
Textarea,
|
||||
Toggle,
|
||||
} from '@modrinth/ui'
|
||||
import dayjs from 'dayjs'
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<label class="text-md font-semibold text-contrast" for="create-account-username">
|
||||
{{ formatMessage(messages.usernameOptionalLabel) }}
|
||||
</label>
|
||||
<StyledInput
|
||||
<Input
|
||||
id="create-account-username"
|
||||
v-model="usernameModel"
|
||||
type="text"
|
||||
@@ -106,7 +106,7 @@ import {
|
||||
DatePicker,
|
||||
defineMessages,
|
||||
injectNotificationManager,
|
||||
StyledInput,
|
||||
Input,
|
||||
useVIntl,
|
||||
} from '@modrinth/ui'
|
||||
import { computed, ref } from 'vue'
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
<div class="text-md font-semibold text-contrast">
|
||||
{{ formatMessage(messages.passkeyNameLabel) }}
|
||||
</div>
|
||||
<StyledInput
|
||||
<Input
|
||||
id="passkey-name"
|
||||
v-model="pendingPasskeyName"
|
||||
:maxlength="255"
|
||||
@@ -145,7 +145,7 @@
|
||||
<div class="text-md font-semibold text-contrast">
|
||||
{{ formatMessage(messages.passkeyNameLabel) }}
|
||||
</div>
|
||||
<StyledInput
|
||||
<Input
|
||||
id="passkey-rename"
|
||||
v-model="passkeyToRenameName"
|
||||
:maxlength="255"
|
||||
@@ -210,8 +210,8 @@ import {
|
||||
IconButton,
|
||||
injectModrinthClient,
|
||||
injectNotificationManager,
|
||||
Input,
|
||||
NewModal,
|
||||
StyledInput,
|
||||
useFormatDateTime,
|
||||
useRelativeTime,
|
||||
useVIntl,
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
{{ formatMessage(messages.twoFactorCodeLabelDescription) }}
|
||||
</span>
|
||||
</label>
|
||||
<StyledInput
|
||||
<Input
|
||||
id="two-factor-code"
|
||||
v-model="twoFactorCodeModel"
|
||||
:maxlength="11"
|
||||
@@ -91,7 +91,7 @@
|
||||
|
||||
<section class="mx-auto flex w-full flex-col gap-2.5">
|
||||
<label for="email" hidden>{{ formatMessage(commonMessages.emailUsernameLabel) }}</label>
|
||||
<StyledInput
|
||||
<Input
|
||||
id="email"
|
||||
v-model="emailModel"
|
||||
:icon="MailIcon"
|
||||
@@ -103,7 +103,7 @@
|
||||
/>
|
||||
|
||||
<label for="password" hidden>{{ formatMessage(commonMessages.passwordLabel) }}</label>
|
||||
<StyledInput
|
||||
<Input
|
||||
id="password"
|
||||
v-model="passwordModel"
|
||||
:icon="KeyIcon"
|
||||
@@ -169,14 +169,7 @@ import {
|
||||
SteamColorIcon,
|
||||
UserKeyIcon,
|
||||
} from '@modrinth/assets'
|
||||
import {
|
||||
Button,
|
||||
ButtonLink,
|
||||
commonMessages,
|
||||
defineMessages,
|
||||
StyledInput,
|
||||
useVIntl,
|
||||
} from '@modrinth/ui'
|
||||
import { Button, ButtonLink, commonMessages, defineMessages, Input, useVIntl } from '@modrinth/ui'
|
||||
import { useStorage } from '@vueuse/core'
|
||||
import { computed } from 'vue'
|
||||
import type { LocationQuery } from 'vue-router'
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
<section class="flex flex-col gap-2.5">
|
||||
<label for="email" hidden>{{ formatMessage(commonMessages.emailLabel) }}</label>
|
||||
<StyledInput
|
||||
<Input
|
||||
id="email"
|
||||
v-model="emailModel"
|
||||
:icon="MailIcon"
|
||||
@@ -77,7 +77,7 @@
|
||||
/>
|
||||
|
||||
<label for="password" hidden>{{ formatMessage(commonMessages.passwordLabel) }}</label>
|
||||
<StyledInput
|
||||
<Input
|
||||
id="password"
|
||||
v-model="passwordModel"
|
||||
:icon="KeyIcon"
|
||||
@@ -145,8 +145,8 @@ import {
|
||||
ButtonLink,
|
||||
commonMessages,
|
||||
defineMessages,
|
||||
Input,
|
||||
IntlFormatted,
|
||||
StyledInput,
|
||||
useVIntl,
|
||||
} from '@modrinth/ui'
|
||||
import { useStorage } from '@vueuse/core'
|
||||
|
||||
+2
-2
@@ -13,7 +13,7 @@
|
||||
size="small"
|
||||
/>
|
||||
</div>
|
||||
<StyledInput
|
||||
<Input
|
||||
v-model="searchQuery"
|
||||
:icon="SearchIcon"
|
||||
type="text"
|
||||
@@ -92,7 +92,7 @@
|
||||
<script lang="ts" setup>
|
||||
import type { Labrinth } from '@modrinth/api-client'
|
||||
import { SearchIcon } from '@modrinth/assets'
|
||||
import { Button, Chips, StyledInput } from '@modrinth/ui'
|
||||
import { Button, Chips, Input } from '@modrinth/ui'
|
||||
import { useMagicKeys } from '@vueuse/core'
|
||||
import { computed, nextTick, onMounted, ref } from 'vue'
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<span class="font-semibold text-contrast">
|
||||
{{ formatMessage(messages.versionNumber) }} <span class="text-red">*</span>
|
||||
</span>
|
||||
<StyledInput
|
||||
<Input
|
||||
id="version-number"
|
||||
v-model="draftVersion.version_number"
|
||||
:disabled="isUploading"
|
||||
@@ -36,7 +36,7 @@
|
||||
</div>
|
||||
<div class="flex flex-col gap-2">
|
||||
<span class="font-semibold text-contrast">{{ formatMessage(messages.versionSubtitle) }}</span>
|
||||
<StyledInput
|
||||
<Input
|
||||
id="version-number"
|
||||
v-model="draftVersion.name"
|
||||
:placeholder="formatMessage(messages.versionSubtitlePlaceholder)"
|
||||
@@ -66,8 +66,8 @@
|
||||
import {
|
||||
Chips,
|
||||
defineMessages,
|
||||
Input,
|
||||
MarkdownEditor,
|
||||
StyledInput,
|
||||
Tabs,
|
||||
type TabsTab,
|
||||
useVIntl,
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<span class="text-brand-red">*</span>
|
||||
</span>
|
||||
</label>
|
||||
<StyledInput
|
||||
<Input
|
||||
id="name"
|
||||
v-model="name"
|
||||
:maxlength="64"
|
||||
@@ -25,10 +25,9 @@
|
||||
}}</span>
|
||||
<span>{{ formatMessage(messages.summaryDescription) }}</span>
|
||||
</label>
|
||||
<StyledInput
|
||||
<Textarea
|
||||
id="additional-information"
|
||||
v-model="description"
|
||||
multiline
|
||||
:maxlength="256"
|
||||
:placeholder="formatMessage(messages.summaryPlaceholder)"
|
||||
:disabled="hasHitLimit"
|
||||
@@ -57,8 +56,9 @@ import {
|
||||
commonMessages,
|
||||
defineMessages,
|
||||
injectNotificationManager,
|
||||
Input,
|
||||
NewModal,
|
||||
StyledInput,
|
||||
Textarea,
|
||||
useVIntl,
|
||||
} from '@modrinth/ui'
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<span class="text-brand-red">*</span>
|
||||
</span>
|
||||
</label>
|
||||
<StyledInput
|
||||
<Input
|
||||
id="name"
|
||||
v-model="name"
|
||||
:maxlength="64"
|
||||
@@ -28,7 +28,7 @@
|
||||
</label>
|
||||
<div class="text-input-wrapper">
|
||||
<div class="text-input-wrapper__before">https://modrinth.com/organization/</div>
|
||||
<StyledInput
|
||||
<Input
|
||||
id="slug"
|
||||
v-model="slug"
|
||||
:maxlength="64"
|
||||
@@ -46,10 +46,9 @@
|
||||
</span>
|
||||
<span>{{ formatMessage(messages.summaryDescription) }}</span>
|
||||
</label>
|
||||
<StyledInput
|
||||
<Textarea
|
||||
id="additional-information"
|
||||
v-model="description"
|
||||
multiline
|
||||
:maxlength="256"
|
||||
:placeholder="formatMessage(messages.summaryPlaceholder)"
|
||||
:disabled="hasHitLimit"
|
||||
@@ -79,8 +78,9 @@ import {
|
||||
commonMessages,
|
||||
defineMessages,
|
||||
injectNotificationManager,
|
||||
Input,
|
||||
NewModal,
|
||||
StyledInput,
|
||||
Textarea,
|
||||
useVIntl,
|
||||
} from '@modrinth/ui'
|
||||
import { ref } from 'vue'
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
{{ formatMessage(messages.nameLabel) }}
|
||||
</span>
|
||||
</label>
|
||||
<StyledInput
|
||||
<Input
|
||||
id="name"
|
||||
v-model="name"
|
||||
:maxlength="64"
|
||||
@@ -46,19 +46,18 @@
|
||||
<span class="text-md font-semibold text-contrast">
|
||||
{{ formatMessage(messages.urlLabel) }}
|
||||
</span>
|
||||
<div class="text-input-wrapper !w-full">
|
||||
<div class="text-input-wrapper__before">https://modrinth.com/project/</div>
|
||||
<StyledInput
|
||||
id="slug"
|
||||
v-model="slug"
|
||||
:maxlength="64"
|
||||
class="w-full"
|
||||
type="text"
|
||||
autocomplete="off"
|
||||
:disabled="hasHitLimit"
|
||||
@update:model-value="manualSlug = true"
|
||||
/>
|
||||
</div>
|
||||
<Input
|
||||
id="slug"
|
||||
v-model="slug"
|
||||
:maxlength="64"
|
||||
class="w-full"
|
||||
type="text"
|
||||
autocomplete="off"
|
||||
:disabled="hasHitLimit"
|
||||
@update:model-value="manualSlug = true"
|
||||
>
|
||||
<template #prefix>https://modrinth.com/project/</template>
|
||||
</Input>
|
||||
</label>
|
||||
<div class="flex flex-col gap-2.5">
|
||||
<label for="owner">
|
||||
@@ -100,10 +99,9 @@
|
||||
{{ formatMessage(messages.summaryLabel) }}
|
||||
</span>
|
||||
</label>
|
||||
<StyledInput
|
||||
<Textarea
|
||||
id="additional-information"
|
||||
v-model="description"
|
||||
multiline
|
||||
:maxlength="256"
|
||||
:placeholder="formatMessage(messages.summaryPlaceholder)"
|
||||
:disabled="hasHitLimit"
|
||||
@@ -142,8 +140,9 @@ import {
|
||||
defineMessages,
|
||||
injectModrinthClient,
|
||||
injectNotificationManager,
|
||||
Input,
|
||||
NewModal,
|
||||
StyledInput,
|
||||
Textarea,
|
||||
useVIntl,
|
||||
} from '@modrinth/ui'
|
||||
import { computed, defineAsyncComponent, h } from 'vue'
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="flex flex-col gap-2">
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="relative flex-1">
|
||||
<StyledInput
|
||||
<Input
|
||||
ref="amountInput"
|
||||
:model-value="modelValue"
|
||||
type="number"
|
||||
@@ -12,7 +12,7 @@
|
||||
:disabled="isDisabled"
|
||||
:placeholder="formatMessage(formFieldPlaceholders.amountPlaceholder)"
|
||||
wrapper-class="w-full"
|
||||
@update:model-value="handleStyledInput"
|
||||
@update:model-value="handleInput"
|
||||
/>
|
||||
</div>
|
||||
<Combobox
|
||||
@@ -52,7 +52,7 @@ import {
|
||||
Combobox,
|
||||
commonMessages,
|
||||
formFieldPlaceholders,
|
||||
StyledInput,
|
||||
Input,
|
||||
useFormatMoney,
|
||||
useVIntl,
|
||||
} from '@modrinth/ui'
|
||||
@@ -81,7 +81,7 @@ const emit = defineEmits<{
|
||||
|
||||
const { formatMessage } = useVIntl()
|
||||
const formatMoney = useFormatMoney()
|
||||
const amountInput = ref<InstanceType<typeof StyledInput> | null>(null)
|
||||
const amountInput = ref<InstanceType<typeof Input> | null>(null)
|
||||
|
||||
const safeMaxAmount = computed(() => {
|
||||
return Math.max(0, props.maxAmount)
|
||||
@@ -106,7 +106,7 @@ function setMaxAmount() {
|
||||
emit('update:modelValue', maxValue)
|
||||
}
|
||||
|
||||
function handleStyledInput(val: string | number) {
|
||||
function handleInput(val: string | number) {
|
||||
const value = String(val)
|
||||
|
||||
if (value && value.includes('.')) {
|
||||
|
||||
+2
-2
@@ -42,7 +42,7 @@
|
||||
>
|
||||
</label>
|
||||
<div class="flex flex-row gap-2">
|
||||
<StyledInput
|
||||
<Input
|
||||
v-model="venmoHandle"
|
||||
:placeholder="formatMessage(messages.venmoHandlePlaceholder)"
|
||||
wrapper-class="w-full"
|
||||
@@ -112,9 +112,9 @@ import {
|
||||
defineMessages,
|
||||
financialMessages,
|
||||
formFieldLabels,
|
||||
Input,
|
||||
IntlFormatted,
|
||||
normalizeChildren,
|
||||
StyledInput,
|
||||
useVIntl,
|
||||
} from '@modrinth/ui'
|
||||
import { useDebounceFn } from '@vueuse/core'
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
</span>
|
||||
<div class="flex flex-col gap-3 sm:flex-row sm:gap-4">
|
||||
<div class="flex flex-1 flex-col gap-2.5">
|
||||
<StyledInput
|
||||
<Input
|
||||
v-model="formData.bankAccountOwnerFirstName"
|
||||
:placeholder="formatMessage(formFieldPlaceholders.firstNamePlaceholder)"
|
||||
autocomplete="given-name"
|
||||
@@ -64,7 +64,7 @@
|
||||
/>
|
||||
</div>
|
||||
<div class="flex flex-1 flex-col gap-2.5">
|
||||
<StyledInput
|
||||
<Input
|
||||
v-model="formData.bankAccountOwnerLastName"
|
||||
:placeholder="formatMessage(formFieldPlaceholders.lastNamePlaceholder)"
|
||||
autocomplete="family-name"
|
||||
@@ -91,7 +91,7 @@
|
||||
class="h-10"
|
||||
/>
|
||||
|
||||
<StyledInput
|
||||
<Input
|
||||
v-else
|
||||
v-model="formData.bankName"
|
||||
:placeholder="formatMessage(formFieldPlaceholders.bankNamePlaceholder)"
|
||||
@@ -108,7 +108,7 @@
|
||||
</span>
|
||||
</label>
|
||||
|
||||
<StyledInput
|
||||
<Input
|
||||
v-if="['text', 'email', 'tel'].includes(field.type)"
|
||||
v-model="formData[field.name]"
|
||||
:type="field.type === 'tel' ? undefined : field.type === 'text' ? undefined : field.type"
|
||||
@@ -158,7 +158,7 @@
|
||||
<span v-if="dynamicDocumentNumberField.required" class="text-red">*</span>
|
||||
</span>
|
||||
</label>
|
||||
<StyledInput
|
||||
<Input
|
||||
v-model="formData.documentNumber"
|
||||
:placeholder="dynamicDocumentNumberField.placeholder"
|
||||
autocomplete="off"
|
||||
@@ -238,9 +238,9 @@ import {
|
||||
getBlockchainIcon,
|
||||
getCurrencyColor,
|
||||
getCurrencyIcon,
|
||||
Input,
|
||||
IntlFormatted,
|
||||
normalizeChildren,
|
||||
StyledInput,
|
||||
useVIntl,
|
||||
} from '@modrinth/ui'
|
||||
import { useDebounceFn } from '@vueuse/core'
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<span class="text-red">*</span>
|
||||
</span>
|
||||
</label>
|
||||
<StyledInput
|
||||
<Input
|
||||
v-model="formData.businessName"
|
||||
:placeholder="formatMessage(formFieldPlaceholders.businessNamePlaceholder)"
|
||||
autocomplete="organization"
|
||||
@@ -47,7 +47,7 @@
|
||||
<span class="text-red">*</span>
|
||||
</span>
|
||||
</label>
|
||||
<StyledInput
|
||||
<Input
|
||||
v-model="formData.email"
|
||||
type="email"
|
||||
:placeholder="formatMessage(formFieldPlaceholders.emailPlaceholder)"
|
||||
@@ -65,7 +65,7 @@
|
||||
<span class="text-red">*</span>
|
||||
</span>
|
||||
</label>
|
||||
<StyledInput
|
||||
<Input
|
||||
v-model="formData.firstName"
|
||||
:placeholder="formatMessage(formFieldPlaceholders.firstNamePlaceholder)"
|
||||
autocomplete="given-name"
|
||||
@@ -79,7 +79,7 @@
|
||||
<span class="text-red">*</span>
|
||||
</span>
|
||||
</label>
|
||||
<StyledInput
|
||||
<Input
|
||||
v-model="formData.lastName"
|
||||
:placeholder="formatMessage(formFieldPlaceholders.lastNamePlaceholder)"
|
||||
autocomplete="family-name"
|
||||
@@ -112,7 +112,7 @@
|
||||
<span class="text-red">*</span>
|
||||
</span>
|
||||
</label>
|
||||
<StyledInput
|
||||
<Input
|
||||
v-model="formData.physicalAddress.address1"
|
||||
:placeholder="formatMessage(formFieldPlaceholders.addressPlaceholder)"
|
||||
autocomplete="address-line1"
|
||||
@@ -126,7 +126,7 @@
|
||||
{{ formatMessage(formFieldLabels.addressLine2) }}
|
||||
</span>
|
||||
</label>
|
||||
<StyledInput
|
||||
<Input
|
||||
v-model="formData.physicalAddress.address2"
|
||||
:placeholder="formatMessage(formFieldPlaceholders.address2Placeholder)"
|
||||
autocomplete="address-line2"
|
||||
@@ -142,7 +142,7 @@
|
||||
<span class="text-red">*</span>
|
||||
</span>
|
||||
</label>
|
||||
<StyledInput
|
||||
<Input
|
||||
v-model="formData.physicalAddress.city"
|
||||
:placeholder="formatMessage(formFieldPlaceholders.cityPlaceholder)"
|
||||
autocomplete="address-level2"
|
||||
@@ -164,7 +164,7 @@
|
||||
searchable
|
||||
:search-placeholder="formatMessage(messages.searchSubdivisionsPlaceholder)"
|
||||
/>
|
||||
<StyledInput
|
||||
<Input
|
||||
v-else
|
||||
v-model="formData.physicalAddress.state"
|
||||
:placeholder="formatMessage(formFieldPlaceholders.statePlaceholder)"
|
||||
@@ -182,7 +182,7 @@
|
||||
<span class="text-red">*</span>
|
||||
</span>
|
||||
</label>
|
||||
<StyledInput
|
||||
<Input
|
||||
v-model="formData.physicalAddress.zip"
|
||||
:placeholder="formatMessage(formFieldPlaceholders.postalCodePlaceholder)"
|
||||
autocomplete="postal-code"
|
||||
@@ -217,7 +217,7 @@ import {
|
||||
defineMessages,
|
||||
formFieldLabels,
|
||||
formFieldPlaceholders,
|
||||
StyledInput,
|
||||
Input,
|
||||
useVIntl,
|
||||
} from '@modrinth/ui'
|
||||
// TODO: Switch to using Muralpay's improved endpoint when it's available.
|
||||
|
||||
+3
-3
@@ -39,7 +39,7 @@
|
||||
>{{ formatMessage(formFieldLabels.email) }} <span class="text-red">*</span></span
|
||||
>
|
||||
</label>
|
||||
<StyledInput
|
||||
<Input
|
||||
v-model="deliveryEmail"
|
||||
type="email"
|
||||
:placeholder="formatMessage(formFieldPlaceholders.emailPlaceholder)"
|
||||
@@ -131,7 +131,7 @@
|
||||
|
||||
<div v-if="showGiftCardSelector && useFixedDenominations" class="flex flex-col gap-2.5">
|
||||
<template v-if="useDenominationSuggestions">
|
||||
<StyledInput
|
||||
<Input
|
||||
v-model="denominationSearchInput"
|
||||
type="number"
|
||||
:icon="SearchIcon"
|
||||
@@ -321,10 +321,10 @@ import {
|
||||
financialMessages,
|
||||
formFieldLabels,
|
||||
formFieldPlaceholders,
|
||||
Input,
|
||||
IntlFormatted,
|
||||
normalizeChildren,
|
||||
paymentMethodMessages,
|
||||
StyledInput,
|
||||
useDebugLogger,
|
||||
useFormatMoney,
|
||||
useVIntl,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<form class="flex flex-col gap-2 sm:flex-row" @submit.prevent="executeSearch">
|
||||
<StyledInput
|
||||
<Input
|
||||
v-model="query"
|
||||
:icon="SearchIcon"
|
||||
type="text"
|
||||
@@ -126,8 +126,8 @@ import {
|
||||
EmptyState,
|
||||
injectModrinthClient,
|
||||
injectNotificationManager,
|
||||
Input,
|
||||
Pagination,
|
||||
StyledInput,
|
||||
} from '@modrinth/ui'
|
||||
|
||||
import GlobalDetailLocalTraceCard from '~/components/ui/moderation/GlobalDetailLocalTraceCard.vue'
|
||||
|
||||
@@ -249,10 +249,9 @@
|
||||
:heading-buttons="false"
|
||||
:on-image-upload="onUploadHandler"
|
||||
/>
|
||||
<StyledInput
|
||||
<Textarea
|
||||
v-else
|
||||
v-model="messageText"
|
||||
multiline
|
||||
placeholder="No message generated."
|
||||
autocomplete="off"
|
||||
input-class="h-[400px] font-mono"
|
||||
@@ -456,8 +455,8 @@ import {
|
||||
injectNotificationManager,
|
||||
injectProjectPageContext,
|
||||
MarkdownEditor,
|
||||
StyledInput,
|
||||
TeleportOverflowMenu,
|
||||
Textarea,
|
||||
useDebugLogger,
|
||||
} from '@modrinth/ui'
|
||||
import type { ProjectStatus } from '@modrinth/utils'
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<label for="proof">
|
||||
<span class="label__title">Proof</span>
|
||||
</label>
|
||||
<StyledInput
|
||||
<Input
|
||||
id="proof"
|
||||
v-model="(modPackData[currentIndex] as ModerationUnknownModpackItem).proof"
|
||||
autocomplete="off"
|
||||
@@ -58,7 +58,7 @@
|
||||
<label for="link">
|
||||
<span class="label__title">Link</span>
|
||||
</label>
|
||||
<StyledInput
|
||||
<Input
|
||||
id="link"
|
||||
v-model="(modPackData[currentIndex] as ModerationUnknownModpackItem).url"
|
||||
autocomplete="off"
|
||||
@@ -68,7 +68,7 @@
|
||||
<label for="title">
|
||||
<span class="label__title">Title</span>
|
||||
</label>
|
||||
<StyledInput
|
||||
<Input
|
||||
id="title"
|
||||
v-model="(modPackData[currentIndex] as ModerationUnknownModpackItem).title"
|
||||
autocomplete="off"
|
||||
@@ -189,7 +189,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { LeftArrowIcon, RightArrowIcon } from '@modrinth/assets'
|
||||
import { Button, StyledInput } from '@modrinth/ui'
|
||||
import { Button, Input } from '@modrinth/ui'
|
||||
import type {
|
||||
ModerationFlameModpackItem,
|
||||
ModerationJudgements,
|
||||
|
||||
+2
-3
@@ -6,7 +6,7 @@ import {
|
||||
IntlFormatted,
|
||||
normalizeChildren,
|
||||
SettingsFormGroup,
|
||||
StyledInput,
|
||||
Textarea,
|
||||
useVIntl,
|
||||
} from '@modrinth/ui'
|
||||
|
||||
@@ -71,10 +71,9 @@ const messages = defineMessages({
|
||||
:title="formatMessage(commonMessages.explanationLabel)"
|
||||
title-for="advertising-disclosure-note"
|
||||
>
|
||||
<StyledInput
|
||||
<Textarea
|
||||
id="advertising-disclosure-note"
|
||||
v-model="model.note"
|
||||
multiline
|
||||
:rows="3"
|
||||
class="max-w-[40rem]"
|
||||
:disabled="disabled"
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
IntlFormatted,
|
||||
normalizeChildren,
|
||||
SettingsFormGroup,
|
||||
StyledInput,
|
||||
Textarea,
|
||||
useVIntl,
|
||||
} from '@modrinth/ui'
|
||||
|
||||
@@ -110,10 +110,9 @@ function setUse(use: AiUsage, enabled: boolean) {
|
||||
title-for="ai-disclosure-note"
|
||||
optional
|
||||
>
|
||||
<StyledInput
|
||||
<Textarea
|
||||
id="ai-disclosure-note"
|
||||
v-model="model.note"
|
||||
multiline
|
||||
:rows="3"
|
||||
class="max-w-[40rem]"
|
||||
:disabled="disabled"
|
||||
|
||||
+2
-3
@@ -5,7 +5,7 @@ import {
|
||||
commonMessages,
|
||||
defineMessages,
|
||||
SettingsFormGroup,
|
||||
StyledInput,
|
||||
Textarea,
|
||||
useVIntl,
|
||||
} from '@modrinth/ui'
|
||||
|
||||
@@ -68,10 +68,9 @@ const messages = defineMessages({
|
||||
title-for="archived-disclosure-note"
|
||||
optional
|
||||
>
|
||||
<StyledInput
|
||||
<Textarea
|
||||
id="archived-disclosure-note"
|
||||
v-model="model.note"
|
||||
multiline
|
||||
:rows="3"
|
||||
class="max-w-[40rem]"
|
||||
:disabled="disabled"
|
||||
|
||||
+5
-5
@@ -4,8 +4,9 @@ import {
|
||||
Button,
|
||||
commonMessages,
|
||||
defineMessages,
|
||||
Input,
|
||||
SettingsFormGroup,
|
||||
StyledInput,
|
||||
Textarea,
|
||||
useVIntl,
|
||||
} from '@modrinth/ui'
|
||||
import { watch } from 'vue'
|
||||
@@ -131,7 +132,7 @@ function setOptionalField(
|
||||
:title-for="`derivative-name-${index}`"
|
||||
class="max-w-[40rem]"
|
||||
>
|
||||
<StyledInput
|
||||
<Input
|
||||
:id="`derivative-name-${index}`"
|
||||
:model-value="source.label"
|
||||
:disabled="disabled"
|
||||
@@ -146,7 +147,7 @@ function setOptionalField(
|
||||
:title-for="`derivative-link-${index}`"
|
||||
class="max-w-[40rem]"
|
||||
>
|
||||
<StyledInput
|
||||
<Input
|
||||
:id="`derivative-link-${index}`"
|
||||
:model-value="source.link ?? undefined"
|
||||
type="url"
|
||||
@@ -160,10 +161,9 @@ function setOptionalField(
|
||||
:title-for="`derivative-note-${index}`"
|
||||
class="max-w-[40rem]"
|
||||
>
|
||||
<StyledInput
|
||||
<Textarea
|
||||
:id="`derivative-note-${index}`"
|
||||
:model-value="source.note ?? undefined"
|
||||
multiline
|
||||
:rows="3"
|
||||
:disabled="disabled"
|
||||
@update:model-value="(value) => setOptionalField(index, 'note', value)"
|
||||
|
||||
+2
-2
@@ -5,8 +5,8 @@ import {
|
||||
commonMessages,
|
||||
defineMessages,
|
||||
IconButton,
|
||||
Input,
|
||||
SettingsFormGroup,
|
||||
StyledInput,
|
||||
useVIntl,
|
||||
} from '@modrinth/ui'
|
||||
import { watch } from 'vue'
|
||||
@@ -75,7 +75,7 @@ function removeFeature(index: number) {
|
||||
<template #expanded>
|
||||
<SettingsFormGroup :title="formatMessage(messages.featuresDescription)">
|
||||
<div v-for="(_, index) in model.features" :key="index" class="flex items-center gap-2">
|
||||
<StyledInput
|
||||
<Input
|
||||
v-model="model.features[index]"
|
||||
class="min-w-0 flex-1"
|
||||
:disabled="disabled"
|
||||
|
||||
+2
-9
@@ -1,12 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { EyeIcon } from '@modrinth/assets'
|
||||
import {
|
||||
commonMessages,
|
||||
defineMessages,
|
||||
SettingsFormGroup,
|
||||
StyledInput,
|
||||
useVIntl,
|
||||
} from '@modrinth/ui'
|
||||
import { commonMessages, defineMessages, SettingsFormGroup, Textarea, useVIntl } from '@modrinth/ui'
|
||||
|
||||
import DisclosureToggleCard from './DisclosureToggleCard.vue'
|
||||
import type { DisclosureCardMetaProps, DisclosureLockStatus, NoteDisclosure } from './types'
|
||||
@@ -53,10 +47,9 @@ const messages = defineMessages({
|
||||
:title="formatMessage(commonMessages.explanationLabel)"
|
||||
title-for="photosensitivity-disclosure-note"
|
||||
>
|
||||
<StyledInput
|
||||
<Textarea
|
||||
id="photosensitivity-disclosure-note"
|
||||
v-model="model.note"
|
||||
multiline
|
||||
:rows="3"
|
||||
class="max-w-[40rem]"
|
||||
:disabled="disabled"
|
||||
|
||||
+2
-3
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { CircuitBoardIcon } from '@modrinth/assets'
|
||||
import { defineMessages, SettingsFormGroup, StyledInput, useVIntl } from '@modrinth/ui'
|
||||
import { defineMessages, SettingsFormGroup, Textarea, useVIntl } from '@modrinth/ui'
|
||||
|
||||
import DisclosureToggleCard from './DisclosureToggleCard.vue'
|
||||
import type {
|
||||
@@ -54,10 +54,9 @@ const messages = defineMessages({
|
||||
:title="formatMessage(messages.noteLabel)"
|
||||
title-for="system-interactions-disclosure-note"
|
||||
>
|
||||
<StyledInput
|
||||
<Textarea
|
||||
id="system-interactions-disclosure-note"
|
||||
v-model="model.note"
|
||||
multiline
|
||||
:rows="3"
|
||||
class="max-w-[40rem]"
|
||||
:disabled="disabled"
|
||||
|
||||
+2
-2
@@ -7,8 +7,8 @@ import {
|
||||
defineMessages,
|
||||
disclosureTelemetryConsentMessages,
|
||||
IconButton,
|
||||
Input,
|
||||
SettingsFormGroup,
|
||||
StyledInput,
|
||||
useVIntl,
|
||||
} from '@modrinth/ui'
|
||||
import { watch } from 'vue'
|
||||
@@ -107,7 +107,7 @@ function removeEntry(index: number) {
|
||||
:description="formatMessage(messages.dataDescription)"
|
||||
>
|
||||
<div v-for="(_, index) in model.entries" :key="index" class="flex items-center gap-2">
|
||||
<StyledInput
|
||||
<Input
|
||||
v-model="model.entries[index]"
|
||||
class="min-w-0 flex-1"
|
||||
:disabled="disabled"
|
||||
|
||||
Reference in New Issue
Block a user