enhance(frontend): 通常のRouterViewにTransitionを追加

This commit is contained in:
syuilo 2025-03-20 18:55:32 +09:00
parent a865a949b5
commit abddd40c09
4 changed files with 84 additions and 5 deletions

View file

@ -0,0 +1,15 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
const CHARS = 'abcdefghijklmnopqrstuvwxyz'; // CSSの<custom-ident>などで使われることもあるのでa-z以外使うな
export function randomId(length = 32, characters = CHARS) {
let result = '';
const charactersLength = characters.length;
for ( let i = 0; i < length; i++ ) {
result += characters.charAt(Math.floor(Math.random() * charactersLength));
}
return result;
}