mizzkey/packages/frontend/src/components/MkSignupDialog.form.vue

430 lines
16 KiB
Vue
Raw Normal View History

<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-License-Identifier: AGPL-3.0-only
-->
<template>
2023-09-23 02:01:20 +02:00
<div>
2023-10-24 14:13:30 +02:00
<div :class="[$style.banner ,{[$style.gamingDark]: gamingType ==='dark' , [$style.gamingLight]: gamingType ==='light'}]">
2023-09-23 02:01:20 +02:00
<i class="ti ti-user-edit"></i>
</div>
<MkSpacer :marginMin="20" :marginMax="32">
<form class="_gaps_m" autocomplete="new-password" @submit.prevent="onSubmit">
<MkInput v-if="instance.disableRegistration" v-model="invitationCode" type="text" :spellcheck="false" required>
<template #label>{{ i18n.ts.invitationCode }}</template>
<template #prefix><i class="ti ti-key"></i></template>
</MkInput>
<MkInput v-model="username" type="text" pattern="^[a-zA-Z0-9_]{1,20}$" :spellcheck="false"
autocomplete="username" required data-cy-signup-username @update:modelValue="onChangeUsername">
<template #label>{{ i18n.ts.username }}
<div v-tooltip:dialog="i18n.ts.usernameInfo" class="_button _help"><i class="ti ti-help-circle"></i></div>
</template>
<template #prefix>@</template>
<template #suffix>@{{ host }}</template>
<template #caption>
<div><i class="ti ti-alert-triangle ti-fw"></i> {{ i18n.ts.cannotBeChangedLater }}</div>
<span v-if="usernameState === 'wait'" style="color:#999"><MkLoading :em="true"/> {{
i18n.ts.checking
}}</span>
<span v-else-if="usernameState === 'ok'" style="color: var(--success)"><i
class="ti ti-check ti-fw"></i> {{ i18n.ts.available }}</span>
<span v-else-if="usernameState === 'unavailable'" style="color: var(--error)"><i
class="ti ti-alert-triangle ti-fw"></i> {{ i18n.ts.unavailable }}</span>
<span v-else-if="usernameState === 'error'" style="color: var(--error)"><i
class="ti ti-alert-triangle ti-fw"></i> {{ i18n.ts.error }}</span>
<span v-else-if="usernameState === 'invalid-format'" style="color: var(--error)"><i
class="ti ti-alert-triangle ti-fw"></i> {{ i18n.ts.usernameInvalidFormat }}</span>
<span v-else-if="usernameState === 'min-range'" style="color: var(--error)"><i
class="ti ti-alert-triangle ti-fw"></i> {{ i18n.ts.tooShort }}</span>
<span v-else-if="usernameState === 'max-range'" style="color: var(--error)"><i
class="ti ti-alert-triangle ti-fw"></i> {{ i18n.ts.tooLong }}</span>
</template>
</MkInput>
<MkInput v-if="instance.emailRequiredForSignup" v-model="email" :debounce="true" type="email"
:spellcheck="false" required data-cy-signup-email @update:modelValue="onChangeEmail">
<template #label>{{ i18n.ts.emailAddress }}
<div v-tooltip:dialog="i18n.ts._signup.emailAddressInfo" class="_button _help"><i
class="ti ti-help-circle"></i></div>
</template>
<template #prefix><i class="ti ti-mail"></i></template>
<template #caption>
<span v-if="emailState === 'wait'" style="color:#999"><MkLoading :em="true"/> {{ i18n.ts.checking }}</span>
<span v-else-if="emailState === 'ok'" style="color: var(--success)"><i
class="ti ti-check ti-fw"></i> {{ i18n.ts.available }}</span>
<span v-else-if="emailState === 'unavailable:used'" style="color: var(--error)"><i
class="ti ti-alert-triangle ti-fw"></i> {{ i18n.ts._emailUnavailable.used }}</span>
<span v-else-if="emailState === 'unavailable:format'" style="color: var(--error)"><i
class="ti ti-alert-triangle ti-fw"></i> {{ i18n.ts._emailUnavailable.format }}</span>
<span v-else-if="emailState === 'unavailable:disposable'" style="color: var(--error)"><i
class="ti ti-alert-triangle ti-fw"></i> {{ i18n.ts._emailUnavailable.disposable }}</span>
<span v-else-if="emailState === 'unavailable:mx'" style="color: var(--error)"><i
class="ti ti-alert-triangle ti-fw"></i> {{ i18n.ts._emailUnavailable.mx }}</span>
<span v-else-if="emailState === 'unavailable:smtp'" style="color: var(--error)"><i
class="ti ti-alert-triangle ti-fw"></i> {{ i18n.ts._emailUnavailable.smtp }}</span>
<span v-else-if="emailState === 'unavailable'" style="color: var(--error)"><i
class="ti ti-alert-triangle ti-fw"></i> {{ i18n.ts.unavailable }}</span>
<span v-else-if="emailState === 'error'" style="color: var(--error)"><i
class="ti ti-alert-triangle ti-fw"></i> {{ i18n.ts.error }}</span>
</template>
</MkInput>
<MkInput v-model="password" type="password" autocomplete="new-password" required data-cy-signup-password
@update:modelValue="onChangePassword">
<template #label>{{ i18n.ts.password }}</template>
<template #prefix><i class="ti ti-lock"></i></template>
<template #caption>
<span v-if="passwordStrength == 'low'" style="color: var(--error)"><i
class="ti ti-alert-triangle ti-fw"></i> {{ i18n.ts.weakPassword }}</span>
<span v-if="passwordStrength == 'medium'" style="color: var(--warn)"><i
class="ti ti-check ti-fw"></i> {{ i18n.ts.normalPassword }}</span>
<span v-if="passwordStrength == 'high'" style="color: var(--success)"><i
class="ti ti-check ti-fw"></i> {{ i18n.ts.strongPassword }}</span>
</template>
</MkInput>
<MkInput v-model="retypedPassword" type="password" autocomplete="new-password" required
data-cy-signup-password-retype @update:modelValue="onChangePasswordRetype">
<template #label>{{ i18n.ts.password }} ({{ i18n.ts.retype }})</template>
<template #prefix><i class="ti ti-lock"></i></template>
<template #caption>
<span v-if="passwordRetypeState == 'match'" style="color: var(--success)"><i class="ti ti-check ti-fw"></i> {{
i18n.ts.passwordMatched
}}</span>
<span v-if="passwordRetypeState == 'not-match'" style="color: var(--error)"><i
class="ti ti-alert-triangle ti-fw"></i> {{ i18n.ts.passwordNotMatched }}</span>
</template>
</MkInput>
<MkCaptcha v-if="instance.enableHcaptcha" ref="hcaptcha" v-model="hCaptchaResponse" :class="$style.captcha"
provider="hcaptcha" :sitekey="instance.hcaptchaSiteKey"/>
<MkCaptcha v-if="instance.enableRecaptcha" ref="recaptcha" v-model="reCaptchaResponse" :class="$style.captcha"
provider="recaptcha" :sitekey="instance.recaptchaSiteKey"/>
<MkCaptcha v-if="instance.enableTurnstile" ref="turnstile" v-model="turnstileResponse" :class="$style.captcha"
provider="turnstile" :sitekey="instance.turnstileSiteKey"/>
<MkButton type="submit" :disabled="shouldDisableSubmitting" large gradate rounded data-cy-signup-submit
style="margin: 0 auto;">
<template v-if="submitting">
<MkLoading :em="true" :colored="false"/>
</template>
<template v-else>{{ i18n.ts.start }}</template>
</MkButton>
</form>
</MkSpacer>
</div>
</template>
<script lang="ts" setup>
Merge remote-tracking branch 'misskey-original/develop' into develop # Conflicts: # locales/index.d.ts # locales/ja-JP.yml # package.json # packages/backend/src/server/api/endpoints/admin/emoji/copy.ts # packages/backend/src/server/api/endpoints/admin/meta.ts # packages/backend/src/server/api/endpoints/channels/timeline.ts # packages/backend/src/server/api/endpoints/notes/featured.ts # packages/frontend/src/components/MkButton.vue # packages/frontend/src/components/MkClickerGame.vue # packages/frontend/src/components/MkDialog.vue # packages/frontend/src/components/MkDrive.vue # packages/frontend/src/components/MkEmojiEditDialog.vue # packages/frontend/src/components/MkEmojiPicker.section.vue # packages/frontend/src/components/MkEmojiPicker.vue # packages/frontend/src/components/MkFollowButton.vue # packages/frontend/src/components/MkInstanceTicker.vue # packages/frontend/src/components/MkLaunchPad.vue # packages/frontend/src/components/MkMenu.vue # packages/frontend/src/components/MkNote.vue # packages/frontend/src/components/MkNoteSimple.vue # packages/frontend/src/components/MkPostForm.vue # packages/frontend/src/components/MkRadio.vue # packages/frontend/src/components/MkSignupDialog.form.vue # packages/frontend/src/components/MkSwitch.vue # packages/frontend/src/custom-emojis.ts # packages/frontend/src/pages/about.emojis.vue # packages/frontend/src/pages/about.vue # packages/frontend/src/pages/admin/index.vue # packages/frontend/src/pages/admin/other-settings.vue # packages/frontend/src/pages/custom-emojis-manager.vue # packages/frontend/src/pages/settings/general.vue # packages/frontend/src/pages/settings/mute-block.vue # packages/frontend/src/pages/timeline.vue # packages/frontend/src/pages/user/home.vue # packages/frontend/src/pages/user/index.files.vue # packages/frontend/src/scripts/get-note-menu.ts # packages/frontend/src/store.ts # packages/frontend/src/ui/_common_/stream-indicator.vue # packages/frontend/src/ui/classic.sidebar.vue # packages/frontend/src/ui/universal.vue # packages/frontend/src/ui/universal.widgets.vue # packages/frontend/vite.config.ts # packages/misskey-js/etc/misskey-js.api.md # packages/misskey-js/src/api.types.ts # packages/misskey-js/src/entities.ts # packages/misskey-js/src/streaming.types.ts
2023-12-12 23:08:57 +01:00
import { computed, ref, watch } from 'vue';
import { toUnicode } from 'punycode/';
import MkButton from './MkButton.vue';
import MkInput from './MkInput.vue';
2023-09-23 02:01:20 +02:00
import MkCaptcha, {type Captcha} from '@/components/MkCaptcha.vue';
2023-09-19 09:37:43 +02:00
import * as config from '@/config.js';
import * as os from '@/os.js';
2023-09-23 02:01:20 +02:00
import {login} from '@/account.js';
import {instance} from '@/instance.js';
import {i18n} from '@/i18n.js';
import {defaultStore} from "@/store.js";
2023-10-24 14:13:30 +02:00
let gamingType = computed(defaultStore.makeGetterSetter('gamingType'));
const props = withDefaults(defineProps<{
2023-09-23 02:01:20 +02:00
autoSet?: boolean;
}>(), {
2023-09-23 02:01:20 +02:00
autoSet: false,
});
const emit = defineEmits<{
2023-09-23 02:01:20 +02:00
(ev: 'signup', user: Record<string, any>): void;
(ev: 'signupEmailPending'): void;
}>();
const host = toUnicode(config.host);
const hcaptcha = ref<Captcha | undefined>();
const recaptcha = ref<Captcha | undefined>();
const turnstile = ref<Captcha | undefined>();
const username = ref<string>('');
const password = ref<string>('');
const retypedPassword = ref<string>('');
const invitationCode = ref<string>('');
const email = ref('');
const usernameState = ref<null | 'wait' | 'ok' | 'unavailable' | 'error' | 'invalid-format' | 'min-range' | 'max-range'>(null);
const emailState = ref<null | 'wait' | 'ok' | 'unavailable:used' | 'unavailable:format' | 'unavailable:disposable' | 'unavailable:mx' | 'unavailable:smtp' | 'unavailable' | 'error'>(null);
const passwordStrength = ref<'' | 'low' | 'medium' | 'high'>('');
const passwordRetypeState = ref<null | 'match' | 'not-match'>(null);
const submitting = ref<boolean>(false);
const hCaptchaResponse = ref(null);
const reCaptchaResponse = ref(null);
const turnstileResponse = ref(null);
const usernameAbortController = ref<null | AbortController>(null);
const emailAbortController = ref<null | AbortController>(null);
const shouldDisableSubmitting = computed((): boolean => {
Merge remote-tracking branch 'misskey-original/develop' into develop # Conflicts: # locales/index.d.ts # locales/ja-JP.yml # package.json # packages/backend/src/server/api/endpoints/admin/emoji/copy.ts # packages/backend/src/server/api/endpoints/admin/meta.ts # packages/backend/src/server/api/endpoints/channels/timeline.ts # packages/backend/src/server/api/endpoints/notes/featured.ts # packages/frontend/src/components/MkButton.vue # packages/frontend/src/components/MkClickerGame.vue # packages/frontend/src/components/MkDialog.vue # packages/frontend/src/components/MkDrive.vue # packages/frontend/src/components/MkEmojiEditDialog.vue # packages/frontend/src/components/MkEmojiPicker.section.vue # packages/frontend/src/components/MkEmojiPicker.vue # packages/frontend/src/components/MkFollowButton.vue # packages/frontend/src/components/MkInstanceTicker.vue # packages/frontend/src/components/MkLaunchPad.vue # packages/frontend/src/components/MkMenu.vue # packages/frontend/src/components/MkNote.vue # packages/frontend/src/components/MkNoteSimple.vue # packages/frontend/src/components/MkPostForm.vue # packages/frontend/src/components/MkRadio.vue # packages/frontend/src/components/MkSignupDialog.form.vue # packages/frontend/src/components/MkSwitch.vue # packages/frontend/src/custom-emojis.ts # packages/frontend/src/pages/about.emojis.vue # packages/frontend/src/pages/about.vue # packages/frontend/src/pages/admin/index.vue # packages/frontend/src/pages/admin/other-settings.vue # packages/frontend/src/pages/custom-emojis-manager.vue # packages/frontend/src/pages/settings/general.vue # packages/frontend/src/pages/settings/mute-block.vue # packages/frontend/src/pages/timeline.vue # packages/frontend/src/pages/user/home.vue # packages/frontend/src/pages/user/index.files.vue # packages/frontend/src/scripts/get-note-menu.ts # packages/frontend/src/store.ts # packages/frontend/src/ui/_common_/stream-indicator.vue # packages/frontend/src/ui/classic.sidebar.vue # packages/frontend/src/ui/universal.vue # packages/frontend/src/ui/universal.widgets.vue # packages/frontend/vite.config.ts # packages/misskey-js/etc/misskey-js.api.md # packages/misskey-js/src/api.types.ts # packages/misskey-js/src/entities.ts # packages/misskey-js/src/streaming.types.ts
2023-12-12 23:08:57 +01:00
return submitting.value ||
instance.enableHcaptcha && !hCaptchaResponse.value ||
instance.enableRecaptcha && !reCaptchaResponse.value ||
instance.enableTurnstile && !turnstileResponse.value ||
instance.emailRequiredForSignup && emailState.value !== 'ok' ||
usernameState.value !== 'ok' ||
passwordRetypeState.value !== 'match';
});
function getPasswordStrength(source: string): number {
2023-09-23 02:01:20 +02:00
let strength = 0;
let power = 0.018;
2023-09-23 02:01:20 +02:00
// 英数字
if (/[a-zA-Z]/.test(source) && /[0-9]/.test(source)) {
power += 0.020;
}
2023-09-23 02:01:20 +02:00
// 大文字と小文字が混ざってたら
if (/[a-z]/.test(source) && /[A-Z]/.test(source)) {
power += 0.015;
}
2023-09-23 02:01:20 +02:00
// 記号が混ざってたら
if (/[!\x22\#$%&@'()*+,-./_]/.test(source)) {
power += 0.02;
}
2023-09-23 02:01:20 +02:00
strength = power * source.length;
2023-09-23 02:01:20 +02:00
return Math.max(0, Math.min(1, strength));
}
function onChangeUsername(): void {
Merge remote-tracking branch 'misskey-original/develop' into develop # Conflicts: # locales/index.d.ts # locales/ja-JP.yml # package.json # packages/backend/src/server/api/endpoints/admin/emoji/copy.ts # packages/backend/src/server/api/endpoints/admin/meta.ts # packages/backend/src/server/api/endpoints/channels/timeline.ts # packages/backend/src/server/api/endpoints/notes/featured.ts # packages/frontend/src/components/MkButton.vue # packages/frontend/src/components/MkClickerGame.vue # packages/frontend/src/components/MkDialog.vue # packages/frontend/src/components/MkDrive.vue # packages/frontend/src/components/MkEmojiEditDialog.vue # packages/frontend/src/components/MkEmojiPicker.section.vue # packages/frontend/src/components/MkEmojiPicker.vue # packages/frontend/src/components/MkFollowButton.vue # packages/frontend/src/components/MkInstanceTicker.vue # packages/frontend/src/components/MkLaunchPad.vue # packages/frontend/src/components/MkMenu.vue # packages/frontend/src/components/MkNote.vue # packages/frontend/src/components/MkNoteSimple.vue # packages/frontend/src/components/MkPostForm.vue # packages/frontend/src/components/MkRadio.vue # packages/frontend/src/components/MkSignupDialog.form.vue # packages/frontend/src/components/MkSwitch.vue # packages/frontend/src/custom-emojis.ts # packages/frontend/src/pages/about.emojis.vue # packages/frontend/src/pages/about.vue # packages/frontend/src/pages/admin/index.vue # packages/frontend/src/pages/admin/other-settings.vue # packages/frontend/src/pages/custom-emojis-manager.vue # packages/frontend/src/pages/settings/general.vue # packages/frontend/src/pages/settings/mute-block.vue # packages/frontend/src/pages/timeline.vue # packages/frontend/src/pages/user/home.vue # packages/frontend/src/pages/user/index.files.vue # packages/frontend/src/scripts/get-note-menu.ts # packages/frontend/src/store.ts # packages/frontend/src/ui/_common_/stream-indicator.vue # packages/frontend/src/ui/classic.sidebar.vue # packages/frontend/src/ui/universal.vue # packages/frontend/src/ui/universal.widgets.vue # packages/frontend/vite.config.ts # packages/misskey-js/etc/misskey-js.api.md # packages/misskey-js/src/api.types.ts # packages/misskey-js/src/entities.ts # packages/misskey-js/src/streaming.types.ts
2023-12-12 23:08:57 +01:00
if (username.value === '') {
usernameState.value = null;
2023-09-23 02:01:20 +02:00
return;
}
{
const err =
Merge remote-tracking branch 'misskey-original/develop' into develop # Conflicts: # locales/index.d.ts # locales/ja-JP.yml # package.json # packages/backend/src/server/api/endpoints/admin/emoji/copy.ts # packages/backend/src/server/api/endpoints/admin/meta.ts # packages/backend/src/server/api/endpoints/channels/timeline.ts # packages/backend/src/server/api/endpoints/notes/featured.ts # packages/frontend/src/components/MkButton.vue # packages/frontend/src/components/MkClickerGame.vue # packages/frontend/src/components/MkDialog.vue # packages/frontend/src/components/MkDrive.vue # packages/frontend/src/components/MkEmojiEditDialog.vue # packages/frontend/src/components/MkEmojiPicker.section.vue # packages/frontend/src/components/MkEmojiPicker.vue # packages/frontend/src/components/MkFollowButton.vue # packages/frontend/src/components/MkInstanceTicker.vue # packages/frontend/src/components/MkLaunchPad.vue # packages/frontend/src/components/MkMenu.vue # packages/frontend/src/components/MkNote.vue # packages/frontend/src/components/MkNoteSimple.vue # packages/frontend/src/components/MkPostForm.vue # packages/frontend/src/components/MkRadio.vue # packages/frontend/src/components/MkSignupDialog.form.vue # packages/frontend/src/components/MkSwitch.vue # packages/frontend/src/custom-emojis.ts # packages/frontend/src/pages/about.emojis.vue # packages/frontend/src/pages/about.vue # packages/frontend/src/pages/admin/index.vue # packages/frontend/src/pages/admin/other-settings.vue # packages/frontend/src/pages/custom-emojis-manager.vue # packages/frontend/src/pages/settings/general.vue # packages/frontend/src/pages/settings/mute-block.vue # packages/frontend/src/pages/timeline.vue # packages/frontend/src/pages/user/home.vue # packages/frontend/src/pages/user/index.files.vue # packages/frontend/src/scripts/get-note-menu.ts # packages/frontend/src/store.ts # packages/frontend/src/ui/_common_/stream-indicator.vue # packages/frontend/src/ui/classic.sidebar.vue # packages/frontend/src/ui/universal.vue # packages/frontend/src/ui/universal.widgets.vue # packages/frontend/vite.config.ts # packages/misskey-js/etc/misskey-js.api.md # packages/misskey-js/src/api.types.ts # packages/misskey-js/src/entities.ts # packages/misskey-js/src/streaming.types.ts
2023-12-12 23:08:57 +01:00
!username.value.match(/^[a-zA-Z0-9_]+$/) ? 'invalid-format' :
username.value.length < 1 ? 'min-range' :
username.value.length > 20 ? 'max-range' :
2023-09-23 02:01:20 +02:00
null;
if (err) {
Merge remote-tracking branch 'misskey-original/develop' into develop # Conflicts: # locales/index.d.ts # locales/ja-JP.yml # package.json # packages/backend/src/server/api/endpoints/admin/emoji/copy.ts # packages/backend/src/server/api/endpoints/admin/meta.ts # packages/backend/src/server/api/endpoints/channels/timeline.ts # packages/backend/src/server/api/endpoints/notes/featured.ts # packages/frontend/src/components/MkButton.vue # packages/frontend/src/components/MkClickerGame.vue # packages/frontend/src/components/MkDialog.vue # packages/frontend/src/components/MkDrive.vue # packages/frontend/src/components/MkEmojiEditDialog.vue # packages/frontend/src/components/MkEmojiPicker.section.vue # packages/frontend/src/components/MkEmojiPicker.vue # packages/frontend/src/components/MkFollowButton.vue # packages/frontend/src/components/MkInstanceTicker.vue # packages/frontend/src/components/MkLaunchPad.vue # packages/frontend/src/components/MkMenu.vue # packages/frontend/src/components/MkNote.vue # packages/frontend/src/components/MkNoteSimple.vue # packages/frontend/src/components/MkPostForm.vue # packages/frontend/src/components/MkRadio.vue # packages/frontend/src/components/MkSignupDialog.form.vue # packages/frontend/src/components/MkSwitch.vue # packages/frontend/src/custom-emojis.ts # packages/frontend/src/pages/about.emojis.vue # packages/frontend/src/pages/about.vue # packages/frontend/src/pages/admin/index.vue # packages/frontend/src/pages/admin/other-settings.vue # packages/frontend/src/pages/custom-emojis-manager.vue # packages/frontend/src/pages/settings/general.vue # packages/frontend/src/pages/settings/mute-block.vue # packages/frontend/src/pages/timeline.vue # packages/frontend/src/pages/user/home.vue # packages/frontend/src/pages/user/index.files.vue # packages/frontend/src/scripts/get-note-menu.ts # packages/frontend/src/store.ts # packages/frontend/src/ui/_common_/stream-indicator.vue # packages/frontend/src/ui/classic.sidebar.vue # packages/frontend/src/ui/universal.vue # packages/frontend/src/ui/universal.widgets.vue # packages/frontend/vite.config.ts # packages/misskey-js/etc/misskey-js.api.md # packages/misskey-js/src/api.types.ts # packages/misskey-js/src/entities.ts # packages/misskey-js/src/streaming.types.ts
2023-12-12 23:08:57 +01:00
usernameState.value = err;
2023-09-23 02:01:20 +02:00
return;
}
}
Merge remote-tracking branch 'misskey-original/develop' into develop # Conflicts: # locales/index.d.ts # locales/ja-JP.yml # package.json # packages/backend/src/server/api/endpoints/admin/emoji/copy.ts # packages/backend/src/server/api/endpoints/admin/meta.ts # packages/backend/src/server/api/endpoints/channels/timeline.ts # packages/backend/src/server/api/endpoints/notes/featured.ts # packages/frontend/src/components/MkButton.vue # packages/frontend/src/components/MkClickerGame.vue # packages/frontend/src/components/MkDialog.vue # packages/frontend/src/components/MkDrive.vue # packages/frontend/src/components/MkEmojiEditDialog.vue # packages/frontend/src/components/MkEmojiPicker.section.vue # packages/frontend/src/components/MkEmojiPicker.vue # packages/frontend/src/components/MkFollowButton.vue # packages/frontend/src/components/MkInstanceTicker.vue # packages/frontend/src/components/MkLaunchPad.vue # packages/frontend/src/components/MkMenu.vue # packages/frontend/src/components/MkNote.vue # packages/frontend/src/components/MkNoteSimple.vue # packages/frontend/src/components/MkPostForm.vue # packages/frontend/src/components/MkRadio.vue # packages/frontend/src/components/MkSignupDialog.form.vue # packages/frontend/src/components/MkSwitch.vue # packages/frontend/src/custom-emojis.ts # packages/frontend/src/pages/about.emojis.vue # packages/frontend/src/pages/about.vue # packages/frontend/src/pages/admin/index.vue # packages/frontend/src/pages/admin/other-settings.vue # packages/frontend/src/pages/custom-emojis-manager.vue # packages/frontend/src/pages/settings/general.vue # packages/frontend/src/pages/settings/mute-block.vue # packages/frontend/src/pages/timeline.vue # packages/frontend/src/pages/user/home.vue # packages/frontend/src/pages/user/index.files.vue # packages/frontend/src/scripts/get-note-menu.ts # packages/frontend/src/store.ts # packages/frontend/src/ui/_common_/stream-indicator.vue # packages/frontend/src/ui/classic.sidebar.vue # packages/frontend/src/ui/universal.vue # packages/frontend/src/ui/universal.widgets.vue # packages/frontend/vite.config.ts # packages/misskey-js/etc/misskey-js.api.md # packages/misskey-js/src/api.types.ts # packages/misskey-js/src/entities.ts # packages/misskey-js/src/streaming.types.ts
2023-12-12 23:08:57 +01:00
if (usernameAbortController.value != null) {
usernameAbortController.value.abort();
2023-09-23 02:01:20 +02:00
}
Merge remote-tracking branch 'misskey-original/develop' into develop # Conflicts: # locales/index.d.ts # locales/ja-JP.yml # package.json # packages/backend/src/server/api/endpoints/admin/emoji/copy.ts # packages/backend/src/server/api/endpoints/admin/meta.ts # packages/backend/src/server/api/endpoints/channels/timeline.ts # packages/backend/src/server/api/endpoints/notes/featured.ts # packages/frontend/src/components/MkButton.vue # packages/frontend/src/components/MkClickerGame.vue # packages/frontend/src/components/MkDialog.vue # packages/frontend/src/components/MkDrive.vue # packages/frontend/src/components/MkEmojiEditDialog.vue # packages/frontend/src/components/MkEmojiPicker.section.vue # packages/frontend/src/components/MkEmojiPicker.vue # packages/frontend/src/components/MkFollowButton.vue # packages/frontend/src/components/MkInstanceTicker.vue # packages/frontend/src/components/MkLaunchPad.vue # packages/frontend/src/components/MkMenu.vue # packages/frontend/src/components/MkNote.vue # packages/frontend/src/components/MkNoteSimple.vue # packages/frontend/src/components/MkPostForm.vue # packages/frontend/src/components/MkRadio.vue # packages/frontend/src/components/MkSignupDialog.form.vue # packages/frontend/src/components/MkSwitch.vue # packages/frontend/src/custom-emojis.ts # packages/frontend/src/pages/about.emojis.vue # packages/frontend/src/pages/about.vue # packages/frontend/src/pages/admin/index.vue # packages/frontend/src/pages/admin/other-settings.vue # packages/frontend/src/pages/custom-emojis-manager.vue # packages/frontend/src/pages/settings/general.vue # packages/frontend/src/pages/settings/mute-block.vue # packages/frontend/src/pages/timeline.vue # packages/frontend/src/pages/user/home.vue # packages/frontend/src/pages/user/index.files.vue # packages/frontend/src/scripts/get-note-menu.ts # packages/frontend/src/store.ts # packages/frontend/src/ui/_common_/stream-indicator.vue # packages/frontend/src/ui/classic.sidebar.vue # packages/frontend/src/ui/universal.vue # packages/frontend/src/ui/universal.widgets.vue # packages/frontend/vite.config.ts # packages/misskey-js/etc/misskey-js.api.md # packages/misskey-js/src/api.types.ts # packages/misskey-js/src/entities.ts # packages/misskey-js/src/streaming.types.ts
2023-12-12 23:08:57 +01:00
usernameState.value = 'wait';
usernameAbortController.value = new AbortController();
2023-09-23 02:01:20 +02:00
os.api('username/available', {
Merge remote-tracking branch 'misskey-original/develop' into develop # Conflicts: # locales/index.d.ts # locales/ja-JP.yml # package.json # packages/backend/src/server/api/endpoints/admin/emoji/copy.ts # packages/backend/src/server/api/endpoints/admin/meta.ts # packages/backend/src/server/api/endpoints/channels/timeline.ts # packages/backend/src/server/api/endpoints/notes/featured.ts # packages/frontend/src/components/MkButton.vue # packages/frontend/src/components/MkClickerGame.vue # packages/frontend/src/components/MkDialog.vue # packages/frontend/src/components/MkDrive.vue # packages/frontend/src/components/MkEmojiEditDialog.vue # packages/frontend/src/components/MkEmojiPicker.section.vue # packages/frontend/src/components/MkEmojiPicker.vue # packages/frontend/src/components/MkFollowButton.vue # packages/frontend/src/components/MkInstanceTicker.vue # packages/frontend/src/components/MkLaunchPad.vue # packages/frontend/src/components/MkMenu.vue # packages/frontend/src/components/MkNote.vue # packages/frontend/src/components/MkNoteSimple.vue # packages/frontend/src/components/MkPostForm.vue # packages/frontend/src/components/MkRadio.vue # packages/frontend/src/components/MkSignupDialog.form.vue # packages/frontend/src/components/MkSwitch.vue # packages/frontend/src/custom-emojis.ts # packages/frontend/src/pages/about.emojis.vue # packages/frontend/src/pages/about.vue # packages/frontend/src/pages/admin/index.vue # packages/frontend/src/pages/admin/other-settings.vue # packages/frontend/src/pages/custom-emojis-manager.vue # packages/frontend/src/pages/settings/general.vue # packages/frontend/src/pages/settings/mute-block.vue # packages/frontend/src/pages/timeline.vue # packages/frontend/src/pages/user/home.vue # packages/frontend/src/pages/user/index.files.vue # packages/frontend/src/scripts/get-note-menu.ts # packages/frontend/src/store.ts # packages/frontend/src/ui/_common_/stream-indicator.vue # packages/frontend/src/ui/classic.sidebar.vue # packages/frontend/src/ui/universal.vue # packages/frontend/src/ui/universal.widgets.vue # packages/frontend/vite.config.ts # packages/misskey-js/etc/misskey-js.api.md # packages/misskey-js/src/api.types.ts # packages/misskey-js/src/entities.ts # packages/misskey-js/src/streaming.types.ts
2023-12-12 23:08:57 +01:00
username: username.value,
}, undefined, usernameAbortController.value.signal).then(result => {
usernameState.value = result.available ? 'ok' : 'unavailable';
2023-09-23 02:01:20 +02:00
}).catch((err) => {
if (err.name !== 'AbortError') {
Merge remote-tracking branch 'misskey-original/develop' into develop # Conflicts: # locales/index.d.ts # locales/ja-JP.yml # package.json # packages/backend/src/server/api/endpoints/admin/emoji/copy.ts # packages/backend/src/server/api/endpoints/admin/meta.ts # packages/backend/src/server/api/endpoints/channels/timeline.ts # packages/backend/src/server/api/endpoints/notes/featured.ts # packages/frontend/src/components/MkButton.vue # packages/frontend/src/components/MkClickerGame.vue # packages/frontend/src/components/MkDialog.vue # packages/frontend/src/components/MkDrive.vue # packages/frontend/src/components/MkEmojiEditDialog.vue # packages/frontend/src/components/MkEmojiPicker.section.vue # packages/frontend/src/components/MkEmojiPicker.vue # packages/frontend/src/components/MkFollowButton.vue # packages/frontend/src/components/MkInstanceTicker.vue # packages/frontend/src/components/MkLaunchPad.vue # packages/frontend/src/components/MkMenu.vue # packages/frontend/src/components/MkNote.vue # packages/frontend/src/components/MkNoteSimple.vue # packages/frontend/src/components/MkPostForm.vue # packages/frontend/src/components/MkRadio.vue # packages/frontend/src/components/MkSignupDialog.form.vue # packages/frontend/src/components/MkSwitch.vue # packages/frontend/src/custom-emojis.ts # packages/frontend/src/pages/about.emojis.vue # packages/frontend/src/pages/about.vue # packages/frontend/src/pages/admin/index.vue # packages/frontend/src/pages/admin/other-settings.vue # packages/frontend/src/pages/custom-emojis-manager.vue # packages/frontend/src/pages/settings/general.vue # packages/frontend/src/pages/settings/mute-block.vue # packages/frontend/src/pages/timeline.vue # packages/frontend/src/pages/user/home.vue # packages/frontend/src/pages/user/index.files.vue # packages/frontend/src/scripts/get-note-menu.ts # packages/frontend/src/store.ts # packages/frontend/src/ui/_common_/stream-indicator.vue # packages/frontend/src/ui/classic.sidebar.vue # packages/frontend/src/ui/universal.vue # packages/frontend/src/ui/universal.widgets.vue # packages/frontend/vite.config.ts # packages/misskey-js/etc/misskey-js.api.md # packages/misskey-js/src/api.types.ts # packages/misskey-js/src/entities.ts # packages/misskey-js/src/streaming.types.ts
2023-12-12 23:08:57 +01:00
usernameState.value = 'error';
2023-09-23 02:01:20 +02:00
}
});
}
function onChangeEmail(): void {
Merge remote-tracking branch 'misskey-original/develop' into develop # Conflicts: # locales/index.d.ts # locales/ja-JP.yml # package.json # packages/backend/src/server/api/endpoints/admin/emoji/copy.ts # packages/backend/src/server/api/endpoints/admin/meta.ts # packages/backend/src/server/api/endpoints/channels/timeline.ts # packages/backend/src/server/api/endpoints/notes/featured.ts # packages/frontend/src/components/MkButton.vue # packages/frontend/src/components/MkClickerGame.vue # packages/frontend/src/components/MkDialog.vue # packages/frontend/src/components/MkDrive.vue # packages/frontend/src/components/MkEmojiEditDialog.vue # packages/frontend/src/components/MkEmojiPicker.section.vue # packages/frontend/src/components/MkEmojiPicker.vue # packages/frontend/src/components/MkFollowButton.vue # packages/frontend/src/components/MkInstanceTicker.vue # packages/frontend/src/components/MkLaunchPad.vue # packages/frontend/src/components/MkMenu.vue # packages/frontend/src/components/MkNote.vue # packages/frontend/src/components/MkNoteSimple.vue # packages/frontend/src/components/MkPostForm.vue # packages/frontend/src/components/MkRadio.vue # packages/frontend/src/components/MkSignupDialog.form.vue # packages/frontend/src/components/MkSwitch.vue # packages/frontend/src/custom-emojis.ts # packages/frontend/src/pages/about.emojis.vue # packages/frontend/src/pages/about.vue # packages/frontend/src/pages/admin/index.vue # packages/frontend/src/pages/admin/other-settings.vue # packages/frontend/src/pages/custom-emojis-manager.vue # packages/frontend/src/pages/settings/general.vue # packages/frontend/src/pages/settings/mute-block.vue # packages/frontend/src/pages/timeline.vue # packages/frontend/src/pages/user/home.vue # packages/frontend/src/pages/user/index.files.vue # packages/frontend/src/scripts/get-note-menu.ts # packages/frontend/src/store.ts # packages/frontend/src/ui/_common_/stream-indicator.vue # packages/frontend/src/ui/classic.sidebar.vue # packages/frontend/src/ui/universal.vue # packages/frontend/src/ui/universal.widgets.vue # packages/frontend/vite.config.ts # packages/misskey-js/etc/misskey-js.api.md # packages/misskey-js/src/api.types.ts # packages/misskey-js/src/entities.ts # packages/misskey-js/src/streaming.types.ts
2023-12-12 23:08:57 +01:00
if (email.value === '') {
emailState.value = null;
2023-09-23 02:01:20 +02:00
return;
}
Merge remote-tracking branch 'misskey-original/develop' into develop # Conflicts: # locales/index.d.ts # locales/ja-JP.yml # package.json # packages/backend/src/server/api/endpoints/admin/emoji/copy.ts # packages/backend/src/server/api/endpoints/admin/meta.ts # packages/backend/src/server/api/endpoints/channels/timeline.ts # packages/backend/src/server/api/endpoints/notes/featured.ts # packages/frontend/src/components/MkButton.vue # packages/frontend/src/components/MkClickerGame.vue # packages/frontend/src/components/MkDialog.vue # packages/frontend/src/components/MkDrive.vue # packages/frontend/src/components/MkEmojiEditDialog.vue # packages/frontend/src/components/MkEmojiPicker.section.vue # packages/frontend/src/components/MkEmojiPicker.vue # packages/frontend/src/components/MkFollowButton.vue # packages/frontend/src/components/MkInstanceTicker.vue # packages/frontend/src/components/MkLaunchPad.vue # packages/frontend/src/components/MkMenu.vue # packages/frontend/src/components/MkNote.vue # packages/frontend/src/components/MkNoteSimple.vue # packages/frontend/src/components/MkPostForm.vue # packages/frontend/src/components/MkRadio.vue # packages/frontend/src/components/MkSignupDialog.form.vue # packages/frontend/src/components/MkSwitch.vue # packages/frontend/src/custom-emojis.ts # packages/frontend/src/pages/about.emojis.vue # packages/frontend/src/pages/about.vue # packages/frontend/src/pages/admin/index.vue # packages/frontend/src/pages/admin/other-settings.vue # packages/frontend/src/pages/custom-emojis-manager.vue # packages/frontend/src/pages/settings/general.vue # packages/frontend/src/pages/settings/mute-block.vue # packages/frontend/src/pages/timeline.vue # packages/frontend/src/pages/user/home.vue # packages/frontend/src/pages/user/index.files.vue # packages/frontend/src/scripts/get-note-menu.ts # packages/frontend/src/store.ts # packages/frontend/src/ui/_common_/stream-indicator.vue # packages/frontend/src/ui/classic.sidebar.vue # packages/frontend/src/ui/universal.vue # packages/frontend/src/ui/universal.widgets.vue # packages/frontend/vite.config.ts # packages/misskey-js/etc/misskey-js.api.md # packages/misskey-js/src/api.types.ts # packages/misskey-js/src/entities.ts # packages/misskey-js/src/streaming.types.ts
2023-12-12 23:08:57 +01:00
if (emailAbortController.value != null) {
emailAbortController.value.abort();
2023-09-23 02:01:20 +02:00
}
Merge remote-tracking branch 'misskey-original/develop' into develop # Conflicts: # locales/index.d.ts # locales/ja-JP.yml # package.json # packages/backend/src/server/api/endpoints/admin/emoji/copy.ts # packages/backend/src/server/api/endpoints/admin/meta.ts # packages/backend/src/server/api/endpoints/channels/timeline.ts # packages/backend/src/server/api/endpoints/notes/featured.ts # packages/frontend/src/components/MkButton.vue # packages/frontend/src/components/MkClickerGame.vue # packages/frontend/src/components/MkDialog.vue # packages/frontend/src/components/MkDrive.vue # packages/frontend/src/components/MkEmojiEditDialog.vue # packages/frontend/src/components/MkEmojiPicker.section.vue # packages/frontend/src/components/MkEmojiPicker.vue # packages/frontend/src/components/MkFollowButton.vue # packages/frontend/src/components/MkInstanceTicker.vue # packages/frontend/src/components/MkLaunchPad.vue # packages/frontend/src/components/MkMenu.vue # packages/frontend/src/components/MkNote.vue # packages/frontend/src/components/MkNoteSimple.vue # packages/frontend/src/components/MkPostForm.vue # packages/frontend/src/components/MkRadio.vue # packages/frontend/src/components/MkSignupDialog.form.vue # packages/frontend/src/components/MkSwitch.vue # packages/frontend/src/custom-emojis.ts # packages/frontend/src/pages/about.emojis.vue # packages/frontend/src/pages/about.vue # packages/frontend/src/pages/admin/index.vue # packages/frontend/src/pages/admin/other-settings.vue # packages/frontend/src/pages/custom-emojis-manager.vue # packages/frontend/src/pages/settings/general.vue # packages/frontend/src/pages/settings/mute-block.vue # packages/frontend/src/pages/timeline.vue # packages/frontend/src/pages/user/home.vue # packages/frontend/src/pages/user/index.files.vue # packages/frontend/src/scripts/get-note-menu.ts # packages/frontend/src/store.ts # packages/frontend/src/ui/_common_/stream-indicator.vue # packages/frontend/src/ui/classic.sidebar.vue # packages/frontend/src/ui/universal.vue # packages/frontend/src/ui/universal.widgets.vue # packages/frontend/vite.config.ts # packages/misskey-js/etc/misskey-js.api.md # packages/misskey-js/src/api.types.ts # packages/misskey-js/src/entities.ts # packages/misskey-js/src/streaming.types.ts
2023-12-12 23:08:57 +01:00
emailState.value = 'wait';
emailAbortController.value = new AbortController();
2023-09-23 02:01:20 +02:00
os.api('email-address/available', {
Merge remote-tracking branch 'misskey-original/develop' into develop # Conflicts: # locales/index.d.ts # locales/ja-JP.yml # package.json # packages/backend/src/server/api/endpoints/admin/emoji/copy.ts # packages/backend/src/server/api/endpoints/admin/meta.ts # packages/backend/src/server/api/endpoints/channels/timeline.ts # packages/backend/src/server/api/endpoints/notes/featured.ts # packages/frontend/src/components/MkButton.vue # packages/frontend/src/components/MkClickerGame.vue # packages/frontend/src/components/MkDialog.vue # packages/frontend/src/components/MkDrive.vue # packages/frontend/src/components/MkEmojiEditDialog.vue # packages/frontend/src/components/MkEmojiPicker.section.vue # packages/frontend/src/components/MkEmojiPicker.vue # packages/frontend/src/components/MkFollowButton.vue # packages/frontend/src/components/MkInstanceTicker.vue # packages/frontend/src/components/MkLaunchPad.vue # packages/frontend/src/components/MkMenu.vue # packages/frontend/src/components/MkNote.vue # packages/frontend/src/components/MkNoteSimple.vue # packages/frontend/src/components/MkPostForm.vue # packages/frontend/src/components/MkRadio.vue # packages/frontend/src/components/MkSignupDialog.form.vue # packages/frontend/src/components/MkSwitch.vue # packages/frontend/src/custom-emojis.ts # packages/frontend/src/pages/about.emojis.vue # packages/frontend/src/pages/about.vue # packages/frontend/src/pages/admin/index.vue # packages/frontend/src/pages/admin/other-settings.vue # packages/frontend/src/pages/custom-emojis-manager.vue # packages/frontend/src/pages/settings/general.vue # packages/frontend/src/pages/settings/mute-block.vue # packages/frontend/src/pages/timeline.vue # packages/frontend/src/pages/user/home.vue # packages/frontend/src/pages/user/index.files.vue # packages/frontend/src/scripts/get-note-menu.ts # packages/frontend/src/store.ts # packages/frontend/src/ui/_common_/stream-indicator.vue # packages/frontend/src/ui/classic.sidebar.vue # packages/frontend/src/ui/universal.vue # packages/frontend/src/ui/universal.widgets.vue # packages/frontend/vite.config.ts # packages/misskey-js/etc/misskey-js.api.md # packages/misskey-js/src/api.types.ts # packages/misskey-js/src/entities.ts # packages/misskey-js/src/streaming.types.ts
2023-12-12 23:08:57 +01:00
emailAddress: email.value,
}, undefined, emailAbortController.value.signal).then(result => {
emailState.value = result.available ? 'ok' :
2023-09-23 02:01:20 +02:00
result.reason === 'used' ? 'unavailable:used' :
result.reason === 'format' ? 'unavailable:format' :
result.reason === 'disposable' ? 'unavailable:disposable' :
result.reason === 'mx' ? 'unavailable:mx' :
result.reason === 'smtp' ? 'unavailable:smtp' :
'unavailable';
}).catch((err) => {
if (err.name !== 'AbortError') {
Merge remote-tracking branch 'misskey-original/develop' into develop # Conflicts: # locales/index.d.ts # locales/ja-JP.yml # package.json # packages/backend/src/server/api/endpoints/admin/emoji/copy.ts # packages/backend/src/server/api/endpoints/admin/meta.ts # packages/backend/src/server/api/endpoints/channels/timeline.ts # packages/backend/src/server/api/endpoints/notes/featured.ts # packages/frontend/src/components/MkButton.vue # packages/frontend/src/components/MkClickerGame.vue # packages/frontend/src/components/MkDialog.vue # packages/frontend/src/components/MkDrive.vue # packages/frontend/src/components/MkEmojiEditDialog.vue # packages/frontend/src/components/MkEmojiPicker.section.vue # packages/frontend/src/components/MkEmojiPicker.vue # packages/frontend/src/components/MkFollowButton.vue # packages/frontend/src/components/MkInstanceTicker.vue # packages/frontend/src/components/MkLaunchPad.vue # packages/frontend/src/components/MkMenu.vue # packages/frontend/src/components/MkNote.vue # packages/frontend/src/components/MkNoteSimple.vue # packages/frontend/src/components/MkPostForm.vue # packages/frontend/src/components/MkRadio.vue # packages/frontend/src/components/MkSignupDialog.form.vue # packages/frontend/src/components/MkSwitch.vue # packages/frontend/src/custom-emojis.ts # packages/frontend/src/pages/about.emojis.vue # packages/frontend/src/pages/about.vue # packages/frontend/src/pages/admin/index.vue # packages/frontend/src/pages/admin/other-settings.vue # packages/frontend/src/pages/custom-emojis-manager.vue # packages/frontend/src/pages/settings/general.vue # packages/frontend/src/pages/settings/mute-block.vue # packages/frontend/src/pages/timeline.vue # packages/frontend/src/pages/user/home.vue # packages/frontend/src/pages/user/index.files.vue # packages/frontend/src/scripts/get-note-menu.ts # packages/frontend/src/store.ts # packages/frontend/src/ui/_common_/stream-indicator.vue # packages/frontend/src/ui/classic.sidebar.vue # packages/frontend/src/ui/universal.vue # packages/frontend/src/ui/universal.widgets.vue # packages/frontend/vite.config.ts # packages/misskey-js/etc/misskey-js.api.md # packages/misskey-js/src/api.types.ts # packages/misskey-js/src/entities.ts # packages/misskey-js/src/streaming.types.ts
2023-12-12 23:08:57 +01:00
emailState.value = 'error';
2023-09-23 02:01:20 +02:00
}
});
}
function onChangePassword(): void {
Merge remote-tracking branch 'misskey-original/develop' into develop # Conflicts: # locales/index.d.ts # locales/ja-JP.yml # package.json # packages/backend/src/server/api/endpoints/admin/emoji/copy.ts # packages/backend/src/server/api/endpoints/admin/meta.ts # packages/backend/src/server/api/endpoints/channels/timeline.ts # packages/backend/src/server/api/endpoints/notes/featured.ts # packages/frontend/src/components/MkButton.vue # packages/frontend/src/components/MkClickerGame.vue # packages/frontend/src/components/MkDialog.vue # packages/frontend/src/components/MkDrive.vue # packages/frontend/src/components/MkEmojiEditDialog.vue # packages/frontend/src/components/MkEmojiPicker.section.vue # packages/frontend/src/components/MkEmojiPicker.vue # packages/frontend/src/components/MkFollowButton.vue # packages/frontend/src/components/MkInstanceTicker.vue # packages/frontend/src/components/MkLaunchPad.vue # packages/frontend/src/components/MkMenu.vue # packages/frontend/src/components/MkNote.vue # packages/frontend/src/components/MkNoteSimple.vue # packages/frontend/src/components/MkPostForm.vue # packages/frontend/src/components/MkRadio.vue # packages/frontend/src/components/MkSignupDialog.form.vue # packages/frontend/src/components/MkSwitch.vue # packages/frontend/src/custom-emojis.ts # packages/frontend/src/pages/about.emojis.vue # packages/frontend/src/pages/about.vue # packages/frontend/src/pages/admin/index.vue # packages/frontend/src/pages/admin/other-settings.vue # packages/frontend/src/pages/custom-emojis-manager.vue # packages/frontend/src/pages/settings/general.vue # packages/frontend/src/pages/settings/mute-block.vue # packages/frontend/src/pages/timeline.vue # packages/frontend/src/pages/user/home.vue # packages/frontend/src/pages/user/index.files.vue # packages/frontend/src/scripts/get-note-menu.ts # packages/frontend/src/store.ts # packages/frontend/src/ui/_common_/stream-indicator.vue # packages/frontend/src/ui/classic.sidebar.vue # packages/frontend/src/ui/universal.vue # packages/frontend/src/ui/universal.widgets.vue # packages/frontend/vite.config.ts # packages/misskey-js/etc/misskey-js.api.md # packages/misskey-js/src/api.types.ts # packages/misskey-js/src/entities.ts # packages/misskey-js/src/streaming.types.ts
2023-12-12 23:08:57 +01:00
if (password.value === '') {
passwordStrength.value = '';
2023-09-23 02:01:20 +02:00
return;
}
Merge remote-tracking branch 'misskey-original/develop' into develop # Conflicts: # locales/index.d.ts # locales/ja-JP.yml # package.json # packages/backend/src/server/api/endpoints/admin/emoji/copy.ts # packages/backend/src/server/api/endpoints/admin/meta.ts # packages/backend/src/server/api/endpoints/channels/timeline.ts # packages/backend/src/server/api/endpoints/notes/featured.ts # packages/frontend/src/components/MkButton.vue # packages/frontend/src/components/MkClickerGame.vue # packages/frontend/src/components/MkDialog.vue # packages/frontend/src/components/MkDrive.vue # packages/frontend/src/components/MkEmojiEditDialog.vue # packages/frontend/src/components/MkEmojiPicker.section.vue # packages/frontend/src/components/MkEmojiPicker.vue # packages/frontend/src/components/MkFollowButton.vue # packages/frontend/src/components/MkInstanceTicker.vue # packages/frontend/src/components/MkLaunchPad.vue # packages/frontend/src/components/MkMenu.vue # packages/frontend/src/components/MkNote.vue # packages/frontend/src/components/MkNoteSimple.vue # packages/frontend/src/components/MkPostForm.vue # packages/frontend/src/components/MkRadio.vue # packages/frontend/src/components/MkSignupDialog.form.vue # packages/frontend/src/components/MkSwitch.vue # packages/frontend/src/custom-emojis.ts # packages/frontend/src/pages/about.emojis.vue # packages/frontend/src/pages/about.vue # packages/frontend/src/pages/admin/index.vue # packages/frontend/src/pages/admin/other-settings.vue # packages/frontend/src/pages/custom-emojis-manager.vue # packages/frontend/src/pages/settings/general.vue # packages/frontend/src/pages/settings/mute-block.vue # packages/frontend/src/pages/timeline.vue # packages/frontend/src/pages/user/home.vue # packages/frontend/src/pages/user/index.files.vue # packages/frontend/src/scripts/get-note-menu.ts # packages/frontend/src/store.ts # packages/frontend/src/ui/_common_/stream-indicator.vue # packages/frontend/src/ui/classic.sidebar.vue # packages/frontend/src/ui/universal.vue # packages/frontend/src/ui/universal.widgets.vue # packages/frontend/vite.config.ts # packages/misskey-js/etc/misskey-js.api.md # packages/misskey-js/src/api.types.ts # packages/misskey-js/src/entities.ts # packages/misskey-js/src/streaming.types.ts
2023-12-12 23:08:57 +01:00
const strength = getPasswordStrength(password.value);
passwordStrength.value = strength > 0.7 ? 'high' : strength > 0.3 ? 'medium' : 'low';
}
function onChangePasswordRetype(): void {
Merge remote-tracking branch 'misskey-original/develop' into develop # Conflicts: # locales/index.d.ts # locales/ja-JP.yml # package.json # packages/backend/src/server/api/endpoints/admin/emoji/copy.ts # packages/backend/src/server/api/endpoints/admin/meta.ts # packages/backend/src/server/api/endpoints/channels/timeline.ts # packages/backend/src/server/api/endpoints/notes/featured.ts # packages/frontend/src/components/MkButton.vue # packages/frontend/src/components/MkClickerGame.vue # packages/frontend/src/components/MkDialog.vue # packages/frontend/src/components/MkDrive.vue # packages/frontend/src/components/MkEmojiEditDialog.vue # packages/frontend/src/components/MkEmojiPicker.section.vue # packages/frontend/src/components/MkEmojiPicker.vue # packages/frontend/src/components/MkFollowButton.vue # packages/frontend/src/components/MkInstanceTicker.vue # packages/frontend/src/components/MkLaunchPad.vue # packages/frontend/src/components/MkMenu.vue # packages/frontend/src/components/MkNote.vue # packages/frontend/src/components/MkNoteSimple.vue # packages/frontend/src/components/MkPostForm.vue # packages/frontend/src/components/MkRadio.vue # packages/frontend/src/components/MkSignupDialog.form.vue # packages/frontend/src/components/MkSwitch.vue # packages/frontend/src/custom-emojis.ts # packages/frontend/src/pages/about.emojis.vue # packages/frontend/src/pages/about.vue # packages/frontend/src/pages/admin/index.vue # packages/frontend/src/pages/admin/other-settings.vue # packages/frontend/src/pages/custom-emojis-manager.vue # packages/frontend/src/pages/settings/general.vue # packages/frontend/src/pages/settings/mute-block.vue # packages/frontend/src/pages/timeline.vue # packages/frontend/src/pages/user/home.vue # packages/frontend/src/pages/user/index.files.vue # packages/frontend/src/scripts/get-note-menu.ts # packages/frontend/src/store.ts # packages/frontend/src/ui/_common_/stream-indicator.vue # packages/frontend/src/ui/classic.sidebar.vue # packages/frontend/src/ui/universal.vue # packages/frontend/src/ui/universal.widgets.vue # packages/frontend/vite.config.ts # packages/misskey-js/etc/misskey-js.api.md # packages/misskey-js/src/api.types.ts # packages/misskey-js/src/entities.ts # packages/misskey-js/src/streaming.types.ts
2023-12-12 23:08:57 +01:00
if (retypedPassword.value === '') {
passwordRetypeState.value = null;
2023-09-23 02:01:20 +02:00
return;
}
Merge remote-tracking branch 'misskey-original/develop' into develop # Conflicts: # locales/index.d.ts # locales/ja-JP.yml # package.json # packages/backend/src/server/api/endpoints/admin/emoji/copy.ts # packages/backend/src/server/api/endpoints/admin/meta.ts # packages/backend/src/server/api/endpoints/channels/timeline.ts # packages/backend/src/server/api/endpoints/notes/featured.ts # packages/frontend/src/components/MkButton.vue # packages/frontend/src/components/MkClickerGame.vue # packages/frontend/src/components/MkDialog.vue # packages/frontend/src/components/MkDrive.vue # packages/frontend/src/components/MkEmojiEditDialog.vue # packages/frontend/src/components/MkEmojiPicker.section.vue # packages/frontend/src/components/MkEmojiPicker.vue # packages/frontend/src/components/MkFollowButton.vue # packages/frontend/src/components/MkInstanceTicker.vue # packages/frontend/src/components/MkLaunchPad.vue # packages/frontend/src/components/MkMenu.vue # packages/frontend/src/components/MkNote.vue # packages/frontend/src/components/MkNoteSimple.vue # packages/frontend/src/components/MkPostForm.vue # packages/frontend/src/components/MkRadio.vue # packages/frontend/src/components/MkSignupDialog.form.vue # packages/frontend/src/components/MkSwitch.vue # packages/frontend/src/custom-emojis.ts # packages/frontend/src/pages/about.emojis.vue # packages/frontend/src/pages/about.vue # packages/frontend/src/pages/admin/index.vue # packages/frontend/src/pages/admin/other-settings.vue # packages/frontend/src/pages/custom-emojis-manager.vue # packages/frontend/src/pages/settings/general.vue # packages/frontend/src/pages/settings/mute-block.vue # packages/frontend/src/pages/timeline.vue # packages/frontend/src/pages/user/home.vue # packages/frontend/src/pages/user/index.files.vue # packages/frontend/src/scripts/get-note-menu.ts # packages/frontend/src/store.ts # packages/frontend/src/ui/_common_/stream-indicator.vue # packages/frontend/src/ui/classic.sidebar.vue # packages/frontend/src/ui/universal.vue # packages/frontend/src/ui/universal.widgets.vue # packages/frontend/vite.config.ts # packages/misskey-js/etc/misskey-js.api.md # packages/misskey-js/src/api.types.ts # packages/misskey-js/src/entities.ts # packages/misskey-js/src/streaming.types.ts
2023-12-12 23:08:57 +01:00
passwordRetypeState.value = password.value === retypedPassword.value ? 'match' : 'not-match';
}
async function onSubmit(): Promise<void> {
Merge remote-tracking branch 'misskey-original/develop' into develop # Conflicts: # locales/index.d.ts # locales/ja-JP.yml # package.json # packages/backend/src/server/api/endpoints/admin/emoji/copy.ts # packages/backend/src/server/api/endpoints/admin/meta.ts # packages/backend/src/server/api/endpoints/channels/timeline.ts # packages/backend/src/server/api/endpoints/notes/featured.ts # packages/frontend/src/components/MkButton.vue # packages/frontend/src/components/MkClickerGame.vue # packages/frontend/src/components/MkDialog.vue # packages/frontend/src/components/MkDrive.vue # packages/frontend/src/components/MkEmojiEditDialog.vue # packages/frontend/src/components/MkEmojiPicker.section.vue # packages/frontend/src/components/MkEmojiPicker.vue # packages/frontend/src/components/MkFollowButton.vue # packages/frontend/src/components/MkInstanceTicker.vue # packages/frontend/src/components/MkLaunchPad.vue # packages/frontend/src/components/MkMenu.vue # packages/frontend/src/components/MkNote.vue # packages/frontend/src/components/MkNoteSimple.vue # packages/frontend/src/components/MkPostForm.vue # packages/frontend/src/components/MkRadio.vue # packages/frontend/src/components/MkSignupDialog.form.vue # packages/frontend/src/components/MkSwitch.vue # packages/frontend/src/custom-emojis.ts # packages/frontend/src/pages/about.emojis.vue # packages/frontend/src/pages/about.vue # packages/frontend/src/pages/admin/index.vue # packages/frontend/src/pages/admin/other-settings.vue # packages/frontend/src/pages/custom-emojis-manager.vue # packages/frontend/src/pages/settings/general.vue # packages/frontend/src/pages/settings/mute-block.vue # packages/frontend/src/pages/timeline.vue # packages/frontend/src/pages/user/home.vue # packages/frontend/src/pages/user/index.files.vue # packages/frontend/src/scripts/get-note-menu.ts # packages/frontend/src/store.ts # packages/frontend/src/ui/_common_/stream-indicator.vue # packages/frontend/src/ui/classic.sidebar.vue # packages/frontend/src/ui/universal.vue # packages/frontend/src/ui/universal.widgets.vue # packages/frontend/vite.config.ts # packages/misskey-js/etc/misskey-js.api.md # packages/misskey-js/src/api.types.ts # packages/misskey-js/src/entities.ts # packages/misskey-js/src/streaming.types.ts
2023-12-12 23:08:57 +01:00
if (submitting.value) return;
submitting.value = true;
2023-09-23 02:01:20 +02:00
try {
await os.api('signup', {
Merge remote-tracking branch 'misskey-original/develop' into develop # Conflicts: # locales/index.d.ts # locales/ja-JP.yml # package.json # packages/backend/src/server/api/endpoints/admin/emoji/copy.ts # packages/backend/src/server/api/endpoints/admin/meta.ts # packages/backend/src/server/api/endpoints/channels/timeline.ts # packages/backend/src/server/api/endpoints/notes/featured.ts # packages/frontend/src/components/MkButton.vue # packages/frontend/src/components/MkClickerGame.vue # packages/frontend/src/components/MkDialog.vue # packages/frontend/src/components/MkDrive.vue # packages/frontend/src/components/MkEmojiEditDialog.vue # packages/frontend/src/components/MkEmojiPicker.section.vue # packages/frontend/src/components/MkEmojiPicker.vue # packages/frontend/src/components/MkFollowButton.vue # packages/frontend/src/components/MkInstanceTicker.vue # packages/frontend/src/components/MkLaunchPad.vue # packages/frontend/src/components/MkMenu.vue # packages/frontend/src/components/MkNote.vue # packages/frontend/src/components/MkNoteSimple.vue # packages/frontend/src/components/MkPostForm.vue # packages/frontend/src/components/MkRadio.vue # packages/frontend/src/components/MkSignupDialog.form.vue # packages/frontend/src/components/MkSwitch.vue # packages/frontend/src/custom-emojis.ts # packages/frontend/src/pages/about.emojis.vue # packages/frontend/src/pages/about.vue # packages/frontend/src/pages/admin/index.vue # packages/frontend/src/pages/admin/other-settings.vue # packages/frontend/src/pages/custom-emojis-manager.vue # packages/frontend/src/pages/settings/general.vue # packages/frontend/src/pages/settings/mute-block.vue # packages/frontend/src/pages/timeline.vue # packages/frontend/src/pages/user/home.vue # packages/frontend/src/pages/user/index.files.vue # packages/frontend/src/scripts/get-note-menu.ts # packages/frontend/src/store.ts # packages/frontend/src/ui/_common_/stream-indicator.vue # packages/frontend/src/ui/classic.sidebar.vue # packages/frontend/src/ui/universal.vue # packages/frontend/src/ui/universal.widgets.vue # packages/frontend/vite.config.ts # packages/misskey-js/etc/misskey-js.api.md # packages/misskey-js/src/api.types.ts # packages/misskey-js/src/entities.ts # packages/misskey-js/src/streaming.types.ts
2023-12-12 23:08:57 +01:00
username: username.value,
password: password.value,
emailAddress: email.value,
invitationCode: invitationCode.value,
'hcaptcha-response': hCaptchaResponse.value,
'g-recaptcha-response': reCaptchaResponse.value,
'turnstile-response': turnstileResponse.value,
2023-09-23 02:01:20 +02:00
});
if (instance.emailRequiredForSignup) {
os.alert({
type: 'success',
title: i18n.ts._signup.almostThere,
Merge remote-tracking branch 'misskey-original/develop' into develop # Conflicts: # locales/index.d.ts # locales/ja-JP.yml # package.json # packages/backend/src/server/api/endpoints/admin/emoji/copy.ts # packages/backend/src/server/api/endpoints/admin/meta.ts # packages/backend/src/server/api/endpoints/channels/timeline.ts # packages/backend/src/server/api/endpoints/notes/featured.ts # packages/frontend/src/components/MkButton.vue # packages/frontend/src/components/MkClickerGame.vue # packages/frontend/src/components/MkDialog.vue # packages/frontend/src/components/MkDrive.vue # packages/frontend/src/components/MkEmojiEditDialog.vue # packages/frontend/src/components/MkEmojiPicker.section.vue # packages/frontend/src/components/MkEmojiPicker.vue # packages/frontend/src/components/MkFollowButton.vue # packages/frontend/src/components/MkInstanceTicker.vue # packages/frontend/src/components/MkLaunchPad.vue # packages/frontend/src/components/MkMenu.vue # packages/frontend/src/components/MkNote.vue # packages/frontend/src/components/MkNoteSimple.vue # packages/frontend/src/components/MkPostForm.vue # packages/frontend/src/components/MkRadio.vue # packages/frontend/src/components/MkSignupDialog.form.vue # packages/frontend/src/components/MkSwitch.vue # packages/frontend/src/custom-emojis.ts # packages/frontend/src/pages/about.emojis.vue # packages/frontend/src/pages/about.vue # packages/frontend/src/pages/admin/index.vue # packages/frontend/src/pages/admin/other-settings.vue # packages/frontend/src/pages/custom-emojis-manager.vue # packages/frontend/src/pages/settings/general.vue # packages/frontend/src/pages/settings/mute-block.vue # packages/frontend/src/pages/timeline.vue # packages/frontend/src/pages/user/home.vue # packages/frontend/src/pages/user/index.files.vue # packages/frontend/src/scripts/get-note-menu.ts # packages/frontend/src/store.ts # packages/frontend/src/ui/_common_/stream-indicator.vue # packages/frontend/src/ui/classic.sidebar.vue # packages/frontend/src/ui/universal.vue # packages/frontend/src/ui/universal.widgets.vue # packages/frontend/vite.config.ts # packages/misskey-js/etc/misskey-js.api.md # packages/misskey-js/src/api.types.ts # packages/misskey-js/src/entities.ts # packages/misskey-js/src/streaming.types.ts
2023-12-12 23:08:57 +01:00
text: i18n.t('_signup.emailSent', {email: email.value}),
2023-09-23 02:01:20 +02:00
});
emit('signupEmailPending');
} else {
const res = await os.api('signin', {
Merge remote-tracking branch 'misskey-original/develop' into develop # Conflicts: # locales/index.d.ts # locales/ja-JP.yml # package.json # packages/backend/src/server/api/endpoints/admin/emoji/copy.ts # packages/backend/src/server/api/endpoints/admin/meta.ts # packages/backend/src/server/api/endpoints/channels/timeline.ts # packages/backend/src/server/api/endpoints/notes/featured.ts # packages/frontend/src/components/MkButton.vue # packages/frontend/src/components/MkClickerGame.vue # packages/frontend/src/components/MkDialog.vue # packages/frontend/src/components/MkDrive.vue # packages/frontend/src/components/MkEmojiEditDialog.vue # packages/frontend/src/components/MkEmojiPicker.section.vue # packages/frontend/src/components/MkEmojiPicker.vue # packages/frontend/src/components/MkFollowButton.vue # packages/frontend/src/components/MkInstanceTicker.vue # packages/frontend/src/components/MkLaunchPad.vue # packages/frontend/src/components/MkMenu.vue # packages/frontend/src/components/MkNote.vue # packages/frontend/src/components/MkNoteSimple.vue # packages/frontend/src/components/MkPostForm.vue # packages/frontend/src/components/MkRadio.vue # packages/frontend/src/components/MkSignupDialog.form.vue # packages/frontend/src/components/MkSwitch.vue # packages/frontend/src/custom-emojis.ts # packages/frontend/src/pages/about.emojis.vue # packages/frontend/src/pages/about.vue # packages/frontend/src/pages/admin/index.vue # packages/frontend/src/pages/admin/other-settings.vue # packages/frontend/src/pages/custom-emojis-manager.vue # packages/frontend/src/pages/settings/general.vue # packages/frontend/src/pages/settings/mute-block.vue # packages/frontend/src/pages/timeline.vue # packages/frontend/src/pages/user/home.vue # packages/frontend/src/pages/user/index.files.vue # packages/frontend/src/scripts/get-note-menu.ts # packages/frontend/src/store.ts # packages/frontend/src/ui/_common_/stream-indicator.vue # packages/frontend/src/ui/classic.sidebar.vue # packages/frontend/src/ui/universal.vue # packages/frontend/src/ui/universal.widgets.vue # packages/frontend/vite.config.ts # packages/misskey-js/etc/misskey-js.api.md # packages/misskey-js/src/api.types.ts # packages/misskey-js/src/entities.ts # packages/misskey-js/src/streaming.types.ts
2023-12-12 23:08:57 +01:00
username: username.value,
password: password.value,
2023-09-23 02:01:20 +02:00
});
emit('signup', res);
if (props.autoSet) {
return login(res.i);
}
}
} catch {
Merge remote-tracking branch 'misskey-original/develop' into develop # Conflicts: # locales/index.d.ts # locales/ja-JP.yml # package.json # packages/backend/src/server/api/endpoints/admin/emoji/copy.ts # packages/backend/src/server/api/endpoints/admin/meta.ts # packages/backend/src/server/api/endpoints/channels/timeline.ts # packages/backend/src/server/api/endpoints/notes/featured.ts # packages/frontend/src/components/MkButton.vue # packages/frontend/src/components/MkClickerGame.vue # packages/frontend/src/components/MkDialog.vue # packages/frontend/src/components/MkDrive.vue # packages/frontend/src/components/MkEmojiEditDialog.vue # packages/frontend/src/components/MkEmojiPicker.section.vue # packages/frontend/src/components/MkEmojiPicker.vue # packages/frontend/src/components/MkFollowButton.vue # packages/frontend/src/components/MkInstanceTicker.vue # packages/frontend/src/components/MkLaunchPad.vue # packages/frontend/src/components/MkMenu.vue # packages/frontend/src/components/MkNote.vue # packages/frontend/src/components/MkNoteSimple.vue # packages/frontend/src/components/MkPostForm.vue # packages/frontend/src/components/MkRadio.vue # packages/frontend/src/components/MkSignupDialog.form.vue # packages/frontend/src/components/MkSwitch.vue # packages/frontend/src/custom-emojis.ts # packages/frontend/src/pages/about.emojis.vue # packages/frontend/src/pages/about.vue # packages/frontend/src/pages/admin/index.vue # packages/frontend/src/pages/admin/other-settings.vue # packages/frontend/src/pages/custom-emojis-manager.vue # packages/frontend/src/pages/settings/general.vue # packages/frontend/src/pages/settings/mute-block.vue # packages/frontend/src/pages/timeline.vue # packages/frontend/src/pages/user/home.vue # packages/frontend/src/pages/user/index.files.vue # packages/frontend/src/scripts/get-note-menu.ts # packages/frontend/src/store.ts # packages/frontend/src/ui/_common_/stream-indicator.vue # packages/frontend/src/ui/classic.sidebar.vue # packages/frontend/src/ui/universal.vue # packages/frontend/src/ui/universal.widgets.vue # packages/frontend/vite.config.ts # packages/misskey-js/etc/misskey-js.api.md # packages/misskey-js/src/api.types.ts # packages/misskey-js/src/entities.ts # packages/misskey-js/src/streaming.types.ts
2023-12-12 23:08:57 +01:00
submitting.value = false;
hcaptcha.value?.reset?.();
recaptcha.value?.reset?.();
turnstile.value?.reset?.();
2023-09-23 02:01:20 +02:00
os.alert({
type: 'error',
text: i18n.ts.somethingHappened,
});
}
}
</script>
<style lang="scss" module>
.banner {
2023-09-23 02:01:20 +02:00
padding: 16px;
text-align: center;
font-size: 26px;
background-color: var(--accentedBg);
color: var(--accent);
&.gamingDark {
background: linear-gradient(270deg, #e7a2a2, #e3cfa2, #ebefa1, #b3e7a6, #a6ebe7, #aec5e3, #cabded, #e0b9e3, #f4bddd);
background-size: 1800% 1800%;
2023-09-24 19:02:33 +02:00
-webkit-animation: AnimationDark var(--gamingspeed) cubic-bezier(0, 0.2, 0.90, 1) infinite;
-moz-animation: AnimationDark var(--gamingspeed) cubic-bezier(0, 0.2, 0.90, 1) infinite;
animation: AnimationDark var(--gamingspeed) cubic-bezier(0, 0.2, 0.90, 1) infinite;
2023-09-23 17:33:52 +02:00
color: var(--navFg);
2023-09-23 02:01:20 +02:00
}
&.gamingLight {
background: linear-gradient(270deg, #c06161, #c0a567, #b6ba69, #81bc72, #63c3be, #8bacd6, #9f8bd6, #d18bd6, #d883b4);
background-size: 1800% 1800%;
2023-09-24 19:02:33 +02:00
-webkit-animation: AnimationLight var(--gamingspeed) cubic-bezier(0, 0.2, 0.90, 1) infinite;
-moz-animation: AnimationLight var(--gamingspeed) cubic-bezier(0, 0.2, 0.90, 1) infinite;
animation: AnimationLight var(--gamingspeed) cubic-bezier(0, 0.2, 0.90, 1) infinite;
2023-09-23 17:33:52 +02:00
color: var(--navFg);
2023-09-23 02:01:20 +02:00
}
}
.captcha {
2023-09-23 02:01:20 +02:00
margin: 16px 0;
}
@-webkit-keyframes AnimationLight {
0% {
background-position: 0% 50%
}
50% {
background-position: 100% 50%
}
100% {
background-position: 0% 50%
}
}
@-moz-keyframes AnimationLight {
0% {
background-position: 0% 50%
}
50% {
background-position: 100% 50%
}
100% {
background-position: 0% 50%
}
}
@keyframes AnimationLight {
0% {
background-position: 0% 50%
}
50% {
background-position: 100% 50%
}
100% {
background-position: 0% 50%
}
}
@-webkit-keyframes AnimationDark {
0% {
background-position: 0% 50%
}
50% {
background-position: 100% 50%
}
100% {
background-position: 0% 50%
}
}
@-moz-keyframes AnimationDark {
0% {
background-position: 0% 50%
}
50% {
background-position: 100% 50%
}
100% {
background-position: 0% 50%
}
}
@keyframes AnimationDark {
0% {
background-position: 0% 50%
}
50% {
background-position: 100% 50%
}
100% {
background-position: 0% 50%
}
}
</style>