style: add missing trailing commas (#9387)

This commit is contained in:
Kagami Sascha Rosylight 2022-12-22 16:01:59 +09:00 committed by GitHub
parent 9314ceae36
commit f1fd1d2585
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
79 changed files with 320 additions and 320 deletions

View file

@ -50,7 +50,7 @@ function send() {
}, undefined).then(res => {
os.alert({
type: 'success',
text: i18n.ts.abuseReported
text: i18n.ts.abuseReported,
});
uiWindow.value?.close();
emit('closed');

View file

@ -86,7 +86,7 @@ for (const x of customEmojis) {
name: x.name,
emoji: `:${x.name}:`,
url: x.url,
isCustomEmoji: true
isCustomEmoji: true,
});
if (x.aliases) {
@ -96,7 +96,7 @@ for (const x of customEmojis) {
aliasOf: x.name,
emoji: `:${x.name}:`,
url: x.url,
isCustomEmoji: true
isCustomEmoji: true,
});
}
}
@ -193,7 +193,7 @@ function exec() {
os.api('users/search-by-username-and-host', {
username: props.q,
limit: 10,
detail: false
detail: false,
}).then(searchedUsers => {
users.value = searchedUsers as any[];
fetching.value = false;
@ -215,7 +215,7 @@ function exec() {
} else {
os.api('hashtags/search', {
query: props.q,
limit: 30
limit: 30,
}).then(searchedHashtags => {
hashtags.value = searchedHashtags as any[];
fetching.value = false;

View file

@ -18,7 +18,7 @@ const users = ref([]);
onMounted(async () => {
users.value = await os.api('users/show', {
userIds: props.userIds
userIds: props.userIds,
});
});
</script>

View file

@ -25,7 +25,7 @@ const label = computed(() => {
return concat([
props.note.text ? [i18n.t('_cw.chars', { count: length(props.note.text) })] : [],
props.note.files && props.note.files.length !== 0 ? [i18n.t('_cw.files', { count: props.note.files.length })] : [],
props.note.poll != null ? [i18n.ts.poll] : []
props.note.poll != null ? [i18n.ts.poll] : [],
] as string[][]).join(' / ');
});

View file

@ -109,7 +109,7 @@ function onDrop(ev: DragEvent) {
emit('removeFile', file.id);
os.api('drive/files/update', {
fileId: file.id,
folderId: props.folder ? props.folder.id : null
folderId: props.folder ? props.folder.id : null,
});
}
//#endregion
@ -123,7 +123,7 @@ function onDrop(ev: DragEvent) {
emit('removeFolder', folder.id);
os.api('drive/folders/update', {
folderId: folder.id,
parentId: props.folder ? props.folder.id : null
parentId: props.folder ? props.folder.id : null,
});
}
//#endregion

View file

@ -32,12 +32,12 @@ export default defineComponent({
expanded: {
type: Boolean,
required: false,
default: true
default: true,
},
persistKey: {
type: String,
required: false,
default: null
default: null,
},
},
data() {
@ -51,7 +51,7 @@ export default defineComponent({
if (this.persistKey) {
localStorage.setItem(localStoragePrefix + this.persistKey, this.showBody ? 't' : 'f');
}
}
},
},
mounted() {
function getParentBg(el: Element | null): string {
@ -91,7 +91,7 @@ export default defineComponent({
afterLeave(el) {
el.style.height = null;
},
}
},
});
</script>

View file

@ -12,20 +12,20 @@ export default defineComponent({
props: {
formula: {
type: String,
required: true
required: true,
},
block: {
type: Boolean,
required: true
}
required: true,
},
},
computed: {
compiledFormula(): any {
return katex.renderToString(this.formula, {
throwOnError: false
throwOnError: false,
} as any);
}
}
},
},
});
</script>

View file

@ -70,7 +70,7 @@ function subscribe() {
// SEE: https://developer.mozilla.org/en-US/docs/Web/API/PushManager/subscribe#Parameters
return promiseDialog(registration.pushManager.subscribe({
userVisibleOnly: true,
applicationServerKey: urlBase64ToUint8Array(instance.swPublickey)
applicationServerKey: urlBase64ToUint8Array(instance.swPublickey),
})
.then(async subscription => {
pushSubscription = subscription;
@ -79,7 +79,7 @@ function subscribe() {
pushRegistrationInServer = await api('sw/register', {
endpoint: subscription.endpoint,
auth: encode(subscription.getKey('auth')),
publickey: encode(subscription.getKey('p256dh'))
publickey: encode(subscription.getKey('p256dh')),
});
}, async err => { // When subscribe failed
//

View file

@ -51,7 +51,7 @@ export default defineComponent({
text: '',
flag: true,
radio: 'misskey',
mfm: `Hello world! This is an @example mention. BTW you are @${this.$i ? this.$i.username : 'guest'}.\nAlso, here is ${config.url} and [example link](${config.url}). for more details, see https://example.com.\nAs you know #misskey is open-source software.`
mfm: `Hello world! This is an @example mention. BTW you are @${this.$i ? this.$i.username : 'guest'}.\nAlso, here is ${config.url} and [example link](${config.url}). for more details, see https://example.com.\nAs you know #misskey is open-source software.`,
};
},
@ -69,17 +69,17 @@ export default defineComponent({
foo: {
type: 'boolean',
default: true,
label: 'This is a boolean property'
label: 'This is a boolean property',
},
bar: {
type: 'number',
default: 300,
label: 'This is a number property'
label: 'This is a number property',
},
baz: {
type: 'string',
default: 'Misskey makes you happy.',
label: 'This is a string property'
label: 'This is a string property',
},
});
},
@ -95,7 +95,7 @@ export default defineComponent({
async openMenu(ev) {
os.popupMenu([{
type: 'label',
text: 'Fruits'
text: 'Fruits',
}, {
text: 'Create some apples',
action: () => {},
@ -111,6 +111,6 @@ export default defineComponent({
action: () => {},
}], ev.currentTarget ?? ev.target);
},
}
},
});
</script>

View file

@ -24,21 +24,21 @@ import { Block } from '@/scripts/hpml/block';
export default defineComponent({
components: {
XText, XSection, XImage, XButton, XNumberInput, XTextInput, XTextareaInput, XTextarea, XPost, XSwitch, XIf, XCounter, XRadioButton, XCanvas, XNote
XText, XSection, XImage, XButton, XNumberInput, XTextInput, XTextareaInput, XTextarea, XPost, XSwitch, XIf, XCounter, XRadioButton, XCanvas, XNote,
},
props: {
block: {
type: Object as PropType<Block>,
required: true
required: true,
},
hpml: {
type: Object as PropType<Hpml>,
required: true
required: true,
},
h: {
type: Number,
required: true
}
required: true,
},
},
});
</script>

View file

@ -13,24 +13,24 @@ import { Hpml } from '@/scripts/hpml/evaluator';
export default defineComponent({
components: {
MkButton
MkButton,
},
props: {
block: {
type: Object as PropType<ButtonBlock>,
required: true
required: true,
},
hpml: {
type: Object as PropType<Hpml>,
required: true
}
required: true,
},
},
methods: {
click() {
if (this.block.action === 'dialog') {
this.hpml.eval();
os.alert({
text: this.hpml.interpolate(this.block.content)
text: this.hpml.interpolate(this.block.content),
});
} else if (this.block.action === 'resetRandom') {
this.hpml.updateRandomSeed(Math.random());
@ -40,19 +40,19 @@ export default defineComponent({
pageId: this.hpml.page.id,
event: this.block.event,
...(this.block.var ? {
var: unref(this.hpml.vars)[this.block.var]
} : {})
var: unref(this.hpml.vars)[this.block.var],
} : {}),
});
os.alert({
type: 'success',
text: this.hpml.interpolate(this.block.message)
text: this.hpml.interpolate(this.block.message),
});
} else if (this.block.action === 'callAiScript') {
this.hpml.callAiScript(this.block.fn);
}
}
}
},
},
});
</script>

View file

@ -14,12 +14,12 @@ export default defineComponent({
props: {
block: {
type: Object as PropType<CanvasBlock>,
required: true
required: true,
},
hpml: {
type: Object as PropType<Hpml>,
required: true
}
required: true,
},
},
setup(props, ctx) {
const canvas: Ref<any> = ref(null);
@ -29,9 +29,9 @@ export default defineComponent({
});
return {
canvas
canvas,
};
}
},
});
</script>

View file

@ -13,17 +13,17 @@ import { Hpml } from '@/scripts/hpml/evaluator';
export default defineComponent({
components: {
MkButton
MkButton,
},
props: {
block: {
type: Object as PropType<CounterVarBlock>,
required: true
required: true,
},
hpml: {
type: Object as PropType<Hpml>,
required: true
}
required: true,
},
},
setup(props, ctx) {
const value = computed(() => {
@ -36,9 +36,9 @@ export default defineComponent({
}
return {
click
click,
};
}
},
});
</script>

View file

@ -11,21 +11,21 @@ import { defineComponent, defineAsyncComponent, PropType } from 'vue';
export default defineComponent({
components: {
XBlock: defineAsyncComponent(() => import('./page.block.vue'))
XBlock: defineAsyncComponent(() => import('./page.block.vue')),
},
props: {
block: {
type: Object as PropType<IfBlock>,
required: true
required: true,
},
hpml: {
type: Object as PropType<Hpml>,
required: true
required: true,
},
h: {
type: Number,
required: true
}
required: true,
},
},
});
</script>

View file

@ -20,8 +20,8 @@ export default defineComponent({
props: {
block: {
type: Object as PropType<NoteBlock>,
required: true
}
required: true,
},
},
setup(props, ctx) {
const note: Ref<Record<string, any> | null> = ref(null);
@ -34,9 +34,9 @@ export default defineComponent({
});
return {
note
note,
};
}
},
});
</script>

View file

@ -15,17 +15,17 @@ import { NumberInputVarBlock } from '@/scripts/hpml/block';
export default defineComponent({
components: {
MkInput
MkInput,
},
props: {
block: {
type: Object as PropType<NumberInputVarBlock>,
required: true
required: true,
},
hpml: {
type: Object as PropType<Hpml>,
required: true
}
required: true,
},
},
setup(props, ctx) {
const value = computed(() => {
@ -39,9 +39,9 @@ export default defineComponent({
return {
value,
updateValue
updateValue,
};
}
},
});
</script>

View file

@ -14,17 +14,17 @@ import { RadioButtonVarBlock } from '@/scripts/hpml/block';
export default defineComponent({
components: {
MkRadio
MkRadio,
},
props: {
block: {
type: Object as PropType<RadioButtonVarBlock>,
required: true
required: true,
},
hpml: {
type: Object as PropType<Hpml>,
required: true
}
required: true,
},
},
setup(props, ctx) {
const value = computed(() => {
@ -38,8 +38,8 @@ export default defineComponent({
return {
value,
updateValue
updateValue,
};
}
},
});
</script>

View file

@ -16,20 +16,20 @@ import { Hpml } from '@/scripts/hpml/evaluator';
export default defineComponent({
components: {
XBlock: defineAsyncComponent(() => import('./page.block.vue'))
XBlock: defineAsyncComponent(() => import('./page.block.vue')),
},
props: {
block: {
type: Object as PropType<SectionBlock>,
required: true
required: true,
},
hpml: {
type: Object as PropType<Hpml>,
required: true
required: true,
},
h: {
required: true
}
required: true,
},
},
});
</script>

View file

@ -13,17 +13,17 @@ import { SwitchVarBlock } from '@/scripts/hpml/block';
export default defineComponent({
components: {
MkSwitch
MkSwitch,
},
props: {
block: {
type: Object as PropType<SwitchVarBlock>,
required: true
required: true,
},
hpml: {
type: Object as PropType<Hpml>,
required: true
}
required: true,
},
},
setup(props, ctx) {
const value = computed(() => {
@ -37,9 +37,9 @@ export default defineComponent({
return {
value,
updateValue
updateValue,
};
}
},
});
</script>

View file

@ -15,17 +15,17 @@ import { TextInputVarBlock } from '@/scripts/hpml/block';
export default defineComponent({
components: {
MkInput
MkInput,
},
props: {
block: {
type: Object as PropType<TextInputVarBlock>,
required: true
required: true,
},
hpml: {
type: Object as PropType<Hpml>,
required: true
}
required: true,
},
},
setup(props, ctx) {
const value = computed(() => {
@ -39,9 +39,9 @@ export default defineComponent({
return {
value,
updateValue
updateValue,
};
}
},
});
</script>

View file

@ -19,12 +19,12 @@ export default defineComponent({
props: {
block: {
type: Object as PropType<TextBlock>,
required: true
required: true,
},
hpml: {
type: Object as PropType<Hpml>,
required: true
}
required: true,
},
},
data() {
return {
@ -38,15 +38,15 @@ export default defineComponent({
} else {
return [];
}
}
},
},
watch: {
'hpml.vars': {
handler() {
this.text = this.hpml.interpolate(this.block.text);
},
deep: true
}
deep: true,
},
},
});
</script>

View file

@ -16,17 +16,17 @@ import { TextInputVarBlock } from '@/scripts/hpml/block';
export default defineComponent({
components: {
MkTextarea
MkTextarea,
},
props: {
block: {
type: Object as PropType<TextInputVarBlock>,
required: true
required: true,
},
hpml: {
type: Object as PropType<Hpml>,
required: true
}
required: true,
},
},
setup(props, ctx) {
const value = computed(() => {
@ -40,8 +40,8 @@ export default defineComponent({
return {
value,
updateValue
updateValue,
};
}
},
});
</script>

View file

@ -10,17 +10,17 @@ import MkTextarea from '../form/textarea.vue';
export default defineComponent({
components: {
MkTextarea
MkTextarea,
},
props: {
block: {
type: Object as PropType<TextBlock>,
required: true
required: true,
},
hpml: {
type: Object as PropType<Hpml>,
required: true
}
required: true,
},
},
data() {
return {
@ -32,8 +32,8 @@ export default defineComponent({
handler() {
this.text = this.hpml.interpolate(this.block.text);
},
deep: true
}
}
deep: true,
},
},
});
</script>

View file

@ -15,12 +15,12 @@ import { defaultStore } from '@/store';
export default defineComponent({
components: {
XBlock
XBlock,
},
props: {
page: {
type: Object as PropType<Record<string, any>>,
required: true
required: true,
},
},
setup(props, ctx) {
@ -28,7 +28,7 @@ export default defineComponent({
randomSeed: Math.random(),
visitor: $i,
url: url,
enableAiScript: !defaultStore.state.disablePagesScript
enableAiScript: !defaultStore.state.disablePagesScript,
});
onMounted(() => {