Skip to content

Commit

Permalink
省略されていたtype="text"を追加
Browse files Browse the repository at this point in the history
  • Loading branch information
takejohn committed Jan 26, 2025
1 parent 716dee2 commit 42fcdaa
Show file tree
Hide file tree
Showing 43 changed files with 88 additions and 89 deletions.
4 changes: 2 additions & 2 deletions packages/frontend/src/components/MkAntennaEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkSpacer :contentMax="700">
<div>
<div class="_gaps_m">
<MkInput v-model="name">
<MkInput v-model="name" type="text">
<template #label>{{ i18n.ts.name }}</template>
</MkInput>
<MkSelect v-model="src">
Expand Down Expand Up @@ -53,6 +53,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<script lang="ts" setup>
import { watch, ref } from 'vue';
import * as Misskey from 'misskey-js';
import type { DeepPartial } from '@/scripts/merge.js';
import MkButton from '@/components/MkButton.vue';
import MkInput from '@/components/MkInput.vue';
import MkTextarea from '@/components/MkTextarea.vue';
Expand All @@ -62,7 +63,6 @@ import * as os from '@/os.js';
import { misskeyApi } from '@/scripts/misskey-api.js';
import { i18n } from '@/i18n.js';
import { deepMerge } from '@/scripts/merge.js';
import type { DeepPartial } from '@/scripts/merge.js';

type PartialAllowedAntenna = Omit<Misskey.entities.Antenna, 'id' | 'createdAt' | 'updatedAt'> & {
id?: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/components/MkAsUi.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<template v-if="c.label" #label>{{ c.label }}</template>
<template v-if="c.caption" #caption>{{ c.caption }}</template>
</MkTextarea>
<MkInput v-else-if="c.type === 'textInput'" :small="size === 'small'" :modelValue="c.default ?? null" @update:modelValue="c.onInput">
<MkInput v-else-if="c.type === 'textInput'" :small="size === 'small'" :modelValue="c.default ?? null" type="text" @update:modelValue="c.onInput">
<template v-if="c.label" #label>{{ c.label }}</template>
<template v-if="c.caption" #caption>{{ c.caption }}</template>
</MkInput>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/

/* eslint-disable @typescript-eslint/explicit-function-return-type */
import { action } from '@storybook/addon-actions';
import { expect, userEvent, waitFor, within } from '@storybook/test';
import { StoryObj } from '@storybook/vue3';
Expand Down Expand Up @@ -61,7 +60,7 @@ const common = {
this.textarea = this.$refs.input.$refs.inputEl;
},
},
template: '<MkInput v-model="q" ref="input" @vue:mounted="inputMounted"/><story v-if="textarea" :q="q" :textarea="textarea"/>',
template: '<MkInput v-model="q" ref="input" @vue:mounted="inputMounted" type="text"/><story v-if="textarea" :q="q" :textarea="textarea"/>',
}),
],
parameters: {
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/components/MkPollEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</p>
<ul>
<li v-for="(choice, i) in choices" :key="i">
<MkInput class="input" small :modelValue="choice" :placeholder="i18n.tsx._poll.choiceN({ n: i + 1 })" @update:modelValue="onInput(i, $event)">
<MkInput class="input" small :modelValue="choice" :placeholder="i18n.tsx._poll.choiceN({ n: i + 1 })" type="text" @update:modelValue="onInput(i, $event)">
</MkInput>
<button class="_button" @click="remove(i)">
<i class="ti ti-x"></i>
Expand Down
8 changes: 4 additions & 4 deletions packages/frontend/src/components/MkPreview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<template>
<div :class="$style.preview">
<div>
<MkInput v-model="text">
<MkInput v-model="text" type="text">
<template #label>Text</template>
</MkInput>
<MkSwitch v-model="flag" :class="$style.preview__content1__switch_button">
Expand All @@ -18,8 +18,8 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkRadio v-model="radio" value="pleroma">Pleroma</MkRadio>
</div>
<div :class="$style.preview__content1__button">
<MkButton inline>This is</MkButton>
<MkButton inline primary>the button</MkButton>
<MkButton inline>This is</MkButton>
<MkButton inline primary>the button</MkButton>
</div>
</div>
<div :class="$style.preview__content2" style="pointer-events: none;">
Expand All @@ -36,13 +36,13 @@ SPDX-License-Identifier: AGPL-3.0-only

<script lang="ts" setup>
import { ref } from 'vue';
import * as config from '@@/js/config.js';
import MkButton from '@/components/MkButton.vue';
import MkInput from '@/components/MkInput.vue';
import MkSwitch from '@/components/MkSwitch.vue';
import MkTextarea from '@/components/MkTextarea.vue';
import MkRadio from '@/components/MkRadio.vue';
import * as os from '@/os.js';
import * as config from '@@/js/config.js';
import { $i } from '@/account.js';

const text = ref('');
Expand Down
6 changes: 3 additions & 3 deletions packages/frontend/src/components/MkSystemWebhookEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkSpacer :marginMin="20" :marginMax="28" style="flex-grow: 1;">
<MkLoading v-if="loading !== 0"/>
<div v-else :class="$style.root" class="_gaps_m">
<MkInput v-model="title">
<MkInput v-model="title" type="text">
<template #label>{{ i18n.ts._webhookSettings.name }}</template>
</MkInput>
<MkInput v-model="url">
<MkInput v-model="url" type="text">
<template #label>URL</template>
</MkInput>
<MkInput v-model="secret">
<MkInput v-model="secret" type="text">
<template #label>{{ i18n.ts._webhookSettings.secret }}</template>
</MkInput>
<MkFolder :defaultOpen="true">
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/components/MkTokenGenerateWindow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkInfo warn>{{ information }}</MkInfo>
</div>
<div>
<MkInput v-model="name">
<MkInput v-model="name" type="text">
<template #label>{{ i18n.ts.name }}</template>
</MkInput>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<div>
<MkSpacer :marginMin="20" :marginMax="28">
<div class="_gaps_m">
<MkInput v-model="title">
<MkInput v-model="title" type="text">
<template #label>{{ i18n.ts.title }}</template>
</MkInput>
<MkTextarea v-model="text">
Expand Down
8 changes: 4 additions & 4 deletions packages/frontend/src/components/MkUserSelectDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ SPDX-License-Identifier: AGPL-3.0-only
<template #header>{{ i18n.ts.selectUser }}</template>
<div>
<div :class="$style.form">
<MkInput v-if="computedLocalOnly" v-model="username" :autofocus="true" @update:modelValue="search">
<MkInput v-if="computedLocalOnly" v-model="username" :autofocus="true" type="text" @update:modelValue="search">
<template #label>{{ i18n.ts.username }}</template>
<template #prefix>@</template>
</MkInput>
<FormSplit v-else :minWidth="170">
<MkInput v-model="username" :autofocus="true" @update:modelValue="search">
<MkInput v-model="username" :autofocus="true" type="text" @update:modelValue="search">
<template #label>{{ i18n.ts.username }}</template>
<template #prefix>@</template>
</MkInput>
<MkInput v-model="host" :datalist="[hostname]" @update:modelValue="search">
<MkInput v-model="host" :datalist="[hostname]" type="text" @update:modelValue="search">
<template #label>{{ i18n.ts.host }}</template>
<template #prefix>@</template>
</MkInput>
Expand Down Expand Up @@ -63,6 +63,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<script lang="ts" setup>
import { onMounted, ref, computed, shallowRef } from 'vue';
import * as Misskey from 'misskey-js';
import { host as currentHost, hostname } from '@@/js/config.js';
import MkInput from '@/components/MkInput.vue';
import FormSplit from '@/components/form/split.vue';
import MkModalWindow from '@/components/MkModalWindow.vue';
Expand All @@ -71,7 +72,6 @@ import { defaultStore } from '@/store.js';
import { i18n } from '@/i18n.js';
import { $i } from '@/account.js';
import { instance } from '@/instance.js';
import { host as currentHost, hostname } from '@@/js/config.js';

const emit = defineEmits<{
(ev: 'ok', selected: Misskey.entities.UserDetailed): void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</div>
</FormSlot>

<MkInput v-model="name" :max="30" manualSave data-cy-user-setup-user-name>
<MkInput v-model="name" :max="30" manualSave data-cy-user-setup-user-name type="text">
<template #label>{{ i18n.ts._profile.name }}</template>
</MkInput>

Expand Down Expand Up @@ -49,7 +49,7 @@ const description = ref($i.description ?? '');
watch(name, () => {
os.apiWithDialog('i/update', {
// 空文字列をnullにしたいので??は使うな
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing

name: name.value || null,
}, undefined, {
'0b3f9f6a-2f4d-4b1f-9fb4-49d3a2fd7191': {
Expand All @@ -62,7 +62,7 @@ watch(name, () => {
watch(description, () => {
os.apiWithDialog('i/update', {
// 空文字列をnullにしたいので??は使うな
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing

description: description.value || null,
});
});
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/pages/about.emojis.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkButton v-if="$i && ($i.isModerator || $i.policies.canManageCustomEmojis)" primary link to="/custom-emojis-manager">{{ i18n.ts.manageCustomEmojis }}</MkButton>

<div class="query">
<MkInput v-model="q" class="" :placeholder="i18n.ts.search" autocapitalize="off">
<MkInput v-model="q" class="" :placeholder="i18n.ts.search" autocapitalize="off" type="text">
<template #prefix><i class="ti ti-search"></i></template>
</MkInput>

Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/pages/about.federation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<template>
<div class="_gaps">
<div>
<MkInput v-model="host" :debounce="true" class="">
<MkInput v-model="host" :debounce="true" class="" type="text">
<template #prefix><i class="ti ti-search"></i></template>
<template #label>{{ i18n.ts.host }}</template>
</MkInput>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<div v-if="loading === 0" style="display: flex; flex-direction: column; min-height: 100%;">
<MkSpacer :marginMin="20" :marginMax="28" style="flex-grow: 1;">
<div :class="$style.root" class="_gaps_m">
<MkInput v-model="title">
<MkInput v-model="title" type="text">
<template #label>{{ i18n.ts.title }}</template>
</MkInput>
<MkSelect v-model="method">
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/pages/admin/announcements.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</template>

<div class="_gaps">
<MkInput v-model="announcement.title">
<MkInput v-model="announcement.title" type="text">
<template #label>{{ i18n.ts.title }}</template>
</MkInput>
<MkTextarea v-model="announcement.text" mfmAutocomplete :mfmPreview="true">
Expand Down
18 changes: 9 additions & 9 deletions packages/frontend/src/pages/admin/bot-protection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ SPDX-License-Identifier: AGPL-3.0-only
</MkRadios>

<template v-if="botProtectionForm.state.provider === 'hcaptcha'">
<MkInput v-model="botProtectionForm.state.hcaptchaSiteKey" debounce>
<MkInput v-model="botProtectionForm.state.hcaptchaSiteKey" debounce type="text">
<template #prefix><i class="ti ti-key"></i></template>
<template #label>{{ i18n.ts.hcaptchaSiteKey }}</template>
</MkInput>
<MkInput v-model="botProtectionForm.state.hcaptchaSecretKey" debounce>
<MkInput v-model="botProtectionForm.state.hcaptchaSecretKey" debounce type="text">
<template #prefix><i class="ti ti-key"></i></template>
<template #label>{{ i18n.ts.hcaptchaSecretKey }}</template>
</MkInput>
Expand All @@ -56,15 +56,15 @@ SPDX-License-Identifier: AGPL-3.0-only
</template>

<template v-else-if="botProtectionForm.state.provider === 'mcaptcha'">
<MkInput v-model="botProtectionForm.state.mcaptchaSiteKey" debounce>
<MkInput v-model="botProtectionForm.state.mcaptchaSiteKey" debounce type="text">
<template #prefix><i class="ti ti-key"></i></template>
<template #label>{{ i18n.ts.mcaptchaSiteKey }}</template>
</MkInput>
<MkInput v-model="botProtectionForm.state.mcaptchaSecretKey" debounce>
<MkInput v-model="botProtectionForm.state.mcaptchaSecretKey" debounce type="text">
<template #prefix><i class="ti ti-key"></i></template>
<template #label>{{ i18n.ts.mcaptchaSecretKey }}</template>
</MkInput>
<MkInput v-model="botProtectionForm.state.mcaptchaInstanceUrl" debounce>
<MkInput v-model="botProtectionForm.state.mcaptchaInstanceUrl" debounce type="text">
<template #prefix><i class="ti ti-link"></i></template>
<template #label>{{ i18n.ts.mcaptchaInstanceUrl }}</template>
</MkInput>
Expand All @@ -81,11 +81,11 @@ SPDX-License-Identifier: AGPL-3.0-only
</template>

<template v-else-if="botProtectionForm.state.provider === 'recaptcha'">
<MkInput v-model="botProtectionForm.state.recaptchaSiteKey" debounce>
<MkInput v-model="botProtectionForm.state.recaptchaSiteKey" debounce type="text">
<template #prefix><i class="ti ti-key"></i></template>
<template #label>{{ i18n.ts.recaptchaSiteKey }}</template>
</MkInput>
<MkInput v-model="botProtectionForm.state.recaptchaSecretKey" debounce>
<MkInput v-model="botProtectionForm.state.recaptchaSecretKey" debounce type="text">
<template #prefix><i class="ti ti-key"></i></template>
<template #label>{{ i18n.ts.recaptchaSecretKey }}</template>
</MkInput>
Expand Down Expand Up @@ -113,11 +113,11 @@ SPDX-License-Identifier: AGPL-3.0-only
</template>

<template v-else-if="botProtectionForm.state.provider === 'turnstile'">
<MkInput v-model="botProtectionForm.state.turnstileSiteKey" debounce>
<MkInput v-model="botProtectionForm.state.turnstileSiteKey" debounce type="text">
<template #prefix><i class="ti ti-key"></i></template>
<template #label>{{ i18n.ts.turnstileSiteKey }}</template>
</MkInput>
<MkInput v-model="botProtectionForm.state.turnstileSecretKey" debounce>
<MkInput v-model="botProtectionForm.state.turnstileSecretKey" debounce type="text">
<template #prefix><i class="ti ti-key"></i></template>
<template #label>{{ i18n.ts.turnstileSecretKey }}</template>
</MkInput>
Expand Down
4 changes: 2 additions & 2 deletions packages/frontend/src/pages/admin/email-settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ SPDX-License-Identifier: AGPL-3.0-only

<div class="_gaps_m">
<FormSplit :minWidth="280">
<MkInput v-model="smtpHost">
<MkInput v-model="smtpHost" type="text">
<template #label>{{ i18n.ts.smtpHost }}</template>
</MkInput>
<MkInput v-model="smtpPort" type="number">
<template #label>{{ i18n.ts.smtpPort }}</template>
</MkInput>
</FormSplit>
<FormSplit :minWidth="280">
<MkInput v-model="smtpUser">
<MkInput v-model="smtpUser" type="text">
<template #label>{{ i18n.ts.smtpUser }}</template>
</MkInput>
<MkInput v-model="smtpPass" type="password">
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/pages/admin/external-services.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<template #label>DeepL Translation</template>

<div class="_gaps_m">
<MkInput v-model="deeplAuthKey">
<MkInput v-model="deeplAuthKey" type="text">
<template #prefix><i class="ti ti-key"></i></template>
<template #label>DeepL Auth Key</template>
</MkInput>
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/pages/admin/federation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkSpacer :contentMax="900">
<div class="_gaps">
<div>
<MkInput v-model="host" :debounce="true" class="">
<MkInput v-model="host" :debounce="true" class="" type="text">
<template #prefix><i class="ti ti-search"></i></template>
<template #label>{{ i18n.ts.host }}</template>
</MkInput>
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/pages/admin/modlog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<option :value="null">{{ i18n.ts.all }}</option>
<option v-for="t in Misskey.moderationLogTypes" :key="t" :value="t">{{ i18n.ts._moderationLogTypes[t] ?? t }}</option>
</MkSelect>
<MkInput v-model="moderatorId" style="margin: 0; flex: 1;">
<MkInput v-model="moderatorId" style="margin: 0; flex: 1;" type="text">
<template #label>{{ i18n.ts.moderator }}(ID)</template>
</MkInput>
</div>
Expand Down
10 changes: 5 additions & 5 deletions packages/frontend/src/pages/admin/object-storage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,29 @@ SPDX-License-Identifier: AGPL-3.0-only
<template #caption>{{ i18n.ts.objectStorageBaseUrlDesc }}</template>
</MkInput>

<MkInput v-model="objectStorageBucket">
<MkInput v-model="objectStorageBucket" type="text">
<template #label>{{ i18n.ts.objectStorageBucket }}</template>
<template #caption>{{ i18n.ts.objectStorageBucketDesc }}</template>
</MkInput>

<MkInput v-model="objectStoragePrefix">
<MkInput v-model="objectStoragePrefix" type="text">
<template #label>{{ i18n.ts.objectStoragePrefix }}</template>
<template #caption>{{ i18n.ts.objectStoragePrefixDesc }}</template>
</MkInput>

<MkInput v-model="objectStorageEndpoint" :placeholder="'example.com'">
<MkInput v-model="objectStorageEndpoint" :placeholder="'example.com'" type="text">
<template #label>{{ i18n.ts.objectStorageEndpoint }}</template>
<template #prefix>https://</template>
<template #caption>{{ i18n.ts.objectStorageEndpointDesc }}</template>
</MkInput>

<MkInput v-model="objectStorageRegion">
<MkInput v-model="objectStorageRegion" type="text">
<template #label>{{ i18n.ts.objectStorageRegion }}</template>
<template #caption>{{ i18n.ts.objectStorageRegionDesc }}</template>
</MkInput>

<FormSplit :minWidth="280">
<MkInput v-model="objectStorageAccessKey">
<MkInput v-model="objectStorageAccessKey" type="text">
<template #prefix><i class="ti ti-key"></i></template>
<template #label>Access key</template>
</MkInput>
Expand Down
4 changes: 2 additions & 2 deletions packages/frontend/src/pages/admin/roles.editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ SPDX-License-Identifier: AGPL-3.0-only

<template>
<div class="_gaps">
<MkInput v-if="readonly" :modelValue="role.id" :readonly="true">
<MkInput v-if="readonly" :modelValue="role.id" :readonly="true" type="text">
<template #label>ID</template>
</MkInput>

<MkInput v-model="role.name" :readonly="readonly">
<MkInput v-model="role.name" :readonly="readonly" type="text">
<template #label>{{ i18n.ts._role.name }}</template>
</MkInput>

Expand Down
Loading

0 comments on commit 42fcdaa

Please sign in to comment.