fix lint no-undef

This commit is contained in:
Johann150 2022-07-04 16:33:55 +02:00
parent 0dc3a8b2e8
commit ae3a51a673
6 changed files with 5 additions and 3 deletions

View file

@ -5,7 +5,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { computed } from 'vue'; import { computed } from 'vue';
import 'prismjs'; import { Prism } from 'prismjs';
import 'prismjs/themes/prism-okaidia.css'; import 'prismjs/themes/prism-okaidia.css';
const props = defineProps<{ const props = defineProps<{

View file

@ -75,7 +75,6 @@ const hasTabs = computed(() => {
const showTabsPopup = (ev: MouseEvent) => { const showTabsPopup = (ev: MouseEvent) => {
if (!hasTabs.value) return; if (!hasTabs.value) return;
if (!narrow.value) return;
ev.preventDefault(); ev.preventDefault();
ev.stopPropagation(); ev.stopPropagation();
const menu = props.tabs.map(tab => ({ const menu = props.tabs.map(tab => ({

View file

@ -46,6 +46,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { watch } from 'vue'; import { watch } from 'vue';
import * as Acct from 'misskey-js/built/acct';
import MkButton from '@/components/ui/button.vue'; import MkButton from '@/components/ui/button.vue';
import MkInput from '@/components/form/input.vue'; import MkInput from '@/components/form/input.vue';
import MkTextarea from '@/components/form/textarea.vue'; import MkTextarea from '@/components/form/textarea.vue';

View file

@ -41,6 +41,7 @@ import MkButton from '@/components/ui/button.vue';
import * as os from '@/os'; import * as os from '@/os';
import { mainRouter } from '@/router'; import { mainRouter } from '@/router';
import { definePageMetadata } from '@/scripts/page-metadata'; import { definePageMetadata } from '@/scripts/page-metadata';
import { i18n } from '@/i18n';
const props = defineProps<{ const props = defineProps<{
listId: string; listId: string;

View file

@ -78,6 +78,7 @@ import FormButton from '@/components/ui/button.vue';
import FormTextarea from '@/components/form/textarea.vue'; import FormTextarea from '@/components/form/textarea.vue';
import FormFolder from '@/components/form/folder.vue'; import FormFolder from '@/components/form/folder.vue';
import { $i } from '@/account';
import { Theme, applyTheme } from '@/scripts/theme'; import { Theme, applyTheme } from '@/scripts/theme';
import lightTheme from '@/themes/_light.json5'; import lightTheme from '@/themes/_light.json5';
import darkTheme from '@/themes/_dark.json5'; import darkTheme from '@/themes/_dark.json5';

View file

@ -53,7 +53,7 @@ function onContextmenu(ev: MouseEvent) {
if (isLink(ev.target as HTMLElement)) return; if (isLink(ev.target as HTMLElement)) return;
if (['INPUT', 'TEXTAREA', 'IMG', 'VIDEO', 'CANVAS'].includes((ev.target as HTMLElement).tagName) || (ev.target as HTMLElement).attributes['contenteditable']) return; if (['INPUT', 'TEXTAREA', 'IMG', 'VIDEO', 'CANVAS'].includes((ev.target as HTMLElement).tagName) || (ev.target as HTMLElement).attributes['contenteditable']) return;
if (window.getSelection()?.toString() !== '') return; if (window.getSelection()?.toString() !== '') return;
const path = router.currentRoute.value.path; const path = mainRouter.currentRoute.value.path;
os.contextMenu([{ os.contextMenu([{
type: 'label', type: 'label',
text: path, text: path,