forked from FoundKeyGang/FoundKey
client: fix some lints
Mostly focused on "@typescript-eslint/no-unused-vars" but also fixed some other lints along the way.
This commit is contained in:
parent
a267e7afdc
commit
5b4c0ffdf3
99 changed files with 174 additions and 310 deletions
|
@ -33,16 +33,16 @@ import XNoteHeader from './note-header.vue';
|
|||
import MkNoteSubNoteContent from './sub-note-content.vue';
|
||||
import XCwButton from './cw-button.vue';
|
||||
import { notePage } from '@/filters/note';
|
||||
import * as os from '@/os';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
note: misskey.entities.Note;
|
||||
conversation?: misskey.entities.Note[];
|
||||
conversation?: misskey.entities.Note[] | null;
|
||||
|
||||
// how many notes are in between this one and the note being viewed in detail
|
||||
depth?: number;
|
||||
}>(), {
|
||||
conversation: null,
|
||||
depth: 1,
|
||||
});
|
||||
|
||||
|
|
|
@ -43,12 +43,12 @@ const emit = defineEmits<{
|
|||
const uiWindow = ref<InstanceType<typeof XWindow>>();
|
||||
const comment = ref('');
|
||||
|
||||
function send() {
|
||||
function send(): void {
|
||||
os.apiWithDialog('users/report-abuse', {
|
||||
userId: props.user.id,
|
||||
urls: props.urls || [],
|
||||
comment: comment.value,
|
||||
}).then(res => {
|
||||
}).then(() => {
|
||||
os.alert({
|
||||
type: 'success',
|
||||
text: i18n.ts.abuseReported,
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<div v-if="report.urls.length > 0">
|
||||
{{ i18n.ts.notes }}:
|
||||
<ul>
|
||||
<li v-for="url in report.urls"><MkUrl :url="url"/></li>
|
||||
<li v-for="url in report.urls" :key="url"><MkUrl :url="url"/></li>
|
||||
</ul>
|
||||
</div>
|
||||
<hr/>
|
||||
|
@ -47,12 +47,11 @@ import MkButton from '@/components/ui/button.vue';
|
|||
import MkSwitch from '@/components/form/switch.vue';
|
||||
import MkKeyValue from '@/components/key-value.vue';
|
||||
import MkUrl from '@/components/global/url.vue';
|
||||
import { acct, userPage } from '@/filters/user';
|
||||
import * as os from '@/os';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
const props = defineProps<{
|
||||
report: any;
|
||||
report: Record<string, any>;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
|
@ -61,7 +60,7 @@ const emit = defineEmits<{
|
|||
|
||||
let forward = $ref(props.report.forwarded);
|
||||
|
||||
function resolve() {
|
||||
function resolve(): void {
|
||||
os.apiWithDialog('admin/resolve-abuse-user-report', {
|
||||
forward,
|
||||
reportId: props.report.id,
|
||||
|
|
|
@ -83,7 +83,7 @@ const graduations = computed(() => {
|
|||
return angles;
|
||||
});
|
||||
|
||||
function tick() {
|
||||
function tick(): void {
|
||||
now.value = new Date();
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
import { } from 'vue';
|
||||
import MkTooltip from './ui/tooltip.vue';
|
||||
|
||||
const props = defineProps<{
|
||||
defineProps<{
|
||||
showing: boolean;
|
||||
x: number;
|
||||
y: number;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
id-denylist violation when setting it. This is causing about 60+ lint issues.
|
||||
As this is part of Chart.js's API it makes sense to disable the check here.
|
||||
*/
|
||||
import { onMounted, ref, watch, PropType, onUnmounted } from 'vue';
|
||||
import { onMounted, ref, watch, PropType } from 'vue';
|
||||
import {
|
||||
Chart,
|
||||
ArcElement,
|
||||
|
@ -173,7 +173,7 @@ const render = () => {
|
|||
// フォントカラー
|
||||
Chart.defaults.color = getComputedStyle(document.documentElement).getPropertyValue('--fg');
|
||||
|
||||
const maxes = chartData.series.map((x, i) => Math.max(...x.data.map(d => d.y)));
|
||||
const maxes = chartData.series.map((x) => Math.max(...x.data.map(d => d.y)));
|
||||
|
||||
chartInstance = new Chart(chartEl.value, {
|
||||
type: props.bar ? 'bar' : 'line',
|
||||
|
@ -315,7 +315,7 @@ const render = () => {
|
|||
},
|
||||
plugins: [{
|
||||
id: 'vLine',
|
||||
beforeDraw(chart, args, options) {
|
||||
beforeDraw(chart) {
|
||||
if (chart.tooltip._active && chart.tooltip._active.length) {
|
||||
const activePoint = chart.tooltip._active[0];
|
||||
const ctx = chart.ctx;
|
||||
|
@ -337,10 +337,6 @@ const render = () => {
|
|||
});
|
||||
};
|
||||
|
||||
const exportData = () => {
|
||||
// TODO
|
||||
};
|
||||
|
||||
const fetchFederationChart = async (): Promise<typeof chartData> => {
|
||||
const raw = await os.apiGet('charts/federation', { limit: props.limit, span: props.span });
|
||||
return {
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { nextTick, onMounted } from 'vue';
|
||||
import { onMounted } from 'vue';
|
||||
import * as misskey from 'misskey-js';
|
||||
import Cropper from 'cropperjs';
|
||||
import tinycolor from 'tinycolor2';
|
||||
|
|
|
@ -26,7 +26,7 @@ export default defineComponent({
|
|||
},
|
||||
},
|
||||
|
||||
setup(props, { slots, expose }) {
|
||||
setup(props, { slots }) {
|
||||
function getDateText(time: string) {
|
||||
const date = new Date(time).getDate();
|
||||
const month = new Date(time).getMonth() + 1;
|
||||
|
|
|
@ -179,10 +179,6 @@ function onDragend() {
|
|||
emit('dragend');
|
||||
}
|
||||
|
||||
function go() {
|
||||
emit('move', props.folder.id);
|
||||
}
|
||||
|
||||
function rename() {
|
||||
os.inputText({
|
||||
title: i18n.ts.renameFolder,
|
||||
|
@ -222,10 +218,6 @@ function deleteFolder() {
|
|||
});
|
||||
}
|
||||
|
||||
function setAsUploadFolder() {
|
||||
defaultStore.set('uploadFolder', props.folder.id);
|
||||
}
|
||||
|
||||
function onContextmenu(ev: MouseEvent) {
|
||||
os.contextMenu([{
|
||||
text: i18n.ts.openInWindow,
|
||||
|
|
|
@ -38,14 +38,6 @@ function onClick() {
|
|||
emit('move', props.folder);
|
||||
}
|
||||
|
||||
function onMouseover() {
|
||||
hover.value = true;
|
||||
}
|
||||
|
||||
function onMouseout() {
|
||||
hover.value = false;
|
||||
}
|
||||
|
||||
function onDragover(ev: DragEvent) {
|
||||
if (!ev.dataTransfer) return;
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { markRaw, nextTick, onActivated, onBeforeUnmount, onMounted, ref, watch } from 'vue';
|
||||
import { nextTick, onActivated, onBeforeUnmount, onMounted, ref, watch } from 'vue';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import XNavFolder from './drive.nav-folder.vue';
|
||||
import XFolder from './drive.folder.vue';
|
||||
|
|
|
@ -31,17 +31,14 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue';
|
||||
import * as Acct from 'misskey-js/built/acct';
|
||||
import MkSwitch from '@/components/ui/switch.vue';
|
||||
import MkPagination from '@/components/ui/pagination.vue';
|
||||
import MkDriveFileThumbnail from '@/components/drive-file-thumbnail.vue';
|
||||
import bytes from '@/filters/bytes';
|
||||
import * as os from '@/os';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
const props = defineProps<{
|
||||
pagination: any;
|
||||
defineProps<{
|
||||
pagination: Record<string, any>;
|
||||
viewMode: 'grid' | 'list';
|
||||
}>();
|
||||
</script>
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, onUnmounted, nextTick, ref, watch, computed, toRefs } from 'vue';
|
||||
import { onMounted, nextTick, ref, watch, computed, toRefs } from 'vue';
|
||||
import { debounce } from 'throttle-debounce';
|
||||
import MkButton from '@/components/ui/button.vue';
|
||||
import { useInterval } from '@/scripts/use-interval';
|
||||
|
@ -73,7 +73,6 @@ const id = Math.random().toString(); // TODO: uuid?
|
|||
const focused = ref(false);
|
||||
const changed = ref(false);
|
||||
const invalid = ref(false);
|
||||
const filled = computed(() => v.value !== '' && v.value != null);
|
||||
const inputEl = ref<HTMLElement>();
|
||||
const prefixEl = ref<HTMLElement>();
|
||||
const suffixEl = ref<HTMLElement>();
|
||||
|
@ -110,7 +109,7 @@ watch(modelValue, newValue => {
|
|||
v.value = newValue;
|
||||
});
|
||||
|
||||
watch(v, newValue => {
|
||||
watch(v, () => {
|
||||
if (!props.manualSave) {
|
||||
if (props.debounce) {
|
||||
debouncedUpdated();
|
||||
|
|
|
@ -74,7 +74,7 @@ watch([steppedRawValue, containerEl], calcThumbPosition);
|
|||
let ro: ResizeObserver | undefined;
|
||||
|
||||
onMounted(() => {
|
||||
ro = new ResizeObserver((entries, observer) => {
|
||||
ro = new ResizeObserver(() => {
|
||||
calcThumbPosition();
|
||||
});
|
||||
ro.observe(containerEl.value);
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, onUnmounted, nextTick, ref, watch, computed, toRefs, VNode, useSlots } from 'vue';
|
||||
import { onMounted, nextTick, ref, watch, computed, toRefs, VNode, useSlots } from 'vue';
|
||||
import MkButton from '@/components/ui/button.vue';
|
||||
import * as os from '@/os';
|
||||
import { useInterval } from '@/scripts/use-interval';
|
||||
|
@ -58,7 +58,6 @@ const v = ref(modelValue.value);
|
|||
const focused = ref(false);
|
||||
const changed = ref(false);
|
||||
const invalid = ref(false);
|
||||
const filled = computed(() => v.value !== '' && v.value != null);
|
||||
const inputEl = ref(null);
|
||||
const prefixEl = ref(null);
|
||||
const suffixEl = ref(null);
|
||||
|
@ -83,7 +82,7 @@ watch(modelValue, newValue => {
|
|||
v.value = newValue;
|
||||
});
|
||||
|
||||
watch(v, newValue => {
|
||||
watch(v, () => {
|
||||
if (!props.manualSave) {
|
||||
updated();
|
||||
}
|
||||
|
@ -117,7 +116,7 @@ onMounted(() => {
|
|||
});
|
||||
});
|
||||
|
||||
const onClick = (ev: MouseEvent) => {
|
||||
const onClick = () => {
|
||||
focused.value = true;
|
||||
|
||||
const menu = [];
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { watch } from 'vue';
|
||||
import MkButton from '@/components/ui/button.vue';
|
||||
import { defaultStore } from '@/store';
|
||||
|
||||
const props = defineProps<{
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { toRefs, Ref } from 'vue';
|
||||
import * as os from '@/os';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
const props = defineProps<{
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { defineComponent, onMounted, onUnmounted, nextTick, ref, watch, computed, toRefs } from 'vue';
|
||||
import { onMounted, nextTick, watch, computed, toRefs } from 'vue';
|
||||
import { debounce } from 'throttle-debounce';
|
||||
import MkButton from '@/components/ui/button.vue';
|
||||
import { i18n } from '@/i18n';
|
||||
|
@ -41,11 +41,10 @@ const emit = defineEmits<{
|
|||
|
||||
const props = withDefaults(defineProps<{
|
||||
modelValue: string;
|
||||
type?: string;
|
||||
required?: boolean;
|
||||
readonly?: boolean;
|
||||
disabled?: boolean;
|
||||
pattern?: string;
|
||||
pattern?: string | undefined;
|
||||
placeholder?: string;
|
||||
autofocus?: boolean;
|
||||
autocomplete?: boolean;
|
||||
|
@ -56,6 +55,8 @@ const props = withDefaults(defineProps<{
|
|||
debounce?: boolean;
|
||||
manualSave?: boolean;
|
||||
}>(), {
|
||||
pattern: undefined,
|
||||
placeholder: '',
|
||||
autofocus: false,
|
||||
tall: false,
|
||||
pre: false,
|
||||
|
@ -68,11 +69,8 @@ const v = $ref(modelValue.value);
|
|||
|
||||
let focused = $ref(false);
|
||||
let changed = $ref(false);
|
||||
let invalid = $ref(false);
|
||||
let inputEl: HTMLTextAreaElement | null = $ref(null);
|
||||
|
||||
const filled = computed(() => modelValue.value !== '' && modelValue.value != null);
|
||||
|
||||
const focus = (): void => {
|
||||
inputEl?.focus();
|
||||
};
|
||||
|
@ -103,8 +101,6 @@ watch($$(v), () => {
|
|||
updated();
|
||||
}
|
||||
}
|
||||
|
||||
invalid = inputEl?.validity.badInput ?? false;
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { defineComponent, defineAsyncComponent } from 'vue';
|
||||
import * as os from '@/os';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
import { defineComponent } from 'vue';
|
||||
import { userName } from '@/filters/user';
|
||||
import ImgWithBlurhash from '@/components/img-with-blurhash.vue';
|
||||
import * as os from '@/os';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
|
|
|
@ -5,11 +5,9 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { inject } from 'vue';
|
||||
import * as os from '@/os';
|
||||
import copyToClipboard from '@/scripts/copy-to-clipboard';
|
||||
import { url } from '@/config';
|
||||
import { popout as popout_ } from '@/scripts/popout';
|
||||
import { i18n } from '@/i18n';
|
||||
import { useRouter } from '@/router';
|
||||
|
||||
|
@ -67,32 +65,15 @@ function onContextmenu(ev) {
|
|||
}], ev);
|
||||
}
|
||||
|
||||
function openWindow() {
|
||||
os.pageWindow(props.to);
|
||||
}
|
||||
|
||||
function modalWindow() {
|
||||
os.modalPageWindow(props.to);
|
||||
}
|
||||
|
||||
function popout() {
|
||||
popout_(props.to);
|
||||
}
|
||||
|
||||
function nav() {
|
||||
if (props.behavior === 'browser') {
|
||||
location.href = props.to;
|
||||
return;
|
||||
}
|
||||
|
||||
if (props.behavior) {
|
||||
if (props.behavior === 'window') {
|
||||
return openWindow();
|
||||
} else if (props.behavior === 'window') {
|
||||
os.pageWindow(props.to);
|
||||
} else if (props.behavior === 'modalWindow') {
|
||||
return modalWindow();
|
||||
}
|
||||
}
|
||||
|
||||
os.modalPageWindow(props.to);
|
||||
} else {
|
||||
router.push(props.to);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, watch } from 'vue';
|
||||
import { watch } from 'vue';
|
||||
import * as misskey from 'misskey-js';
|
||||
import { getStaticImageUrl } from '@/scripts/get-static-image-url';
|
||||
import { extractAvgColorFromBlurhash } from '@/scripts/extract-avg-color-from-blurhash';
|
||||
|
|
|
@ -6,7 +6,7 @@ char2filePath<template>
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { computed, defineComponent, ref, watch } from 'vue';
|
||||
import { computed, defineComponent } from 'vue';
|
||||
import { getStaticImageUrl } from '@/scripts/get-static-image-url';
|
||||
import { char2filePath } from '@/scripts/twemoji-base';
|
||||
import { defaultStore } from '@/store';
|
||||
|
|
|
@ -20,7 +20,7 @@ import { useCssModule } from 'vue';
|
|||
|
||||
useCssModule();
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
withDefaults(defineProps<{
|
||||
inline?: boolean;
|
||||
colored?: boolean;
|
||||
mini?: boolean;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { } from 'vue';
|
||||
import MfmCore from '@/components/mfm';
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
withDefaults(defineProps<{
|
||||
text: string;
|
||||
plain?: boolean;
|
||||
nowrap?: boolean;
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div v-if="!narrow || hideTitle" class="tabs">
|
||||
<button v-for="tab in tabs" :ref="(el) => tabRefs[tab.key] = el" v-tooltip="tab.title" class="tab _button" :class="{ active: tab.key != null && tab.key === props.tab }" @mousedown="(ev) => onTabMousedown(tab, ev)" @click="(ev) => onTabClick(tab, ev)">
|
||||
<button v-for="tab in tabs" :ref="(el) => tabRefs[tab.key] = el" v-tooltip="tab.title" class="tab _button" :class="{ active: tab.key != null && tab.key === props.tab }" @mousedown="() => onTabMousedown(tab)" @click="(ev) => onTabClick(tab, ev)">
|
||||
<i v-if="tab.icon" class="icon" :class="tab.icon"></i>
|
||||
<span v-if="!tab.iconOnly" class="title">{{ tab.title }}</span>
|
||||
</button>
|
||||
|
@ -34,11 +34,10 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, onMounted, onUnmounted, ref, inject, watch, shallowReactive, nextTick, reactive } from 'vue';
|
||||
import { onMounted, onUnmounted, ref, inject, watch, nextTick } from 'vue';
|
||||
import tinycolor from 'tinycolor2';
|
||||
import { popupMenu } from '@/os';
|
||||
import { scrollToTop } from '@/scripts/scroll';
|
||||
import { i18n } from '@/i18n';
|
||||
import { globalEvents } from '@/events';
|
||||
import { injectPageMetadata } from '@/scripts/page-metadata';
|
||||
|
||||
|
@ -106,7 +105,7 @@ const onClick = () => {
|
|||
scrollToTop(el, { behavior: 'smooth' });
|
||||
};
|
||||
|
||||
function onTabMousedown(tab: Tab, ev: MouseEvent): void {
|
||||
function onTabMousedown(tab: Tab): void {
|
||||
// ユーザビリティの観点からmousedown時にはonClickは呼ばない
|
||||
if (tab.key) {
|
||||
emit('update:tab', tab.key);
|
||||
|
@ -155,7 +154,7 @@ onMounted(() => {
|
|||
|
||||
if (el && el.parentElement) {
|
||||
narrow = el.parentElement.offsetWidth < 500;
|
||||
ro = new ResizeObserver((entries, observer) => {
|
||||
ro = new ResizeObserver(() => {
|
||||
if (el.parentElement && document.body.contains(el)) {
|
||||
narrow = el.parentElement.offsetWidth < 500;
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { inject, nextTick, onMounted, onUnmounted, watch } from 'vue';
|
||||
import { inject, onUnmounted, watch } from 'vue';
|
||||
import { Router } from '@/nirax';
|
||||
import { defaultStore } from '@/store';
|
||||
|
||||
|
@ -29,7 +29,7 @@ let currentPageComponent = $shallowRef(router.getCurrentComponent());
|
|||
let currentPageProps = $ref(router.getCurrentProps());
|
||||
let key = $ref(router.getCurrentKey());
|
||||
|
||||
function onChange({ route, props: newProps, key: newKey }) {
|
||||
function onChange({ route, props: newProps, key: newKey }): void {
|
||||
currentPageComponent = route.component;
|
||||
currentPageProps = newProps;
|
||||
key = newKey;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { inject, onMounted, onUnmounted, ref } from 'vue';
|
||||
import { inject, onMounted, onUnmounted } from 'vue';
|
||||
import { deviceKind } from '@/scripts/device-kind';
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
|
@ -40,7 +40,7 @@ const adjust = (rect: { width: number; height: number; }) => {
|
|||
};
|
||||
|
||||
onMounted(() => {
|
||||
ro = new ResizeObserver((entries) => {
|
||||
ro = new ResizeObserver(() => {
|
||||
/* iOSが対応していない
|
||||
adjust({
|
||||
width: entries[0].borderBoxSize[0].inlineSize,
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { } from 'vue';
|
||||
import * as misskey from 'misskey-js';
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
withDefaults(defineProps<{
|
||||
user: misskey.entities.User;
|
||||
nowrap?: boolean;
|
||||
}>(), {
|
||||
|
|
|
@ -91,7 +91,7 @@ Chart.register(
|
|||
Filler,
|
||||
);
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
withDefaults(defineProps<{
|
||||
chartLimit?: number;
|
||||
detailed?: boolean;
|
||||
}>(), {
|
||||
|
@ -103,8 +103,7 @@ const chartSrc = $ref('active-users');
|
|||
let subDoughnutEl = $ref<HTMLCanvasElement>();
|
||||
let pubDoughnutEl = $ref<HTMLCanvasElement>();
|
||||
|
||||
const { handler: externalTooltipHandler1 } = useChartTooltip();
|
||||
const { handler: externalTooltipHandler2 } = useChartTooltip();
|
||||
const { handler: externalTooltipHandler } = useChartTooltip();
|
||||
|
||||
function createDoughnut(chartEl, tooltip, data) {
|
||||
return new Chart(chartEl, {
|
||||
|
@ -148,8 +147,8 @@ function createDoughnut(chartEl, tooltip, data) {
|
|||
|
||||
onMounted(() => {
|
||||
os.apiGet('federation/stats', { limit: 15 }).then(fedStats => {
|
||||
createDoughnut(subDoughnutEl, externalTooltipHandler1, fedStats.topSubInstances.map(x => ({ name: x.host, color: x.themeColor, value: x.followersCount })).concat([{ name: '(other)', color: '#80808080', value: fedStats.otherFollowersCount }]));
|
||||
createDoughnut(pubDoughnutEl, externalTooltipHandler1, fedStats.topPubInstances.map(x => ({ name: x.host, color: x.themeColor, value: x.followingCount })).concat([{ name: '(other)', color: '#80808080', value: fedStats.otherFollowingCount }]));
|
||||
createDoughnut(subDoughnutEl, externalTooltipHandler, fedStats.topSubInstances.map(x => ({ name: x.host, color: x.themeColor, value: x.followersCount })).concat([{ name: '(other)', color: '#80808080', value: fedStats.otherFollowersCount }]));
|
||||
createDoughnut(pubDoughnutEl, externalTooltipHandler, fedStats.topPubInstances.map(x => ({ name: x.host, color: x.themeColor, value: x.followingCount })).concat([{ name: '(other)', color: '#80808080', value: fedStats.otherFollowingCount }]));
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -47,7 +47,7 @@ export default {
|
|||
},
|
||||
render({
|
||||
$slots, $style, $props: {
|
||||
duration, repeat, paused, reverse,
|
||||
repeat, paused, reverse,
|
||||
},
|
||||
}) {
|
||||
return h('div', { class: [$style.wrap] }, [
|
||||
|
|
|
@ -34,15 +34,14 @@ import * as misskey from 'misskey-js';
|
|||
import { ColdDeviceStorage } from '@/store';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
defineProps<{
|
||||
media: misskey.entities.DriveFile;
|
||||
}>(), {
|
||||
});
|
||||
}>();
|
||||
|
||||
const audioEl = $ref<HTMLAudioElement | null>();
|
||||
let hide = $ref(true);
|
||||
|
||||
function volumechange() {
|
||||
function volumechange(): void {
|
||||
if (audioEl) ColdDeviceStorage.set('mediaVolume', audioEl.volume);
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,6 @@ import XImage from './media-image.vue';
|
|||
import XVideo from './media-video.vue';
|
||||
import * as os from '@/os';
|
||||
import { FILE_TYPE_BROWSERSAFE } from '@/const';
|
||||
import { defaultStore } from '@/store';
|
||||
|
||||
const props = defineProps<{
|
||||
mediaList: misskey.entities.DriveFile[];
|
||||
|
@ -31,7 +30,6 @@ const props = defineProps<{
|
|||
}>();
|
||||
|
||||
const gallery = ref(null);
|
||||
const pswpZIndex = os.claimZIndex('middle');
|
||||
|
||||
onMounted(() => {
|
||||
const lightbox = new PhotoSwipeLightbox({
|
||||
|
@ -183,7 +181,6 @@ const previewable = (file: misskey.entities.DriveFile): boolean => {
|
|||
<style lang="scss">
|
||||
.pswp {
|
||||
// なぜか機能しない
|
||||
//z-index: v-bind(pswpZIndex);
|
||||
z-index: 2000000;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onUnmounted, watch } from 'vue';
|
||||
import { watch } from 'vue';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import tinycolor from 'tinycolor2';
|
||||
import { useInterval } from '@/scripts/use-interval';
|
||||
|
@ -42,7 +42,6 @@ let polylinePoints = $ref('');
|
|||
let polygonPoints = $ref('');
|
||||
let headX = $ref<number | null>(null);
|
||||
let headY = $ref<number | null>(null);
|
||||
let clock = $ref<number | null>(null);
|
||||
const accent = tinycolor(getComputedStyle(document.documentElement).getPropertyValue('--accent'));
|
||||
const color = accent.toRgbString();
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ import { url } from '@/config';
|
|||
import * as os from '@/os';
|
||||
import { mainRouter, routes } from '@/router';
|
||||
import { i18n } from '@/i18n';
|
||||
import { PageMetadata, provideMetadataReceiver, setPageMetadata } from '@/scripts/page-metadata';
|
||||
import { PageMetadata, provideMetadataReceiver } from '@/scripts/page-metadata';
|
||||
import { Router } from '@/nirax';
|
||||
|
||||
const props = defineProps<{
|
||||
|
@ -43,10 +43,6 @@ defineEmits<{
|
|||
|
||||
const router = new Router(routes, props.initialPath);
|
||||
|
||||
router.addListener('push', ctx => {
|
||||
|
||||
});
|
||||
|
||||
let pageMetadata = $ref<null | ComputedRef<PageMetadata>>();
|
||||
let rootEl = $ref();
|
||||
let modal = $ref<InstanceType<typeof MkModal>>();
|
||||
|
|
|
@ -113,7 +113,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, inject, onMounted, onUnmounted, reactive, ref } from 'vue';
|
||||
import { inject, onMounted, ref } from 'vue';
|
||||
import * as mfm from 'mfm-js';
|
||||
import * as misskey from 'misskey-js';
|
||||
import MkNoteSub from './MkNoteSub.vue';
|
||||
|
@ -186,7 +186,7 @@ const directReplies = ref<misskey.entities.Note[]>([]);
|
|||
|
||||
const keymap = {
|
||||
'r': () => reply(true),
|
||||
'e|a|plus': () => react(true),
|
||||
'e|a|plus': () => react(),
|
||||
'q': () => renoteButton.value.renote(true),
|
||||
'esc': blur,
|
||||
'm|o': () => menu(true),
|
||||
|
@ -209,7 +209,7 @@ function reply(viaKeyboard = false): void {
|
|||
});
|
||||
}
|
||||
|
||||
function react(viaKeyboard = false): void {
|
||||
function react(): void {
|
||||
pleaseLogin();
|
||||
blur();
|
||||
reactionPicker.show(reactButton.value, reaction => {
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { } from 'vue';
|
||||
|
||||
const props = defineProps<{
|
||||
defineProps<{
|
||||
text: string;
|
||||
}>();
|
||||
</script>
|
||||
|
|
|
@ -23,7 +23,7 @@ import XNoteHeader from './note-header.vue';
|
|||
import MkNoteSubNoteContent from './sub-note-content.vue';
|
||||
import XCwButton from './cw-button.vue';
|
||||
|
||||
const props = defineProps<{
|
||||
defineProps<{
|
||||
note: misskey.entities.Note;
|
||||
pinned?: boolean;
|
||||
}>();
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
<button v-if="appearNote.myReaction == null" ref="reactButton" class="button _button" @click="react()">
|
||||
<i class="fas fa-plus"></i>
|
||||
</button>
|
||||
<button v-if="appearNote.myReaction != null" ref="reactButton" class="button _button reacted" @click="undoReact(appearNote)">
|
||||
<button v-if="appearNote.myReaction != null" ref="reactButton" class="button _button reacted" @click="undoReact()">
|
||||
<i class="fas fa-minus"></i>
|
||||
</button>
|
||||
<button ref="menuButton" class="button _button" @click="menu()">
|
||||
|
@ -102,7 +102,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, inject, onMounted, onUnmounted, reactive, ref, Ref } from 'vue';
|
||||
import { inject, onMounted, ref, Ref } from 'vue';
|
||||
import * as mfm from 'mfm-js';
|
||||
import * as misskey from 'misskey-js';
|
||||
import MkNoteSub from './MkNoteSub.vue';
|
||||
|
@ -178,7 +178,7 @@ const showTicker = (defaultStore.state.instanceTicker === 'always') || (defaultS
|
|||
|
||||
const keymap = {
|
||||
'r': () => reply(true),
|
||||
'e|a|plus': () => react(true),
|
||||
'e|a|plus': () => react(),
|
||||
'q': () => renoteButton.value.renote(true),
|
||||
'up|k|shift+tab': focusBefore,
|
||||
'down|j|tab': focusAfter,
|
||||
|
@ -203,7 +203,7 @@ function reply(viaKeyboard = false): void {
|
|||
});
|
||||
}
|
||||
|
||||
function react(viaKeyboard = false): void {
|
||||
function react(): void {
|
||||
pleaseLogin();
|
||||
blur();
|
||||
reactionPicker.show(reactButton.value, reaction => {
|
||||
|
@ -216,11 +216,10 @@ function react(viaKeyboard = false): void {
|
|||
});
|
||||
}
|
||||
|
||||
function undoReact(note): void {
|
||||
const oldReaction = note.myReaction;
|
||||
if (!oldReaction) return;
|
||||
function undoReact(): void {
|
||||
if (!appearNote.myReaction) return;
|
||||
os.api('notes/reactions/delete', {
|
||||
noteId: note.id,
|
||||
noteId: appearNote.id,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ import XList from '@/components/date-separated-list.vue';
|
|||
import MkPagination, { Paging } from '@/components/ui/pagination.vue';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
const props = defineProps<{
|
||||
defineProps<{
|
||||
pagination: Paging;
|
||||
noGap?: boolean;
|
||||
}>();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="mk-notification-toast" :style="{ zIndex }">
|
||||
<transition :name="$store.state.animation ? 'notification-toast' : ''" appear @after-leave="$emit('closed')">
|
||||
<transition :name="$store.state.animation ? 'notification-toast' : ''" appear @after-leave="emit('closed')">
|
||||
<XNotification v-if="showing" :notification="notification" class="notification _acrylic"/>
|
||||
</transition>
|
||||
</div>
|
||||
|
|
|
@ -17,13 +17,12 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { defineComponent, markRaw, onUnmounted, onMounted, computed, ref } from 'vue';
|
||||
import { onUnmounted, onMounted, computed, ref } from 'vue';
|
||||
import { notificationTypes } from 'misskey-js';
|
||||
import MkPagination, { Paging } from '@/components/ui/pagination.vue';
|
||||
import XNotification from '@/components/notification.vue';
|
||||
import XList from '@/components/date-separated-list.vue';
|
||||
import XNote from '@/components/note.vue';
|
||||
import * as os from '@/os';
|
||||
import { stream } from '@/stream';
|
||||
import { $i } from '@/account';
|
||||
import { i18n } from '@/i18n';
|
||||
|
@ -45,7 +44,7 @@ const pagination: Paging = {
|
|||
})),
|
||||
};
|
||||
|
||||
const onNotification = (notification) => {
|
||||
const onNotification = (notification): void => {
|
||||
const isMuted = props.includeTypes ? !props.includeTypes.includes(notification.type) : $i.mutingNotificationTypes.includes(notification.type);
|
||||
if (isMuted || document.visibilityState === 'visible') {
|
||||
stream.send('readNotification', {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import { } from 'vue';
|
||||
import XValue from './object-view.value.vue';
|
||||
|
||||
const props = defineProps<{
|
||||
defineProps<{
|
||||
value: Record<string, unknown>;
|
||||
}>();
|
||||
</script>
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { userName } from '@/filters/user';
|
||||
import * as os from '@/os';
|
||||
|
||||
export default defineComponent({
|
||||
props: {
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ComputedRef, inject, provide } from 'vue';
|
||||
import { ComputedRef, provide } from 'vue';
|
||||
import RouterView from './global/router-view.vue';
|
||||
import XWindow from '@/components/ui/window.vue';
|
||||
import { popout as _popout } from '@/scripts/popout';
|
||||
|
@ -34,7 +34,7 @@ import * as os from '@/os';
|
|||
import { mainRouter, routes } from '@/router';
|
||||
import { Router } from '@/nirax';
|
||||
import { i18n } from '@/i18n';
|
||||
import { PageMetadata, provideMetadataReceiver, setPageMetadata } from '@/scripts/page-metadata';
|
||||
import { PageMetadata, provideMetadataReceiver } from '@/scripts/page-metadata';
|
||||
|
||||
const props = defineProps<{
|
||||
initialPath: string;
|
||||
|
@ -108,10 +108,6 @@ const contextmenu = $computed(() => ([{
|
|||
},
|
||||
}]));
|
||||
|
||||
function menu(ev) {
|
||||
os.popupMenu(contextmenu, ev.currentTarget ?? ev.target);
|
||||
}
|
||||
|
||||
function back() {
|
||||
history.pop();
|
||||
router.change(history[history.length - 1].path, history[history.length - 1].key);
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, onUnmounted, ref, toRef } from 'vue';
|
||||
import { computed, ref } from 'vue';
|
||||
import * as misskey from 'misskey-js';
|
||||
import { sum } from '@/scripts/array';
|
||||
import { pleaseLogin } from '@/scripts/please-login';
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
v-size="{ max: [310, 500] }" class="gafaadew"
|
||||
:class="{ modal, _popup: modal }"
|
||||
@dragover.stop="onDragover"
|
||||
@dragenter="onDragenter"
|
||||
@dragleave="onDragleave"
|
||||
@drop.stop="onDrop"
|
||||
>
|
||||
<header>
|
||||
|
@ -141,8 +139,6 @@ let visibleUsers = $ref([]);
|
|||
if (props.initialVisibleUsers) {
|
||||
props.initialVisibleUsers.forEach(pushVisibleUser);
|
||||
}
|
||||
let autocomplete = $ref(null);
|
||||
let draghover = $ref(false);
|
||||
let quoteId = $ref(null);
|
||||
let hasNotSpecifiedMentions = $ref(false);
|
||||
let recentHashtags = $ref(JSON.parse(localStorage.getItem('hashtags') || '[]'));
|
||||
|
@ -337,10 +333,6 @@ function togglePoll() {
|
|||
}
|
||||
}
|
||||
|
||||
function addTag(tag: string) {
|
||||
insertTextAtCursor(textareaEl, ` #${tag} `);
|
||||
}
|
||||
|
||||
function focus() {
|
||||
if (textareaEl) {
|
||||
textareaEl.focus();
|
||||
|
@ -438,7 +430,7 @@ function onCompositionUpdate(ev: CompositionEvent) {
|
|||
typing();
|
||||
}
|
||||
|
||||
function onCompositionEnd(ev: CompositionEvent) {
|
||||
function onCompositionEnd() {
|
||||
imeText = '';
|
||||
}
|
||||
|
||||
|
@ -478,22 +470,11 @@ function onDragover(ev) {
|
|||
const isDriveFile = ev.dataTransfer.types[0] === _DATA_TRANSFER_DRIVE_FILE_;
|
||||
if (isFile || isDriveFile) {
|
||||
ev.preventDefault();
|
||||
draghover = true;
|
||||
ev.dataTransfer.dropEffect = ev.dataTransfer.effectAllowed === 'all' ? 'copy' : 'move';
|
||||
}
|
||||
}
|
||||
|
||||
function onDragenter(ev) {
|
||||
draghover = true;
|
||||
}
|
||||
|
||||
function onDragleave(ev) {
|
||||
draghover = false;
|
||||
}
|
||||
|
||||
function onDrop(ev): void {
|
||||
draghover = false;
|
||||
|
||||
// ファイルだったら
|
||||
if (ev.dataTransfer.files.length > 0) {
|
||||
ev.preventDefault();
|
||||
|
|
|
@ -21,8 +21,6 @@ import {
|
|||
SubTitle,
|
||||
Filler,
|
||||
} from 'chart.js';
|
||||
import number from '@/filters/number';
|
||||
import * as os from '@/os';
|
||||
import { defaultStore } from '@/store';
|
||||
|
||||
Chart.register(
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
<template>
|
||||
<MkEmoji :emoji="reaction" :custom-emojis="customEmojis || []" :is-reaction="true" :normal="true" :no-style="noStyle"/>
|
||||
<MkEmoji :emoji="reaction" :custom-emojis="customEmojis" :is-reaction="true" :normal="true" :no-style="noStyle"/>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { } from 'vue';
|
||||
|
||||
const props = defineProps<{
|
||||
withDefaults(defineProps<{
|
||||
reaction: string;
|
||||
customEmojis?: any[]; // TODO
|
||||
customEmojis?: Record<string, any>[]; // TODO
|
||||
noStyle?: boolean;
|
||||
}>();
|
||||
}>(), {
|
||||
customEmojis: [];
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -12,9 +12,9 @@ import { } from 'vue';
|
|||
import MkTooltip from './ui/tooltip.vue';
|
||||
import XReactionIcon from './reaction-icon.vue';
|
||||
|
||||
const props = defineProps<{
|
||||
defineProps<{
|
||||
reaction: string;
|
||||
emojis: any[]; // TODO
|
||||
emojis: Record<string, any>[]; // TODO
|
||||
targetElement: HTMLElement;
|
||||
}>();
|
||||
|
||||
|
|
|
@ -21,11 +21,11 @@ import { } from 'vue';
|
|||
import MkTooltip from './ui/tooltip.vue';
|
||||
import XReactionIcon from './reaction-icon.vue';
|
||||
|
||||
const props = defineProps<{
|
||||
defineProps<{
|
||||
reaction: string;
|
||||
users: any[]; // TODO
|
||||
users: Record<string, any>[]; // TODO
|
||||
count: number;
|
||||
emojis: any[]; // TODO
|
||||
emojis: Record<string, any>[]; // TODO
|
||||
targetElement: HTMLElement;
|
||||
}>();
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ import MkSignin from './signin.vue';
|
|||
import XModalWindow from '@/components/ui/modal-window.vue';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
withDefaults(defineProps<{
|
||||
autoSet?: boolean;
|
||||
message?: string,
|
||||
}>(), {
|
||||
|
@ -34,12 +34,12 @@ const emit = defineEmits<{
|
|||
|
||||
const dialog = $ref<InstanceType<typeof XModalWindow>>();
|
||||
|
||||
function onClose() {
|
||||
function onClose(): void {
|
||||
emit('cancelled');
|
||||
dialog.close();
|
||||
}
|
||||
|
||||
function onLogin(res) {
|
||||
function onLogin(res): void {
|
||||
emit('done', res);
|
||||
dialog.close();
|
||||
}
|
||||
|
|
|
@ -69,7 +69,6 @@ let password = $ref('');
|
|||
let token = $ref('');
|
||||
let host = $ref(toUnicode(configHost));
|
||||
let totpLogin = $ref(false);
|
||||
let credential = $ref(null);
|
||||
let challengeData = $ref(null);
|
||||
let queryingKey = $ref(false);
|
||||
let hCaptchaResponse = $ref(null);
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
<div class="_monolithic_">
|
||||
<div class="_section">
|
||||
<XSignup :auto-set="autoSet" @signup="onSignup" @signupEmailPending="onSignupEmailPending"/>
|
||||
<XSignup :auto-set="autoSet" @signup="onSignup" @signup-email-pending="onSignupEmailPending"/>
|
||||
</div>
|
||||
</div>
|
||||
</XModalWindow>
|
||||
|
@ -22,7 +22,7 @@ import XSignup from './signup.vue';
|
|||
import XModalWindow from '@/components/ui/modal-window.vue';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
withDefaults(defineProps<{
|
||||
autoSet?: boolean;
|
||||
}>(), {
|
||||
autoSet: false,
|
||||
|
@ -35,12 +35,12 @@ const emit = defineEmits<{
|
|||
|
||||
const dialog = $ref<InstanceType<typeof XModalWindow>>();
|
||||
|
||||
function onSignup(res) {
|
||||
function onSignup(res): void {
|
||||
emit('done', res);
|
||||
dialog.close();
|
||||
}
|
||||
|
||||
function onSignupEmailPending() {
|
||||
function onSignupEmailPending(): void {
|
||||
dialog.close();
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -65,7 +65,6 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { defineComponent, onMounted, onUnmounted, ref } from 'vue';
|
||||
import * as os from '@/os';
|
||||
|
||||
export default defineComponent({
|
||||
setup() {
|
||||
|
@ -78,7 +77,7 @@ export default defineComponent({
|
|||
let ro: ResizeObserver | undefined;
|
||||
|
||||
onMounted(() => {
|
||||
ro = new ResizeObserver((entries, observer) => {
|
||||
ro = new ResizeObserver(() => {
|
||||
width.value = el.value?.offsetWidth + 64;
|
||||
height.value = el.value?.offsetHeight + 64;
|
||||
});
|
||||
|
|
|
@ -3,9 +3,8 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, computed, provide, onUnmounted } from 'vue';
|
||||
import { computed, provide, onUnmounted } from 'vue';
|
||||
import XNotes from './notes.vue';
|
||||
import * as os from '@/os';
|
||||
import { stream } from '@/stream';
|
||||
import * as sound from '@/scripts/sound';
|
||||
import { $i } from '@/account';
|
||||
|
|
|
@ -97,7 +97,7 @@ export default defineComponent({
|
|||
};
|
||||
|
||||
calcOmit();
|
||||
new ResizeObserver((entries, observer) => {
|
||||
new ResizeObserver(() => {
|
||||
calcOmit();
|
||||
}).observe(this.$refs.content);
|
||||
},
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import * as os from '@/os';
|
||||
|
||||
export default defineComponent({
|
||||
props: {
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
import { onMounted, onUnmounted } from 'vue';
|
||||
import MkModal from './modal.vue';
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
withDefaults(defineProps<{
|
||||
withOkButton: boolean;
|
||||
okButtonDisabled: boolean;
|
||||
width: number;
|
||||
|
@ -63,7 +63,7 @@ const onKeydown = (evt) => {
|
|||
}
|
||||
};
|
||||
|
||||
const ro = new ResizeObserver((entries, observer) => {
|
||||
const ro = new ResizeObserver(() => {
|
||||
bodyWidth = rootEl.offsetWidth;
|
||||
bodyHeight = rootEl.offsetHeight - headerEl.offsetHeight;
|
||||
});
|
||||
|
|
|
@ -217,9 +217,9 @@ const onOpened = () => {
|
|||
|
||||
// モーダルコンテンツにマウスボタンが押され、コンテンツ外でマウスボタンが離されたときにモーダルバックグラウンドクリックと判定させないためにマウスイベントを監視しフラグ管理する
|
||||
const el = content!.children[0];
|
||||
el.addEventListener('mousedown', ev => {
|
||||
el.addEventListener('mousedown', () => {
|
||||
contentClicking = true;
|
||||
window.addEventListener('mouseup', ev => {
|
||||
window.addEventListener('mouseup', () => {
|
||||
// click イベントより先に mouseup イベントが発生するかもしれないのでちょっと待つ
|
||||
window.setTimeout(() => {
|
||||
contentClicking = false;
|
||||
|
@ -242,7 +242,7 @@ onMounted(() => {
|
|||
}, { immediate: true });
|
||||
|
||||
nextTick(() => {
|
||||
new ResizeObserver((entries, observer) => {
|
||||
new ResizeObserver(() => {
|
||||
align();
|
||||
}).observe(content!);
|
||||
});
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, ComputedRef, isRef, markRaw, onActivated, onDeactivated, Ref, ref, watch } from 'vue';
|
||||
import { computed, ComputedRef, isRef, onActivated, onDeactivated, ref, watch } from 'vue';
|
||||
import * as misskey from 'misskey-js';
|
||||
import * as os from '@/os';
|
||||
import { onScrollTop, isTopVisible, getScrollPosition, getScrollContainer } from '@/scripts/scroll';
|
||||
|
@ -105,7 +105,7 @@ const init = async (): Promise<void> => {
|
|||
offset.value = res.length;
|
||||
error.value = false;
|
||||
fetching.value = false;
|
||||
}, err => {
|
||||
}, () => {
|
||||
error.value = true;
|
||||
fetching.value = false;
|
||||
});
|
||||
|
@ -142,7 +142,7 @@ const fetchMore = async (): Promise<void> => {
|
|||
}
|
||||
offset.value += res.length;
|
||||
moreFetching.value = false;
|
||||
}, err => {
|
||||
}, () => {
|
||||
moreFetching.value = false;
|
||||
});
|
||||
};
|
||||
|
@ -172,7 +172,7 @@ const fetchMoreAhead = async (): Promise<void> => {
|
|||
}
|
||||
offset.value += res.length;
|
||||
moreFetching.value = false;
|
||||
}, err => {
|
||||
}, () => {
|
||||
moreFetching.value = false;
|
||||
});
|
||||
};
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, ref, unref } from 'vue';
|
||||
import { defineComponent } from 'vue';
|
||||
|
||||
export default defineComponent({
|
||||
props: {
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, onUnmounted } from 'vue';
|
||||
import { onUnmounted } from 'vue';
|
||||
import { url as local, lang } from '@/config';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
|
|
|
@ -19,10 +19,9 @@
|
|||
import { ref } from 'vue';
|
||||
import MkUserInfo from '@/components/user-info.vue';
|
||||
import MkPagination, { Paging } from '@/components/ui/pagination.vue';
|
||||
import { userPage } from '@/filters/user';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
const props = defineProps<{
|
||||
defineProps<{
|
||||
pagination: Paging;
|
||||
noGap?: boolean;
|
||||
}>();
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { nextTick, onMounted } from 'vue';
|
||||
import { onMounted } from 'vue';
|
||||
import * as misskey from 'misskey-js';
|
||||
import MkInput from '@/components/form/input.vue';
|
||||
import FormSplit from '@/components/form/split.vue';
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
import { } from 'vue';
|
||||
import MkTooltip from './ui/tooltip.vue';
|
||||
|
||||
const props = defineProps<{
|
||||
users: any[]; // TODO
|
||||
defineProps<{
|
||||
users: Record<string, any>[]; // TODO
|
||||
count: number;
|
||||
targetElement: HTMLElement;
|
||||
}>();
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import XDetails from '@/components/users-tooltip.vue';
|
||||
import * as os from '@/os';
|
||||
import { useTooltip } from '@/scripts/use-tooltip';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Directive } from 'vue';
|
||||
|
||||
export default {
|
||||
mounted(src, binding, vn) {
|
||||
mounted(src) {
|
||||
const getBgColor = (el: HTMLElement) => {
|
||||
const style = window.getComputedStyle(el);
|
||||
if (style.backgroundColor && !['rgba(0, 0, 0, 0)', 'rgba(0,0,0,0)', 'transparent'].includes(style.backgroundColor)) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Directive } from 'vue';
|
||||
|
||||
export default {
|
||||
beforeMount(src, binding, vn) {
|
||||
beforeMount(src) {
|
||||
src.style.opacity = '0';
|
||||
src.style.transform = 'scale(0.9)';
|
||||
// ページネーションと相性が悪いので
|
||||
|
@ -9,7 +9,7 @@ export default {
|
|||
src.classList.add('_zoom');
|
||||
},
|
||||
|
||||
mounted(src, binding, vn) {
|
||||
mounted(src) {
|
||||
window.setTimeout(() => {
|
||||
src.style.opacity = '1';
|
||||
src.style.transform = 'none';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Directive } from 'vue';
|
||||
|
||||
export default {
|
||||
mounted(src, binding, vn) {
|
||||
mounted(src, binding) {
|
||||
const fn = binding.value;
|
||||
if (fn == null) return;
|
||||
|
||||
|
@ -16,7 +16,7 @@ export default {
|
|||
src._observer_ = observer;
|
||||
},
|
||||
|
||||
unmounted(src, binding, vn) {
|
||||
unmounted(src) {
|
||||
if (src._observer_) src._observer_.disconnect();
|
||||
},
|
||||
} as Directive;
|
||||
|
|
|
@ -33,8 +33,8 @@ function calc(src: Element) {
|
|||
}
|
||||
|
||||
export default {
|
||||
mounted(src, binding, vn) {
|
||||
const resize = new ResizeObserver((entries, observer) => {
|
||||
mounted(src) {
|
||||
const resize = new ResizeObserver(() => {
|
||||
calc(src);
|
||||
});
|
||||
resize.observe(src);
|
||||
|
@ -43,7 +43,7 @@ export default {
|
|||
calc(src);
|
||||
},
|
||||
|
||||
unmounted(src, binding, vn) {
|
||||
unmounted(src) {
|
||||
binding.value(0, 0);
|
||||
const info = mountings.get(src);
|
||||
if (!info) return;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Directive } from 'vue';
|
||||
|
||||
export default {
|
||||
mounted(src, binding, vn) {
|
||||
mounted(src) {
|
||||
const getBgColor = (el: HTMLElement) => {
|
||||
const style = window.getComputedStyle(el);
|
||||
if (style.backgroundColor && !['rgba(0, 0, 0, 0)', 'rgba(0,0,0,0)', 'transparent'].includes(style.backgroundColor)) {
|
||||
|
|
|
@ -2,7 +2,7 @@ import Ripple from '@/components/ripple.vue';
|
|||
import { popup } from '@/os';
|
||||
|
||||
export default {
|
||||
mounted(el, binding, vn) {
|
||||
mounted(el, binding) {
|
||||
// 明示的に false であればバインドしない
|
||||
if (binding.value === false) return;
|
||||
|
||||
|
|
|
@ -77,8 +77,8 @@ function calc(el: Element) {
|
|||
}
|
||||
|
||||
export default {
|
||||
mounted(src, binding, vn) {
|
||||
const resize = new ResizeObserver((entries, observer) => {
|
||||
mounted(src, binding) {
|
||||
const resize = new ResizeObserver(() => {
|
||||
calc(src);
|
||||
});
|
||||
|
||||
|
@ -92,12 +92,12 @@ export default {
|
|||
resize.observe(src);
|
||||
},
|
||||
|
||||
updated(src, binding, vn) {
|
||||
updated(src, binding) {
|
||||
mountings.set(src, Object.assign({}, mountings.get(src), { value: binding.value }));
|
||||
calc(src);
|
||||
},
|
||||
|
||||
unmounted(src, binding, vn) {
|
||||
unmounted(src) {
|
||||
const info = mountings.get(src);
|
||||
if (!info) return;
|
||||
info.resize.disconnect();
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
import { Directive } from 'vue';
|
||||
|
||||
export default {
|
||||
mounted(src, binding, vn) {
|
||||
//const query = binding.value;
|
||||
|
||||
mounted(src) {
|
||||
const header = src.children[0];
|
||||
const body = src.children[1];
|
||||
const currentStickyTop = getComputedStyle(src).getPropertyValue('--stickyTop') || '0px';
|
||||
|
|
|
@ -10,7 +10,7 @@ const end = isTouchUsing ? 'touchend' : 'mouseleave';
|
|||
const delay = 100;
|
||||
|
||||
export default {
|
||||
mounted(el: HTMLElement, binding, vn) {
|
||||
mounted(el: HTMLElement, binding) {
|
||||
const self = (el as any)._tooltipDirective_ = {} as any;
|
||||
|
||||
self.text = binding.value as string;
|
||||
|
@ -84,7 +84,7 @@ export default {
|
|||
self.text = binding.value as string;
|
||||
},
|
||||
|
||||
unmounted(el, binding, vn) {
|
||||
unmounted(el) {
|
||||
const self = el._tooltipDirective_;
|
||||
window.clearInterval(self.checkTimer);
|
||||
},
|
||||
|
|
|
@ -99,7 +99,7 @@ export class UserPreview {
|
|||
}
|
||||
|
||||
export default {
|
||||
mounted(el: HTMLElement, binding, vn) {
|
||||
mounted(el: HTMLElement, binding) {
|
||||
if (binding.value == null) return;
|
||||
|
||||
// TODO: 新たにプロパティを作るのをやめMapを使う
|
||||
|
@ -109,7 +109,7 @@ export default {
|
|||
self.preview = new UserPreview(el, binding.value);
|
||||
},
|
||||
|
||||
unmounted(el, binding, vn) {
|
||||
unmounted(el, binding) {
|
||||
if (binding.value == null) return;
|
||||
|
||||
const self = el._userPreviewDirective_;
|
||||
|
|
|
@ -20,7 +20,7 @@ import JSON5 from 'json5';
|
|||
import widgets from '@/widgets';
|
||||
import directives from '@/directives';
|
||||
import components from '@/components';
|
||||
import { version, ui, lang, host } from '@/config';
|
||||
import { version, ui, lang } from '@/config';
|
||||
import { applyTheme } from '@/scripts/theme';
|
||||
import { isDeviceDarkmode } from '@/scripts/is-device-darkmode';
|
||||
import { i18n } from '@/i18n';
|
||||
|
|
|
@ -194,7 +194,7 @@ export const menuDef = reactive({
|
|||
reload: {
|
||||
title: 'reload',
|
||||
icon: 'fas fa-refresh',
|
||||
action: (ev) => {
|
||||
action: () => {
|
||||
location.reload();
|
||||
},
|
||||
},
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// NIRAX --- A lightweight router
|
||||
|
||||
import { EventEmitter } from 'eventemitter3';
|
||||
import { Ref, Component, ref, shallowRef, ShallowRef } from 'vue';
|
||||
import { Component, shallowRef, ShallowRef } from 'vue';
|
||||
import { pleaseLogin } from '@/scripts/please-login';
|
||||
import { safeURIDecode } from '@/scripts/safe-uri-decode';
|
||||
|
||||
|
@ -165,7 +165,6 @@ export class Router extends EventEmitter<{
|
|||
|
||||
private navigate(path: string, key: string | null | undefined, initial = false) {
|
||||
const beforePath = this.currentPath;
|
||||
const beforeRoute = this.currentRoute.value;
|
||||
this.currentPath = path;
|
||||
|
||||
const res = this.resolve(this.currentPath);
|
||||
|
|
|
@ -207,11 +207,9 @@ export function alert(props: {
|
|||
title?: string | null;
|
||||
text?: string | null;
|
||||
}): Promise<void> {
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise((resolve) => {
|
||||
popup(defineAsyncComponent(() => import('@/components/dialog.vue')), props, {
|
||||
done: result => {
|
||||
resolve();
|
||||
},
|
||||
done: resolve,
|
||||
}, 'closed');
|
||||
});
|
||||
}
|
||||
|
@ -221,7 +219,7 @@ export function confirm(props: {
|
|||
title?: string | null;
|
||||
text?: string | null;
|
||||
}): Promise<{ canceled: boolean }> {
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise((resolve) => {
|
||||
popup(defineAsyncComponent(() => import('@/components/dialog.vue')), {
|
||||
...props,
|
||||
showCancelButton: true,
|
||||
|
@ -242,7 +240,7 @@ export function inputText(props: {
|
|||
}): Promise<{ canceled: true; result: undefined; } | {
|
||||
canceled: false; result: string;
|
||||
}> {
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise((resolve) => {
|
||||
popup(defineAsyncComponent(() => import('@/components/dialog.vue')), {
|
||||
title: props.title,
|
||||
text: props.text,
|
||||
|
@ -267,7 +265,7 @@ export function inputNumber(props: {
|
|||
}): Promise<{ canceled: true; result: undefined; } | {
|
||||
canceled: false; result: number;
|
||||
}> {
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise((resolve) => {
|
||||
popup(defineAsyncComponent(() => import('@/components/dialog.vue')), {
|
||||
title: props.title,
|
||||
text: props.text,
|
||||
|
@ -292,7 +290,7 @@ export function inputDate(props: {
|
|||
}): Promise<{ canceled: true; result: undefined; } | {
|
||||
canceled: false; result: Date;
|
||||
}> {
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise((resolve) => {
|
||||
popup(defineAsyncComponent(() => import('@/components/dialog.vue')), {
|
||||
title: props.title,
|
||||
text: props.text,
|
||||
|
@ -329,7 +327,7 @@ export function select<C = any>(props: {
|
|||
})): Promise<{ canceled: true; result: undefined; } | {
|
||||
canceled: false; result: C;
|
||||
}> {
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise((resolve) => {
|
||||
popup(defineAsyncComponent(() => import('@/components/dialog.vue')), {
|
||||
title: props.title,
|
||||
text: props.text,
|
||||
|
@ -347,7 +345,7 @@ export function select<C = any>(props: {
|
|||
}
|
||||
|
||||
export function success() {
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise((resolve) => {
|
||||
const showing = ref(true);
|
||||
window.setTimeout(() => {
|
||||
showing.value = false;
|
||||
|
@ -362,7 +360,7 @@ export function success() {
|
|||
}
|
||||
|
||||
export function waiting() {
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise((resolve) => {
|
||||
const showing = ref(true);
|
||||
popup(defineAsyncComponent(() => import('@/components/waiting-dialog.vue')), {
|
||||
success: false,
|
||||
|
@ -374,7 +372,7 @@ export function waiting() {
|
|||
}
|
||||
|
||||
export function form(title, form) {
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise((resolve) => {
|
||||
popup(defineAsyncComponent(() => import('@/components/form-dialog.vue')), { title, form }, {
|
||||
done: result => {
|
||||
resolve(result);
|
||||
|
@ -384,7 +382,7 @@ export function form(title, form) {
|
|||
}
|
||||
|
||||
export async function selectUser() {
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise((resolve) => {
|
||||
popup(defineAsyncComponent(() => import('@/components/user-select-dialog.vue')), {}, {
|
||||
ok: user => {
|
||||
resolve(user);
|
||||
|
@ -394,7 +392,7 @@ export async function selectUser() {
|
|||
}
|
||||
|
||||
export async function selectDriveFile(multiple: boolean) {
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise((resolve) => {
|
||||
popup(defineAsyncComponent(() => import('@/components/drive-select-dialog.vue')), {
|
||||
type: 'file',
|
||||
multiple,
|
||||
|
@ -409,7 +407,7 @@ export async function selectDriveFile(multiple: boolean) {
|
|||
}
|
||||
|
||||
export async function selectDriveFolder(multiple: boolean) {
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise((resolve) => {
|
||||
popup(defineAsyncComponent(() => import('@/components/drive-select-dialog.vue')), {
|
||||
type: 'folder',
|
||||
multiple,
|
||||
|
@ -424,7 +422,7 @@ export async function selectDriveFolder(multiple: boolean) {
|
|||
}
|
||||
|
||||
export async function pickEmoji(src: HTMLElement | null, opts) {
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise((resolve) => {
|
||||
popup(defineAsyncComponent(() => import('@/components/emoji-picker-dialog.vue')), {
|
||||
src,
|
||||
...opts,
|
||||
|
@ -439,7 +437,7 @@ export async function pickEmoji(src: HTMLElement | null, opts) {
|
|||
export async function cropImage(image: Misskey.entities.DriveFile, options: {
|
||||
aspectRatio: number;
|
||||
}): Promise<Misskey.entities.DriveFile> {
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise((resolve) => {
|
||||
popup(defineAsyncComponent(() => import('@/components/cropper-dialog.vue')), {
|
||||
file: image,
|
||||
aspectRatio: options.aspectRatio,
|
||||
|
@ -510,7 +508,7 @@ export function popupMenu(items: MenuItem[] | Ref<MenuItem[]>, src?: HTMLElement
|
|||
width?: number;
|
||||
viaKeyboard?: boolean;
|
||||
}) {
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise((resolve) => {
|
||||
let dispose;
|
||||
popup(defineAsyncComponent(() => import('@/components/ui/popup-menu.vue')), {
|
||||
items,
|
||||
|
@ -531,7 +529,7 @@ export function popupMenu(items: MenuItem[] | Ref<MenuItem[]>, src?: HTMLElement
|
|||
|
||||
export function contextMenu(items: MenuItem[] | Ref<MenuItem[]>, ev: MouseEvent) {
|
||||
ev.preventDefault();
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise((resolve) => {
|
||||
let dispose;
|
||||
popup(defineAsyncComponent(() => import('@/components/ui/context-menu.vue')), {
|
||||
items,
|
||||
|
@ -548,7 +546,7 @@ export function contextMenu(items: MenuItem[] | Ref<MenuItem[]>, ev: MouseEvent)
|
|||
}
|
||||
|
||||
export function post(props: Record<string, any> = {}) {
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise((resolve) => {
|
||||
// NOTE: MkPostFormDialogをdynamic importするとiOSでテキストエリアに自動フォーカスできない
|
||||
// NOTE: ただ、dynamic importしない場合、MkPostFormDialogインスタンスが使いまわされ、
|
||||
// Vueが渡されたコンポーネントに内部的に__propsというプロパティを生やす影響で、
|
||||
|
@ -570,7 +568,7 @@ export const deckGlobalEvents = new EventEmitter();
|
|||
|
||||
/*
|
||||
export function checkExistence(fileData: ArrayBuffer): Promise<any> {
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise((resolve) => {
|
||||
const data = new FormData();
|
||||
data.append('md5', getMD5(fileData));
|
||||
|
||||
|
|
|
@ -27,9 +27,10 @@ import { unisonReload } from '@/scripts/unison-reload';
|
|||
import { i18n } from '@/i18n';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata';
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
error?: Error;
|
||||
withDefaults(defineProps<{
|
||||
error?: Error | undefined;
|
||||
}>(), {
|
||||
error: undefined,
|
||||
});
|
||||
|
||||
let loaded = $ref(false);
|
||||
|
@ -52,10 +53,6 @@ function reload() {
|
|||
unisonReload();
|
||||
}
|
||||
|
||||
const headerActions = $computed(() => []);
|
||||
|
||||
const headerTabs = $computed(() => []);
|
||||
|
||||
definePageMetadata({
|
||||
title: i18n.ts.error,
|
||||
icon: 'fas fa-exclamation-triangle',
|
||||
|
|
|
@ -80,8 +80,8 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, computed } from 'vue';
|
||||
import { version, instanceName , host } from '@/config';
|
||||
import { computed } from 'vue';
|
||||
import { version, host } from '@/config';
|
||||
import FormLink from '@/components/form/link.vue';
|
||||
import FormSection from '@/components/form/section.vue';
|
||||
import FormSuspense from '@/components/form/suspense.vue';
|
||||
|
|
|
@ -54,13 +54,11 @@ import MkSwitch from '@/components/form/switch.vue';
|
|||
import MkObjectView from '@/components/object-view.vue';
|
||||
import MkDriveFileThumbnail from '@/components/drive-file-thumbnail.vue';
|
||||
import MkKeyValue from '@/components/key-value.vue';
|
||||
import FormLink from '@/components/form/link.vue';
|
||||
import MkUserCardMini from '@/components/user-card-mini.vue';
|
||||
import bytes from '@/filters/bytes';
|
||||
import * as os from '@/os';
|
||||
import { i18n } from '@/i18n';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata';
|
||||
import { acct } from '@/filters/user';
|
||||
|
||||
let tab = $ref('overview');
|
||||
let file: any = $ref(null);
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
<button v-for="tab in tabs" :ref="(el) => tabRefs[tab.key] = el" v-tooltip="tab.title" class="tab _button" :class="{ active: tab.key != null && tab.key === props.tab }" @mousedown="(ev) => onTabMousedown(tab, ev)" @click="(ev) => onTabClick(tab, ev)">
|
||||
<button v-for="tab in tabs" :ref="(el) => tabRefs[tab.key] = el" v-tooltip="tab.title" class="tab _button" :class="{ active: tab.key != null && tab.key === props.tab }" @mousedown="() => onTabMousedown(tab)" @click="(ev) => onTabClick(tab, ev)">
|
||||
<i v-if="tab.icon" class="icon" :class="tab.icon"></i>
|
||||
<span v-if="!tab.iconOnly" class="title">{{ tab.title }}</span>
|
||||
</button>
|
||||
|
@ -28,13 +28,11 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, onMounted, onUnmounted, ref, inject, watch, nextTick } from 'vue';
|
||||
import { computed, onMounted, onUnmounted, ref, watch, nextTick } from 'vue';
|
||||
import tinycolor from 'tinycolor2';
|
||||
import { popupMenu } from '@/os';
|
||||
import { url } from '@/config';
|
||||
import { scrollToTop } from '@/scripts/scroll';
|
||||
import MkButton from '@/components/ui/button.vue';
|
||||
import { i18n } from '@/i18n';
|
||||
import { globalEvents } from '@/events';
|
||||
import { injectPageMetadata } from '@/scripts/page-metadata';
|
||||
|
||||
|
@ -68,7 +66,6 @@ const el = ref<HTMLElement>(null);
|
|||
const tabRefs = {};
|
||||
const tabHighlightEl = $ref<HTMLElement | null>(null);
|
||||
const bg = ref(null);
|
||||
const height = ref(0);
|
||||
const hasTabs = computed(() => {
|
||||
return props.tabs && props.tabs.length > 0;
|
||||
});
|
||||
|
@ -96,7 +93,7 @@ const onClick = () => {
|
|||
scrollToTop(el.value, { behavior: 'smooth' });
|
||||
};
|
||||
|
||||
function onTabMousedown(tab: Tab, ev: MouseEvent): void {
|
||||
function onTabMousedown(tab: Tab): void {
|
||||
// ユーザビリティの観点からmousedown時にはonClickは呼ばない
|
||||
if (tab.key) {
|
||||
emit('update:tab', tab.key);
|
||||
|
|
|
@ -25,16 +25,6 @@
|
|||
<option value="remote">{{ i18n.ts.remote }}</option>
|
||||
</MkSelect>
|
||||
</div>
|
||||
<!-- TODO
|
||||
<div class="inputs" style="display: flex; padding-top: 1.2em;">
|
||||
<MkInput v-model="searchUsername" style="margin: 0; flex: 1;" type="text" :spellcheck="false">
|
||||
<span>{{ i18n.ts.username }}</span>
|
||||
</MkInput>
|
||||
<MkInput v-model="searchHost" style="margin: 0; flex: 1;" type="text" :spellcheck="false" :disabled="pagination.params().origin === 'local'">
|
||||
<span>{{ i18n.ts.host }}</span>
|
||||
</MkInput>
|
||||
</div>
|
||||
-->
|
||||
|
||||
<MkPagination v-slot="{items}" ref="reports" :pagination="pagination" style="margin-top: var(--margin);">
|
||||
<XAbuseReport v-for="report in items" :key="report.id" :report="report" @resolved="resolved"/>
|
||||
|
@ -50,7 +40,6 @@
|
|||
import { computed } from 'vue';
|
||||
|
||||
import XHeader from './_header_.vue';
|
||||
import MkInput from '@/components/form/input.vue';
|
||||
import MkSelect from '@/components/form/select.vue';
|
||||
import MkPagination from '@/components/ui/pagination.vue';
|
||||
import XAbuseReport from '@/components/abuse-report.vue';
|
||||
|
@ -63,8 +52,6 @@ let reports = $ref<InstanceType<typeof MkPagination>>();
|
|||
let state = $ref('unresolved');
|
||||
let reporterOrigin = $ref('combined');
|
||||
let targetUserOrigin = $ref('combined');
|
||||
let searchUsername = $ref('');
|
||||
let searchHost = $ref('');
|
||||
|
||||
const pagination = {
|
||||
endpoint: 'admin/abuse-user-reports' as const,
|
||||
|
|
|
@ -34,7 +34,6 @@ import XModalWindow from '@/components/ui/modal-window.vue';
|
|||
import MkButton from '@/components/ui/button.vue';
|
||||
import MkInput from '@/components/form/input.vue';
|
||||
import * as os from '@/os';
|
||||
import { unique } from '@/scripts/array';
|
||||
import { i18n } from '@/i18n';
|
||||
import { emojiCategories } from '@/instance';
|
||||
|
||||
|
|
|
@ -68,12 +68,11 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, defineAsyncComponent, defineComponent, ref, toRef } from 'vue';
|
||||
import { computed, defineAsyncComponent, ref } from 'vue';
|
||||
import XHeader from './_header_.vue';
|
||||
import MkButton from '@/components/ui/button.vue';
|
||||
import MkInput from '@/components/form/input.vue';
|
||||
import MkPagination from '@/components/ui/pagination.vue';
|
||||
import MkTab from '@/components/tab.vue';
|
||||
import MkSwitch from '@/components/form/switch.vue';
|
||||
import FormSplit from '@/components/form/split.vue';
|
||||
import { selectFile, selectFiles } from '@/scripts/select-file';
|
||||
|
|
|
@ -33,14 +33,11 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, defineAsyncComponent } from 'vue';
|
||||
import * as Acct from 'misskey-js/built/acct';
|
||||
import { computed } from 'vue';
|
||||
import XHeader from './_header_.vue';
|
||||
import MkButton from '@/components/ui/button.vue';
|
||||
import MkInput from '@/components/form/input.vue';
|
||||
import MkSelect from '@/components/form/select.vue';
|
||||
import MkFileListForAdmin from '@/components/file-list-for-admin.vue';
|
||||
import bytes from '@/filters/bytes';
|
||||
import * as os from '@/os';
|
||||
import { i18n } from '@/i18n';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata';
|
||||
|
@ -105,8 +102,6 @@ const headerActions = $computed(() => [{
|
|||
handler: clear,
|
||||
}]);
|
||||
|
||||
const headerTabs = $computed(() => []);
|
||||
|
||||
definePageMetadata(computed(() => ({
|
||||
title: i18n.ts.files,
|
||||
icon: 'fas fa-cloud',
|
||||
|
|
|
@ -32,7 +32,7 @@ import { instance } from '@/instance';
|
|||
import * as os from '@/os';
|
||||
import { lookupUser } from '@/scripts/lookup-user';
|
||||
import { useRouter } from '@/router';
|
||||
import { definePageMetadata, provideMetadataReceiver, setPageMetadata } from '@/scripts/page-metadata';
|
||||
import { definePageMetadata, provideMetadataReceiver } from '@/scripts/page-metadata';
|
||||
|
||||
const isEmpty = (x: string | null) => x == null || x === '';
|
||||
|
||||
|
@ -294,10 +294,6 @@ const lookup = (ev) => {
|
|||
}], ev.currentTarget ?? ev.target);
|
||||
};
|
||||
|
||||
const headerActions = $computed(() => []);
|
||||
|
||||
const headerTabs = $computed(() => []);
|
||||
|
||||
definePageMetadata(INFO);
|
||||
|
||||
defineExpose({
|
||||
|
|
|
@ -18,7 +18,7 @@ export function install(plugin) {
|
|||
return new Promise(ok => {
|
||||
inputText({
|
||||
title: q,
|
||||
}).then(({ canceled, result: a }) => {
|
||||
}).then(({ result: a }) => {
|
||||
ok(a);
|
||||
});
|
||||
});
|
||||
|
@ -26,8 +26,7 @@ export function install(plugin) {
|
|||
out: (value) => {
|
||||
console.log(value);
|
||||
},
|
||||
log: (type, params) => {
|
||||
},
|
||||
log: (type, params) => {},
|
||||
});
|
||||
|
||||
initPlugin({ plugin, aiscript });
|
||||
|
|
|
@ -3,7 +3,6 @@ import { Router } from '@/nirax';
|
|||
import { $i, iAmModerator } from '@/account';
|
||||
import MkLoading from '@/pages/_loading_.vue';
|
||||
import MkError from '@/pages/_error_.vue';
|
||||
import { ui } from '@/config';
|
||||
|
||||
const page = (loader: AsyncComponentLoader<any>) => defineAsyncComponent({
|
||||
loader,
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import { defineAsyncComponent, Ref, inject } from 'vue';
|
||||
import { defineAsyncComponent, Ref } from 'vue';
|
||||
import * as misskey from 'misskey-js';
|
||||
import { pleaseLogin } from './please-login';
|
||||
import { $i } from '@/account';
|
||||
import { i18n } from '@/i18n';
|
||||
import { instance } from '@/instance';
|
||||
|
|
|
@ -49,7 +49,7 @@ import { StickySidebar } from '@/scripts/sticky-sidebar';
|
|||
import * as os from '@/os';
|
||||
import { menuDef } from '@/menu';
|
||||
import { mainRouter } from '@/router';
|
||||
import { PageMetadata, provideMetadataReceiver, setPageMetadata } from '@/scripts/page-metadata';
|
||||
import { PageMetadata, provideMetadataReceiver } from '@/scripts/page-metadata';
|
||||
import { defaultStore } from '@/store';
|
||||
import { i18n } from '@/i18n';
|
||||
const XHeaderMenu = defineAsyncComponent(() => import('./classic.header.vue'));
|
||||
|
|
|
@ -18,7 +18,7 @@ import { deckStore, Column } from '@/ui/deck/deck-store';
|
|||
import * as os from '@/os';
|
||||
import { i18n } from '@/i18n';
|
||||
import { mainRouter } from '@/router';
|
||||
import { PageMetadata, provideMetadataReceiver, setPageMetadata } from '@/scripts/page-metadata';
|
||||
import { PageMetadata, provideMetadataReceiver } from '@/scripts/page-metadata';
|
||||
|
||||
defineProps<{
|
||||
column: Column;
|
||||
|
|
|
@ -68,7 +68,7 @@ import { i18n } from '@/i18n';
|
|||
import { $i } from '@/account';
|
||||
import { Router } from '@/nirax';
|
||||
import { mainRouter } from '@/router';
|
||||
import { PageMetadata, provideMetadataReceiver, setPageMetadata } from '@/scripts/page-metadata';
|
||||
import { PageMetadata, provideMetadataReceiver } from '@/scripts/page-metadata';
|
||||
const XWidgets = defineAsyncComponent(() => import('./universal.widgets.vue'));
|
||||
const XSidebar = defineAsyncComponent(() => import('@/ui/_common_/sidebar.vue'));
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ import XSignupDialog from '@/components/signup-dialog.vue';
|
|||
import MkButton from '@/components/ui/button.vue';
|
||||
import { ColdDeviceStorage, defaultStore } from '@/store';
|
||||
import { mainRouter } from '@/router';
|
||||
import { PageMetadata, provideMetadataReceiver, setPageMetadata } from '@/scripts/page-metadata';
|
||||
import { PageMetadata, provideMetadataReceiver } from '@/scripts/page-metadata';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
const DESKTOP_THRESHOLD = 1100;
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
import { provide, ComputedRef } from 'vue';
|
||||
import XCommon from './_common_/common.vue';
|
||||
import { mainRouter } from '@/router';
|
||||
import { PageMetadata, provideMetadataReceiver, setPageMetadata } from '@/scripts/page-metadata';
|
||||
import { PageMetadata, provideMetadataReceiver } from '@/scripts/page-metadata';
|
||||
import { instanceName } from '@/config';
|
||||
|
||||
let pageMetadata = $ref<null | ComputedRef<PageMetadata>>();
|
||||
|
|
|
@ -68,7 +68,7 @@ module.exports = {
|
|||
'@typescript-eslint/no-inferrable-types': ['warn'],
|
||||
'@typescript-eslint/no-empty-function': ['off'],
|
||||
'@typescript-eslint/no-non-null-assertion': ['warn'],
|
||||
'@typescript-eslint/explicit-function-return-type': ['warn'],
|
||||
'@typescript-eslint/explicit-function-return-type': ['warn', { allowExpressions: true }],
|
||||
'@typescript-eslint/no-misused-promises': ['error', {
|
||||
'checksVoidReturn': false,
|
||||
}],
|
||||
|
|
Loading…
Reference in a new issue