spec(pages): URLとして使用できる文字を制限 (MisskeyIO#873)

This commit is contained in:
あわわわとーにゅ 2025-01-08 03:50:25 +09:00 committed by GitHub
parent e1ae455e4a
commit 4f9aee899f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 5 deletions

View file

@ -24,7 +24,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<template #label>{{ i18n.ts._pages.summary }}</template>
</MkInput>
<MkInput v-model="name">
<MkInput v-model="name" type="text" pattern="^[a-zA-Z0-9_-]+$" autocapitalize="off">
<template #prefix>{{ url }}/@{{ author.username }}/pages/</template>
<template #label>{{ i18n.ts._pages.url }}</template>
</MkInput>
@ -158,7 +158,7 @@ function save() {
if (pageId.value) {
options.pageId = pageId.value;
misskeyApi('pages/update', options)
os.apiWithDialog('pages/update', options)
.then(page => {
currentName.value = name.value.trim();
os.alert({
@ -167,7 +167,7 @@ function save() {
});
}).catch(onError);
} else {
misskeyApi('pages/create', options)
os.apiWithDialog('pages/create', options)
.then(created => {
pageId.value = created.id;
currentName.value = name.value.trim();