refactor
This commit is contained in:
parent
084ccf5c9a
commit
cfd4d7c57b
|
@ -3,14 +3,13 @@
|
||||||
* SPDX-License-Identifier: AGPL-3.0-only
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
|
||||||
/* eslint-disable import/no-default-export */
|
|
||||||
import type { StoryObj } from '@storybook/vue3';
|
|
||||||
import { HttpResponse, http } from 'msw';
|
import { HttpResponse, http } from 'msw';
|
||||||
import { action } from 'storybook/actions';
|
import { action } from 'storybook/actions';
|
||||||
import { channel } from '../../.storybook/fakes.js';
|
import { channel } from '../../.storybook/fakes.js';
|
||||||
import { commonHandlers } from '../../.storybook/mocks.js';
|
import { commonHandlers } from '../../.storybook/mocks.js';
|
||||||
import MkChannelList from './MkChannelList.vue';
|
import MkChannelList from './MkChannelList.vue';
|
||||||
|
import type { StoryObj } from '@storybook/vue3';
|
||||||
|
import { Paginator } from '@/utility/paginator.js';
|
||||||
export const Default = {
|
export const Default = {
|
||||||
render(args) {
|
render(args) {
|
||||||
return {
|
return {
|
||||||
|
@ -33,10 +32,7 @@ export const Default = {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
args: {
|
args: {
|
||||||
pagination: {
|
paginator: new Paginator('channels/search', {}),
|
||||||
endpoint: 'channels/search',
|
|
||||||
limit: 10,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
parameters: {
|
parameters: {
|
||||||
chromatic: {
|
chromatic: {
|
||||||
|
|
|
@ -28,7 +28,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<MkCaptcha v-if="instance.enableMcaptcha" ref="mcaptcha" v-model="mCaptchaResponse" provider="mcaptcha" :sitekey="instance.mcaptchaSiteKey" :instanceUrl="instance.mcaptchaInstanceUrl"/>
|
<MkCaptcha v-if="instance.enableMcaptcha" ref="mcaptcha" v-model="mCaptchaResponse" provider="mcaptcha" :sitekey="instance.mcaptchaSiteKey" :instanceUrl="instance.mcaptchaInstanceUrl"/>
|
||||||
<MkCaptcha v-if="instance.enableRecaptcha" ref="recaptcha" v-model="reCaptchaResponse" provider="recaptcha" :sitekey="instance.recaptchaSiteKey"/>
|
<MkCaptcha v-if="instance.enableRecaptcha" ref="recaptcha" v-model="reCaptchaResponse" provider="recaptcha" :sitekey="instance.recaptchaSiteKey"/>
|
||||||
<MkCaptcha v-if="instance.enableTurnstile" ref="turnstile" v-model="turnstileResponse" provider="turnstile" :sitekey="instance.turnstileSiteKey"/>
|
<MkCaptcha v-if="instance.enableTurnstile" ref="turnstile" v-model="turnstileResponse" provider="turnstile" :sitekey="instance.turnstileSiteKey"/>
|
||||||
<MkCaptcha v-if="instance.enableTestcaptcha" ref="testcaptcha" v-model="testcaptchaResponse" provider="testcaptcha"/>
|
<MkCaptcha v-if="instance.enableTestcaptcha" ref="testcaptcha" v-model="testcaptchaResponse" provider="testcaptcha" :sitekey="null"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<MkButton type="submit" :disabled="needCaptcha && captchaFailed" large primary rounded style="margin: 0 auto;" data-cy-signin-page-password-continue>{{ i18n.ts.continue }} <i class="ti ti-arrow-right"></i></MkButton>
|
<MkButton type="submit" :disabled="needCaptcha && captchaFailed" large primary rounded style="margin: 0 auto;" data-cy-signin-page-password-continue>{{ i18n.ts.continue }} <i class="ti ti-arrow-right"></i></MkButton>
|
||||||
|
|
|
@ -2,11 +2,10 @@
|
||||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||||
* SPDX-License-Identifier: AGPL-3.0-only
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
|
||||||
import { expect, userEvent, waitFor, within } from '@storybook/test';
|
import { expect, userEvent, waitFor, within } from '@storybook/test';
|
||||||
import type { StoryObj } from '@storybook/vue3';
|
|
||||||
import MkAd from './MkAd.vue';
|
import MkAd from './MkAd.vue';
|
||||||
|
import type { StoryObj } from '@storybook/vue3';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
|
|
||||||
const common = {
|
const common = {
|
||||||
|
@ -68,7 +67,7 @@ const common = {
|
||||||
await expect(imgAgain).toBeInTheDocument();
|
await expect(imgAgain).toBeInTheDocument();
|
||||||
},
|
},
|
||||||
args: {
|
args: {
|
||||||
prefer: [],
|
preferForms: [],
|
||||||
specify: {
|
specify: {
|
||||||
id: 'someadid',
|
id: 'someadid',
|
||||||
ratio: 1,
|
ratio: 1,
|
||||||
|
|
|
@ -87,7 +87,7 @@ router.useListener('change', ({ resolved }) => {
|
||||||
const fullPath = router.getCurrentFullPath();
|
const fullPath = router.getCurrentFullPath();
|
||||||
|
|
||||||
if (tabs.value.some(tab => tab.routePath === routePath && deepEqual(resolved.props, tab.props))) {
|
if (tabs.value.some(tab => tab.routePath === routePath && deepEqual(resolved.props, tab.props))) {
|
||||||
const newTabs = [];
|
const newTabs = [] as typeof tabs.value;
|
||||||
for (const tab of tabs.value) {
|
for (const tab of tabs.value) {
|
||||||
newTabs.push(tab);
|
newTabs.push(tab);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue