mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-11-22 17:38:26 +01:00
parent
58a04ce1a5
commit
5fb0a995dd
37 changed files with 59 additions and 49 deletions
|
@ -1865,8 +1865,8 @@ pages:
|
||||||
font: "フォント"
|
font: "フォント"
|
||||||
fontSerif: "セリフ"
|
fontSerif: "セリフ"
|
||||||
fontSansSerif: "サンセリフ"
|
fontSansSerif: "サンセリフ"
|
||||||
set-eye-catchig-image: "アイキャッチ画像を設定"
|
set-eye-catching-image: "アイキャッチ画像を設定"
|
||||||
remove-eye-catchig-image: "アイキャッチ画像を削除"
|
remove-eye-catching-image: "アイキャッチ画像を削除"
|
||||||
choose-block: "ブロックを追加"
|
choose-block: "ブロックを追加"
|
||||||
select-type: "種類を選択"
|
select-type: "種類を選択"
|
||||||
enter-variable-name: "変数名を決めてください"
|
enter-variable-name: "変数名を決めてください"
|
||||||
|
|
|
@ -34,7 +34,7 @@ body
|
||||||
.peg
|
.peg
|
||||||
display block
|
display block
|
||||||
position absolute
|
position absolute
|
||||||
right 0px
|
right 0
|
||||||
width 100px
|
width 100px
|
||||||
height 100%
|
height 100%
|
||||||
box-shadow 0 0 10px var(--primary), 0 0 5px var(--primary)
|
box-shadow 0 0 10px var(--primary), 0 0 5px var(--primary)
|
||||||
|
|
|
@ -98,7 +98,7 @@ export default Vue.extend({
|
||||||
margin 0 auto
|
margin 0 auto
|
||||||
text-align center
|
text-align center
|
||||||
background #fff
|
background #fff
|
||||||
box-shadow 0px 4px 16px rgba(#000, 0.2)
|
box-shadow 0 4px 16px rgba(#000, 0.2)
|
||||||
|
|
||||||
> .fetching
|
> .fetching
|
||||||
margin 0
|
margin 0
|
||||||
|
|
|
@ -52,7 +52,7 @@ function match(e: KeyboardEvent, patterns: action['patterns']): boolean {
|
||||||
pattern.ctrl == e.ctrlKey &&
|
pattern.ctrl == e.ctrlKey &&
|
||||||
pattern.shift == e.shiftKey &&
|
pattern.shift == e.shiftKey &&
|
||||||
pattern.alt == e.altKey &&
|
pattern.alt == e.altKey &&
|
||||||
e.metaKey == false
|
!e.metaKey
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,9 +11,9 @@ export default function(me, settings, note) {
|
||||||
return (
|
return (
|
||||||
(!isMyNote && note.reply && includesMutedWords(note.reply.text)) ||
|
(!isMyNote && note.reply && includesMutedWords(note.reply.text)) ||
|
||||||
(!isMyNote && note.renote && includesMutedWords(note.renote.text)) ||
|
(!isMyNote && note.renote && includesMutedWords(note.renote.text)) ||
|
||||||
(settings.showMyRenotes === false && isMyNote && isPureRenote) ||
|
(!settings.showMyRenotes && isMyNote && isPureRenote) ||
|
||||||
(settings.showRenotedMyNotes === false && isPureRenote && note.renote.userId == me.id) ||
|
(!settings.showRenotedMyNotes && isPureRenote && note.renote.userId == me.id) ||
|
||||||
(settings.showLocalRenotes === false && isPureRenote && note.renote.user.host == null) ||
|
(!settings.showLocalRenotes && isPureRenote && note.renote.user.host == null) ||
|
||||||
(!isMyNote && includesMutedWords(note.text))
|
(!isMyNote && includesMutedWords(note.text))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,7 +80,7 @@ export default Vue.extend({
|
||||||
|
|
||||||
ms(): number {
|
ms(): number {
|
||||||
return this.now.getMilliseconds() * this.smooth;
|
return this.now.getMilliseconds() * this.smooth;
|
||||||
}
|
},
|
||||||
s(): number {
|
s(): number {
|
||||||
return this.now.getSeconds();
|
return this.now.getSeconds();
|
||||||
},
|
},
|
||||||
|
|
|
@ -202,7 +202,7 @@ export default Vue.extend({
|
||||||
left 0
|
left 0
|
||||||
z-index 1
|
z-index 1
|
||||||
width 100%
|
width 100%
|
||||||
box-shadow 0 0px 2px rgba(#000, 0.2)
|
box-shadow 0 0 2px rgba(#000, 0.2)
|
||||||
|
|
||||||
> .form
|
> .form
|
||||||
background rgba(0, 0, 0, 0.02)
|
background rgba(0, 0, 0, 0.02)
|
||||||
|
|
|
@ -36,10 +36,10 @@
|
||||||
</ui-select>
|
</ui-select>
|
||||||
|
|
||||||
<div class="eyeCatch">
|
<div class="eyeCatch">
|
||||||
<ui-button v-if="eyeCatchingImageId == null && !readonly" @click="setEyeCatchingImage()"><fa :icon="faPlus"/> {{ $t('set-eye-catchig-image') }}</ui-button>
|
<ui-button v-if="eyeCatchingImageId == null && !readonly" @click="setEyeCatchingImage()"><fa :icon="faPlus"/> {{ $t('set-eye-catching-image') }}</ui-button>
|
||||||
<div v-else-if="eyeCatchingImage">
|
<div v-else-if="eyeCatchingImage">
|
||||||
<img :src="eyeCatchingImage.url" :alt="eyeCatchingImage.name"/>
|
<img :src="eyeCatchingImage.url" :alt="eyeCatchingImage.name"/>
|
||||||
<ui-button @click="removeEyeCatchingImage()" v-if="!readonly"><fa :icon="faTrashAlt"/> {{ $t('remove-eye-catchig-image') }}</ui-button>
|
<ui-button @click="removeEyeCatchingImage()" v-if="!readonly"><fa :icon="faTrashAlt"/> {{ $t('remove-eye-catching-image') }}</ui-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -273,7 +273,7 @@ export default Vue.extend({
|
||||||
|
|
||||||
import_() {
|
import_() {
|
||||||
(this.$refs.file as any).click();
|
(this.$refs.file as any).click();
|
||||||
}
|
},
|
||||||
|
|
||||||
export_() {
|
export_() {
|
||||||
const blob = new Blob([this.selectedThemeCode], {
|
const blob = new Blob([this.selectedThemeCode], {
|
||||||
|
|
|
@ -322,7 +322,7 @@ root(fill)
|
||||||
|
|
||||||
> .value
|
> .value
|
||||||
display block
|
display block
|
||||||
width 0%
|
width 0
|
||||||
height 100%
|
height 100%
|
||||||
background transparent
|
background transparent
|
||||||
border-radius 6px
|
border-radius 6px
|
||||||
|
|
|
@ -166,7 +166,7 @@ export default Vue.extend({
|
||||||
> .follow-button
|
> .follow-button
|
||||||
position absolute
|
position absolute
|
||||||
top 8px
|
top 8px
|
||||||
right 0px
|
right 0
|
||||||
|
|
||||||
> .more
|
> .more
|
||||||
display block
|
display block
|
||||||
|
|
|
@ -160,7 +160,7 @@ export default Vue.extend({
|
||||||
this.$emit('top');
|
this.$emit('top');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.$store.state.settings.fetchOnScroll !== false) {
|
if (this.$store.state.settings.fetchOnScroll) {
|
||||||
const current = this.$refs.body.scrollTop + this.$refs.body.clientHeight;
|
const current = this.$refs.body.scrollTop + this.$refs.body.clientHeight;
|
||||||
if (current > this.$refs.body.scrollHeight - 1) this.$emit('bottom');
|
if (current > this.$refs.body.scrollHeight - 1) this.$emit('bottom');
|
||||||
}
|
}
|
||||||
|
|
|
@ -205,7 +205,7 @@ export default Vue.extend({
|
||||||
top -32px
|
top -32px
|
||||||
left 0
|
left 0
|
||||||
right 0
|
right 0
|
||||||
width 0px
|
width 0
|
||||||
margin 0 auto
|
margin 0 auto
|
||||||
border-top solid 16px transparent
|
border-top solid 16px transparent
|
||||||
border-left solid 16px transparent
|
border-left solid 16px transparent
|
||||||
|
|
|
@ -102,7 +102,7 @@ class Autocomplete {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isHashtag && opened == false) {
|
if (isHashtag && !opened) {
|
||||||
const hashtag = text.substr(hashtagIndex + 1);
|
const hashtag = text.substr(hashtagIndex + 1);
|
||||||
if (!hashtag.includes(' ')) {
|
if (!hashtag.includes(' ')) {
|
||||||
this.open('hashtag', hashtag);
|
this.open('hashtag', hashtag);
|
||||||
|
@ -110,7 +110,7 @@ class Autocomplete {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isEmoji && opened == false) {
|
if (isEmoji && !opened) {
|
||||||
const emoji = text.substr(emojiIndex + 1);
|
const emoji = text.substr(emojiIndex + 1);
|
||||||
if (!emoji.includes(' ')) {
|
if (!emoji.includes(' ')) {
|
||||||
this.open('emoji', emoji);
|
this.open('emoji', emoji);
|
||||||
|
|
|
@ -47,7 +47,7 @@ class Script {
|
||||||
|
|
||||||
public interpolate(str: string) {
|
public interpolate(str: string) {
|
||||||
if (str == null) return null;
|
if (str == null) return null;
|
||||||
return str.replace(/\{(.+?)\}/g, match => {
|
return str.replace(/{(.+?)}/g, match => {
|
||||||
const v = this.vars[match.slice(1, -1).trim()];
|
const v = this.vars[match.slice(1, -1).trim()];
|
||||||
return v == null ? 'NULL' : v.toString();
|
return v == null ? 'NULL' : v.toString();
|
||||||
});
|
});
|
||||||
|
|
|
@ -750,12 +750,17 @@ export default Vue.extend({
|
||||||
bottom 0
|
bottom 0
|
||||||
animation-delay -1.0s
|
animation-delay -1.0s
|
||||||
|
|
||||||
@keyframes sk-rotate { 100% { transform: rotate(360deg); }}
|
@keyframes sk-rotate {
|
||||||
|
100% {
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@keyframes sk-bounce {
|
@keyframes sk-bounce {
|
||||||
0%, 100% {
|
0%, 100% {
|
||||||
transform: scale(0.0);
|
transform: scale(0.0);
|
||||||
} 50% {
|
}
|
||||||
|
50% {
|
||||||
transform: scale(1.0);
|
transform: scale(1.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -180,7 +180,7 @@ export default Vue.extend({
|
||||||
this.releaseQueue();
|
this.releaseQueue();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.$store.state.settings.fetchOnScroll !== false) {
|
if (this.$store.state.settings.fetchOnScroll) {
|
||||||
const current = window.scrollY + window.innerHeight;
|
const current = window.scrollY + window.innerHeight;
|
||||||
if (current > document.body.offsetHeight - 8) this.fetchMore();
|
if (current > document.body.offsetHeight - 8) this.fetchMore();
|
||||||
}
|
}
|
||||||
|
|
|
@ -377,7 +377,7 @@ export default Vue.extend({
|
||||||
}, err => {
|
}, err => {
|
||||||
this.$root.dialog({
|
this.$root.dialog({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
title: this.$t('error')
|
title: this.$t('error'),
|
||||||
text: err.message
|
text: err.message
|
||||||
});
|
});
|
||||||
}, {
|
}, {
|
||||||
|
|
|
@ -480,7 +480,7 @@ export default Vue.extend({
|
||||||
&:focus
|
&:focus
|
||||||
&:not([data-is-modal])
|
&:not([data-is-modal])
|
||||||
> .body
|
> .body
|
||||||
box-shadow 0 0 0px 1px var(--primaryAlpha05), 0 2px 12px 0 var(--desktopWindowShadow)
|
box-shadow 0 0 0 1px var(--primaryAlpha05), 0 2px 12px 0 var(--desktopWindowShadow)
|
||||||
|
|
||||||
> .handle
|
> .handle
|
||||||
$size = 8px
|
$size = 8px
|
||||||
|
|
|
@ -352,7 +352,7 @@ export default Vue.extend({
|
||||||
padding 0 16px
|
padding 0 16px
|
||||||
line-height 48px
|
line-height 48px
|
||||||
background var(--faceHeader)
|
background var(--faceHeader)
|
||||||
box-shadow 0 1px 0px rgba(0, 0, 0, 0.1)
|
box-shadow 0 1px 0 rgba(0, 0, 0, 0.1)
|
||||||
|
|
||||||
& + div
|
& + div
|
||||||
max-height calc(100% - 48px)
|
max-height calc(100% - 48px)
|
||||||
|
|
|
@ -505,7 +505,7 @@ class WindowSystem extends EventEmitter {
|
||||||
function urlBase64ToUint8Array(base64String: string): Uint8Array {
|
function urlBase64ToUint8Array(base64String: string): Uint8Array {
|
||||||
const padding = '='.repeat((4 - base64String.length % 4) % 4);
|
const padding = '='.repeat((4 - base64String.length % 4) % 4);
|
||||||
const base64 = (base64String + padding)
|
const base64 = (base64String + padding)
|
||||||
.replace(/\-/g, '+')
|
.replace(/-/g, '+')
|
||||||
.replace(/_/g, '/');
|
.replace(/_/g, '/');
|
||||||
|
|
||||||
const rawData = window.atob(base64);
|
const rawData = window.atob(base64);
|
||||||
|
|
|
@ -83,7 +83,7 @@ export default Vue.extend({
|
||||||
hierarchyFolders: [],
|
hierarchyFolders: [],
|
||||||
selectedFiles: [],
|
selectedFiles: [],
|
||||||
info: null,
|
info: null,
|
||||||
connection: null
|
connection: null,
|
||||||
|
|
||||||
fetching: true,
|
fetching: true,
|
||||||
fetchingMoreFiles: false,
|
fetchingMoreFiles: false,
|
||||||
|
@ -385,7 +385,7 @@ export default Vue.extend({
|
||||||
|
|
||||||
createFolder() {
|
createFolder() {
|
||||||
this.$root.dialog({
|
this.$root.dialog({
|
||||||
title: this.$t('folder-name')
|
title: this.$t('folder-name'),
|
||||||
input: {
|
input: {
|
||||||
default: this.folder.name
|
default: this.folder.name
|
||||||
}
|
}
|
||||||
|
@ -415,7 +415,7 @@ export default Vue.extend({
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.$root.dialog({
|
this.$root.dialog({
|
||||||
title: this.$t('folder-name')
|
title: this.$t('folder-name'),
|
||||||
input: {
|
input: {
|
||||||
default: this.folder.name
|
default: this.folder.name
|
||||||
}
|
}
|
||||||
|
@ -597,12 +597,17 @@ export default Vue.extend({
|
||||||
bottom 0
|
bottom 0
|
||||||
animation-delay -1.0s
|
animation-delay -1.0s
|
||||||
|
|
||||||
@keyframes sk-rotate { 100% { transform: rotate(360deg); }}
|
@keyframes sk-rotate {
|
||||||
|
100% {
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@keyframes sk-bounce {
|
@keyframes sk-bounce {
|
||||||
0%, 100% {
|
0%, 100% {
|
||||||
transform: scale(0.0);
|
transform: scale(0.0);
|
||||||
} 50% {
|
}
|
||||||
|
50% {
|
||||||
transform: scale(1.0);
|
transform: scale(1.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -174,7 +174,7 @@ export default Vue.extend({
|
||||||
this.releaseQueue();
|
this.releaseQueue();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.$store.state.settings.fetchOnScroll !== false) {
|
if (this.$store.state.settings.fetchOnScroll) {
|
||||||
// 親要素が display none だったら弾く
|
// 親要素が display none だったら弾く
|
||||||
// https://github.com/syuilo/misskey/issues/1569
|
// https://github.com/syuilo/misskey/issues/1569
|
||||||
// http://d.hatena.ne.jp/favril/20091105/1257403319
|
// http://d.hatena.ne.jp/favril/20091105/1257403319
|
||||||
|
|
|
@ -115,7 +115,7 @@ export default Vue.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
onScroll() {
|
onScroll() {
|
||||||
if (this.$store.state.settings.fetchOnScroll !== false) {
|
if (this.$store.state.settings.fetchOnScroll) {
|
||||||
// 親要素が display none だったら弾く
|
// 親要素が display none だったら弾く
|
||||||
// https://github.com/syuilo/misskey/issues/1569
|
// https://github.com/syuilo/misskey/issues/1569
|
||||||
// http://d.hatena.ne.jp/favril/20091105/1257403319
|
// http://d.hatena.ne.jp/favril/20091105/1257403319
|
||||||
|
|
|
@ -295,7 +295,7 @@ export default Vue.extend({
|
||||||
}, err => {
|
}, err => {
|
||||||
this.$root.dialog({
|
this.$root.dialog({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
title: this.$t('error')
|
title: this.$t('error'),
|
||||||
text: err.message
|
text: err.message
|
||||||
});
|
});
|
||||||
}, {
|
}, {
|
||||||
|
@ -341,7 +341,7 @@ export default Vue.extend({
|
||||||
|
|
||||||
post() {
|
post() {
|
||||||
this.posting = true;
|
this.posting = true;
|
||||||
const viaMobile = this.$store.state.settings.disableViaMobile !== true;
|
const viaMobile = !this.$store.state.settings.disableViaMobile;
|
||||||
this.$root.api('notes/create', {
|
this.$root.api('notes/create', {
|
||||||
text: this.text == '' ? undefined : this.text,
|
text: this.text == '' ? undefined : this.text,
|
||||||
fileIds: this.files.length > 0 ? this.files.map(f => f.id) : undefined,
|
fileIds: this.files.length > 0 ? this.files.map(f => f.id) : undefined,
|
||||||
|
|
|
@ -49,7 +49,7 @@ export default Vue.extend({
|
||||||
padding 0 8px
|
padding 0 8px
|
||||||
|
|
||||||
&.shadow
|
&.shadow
|
||||||
box-shadow 0 0px 8px rgba(0, 0, 0, 0.25)
|
box-shadow 0 0 8px rgba(0, 0, 0, 0.25)
|
||||||
|
|
||||||
&, *
|
&, *
|
||||||
user-select none
|
user-select none
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
input
|
input
|
||||||
min-width 0px
|
min-width 0
|
||||||
|
|
||||||
input:not([type])
|
input:not([type])
|
||||||
input[type='text']
|
input[type='text']
|
||||||
|
|
|
@ -129,7 +129,7 @@ export const mfmLanguage = P.createLanguage({
|
||||||
mention: () => {
|
mention: () => {
|
||||||
return P((input, i) => {
|
return P((input, i) => {
|
||||||
const text = input.substr(i);
|
const text = input.substr(i);
|
||||||
const match = text.match(/^@\w([\w-]*\w)?(?:@[\w\.\-]+\w)?/);
|
const match = text.match(/^@\w([\w-]*\w)?(?:@[\w.\-]+\w)?/);
|
||||||
if (!match) return P.makeFailure(i, 'not a mention');
|
if (!match) return P.makeFailure(i, 'not a mention');
|
||||||
if (input[i - 1] != null && input[i - 1].match(/[a-z0-9]/i)) return P.makeFailure(i, 'not a mention');
|
if (input[i - 1] != null && input[i - 1].match(/[a-z0-9]/i)) return P.makeFailure(i, 'not a mention');
|
||||||
return P.makeSuccess(i + match[0].length, match[0]);
|
return P.makeSuccess(i + match[0].length, match[0]);
|
||||||
|
@ -141,7 +141,7 @@ export const mfmLanguage = P.createLanguage({
|
||||||
},
|
},
|
||||||
hashtag: () => P((input, i) => {
|
hashtag: () => P((input, i) => {
|
||||||
const text = input.substr(i);
|
const text = input.substr(i);
|
||||||
const match = text.match(/^#([^\s\.,!\?'"#:\/\[\]【】]+)/i);
|
const match = text.match(/^#([^\s.,!?'"#:\/\[\]【】]+)/i);
|
||||||
if (!match) return P.makeFailure(i, 'not a hashtag');
|
if (!match) return P.makeFailure(i, 'not a hashtag');
|
||||||
let hashtag = match[1];
|
let hashtag = match[1];
|
||||||
hashtag = removeOrphanedBrackets(hashtag);
|
hashtag = removeOrphanedBrackets(hashtag);
|
||||||
|
|
|
@ -36,4 +36,4 @@ export function createTree(type: string, children: MfmForest, props: any): MfmTr
|
||||||
return T.createTree({ type, props }, children);
|
return T.createTree({ type, props }, children);
|
||||||
}
|
}
|
||||||
|
|
||||||
export const urlRegex = /^https?:\/\/[\w\/:%#@\$&\?!\(\)\[\]~\.,=\+\-]+/;
|
export const urlRegex = /^https?:\/\/[\w\/:%#@$&?!()\[\]~.,=+\-]+/;
|
||||||
|
|
|
@ -64,7 +64,7 @@ export class ASEvaluator {
|
||||||
|
|
||||||
@autobind
|
@autobind
|
||||||
private interpolate(str: string, scope: Scope) {
|
private interpolate(str: string, scope: Scope) {
|
||||||
return str.replace(/\{(.+?)\}/g, match => {
|
return str.replace(/{(.+?)}/g, match => {
|
||||||
const v = scope.getState(match.slice(1, -1).trim());
|
const v = scope.getState(match.slice(1, -1).trim());
|
||||||
return v == null ? 'NULL' : v.toString();
|
return v == null ? 'NULL' : v.toString();
|
||||||
});
|
});
|
||||||
|
|
|
@ -217,7 +217,7 @@ export class UserRepository extends Repository<User> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public isValidBirthday(birthday: string): boolean {
|
public isValidBirthday(birthday: string): boolean {
|
||||||
return typeof birthday == 'string' && /^([0-9]{4})\-([0-9]{2})-([0-9]{2})$/.test(birthday);
|
return typeof birthday == 'string' && /^([0-9]{4})-([0-9]{2})-([0-9]{2})$/.test(birthday);
|
||||||
}
|
}
|
||||||
//#endregion
|
//#endregion
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
|
|
||||||
type: {
|
type: {
|
||||||
validator: $.optional.str.match(/^[a-zA-Z\/\-\*]+$/)
|
validator: $.optional.str.match(/^[a-zA-Z\/\-*]+$/)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
|
|
||||||
type: {
|
type: {
|
||||||
validator: $.optional.str.match(/^[a-zA-Z\/\-\*]+$/)
|
validator: $.optional.str.match(/^[a-zA-Z\/\-*]+$/)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ for (const endpoint of endpoints) {
|
||||||
} else {
|
} else {
|
||||||
if (endpoint.name.includes('-')) {
|
if (endpoint.name.includes('-')) {
|
||||||
// 後方互換性のため
|
// 後方互換性のため
|
||||||
router.post(`/${endpoint.name.replace(/\-/g, '_')}`, handler.bind(null, endpoint));
|
router.post(`/${endpoint.name.replace(/-/g, '_')}`, handler.bind(null, endpoint));
|
||||||
}
|
}
|
||||||
router.post(`/${endpoint.name}`, handler.bind(null, endpoint));
|
router.post(`/${endpoint.name}`, handler.bind(null, endpoint));
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ export function convertSchemaToOpenApiSchema(schema: Schema) {
|
||||||
const res: any = schema;
|
const res: any = schema;
|
||||||
|
|
||||||
if (schema.type === 'object' && schema.properties) {
|
if (schema.type === 'object' && schema.properties) {
|
||||||
res.required = Object.entries(schema.properties).filter(([k, v]) => v.optional !== true).map(([k]) => k);
|
res.required = Object.entries(schema.properties).filter(([k, v]) => !v.optional).map(([k]) => k);
|
||||||
|
|
||||||
for (const k of Object.keys(schema.properties)) {
|
for (const k of Object.keys(schema.properties)) {
|
||||||
res.properties[k] = convertSchemaToOpenApiSchema(schema.properties[k]);
|
res.properties[k] = convertSchemaToOpenApiSchema(schema.properties[k]);
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
"radix": false,
|
"radix": false,
|
||||||
"ban-types": [
|
"ban-types": [
|
||||||
true,
|
true,
|
||||||
"Object"
|
["Object", "Use {} instead."]
|
||||||
],
|
],
|
||||||
"ban": [
|
"ban": [
|
||||||
true,
|
true,
|
||||||
|
|
|
@ -95,7 +95,7 @@ module.exports = {
|
||||||
loader: 'css-loader'
|
loader: 'css-loader'
|
||||||
}, postcss]
|
}, postcss]
|
||||||
}, {
|
}, {
|
||||||
test: /\.(eot|woff|woff2|svg|ttf)([\?]?.*)$/,
|
test: /\.(eot|woff|woff2|svg|ttf)([?]?.*)$/,
|
||||||
loader: 'url-loader'
|
loader: 'url-loader'
|
||||||
}, {
|
}, {
|
||||||
test: /\.json5$/,
|
test: /\.json5$/,
|
||||||
|
|
Loading…
Reference in a new issue