update deps (#11820)

* update deps

* fix

* wip

* wip

* wip

* Update docker-compose.yml.example

* Delete reviewer-lottery.yml

* Update RepositoryModule.ts

* wip

* wip

* clean up

* update deps

* wip

* wip
This commit is contained in:
syuilo 2023-09-15 14:28:29 +09:00 committed by GitHub
parent cf7c6558ae
commit 6cf466e5d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
421 changed files with 2450 additions and 2604 deletions

View file

@ -77,7 +77,6 @@ SPDX-License-Identifier: AGPL-3.0-only
<script lang="ts" setup>
import { } from 'vue';
import getPasswordStrength from 'syuilo-password-strength';
import { toUnicode } from 'punycode/';
import MkButton from './MkButton.vue';
import MkInput from './MkInput.vue';
@ -132,6 +131,30 @@ const shouldDisableSubmitting = $computed((): boolean => {
passwordRetypeState !== 'match';
});
function getPasswordStrength(source: string): number {
let strength = 0;
let power = 0.018;
//
if (/[a-zA-Z]/.test(source) && /[0-9]/.test(source)) {
power += 0.020;
}
//
if (/[a-z]/.test(source) && /[A-Z]/.test(source)) {
power += 0.015;
}
//
if (/[!\x22\#$%&@'()*+,-./_]/.test(source)) {
power += 0.02;
}
strength = power * source.length;
return Math.max(0, Math.min(1, strength));
}
function onChangeUsername(): void {
if (username === '') {
usernameState = null;