cleanup: trim trailing whitespace (#11136)

* cleanup: trim trailing whitespace

* update(`.editorconfig`)

---------

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
okayurisotto
2023-07-08 07:08:16 +09:00
committed by GitHub
parent 4c879b3a33
commit d84796588c
161 changed files with 615 additions and 609 deletions

View File

@@ -87,7 +87,7 @@ export async function mainBoot() {
const now = new Date();
const m = now.getMonth() + 1;
const d = now.getDate();
if ($i.birthday) {
const bm = parseInt($i.birthday.split('-')[1]);
const bd = parseInt($i.birthday.split('-')[2]);

View File

@@ -93,9 +93,9 @@ function onDragover(ev: DragEvent) {
switch (ev.dataTransfer.effectAllowed) {
case 'all':
case 'uninitialized':
case 'copy':
case 'copyLink':
case 'copyMove':
case 'copy':
case 'copyLink':
case 'copyMove':
ev.dataTransfer.dropEffect = 'copy';
break;
case 'linkMove':

View File

@@ -61,9 +61,9 @@ function onDragover(ev: DragEvent) {
switch (ev.dataTransfer.effectAllowed) {
case 'all':
case 'uninitialized':
case 'copy':
case 'copyLink':
case 'copyMove':
case 'copy':
case 'copyLink':
case 'copyMove':
ev.dataTransfer.dropEffect = 'copy';
break;
case 'linkMove':

View File

@@ -202,9 +202,9 @@ function onDragover(ev: DragEvent): any {
switch (ev.dataTransfer.effectAllowed) {
case 'all':
case 'uninitialized':
case 'copy':
case 'copyLink':
case 'copyMove':
case 'copy':
case 'copyLink':
case 'copyMove':
ev.dataTransfer.dropEffect = 'copy';
break;
case 'linkMove':

View File

@@ -89,7 +89,7 @@ const props = defineProps<{
> .file {
position: relative;
aspect-ratio: 1;
> .thumbnail {
width: 100%;
height: 100%;

View File

@@ -87,7 +87,7 @@ const props = defineProps<{
@media (max-width: 500px) {
font-size: 10px;
> article {
padding: 8px;

View File

@@ -17,8 +17,8 @@
controls
@contextmenu.stop
>
<source
:src="video.url"
<source
:src="video.url"
:type="video.type"
>
</video>

View File

@@ -293,7 +293,7 @@ function renote(viaKeyboard = false) {
const y = rect.top + (el.offsetHeight / 2);
os.popup(MkRippleEffect, { x, y }, {}, 'end');
}
os.api('notes/create', {
renoteId: appearNote.id,
}).then(() => {

View File

@@ -46,7 +46,7 @@ defineProps<{
margin: 0 0 8px 0;
font-size: 0.9em;
}
> .items {
> .item {
display: flex;

View File

@@ -195,7 +195,7 @@ onMounted(() => {
.mfm {
display: -webkit-box;
-webkit-line-clamp: 5;
-webkit-box-orient: vertical;
-webkit-box-orient: vertical;
overflow: hidden;
}

View File

@@ -26,7 +26,7 @@ export const Default = {
};
},
args: {
},
parameters: {
layout: 'centered',

View File

@@ -23,7 +23,7 @@ export const Default = {
};
},
args: {
},
parameters: {
layout: 'centered',

View File

@@ -23,7 +23,7 @@ export const Default = {
};
},
args: {
},
parameters: {
layout: 'centered',

View File

@@ -90,7 +90,7 @@ async function follow() {
.mfm {
display: -webkit-box;
-webkit-line-clamp: 5;
-webkit-box-orient: vertical;
-webkit-box-orient: vertical;
overflow: hidden;
}

View File

@@ -26,7 +26,7 @@ export const Default = {
};
},
args: {
},
parameters: {
layout: 'centered',

View File

@@ -199,7 +199,7 @@ export default function(props: {
}
const x = Math.min(parseFloat(token.props.args.x ?? '1'), 5);
const y = Math.min(parseFloat(token.props.args.y ?? '1'), 5);
style = `transform: scale(${x}, ${y});`;
style = `transform: scale(${x}, ${y});`;
scale = scale * Math.max(x, y);
break;
}

View File

@@ -10,7 +10,7 @@ export default {
return el.parentElement ? getBgColor(el.parentElement) : 'transparent';
}
};
const parentBg = getBgColor(src.parentElement);
const myBg = window.getComputedStyle(src).backgroundColor;

View File

@@ -10,7 +10,7 @@ export default {
return el.parentElement ? getBgColor(el.parentElement) : 'transparent';
}
};
const parentBg = getBgColor(src.parentElement);
const myBg = window.getComputedStyle(src).backgroundColor;

View File

@@ -10,7 +10,7 @@ export default {
return el.parentElement ? getBgColor(el.parentElement) : 'transparent';
}
};
const parentBg = getBgColor(src.parentElement);
const myBg = getComputedStyle(document.documentElement).getPropertyValue('--panel');

View File

@@ -1,4 +1,4 @@
import { dateTimeFormat } from '@/scripts/intl-const';
export default (d: Date | number | undefined) => dateTimeFormat.format(d);
export default (d: Date | number | undefined) => dateTimeFormat.format(d);
export const dateString = (d: string) => dateTimeFormat.format(new Date(d));

View File

@@ -14,7 +14,7 @@ type Keys =
'wallpaper' |
'theme' |
'colorScheme' |
'useSystemFont' |
'useSystemFont' |
'fontSize' |
'ui' |
'ui_temp' |

View File

@@ -159,11 +159,11 @@ export class Router extends EventEmitter<{
if (route.hash != null && hash != null) {
props.set(route.hash, safeURIDecode(hash));
}
if (route.query != null && queryString != null) {
const queryObject = [...new URLSearchParams(queryString).entries()]
.reduce((obj, entry) => ({ ...obj, [entry[0]]: entry[1] }), {});
for (const q in route.query) {
const as = route.query[q];
if (queryObject[q]) {
@@ -171,7 +171,7 @@ export class Router extends EventEmitter<{
}
}
}
return {
route,
props,

View File

@@ -20,7 +20,7 @@
<XEmoji v-for="emoji in searchEmojis" :key="emoji.name" :emoji="emoji"/>
</div>
</MkFoldableSection>
<MkFoldableSection v-for="category in customEmojiCategories" v-once :key="category">
<template #header>{{ category || i18n.ts.other }}</template>
<div :class="$style.emojis">
@@ -56,7 +56,7 @@ function search() {
const queryarry = q.match(/\:([a-z0-9_]*)\:/g);
if (queryarry) {
searchEmojis = customEmojis.value.filter(emoji =>
searchEmojis = customEmojis.value.filter(emoji =>
queryarry.includes(`:${emoji.name}:`),
);
} else {

View File

@@ -1,6 +1,6 @@
<template>
<div ref="el" class="hiyeyicy" :class="{ wide: !narrow }">
<div v-if="!narrow || currentPage?.route.name == null" class="nav">
<div v-if="!narrow || currentPage?.route.name == null" class="nav">
<MkSpacer :contentMax="700" :marginMin="16">
<div class="lxpfedzu">
<div class="banner">

View File

@@ -24,7 +24,7 @@
<template #label>{{ i18n.ts.preservedUsernames }}</template>
<template #caption>{{ i18n.ts.preservedUsernamesDescription }}</template>
</MkTextarea>
<MkTextarea v-model="sensitiveWords">
<template #label>{{ i18n.ts.sensitiveWords }}</template>
<template #caption>{{ i18n.ts.sensitiveWordsDescription }}<br>{{ i18n.ts.sensitiveWordsDescription2 }}</template>

View File

@@ -259,7 +259,7 @@ onMounted(async () => {
},
plugins: [chartVLine(vLineColor)],
});
fetching = false;
});
</script>

View File

@@ -58,7 +58,7 @@ let federationSubActiveDiff = $ref<number | null>(null);
let fetching = $ref(true);
const { handler: externalTooltipHandler } = useChartTooltip();
onMounted(async () => {
const chart = await os.apiGet('charts/federation', { limit: 2, span: 'day' });
federationPubActive = chart.pubActive[0];

View File

@@ -122,4 +122,4 @@ onUnmounted(() => {
}
}
}
</style>
</style>

View File

@@ -30,7 +30,7 @@
<template #header>Federation</template>
<XFederation/>
</MkFoldableSection>
<MkFoldableSection class="item">
<template #header>Instances</template>
<XInstances/>

View File

@@ -210,7 +210,7 @@
</MkRange>
</div>
</MkFolder>
<MkFolder v-if="matchQuery([i18n.ts._role._options.driveCapacity, 'driveCapacityMb'])">
<template #label>{{ i18n.ts._role._options.driveCapacity }}</template>
<template #suffix>

View File

@@ -25,11 +25,11 @@
<MkFolder :defaultOpen="true">
<template #label>{{ i18n.ts.pinnedNotes }}</template>
<div class="_gaps">
<MkButton primary rounded @click="addPinnedNote()"><i class="ti ti-plus"></i></MkButton>
<Sortable
<Sortable
v-model="pinnedNotes"
itemKey="id"
:handle="'.' + $style.pinnedNoteHandle"
@@ -160,7 +160,7 @@ async function archive() {
});
if (canceled) return;
os.api('channels/update', {
channelId: props.channelId,
isArchived: true,

View File

@@ -55,7 +55,7 @@ watch(() => props.clipId, async () => {
favorited = clip.isFavorited;
}, {
immediate: true,
});
});
provide('currentClip', $$(clip));

View File

@@ -311,13 +311,13 @@ definePageMetadata(computed(() => ({
.empty {
margin: var(--margin);
}
.ldhfsamy {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
grid-gap: 12px;
margin: var(--margin) 0;
> .emoji {
display: flex;
align-items: center;

View File

@@ -20,7 +20,7 @@ async function follow(user): Promise<void> {
window.close();
return;
}
os.apiWithDialog('following/create', {
userId: user.id,
});

View File

@@ -49,7 +49,7 @@
<template #value><MkTime v-if="instance.latestRequestReceivedAt" :time="instance.latestRequestReceivedAt"/><span v-else>N/A</span></template>
</MkKeyValue>
</FormSection>
<FormSection>
<MkKeyValue oneline style="margin: 1em 0;">
<template #key>Following (Pub)</template>

View File

@@ -112,7 +112,7 @@ definePageMetadata(computed(() => list ? {
flex: 1;
min-width: 0;
margin-right: 8px;
&:hover {
text-decoration: none;
}

View File

@@ -13,7 +13,7 @@
<template #value>{{ scope.join('/') }}</template>
</MkKeyValue>
</FormSplit>
<MkButton primary @click="createKey">{{ i18n.ts._registry.createKey }}</MkButton>
<FormSection v-if="keys">

View File

@@ -20,7 +20,7 @@
<template #value>{{ key }}</template>
</MkKeyValue>
</FormSplit>
<MkTextarea v-model="valueForEditor" tall class="_monospace">
<template #label>{{ i18n.ts.value }} (JSON)</template>
</MkTextarea>

View File

@@ -7,7 +7,7 @@
<template #prefix><i class="ti ti-lock"></i></template>
<template #label>{{ i18n.ts.newPassword }}</template>
</MkInput>
<MkButton primary @click="save">{{ i18n.ts.save }}</MkButton>
</div>
</MkSpacer>

View File

@@ -80,7 +80,7 @@ watch(sortModeSelect, () => {
sortMode.value = '+size';
fetchDriveInfo();
break;
case 'createdAtAsc':
sortMode.value = '-createdAt';
fetchDriveInfo();

View File

@@ -3,7 +3,7 @@
<FormSlot>
<template #label>{{ i18n.ts.navbar }}</template>
<MkContainer :showHeader="false">
<Sortable
<Sortable
v-model="items"
itemKey="id"
:animation="150"

View File

@@ -144,7 +144,7 @@ function validate(profile: unknown): void {
if (!profile.name) throw new Error('Missing required prop: name');
if (!profile.misskeyVersion) throw new Error('Missing required prop: misskeyVersion');
// Check if createdAt and updatedAt is Date
// https://zenn.dev/lollipop_onl/articles/eoz-judge-js-invalid-date
if (!profile.createdAt || Number.isNaN(new Date(profile.createdAt).getTime())) throw new Error('createdAt is falsy or not Date');
@@ -273,7 +273,7 @@ async function applyProfile(id: string): Promise<void> {
defaultStore.set(key, settings.hot[key]);
}
}
// coldDeviceStorage
for (const key of coldDeviceStorageSaveKeys) {
if (settings.cold[key] !== undefined) {

View File

@@ -7,7 +7,7 @@
{{ i18n.ts.makeReactionsPublic }}
<template #caption>{{ i18n.ts.makeReactionsPublicDescription }}</template>
</MkSwitch>
<MkSelect v-model="ffVisibility" @update:modelValue="save()">
<template #label>{{ i18n.ts.ffVisibility }}</template>
<option value="public">{{ i18n.ts._ffVisibility.public }}</option>
@@ -15,7 +15,7 @@
<option value="private">{{ i18n.ts._ffVisibility.private }}</option>
<template #caption>{{ i18n.ts.ffVisibilityDescription }}</template>
</MkSelect>
<MkSwitch v-model="hideOnlineStatus" @update:modelValue="save()">
{{ i18n.ts.hideOnlineStatus }}
<template #caption>{{ i18n.ts.hideOnlineStatusDescription }}</template>

View File

@@ -37,7 +37,7 @@ import MkRolePreview from '@/components/MkRolePreview.vue';
function save() {
os.apiWithDialog('i/update', {
});
}

View File

@@ -78,7 +78,7 @@ async function change() {
});
return;
}
os.apiWithDialog('i/change-password', {
currentPassword,
newPassword,

View File

@@ -70,7 +70,7 @@ export class Storage<T extends StateDef> {
this.state[k] = v.default;
this.reactiveState[k] = ref(v.default);
}
this.ready = this.init();
this.loaded = this.ready.then(() => this.load());
}
@@ -81,7 +81,7 @@ export class Storage<T extends StateDef> {
const deviceState: State<T> = await get(this.deviceStateKeyName) || {};
const deviceAccountState = $i ? await get(this.deviceAccountStateKeyName) || {} : {};
const registryCache = $i ? await get(this.registryCacheKeyName) || {} : {};
for (const [k, v] of Object.entries(this.def) as [keyof T, T[keyof T]['default']][]) {
if (v.where === 'device' && Object.prototype.hasOwnProperty.call(deviceState, k)) {
this.reactiveState[k].value = this.state[k] = deviceState[k];
@@ -110,7 +110,7 @@ export class Storage<T extends StateDef> {
if (!scope || scope.length !== 2 || scope[0] !== 'client' || scope[1] !== this.key || this.state[key] === value) return;
this.reactiveState[key].value = this.state[key] = value;
this.addIdbSetJob(async () => {
const cache = await get(this.registryCacheKeyName);
if (cache[key] !== value) {
@@ -142,7 +142,7 @@ export class Storage<T extends StateDef> {
}
}
}
return set(this.registryCacheKeyName, cache);
})
.then(() => resolve());
@@ -252,7 +252,7 @@ export class Storage<T extends StateDef> {
// localStorage => indexedDBのマイグレーション
private async migrate() {
const deviceState = localStorage.getItem(this.deviceStateKeyName);
if (deviceState) {
if (deviceState) {
await set(this.deviceStateKeyName, JSON.parse(deviceState));
localStorage.removeItem(this.deviceStateKeyName);
}

View File

@@ -510,7 +510,7 @@ export function registerAsUiLib(components: Ref<AsUiComponent>[], done: (root: R
// Ui:root.update({ children: [...] }) の糖衣構文
'Ui:render': values.FN_NATIVE(([children], opts) => {
utils.assertArray(children);
rootComponent.value.children = children.value.map(v => {
utils.assertObject(v);
return v.value.get('id').value;

View File

@@ -196,7 +196,7 @@ export function getUserMenu(user: misskey.entities.UserDetailed, router: Router
default: 'indefinitely',
});
if (canceled) return;
const expiresAt = period === 'indefinitely' ? null
: period === 'oneHour' ? Date.now() + (1000 * 60 * 60)
: period === 'oneDay' ? Date.now() + (1000 * 60 * 60 * 24)

View File

@@ -10,7 +10,7 @@ export async function lookup(router?: Router) {
title: i18n.ts.lookup,
});
if (canceled) return;
if (query.startsWith('@') && !query.includes(' ')) {
_router.push(`/${query}`);
return;

View File

@@ -2,7 +2,7 @@
* 1. 配列に何も入っていない時はクエリを付けない
* 2. プロパティがundefinedの時はクエリを付けない
* new URLSearchParams(obj)ではそこまで丁寧なことをしてくれない)
*/
*/
export function query(obj: Record<string, any>): string {
const params = Object.entries(obj)
.filter(([, v]) => Array.isArray(v) ? v.length : v !== undefined)

View File

@@ -93,12 +93,12 @@ export function useNoteCapture(props: {
function onStreamConnected() {
capture(false);
}
capture(true);
if (connection) {
connection.on('_connected_', onStreamConnected);
}
onUnmounted(() => {
decapture(true);
if (connection) {

View File

@@ -7,7 +7,7 @@
--margin: var(--marginFull);
--minBottomSpacing: 0px;
@media (max-width: 500px) {
--margin: var(--marginHalf);
--minBottomSpacing: calc(72px + max(12px, env(safe-area-inset-bottom, 0px)));
@@ -19,7 +19,7 @@
::selection {
color: var(--fgOnAccent);
background-color: var(--accent);
}
}
html {
background-color: var(--bg);

View File

@@ -5,7 +5,7 @@
author: 'ThinaticSystem',
base: 'light',
props: {
accent: '#77b58c',
bg: 'e2deda',

View File

@@ -82,7 +82,7 @@ function openAccountMenu(ev: MouseEvent) {
onMounted(() => {
window.addEventListener('resize', () => {
settingsWindowed = (window.innerWidth >= WINDOW_THRESHOLD);
}, { passive: true });
}, { passive: true });
});
</script>
@@ -177,7 +177,7 @@ onMounted(() => {
> .post {
display: inline-block;
> .button {
width: 40px;
height: 40px;

View File

@@ -219,7 +219,7 @@ onMounted(() => {
&.fullView {
margin: 0;
> .sidebar {
display: none;
}

View File

@@ -37,7 +37,7 @@ type WidgetProps = GetFormResultType<typeof widgetPropsDef>;
const props = defineProps<WidgetComponentProps<WidgetProps>>();
const emit = defineEmits<WidgetComponentEmits<WidgetProps>>();
const { widgetProps, configure } = useWidgetPropsManager(name,
widgetPropsDef,
props,

View File

@@ -25,7 +25,7 @@ type WidgetProps = GetFormResultType<typeof widgetPropsDef>;
const props = defineProps<WidgetComponentProps<WidgetProps>>();
const emit = defineEmits<WidgetComponentEmits<WidgetProps>>();
const { widgetProps, configure } = useWidgetPropsManager(name,
widgetPropsDef,
props,

View File

@@ -41,7 +41,7 @@ type WidgetProps = GetFormResultType<typeof widgetPropsDef>;
const props = defineProps<WidgetComponentProps<WidgetProps>>();
const emit = defineEmits<WidgetComponentEmits<WidgetProps>>();
const { widgetProps, configure, save } = useWidgetPropsManager(name,
widgetPropsDef,
props,