Skip to content

Commit

Permalink
refactor(frontend): 不要なスペースとstyle宣言を削除
Browse files Browse the repository at this point in the history
  • Loading branch information
taiyme committed Nov 28, 2024
1 parent d4c6ec9 commit 0d073ed
Show file tree
Hide file tree
Showing 32 changed files with 18 additions and 81 deletions.
3 changes: 0 additions & 3 deletions packages/frontend/src/components/MkAnimBg.vue
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,3 @@ onUnmounted(() => {
}
});
</script>

<style lang="scss" module>
</style>
10 changes: 3 additions & 7 deletions packages/frontend/src/components/MkAnnouncementDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</template>

<script lang="ts" setup>
import { onMounted, shallowRef } from 'vue';
import { shallowRef } from 'vue';
import * as Misskey from 'misskey-js';
import * as os from '@/os.js';
import { misskeyApi } from '@/scripts/misskey-api.js';
Expand All @@ -31,10 +31,9 @@ import MkButton from '@/components/MkButton.vue';
import { i18n } from '@/i18n.js';
import { $i, updateAccountPartial } from '@/account.js';

const props = withDefaults(defineProps<{
const props = defineProps<{
announcement: Misskey.entities.Announcement;
}>(), {
});
}>();

const emit = defineEmits<{
(ev: 'closed'): void;
Expand Down Expand Up @@ -74,9 +73,6 @@ function onBgClick() {
duration: 100,
});
}

onMounted(() => {
});
</script>

<style lang="scss" module>
Expand Down
1 change: 0 additions & 1 deletion packages/frontend/src/components/MkChannelPreview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -221,5 +221,4 @@ const bannerStyle = computed(() => {
height: 1.5rem;
aspect-ratio: 1 / 1;
}

</style>
1 change: 0 additions & 1 deletion packages/frontend/src/components/MkChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,6 @@ watch(() => [props.src, props.span], fetchAndRender);
onMounted(() => {
fetchAndRender();
});

</script>

<style lang="scss" module>
Expand Down
1 change: 0 additions & 1 deletion packages/frontend/src/components/MkFlashPreview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,4 @@ const props = defineProps<{
}
}
}

</style>
1 change: 0 additions & 1 deletion packages/frontend/src/components/MkFormDialog.file.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ function selectButton(ev: MouseEvent) {
fileUrl.value = file.url;
});
}

</script>

<style lang="scss" module>
Expand Down
5 changes: 2 additions & 3 deletions packages/frontend/src/components/MkLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,11 @@ import { popup } from '@/os.js';
import { isEnabledUrlPreview } from '@/instance.js';
import MkA, { type MkABehavior } from '@/components/global/MkA.vue';

const props = withDefaults(defineProps<{
const props = defineProps<{
url: string;
rel?: null | string;
navigationBehavior?: MkABehavior;
}>(), {
});
}>();

const self = props.url.startsWith(local);
const attr = self ? 'to' : 'href';
Expand Down
5 changes: 1 addition & 4 deletions packages/frontend/src/components/MkMarquee.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ SPDX-License-Identifier: AGPL-3.0-only
-->

<script lang="ts">
import { h, onMounted, onUnmounted, ref, watch } from 'vue';
import { h, onMounted, ref, watch } from 'vue';

// eslint-disable-next-line import/no-default-export
export default {
Expand Down Expand Up @@ -45,9 +45,6 @@ export default {
calc();
});

onUnmounted(() => {
});

return {
contentEl,
};
Expand Down
1 change: 0 additions & 1 deletion packages/frontend/src/components/MkPagePreview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -172,5 +172,4 @@ const props = defineProps<{
}
}
}

</style>
1 change: 0 additions & 1 deletion packages/frontend/src/components/MkPagination.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ function arrayToEntries(entities: MisskeyEntity[]): [string, MisskeyEntity][] {
function concatMapWithArray(map: MisskeyEntityMap, entities: MisskeyEntity[]): MisskeyEntityMap {
return new Map([...map, ...arrayToEntries(entities)]);
}

</script>

<script lang="ts" setup>
Expand Down
5 changes: 2 additions & 3 deletions packages/frontend/src/components/MkReactionEffect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ import { onMounted, ref } from 'vue';
import * as os from '@/os.js';
import MkReactionIcon from '@/components/MkReactionIcon.vue';

const props = withDefaults(defineProps<{
const props = defineProps<{
reaction: string;
x: number;
y: number;
}>(), {
});
}>();

const emit = defineEmits<{
(ev: 'end'): void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ const exampleNote = reactive<Misskey.entities.Note>({
replyId: null,
renoteId: null,
});

</script>

<style lang="scss" module>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,3 @@ watch([isLocked, hideOnlineStatus, noCrawle, preventAiLearning], () => {
});
});
</script>

<style lang="scss" module>

</style>
5 changes: 2 additions & 3 deletions packages/frontend/src/components/MkVisibilityPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,13 @@ import { i18n } from '@/i18n.js';

const modal = shallowRef<InstanceType<typeof MkModal>>();

const props = withDefaults(defineProps<{
const props = defineProps<{
currentVisibility: typeof Misskey.noteVisibilities[number];
isSilenced: boolean;
localOnly: boolean;
src?: HTMLElement;
isReplyVisibilitySpecified?: boolean;
}>(), {
});
}>();

const emit = defineEmits<{
(ev: 'changeVisibility', v: typeof Misskey.noteVisibilities[number]): void;
Expand Down
1 change: 0 additions & 1 deletion packages/frontend/src/components/MkWidgets.vue
Original file line number Diff line number Diff line change
Expand Up @@ -177,5 +177,4 @@ function onContextmenu(widget: Widget, ev: MouseEvent) {
}

}

</style>
1 change: 0 additions & 1 deletion packages/frontend/src/components/MkYouTubePlayer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ const ytFetch = (): void => {
};

ytFetch();

</script>

<style lang="scss">
Expand Down
5 changes: 2 additions & 3 deletions packages/frontend/src/pages/_error_.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,9 @@ import { miLocalStorage } from '@/local-storage.js';
import { defaultStore } from '@/store.js';
import { serverErrorImageUrl } from '@/instance.js';

const props = withDefaults(defineProps<{
const props = defineProps<{
error?: Error;
}>(), {
});
}>();

const loaded = ref(false);
const serverIsDead = ref(false);
Expand Down
4 changes: 0 additions & 4 deletions packages/frontend/src/pages/achievements.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,3 @@ definePageMetadata(() => ({
icon: 'ti ti-medal',
}));
</script>

<style lang="scss" module>

</style>
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,6 @@ onMounted(async () => {
}
});
});

</script>

<style lang="scss" module>
Expand Down
4 changes: 0 additions & 4 deletions packages/frontend/src/pages/admin/roles.vue
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,3 @@ definePageMetadata(() => ({
icon: 'ti ti-badges',
}));
</script>

<style lang="scss" module>

</style>
1 change: 0 additions & 1 deletion packages/frontend/src/pages/admin/system-webhook.item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ function onEditClick() {
function onDeleteClick() {
emit('delete', entity.value);
}

</script>

<style lang="scss" module>
Expand Down
4 changes: 0 additions & 4 deletions packages/frontend/src/pages/admin/system-webhook.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,3 @@ definePageMetadata(() => ({
icon: 'ti ti-webhook',
}));
</script>

<style lang="scss" module>

</style>
4 changes: 0 additions & 4 deletions packages/frontend/src/pages/clicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,3 @@ definePageMetadata(() => ({
icon: 'ti ti-cookie',
}));
</script>

<style lang="scss" module>

</style>
4 changes: 0 additions & 4 deletions packages/frontend/src/pages/my-clips/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,3 @@ definePageMetadata(() => ({
icon: 'ti ti-paperclip',
}));
</script>

<style lang="scss" module>

</style>
4 changes: 0 additions & 4 deletions packages/frontend/src/pages/settings/roles.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,3 @@ definePageMetadata(() => ({
icon: 'ti ti-badges',
}));
</script>

<style lang="scss" module>

</style>
4 changes: 0 additions & 4 deletions packages/frontend/src/pages/user/achievements.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,3 @@ onDeactivated(() => {
}
});
</script>

<style lang="scss" module>

</style>
1 change: 0 additions & 1 deletion packages/frontend/src/pages/user/activity.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,4 @@ import MkHeatmap from '@/components/MkHeatmap.vue';
const props = defineProps<{
user: Misskey.entities.User;
}>();

</script>
5 changes: 2 additions & 3 deletions packages/frontend/src/pages/user/followers.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ import { misskeyApi } from '@/scripts/misskey-api.js';
import { definePageMetadata } from '@/scripts/page-metadata.js';
import { i18n } from '@/i18n.js';

const props = withDefaults(defineProps<{
const props = defineProps<{
acct: string;
}>(), {
});
}>();

const user = ref<null | Misskey.entities.UserDetailed>(null);
const error = ref<any>(null);
Expand Down
5 changes: 2 additions & 3 deletions packages/frontend/src/pages/user/following.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ import { misskeyApi } from '@/scripts/misskey-api.js';
import { definePageMetadata } from '@/scripts/page-metadata.js';
import { i18n } from '@/i18n.js';

const props = withDefaults(defineProps<{
const props = defineProps<{
acct: string;
}>(), {
});
}>();

const user = ref<null | Misskey.entities.UserDetailed>(null);
const error = ref<any>(null);
Expand Down
5 changes: 2 additions & 3 deletions packages/frontend/src/pages/user/gallery.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ import * as Misskey from 'misskey-js';
import MkGalleryPostPreview from '@/components/MkGalleryPostPreview.vue';
import MkPagination from '@/components/MkPagination.vue';

const props = withDefaults(defineProps<{
const props = defineProps<{
user: Misskey.entities.User;
}>(), {
});
}>();

const pagination = {
endpoint: 'users/gallery/posts' as const,
Expand Down
1 change: 0 additions & 1 deletion packages/frontend/src/ui/classic.header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ onMounted(() => {
settingsWindowed.value = (window.innerWidth >= WINDOW_THRESHOLD);
}, { passive: true });
});

</script>

<style lang="scss" scoped>
Expand Down
1 change: 0 additions & 1 deletion packages/frontend/src/ui/classic.sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ function openAccountMenu(ev: MouseEvent) {
watch(defaultStore.reactiveState.menuDisplay, () => {
calcViewState();
});

</script>

<style lang="scss" scoped>
Expand Down

0 comments on commit 0d073ed

Please sign in to comment.