chore: fix some lints automatically (#8788)
* chore: fix some lints automatically Fixed lints that were automatically fixable with `eslint --fix`. * fix type * workaround for empty interface lint
This commit is contained in:
parent
a683a7092d
commit
5e29528ad4
@ -15,6 +15,12 @@ module.exports = {
|
|||||||
'plugin:vue/vue3-recommended',
|
'plugin:vue/vue3-recommended',
|
||||||
],
|
],
|
||||||
rules: {
|
rules: {
|
||||||
|
'@typescript-eslint/no-empty-interface': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
'allowSingleExtends': true,
|
||||||
|
},
|
||||||
|
],
|
||||||
// window の禁止理由: グローバルスコープと衝突し、予期せぬ結果を招くため
|
// window の禁止理由: グローバルスコープと衝突し、予期せぬ結果を招くため
|
||||||
// data の禁止理由: 抽象的すぎるため
|
// data の禁止理由: 抽象的すぎるため
|
||||||
// e の禁止理由: error や event など、複数のキーワードの頭文字であり分かりにくいため
|
// e の禁止理由: error や event など、複数のキーワードの頭文字であり分かりにくいため
|
||||||
|
@ -27,8 +27,7 @@ type CaptchaContainer = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface Window extends CaptchaContainer {
|
interface Window extends CaptchaContainer { }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
|
@ -71,7 +71,7 @@ function onMouseover() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function onMouseout() {
|
function onMouseout() {
|
||||||
hover.value = false
|
hover.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function onDragover(ev: DragEvent) {
|
function onDragover(ev: DragEvent) {
|
||||||
|
@ -143,7 +143,7 @@ const fetching = ref(true);
|
|||||||
|
|
||||||
const ilFilesObserver = new IntersectionObserver(
|
const ilFilesObserver = new IntersectionObserver(
|
||||||
(entries) => entries.some((entry) => entry.isIntersecting) && !fetching.value && moreFiles.value && fetchMoreFiles()
|
(entries) => entries.some((entry) => entry.isIntersecting) && !fetching.value && moreFiles.value && fetchMoreFiles()
|
||||||
)
|
);
|
||||||
|
|
||||||
watch(folder, () => emit('cd', folder.value));
|
watch(folder, () => emit('cd', folder.value));
|
||||||
|
|
||||||
@ -607,7 +607,7 @@ function onContextmenu(ev: MouseEvent) {
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (defaultStore.state.enableInfiniteScroll && loadMoreFiles.value) {
|
if (defaultStore.state.enableInfiniteScroll && loadMoreFiles.value) {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
ilFilesObserver.observe(loadMoreFiles.value?.$el)
|
ilFilesObserver.observe(loadMoreFiles.value?.$el);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -628,7 +628,7 @@ onMounted(() => {
|
|||||||
onActivated(() => {
|
onActivated(() => {
|
||||||
if (defaultStore.state.enableInfiniteScroll) {
|
if (defaultStore.state.enableInfiniteScroll) {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
ilFilesObserver.observe(loadMoreFiles.value?.$el)
|
ilFilesObserver.observe(loadMoreFiles.value?.$el);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -24,7 +24,7 @@ const props = withDefaults(defineProps<{
|
|||||||
defaultOpen: boolean;
|
defaultOpen: boolean;
|
||||||
}>(), {
|
}>(), {
|
||||||
defaultOpen: false,
|
defaultOpen: false,
|
||||||
})
|
});
|
||||||
|
|
||||||
let opened = $ref(props.defaultOpen);
|
let opened = $ref(props.defaultOpen);
|
||||||
let openedAtLeastOnce = $ref(props.defaultOpen);
|
let openedAtLeastOnce = $ref(props.defaultOpen);
|
||||||
|
@ -14,7 +14,7 @@ export default defineComponent({
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
value: this.modelValue,
|
value: this.modelValue,
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
value() {
|
value() {
|
||||||
|
@ -66,7 +66,7 @@ export default defineComponent({
|
|||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(f => {
|
.then(f => {
|
||||||
ok(f);
|
ok(f);
|
||||||
})
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
os.promiseDialog(promise);
|
os.promiseDialog(promise);
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent, defineAsyncComponent } from 'vue';
|
import { defineComponent, defineAsyncComponent } from 'vue';
|
||||||
import MkDriveFileThumbnail from './drive-file-thumbnail.vue'
|
import MkDriveFileThumbnail from './drive-file-thumbnail.vue';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
@ -114,19 +114,19 @@ export default defineComponent({
|
|||||||
this.menu = os.popupMenu([{
|
this.menu = os.popupMenu([{
|
||||||
text: this.$ts.renameFile,
|
text: this.$ts.renameFile,
|
||||||
icon: 'fas fa-i-cursor',
|
icon: 'fas fa-i-cursor',
|
||||||
action: () => { this.rename(file) }
|
action: () => { this.rename(file); }
|
||||||
}, {
|
}, {
|
||||||
text: file.isSensitive ? this.$ts.unmarkAsSensitive : this.$ts.markAsSensitive,
|
text: file.isSensitive ? this.$ts.unmarkAsSensitive : this.$ts.markAsSensitive,
|
||||||
icon: file.isSensitive ? 'fas fa-eye-slash' : 'fas fa-eye',
|
icon: file.isSensitive ? 'fas fa-eye-slash' : 'fas fa-eye',
|
||||||
action: () => { this.toggleSensitive(file) }
|
action: () => { this.toggleSensitive(file); }
|
||||||
}, {
|
}, {
|
||||||
text: this.$ts.describeFile,
|
text: this.$ts.describeFile,
|
||||||
icon: 'fas fa-i-cursor',
|
icon: 'fas fa-i-cursor',
|
||||||
action: () => { this.describe(file) }
|
action: () => { this.describe(file); }
|
||||||
}, {
|
}, {
|
||||||
text: this.$ts.attachCancel,
|
text: this.$ts.attachCancel,
|
||||||
icon: 'fas fa-times-circle',
|
icon: 'fas fa-times-circle',
|
||||||
action: () => { this.detachMedia(file.id) }
|
action: () => { this.detachMedia(file.id); }
|
||||||
}], ev.currentTarget ?? ev.target).then(() => this.menu = null);
|
}], ev.currentTarget ?? ev.target).then(() => this.menu = null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -222,7 +222,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
chartEl,
|
chartEl,
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@ -52,7 +52,7 @@ export default defineComponent({
|
|||||||
flag: true,
|
flag: true,
|
||||||
radio: 'misskey',
|
radio: 'misskey',
|
||||||
mfm: `Hello world! This is an @example mention. BTW you are @${this.$i ? this.$i.username : 'guest'}.\nAlso, here is ${config.url} and [example link](${config.url}). for more details, see https://example.com.\nAs you know #misskey is open-source software.`
|
mfm: `Hello world! This is an @example mention. BTW you are @${this.$i ? this.$i.username : 'guest'}.\nAlso, here is ${config.url} and [example link](${config.url}). for more details, see https://example.com.\nAs you know #misskey is open-source software.`
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -159,7 +159,7 @@ function queryKey() {
|
|||||||
|
|
||||||
function onSubmit() {
|
function onSubmit() {
|
||||||
signing = true;
|
signing = true;
|
||||||
console.log('submit')
|
console.log('submit');
|
||||||
if (!totpLogin && user && user.twoFactorEnabled) {
|
if (!totpLogin && user && user.twoFactorEnabled) {
|
||||||
if (window.PublicKeyCredential && user.securityKeys) {
|
if (window.PublicKeyCredential && user.securityKeys) {
|
||||||
os.api('signin', {
|
os.api('signin', {
|
||||||
@ -222,7 +222,7 @@ function loginFailed(err) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
console.log(err)
|
console.log(err);
|
||||||
os.alert({
|
os.alert({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
title: i18n.ts.loginFailed,
|
title: i18n.ts.loginFailed,
|
||||||
|
@ -111,7 +111,7 @@ export default defineComponent({
|
|||||||
ToSAgreement: false,
|
ToSAgreement: false,
|
||||||
hCaptchaResponse: null,
|
hCaptchaResponse: null,
|
||||||
reCaptchaResponse: null,
|
reCaptchaResponse: null,
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -234,7 +234,7 @@ onMounted(() => {
|
|||||||
}
|
}
|
||||||
fixed.value = (type.value === 'drawer') || (getFixedContainer(props.src) != null);
|
fixed.value = (type.value === 'drawer') || (getFixedContainer(props.src) != null);
|
||||||
|
|
||||||
await nextTick()
|
await nextTick();
|
||||||
|
|
||||||
align();
|
align();
|
||||||
}, { immediate: true, });
|
}, { immediate: true, });
|
||||||
|
@ -63,7 +63,7 @@ const setPosition = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return [left, top];
|
return [left, top];
|
||||||
}
|
};
|
||||||
|
|
||||||
const calcPosWhenBottom = () => {
|
const calcPosWhenBottom = () => {
|
||||||
let left: number;
|
let left: number;
|
||||||
@ -84,7 +84,7 @@ const setPosition = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return [left, top];
|
return [left, top];
|
||||||
}
|
};
|
||||||
|
|
||||||
const calcPosWhenLeft = () => {
|
const calcPosWhenLeft = () => {
|
||||||
let left: number;
|
let left: number;
|
||||||
@ -105,7 +105,7 @@ const setPosition = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return [left, top];
|
return [left, top];
|
||||||
}
|
};
|
||||||
|
|
||||||
const calcPosWhenRight = () => {
|
const calcPosWhenRight = () => {
|
||||||
let left: number;
|
let left: number;
|
||||||
@ -126,7 +126,7 @@ const setPosition = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return [left, top];
|
return [left, top];
|
||||||
}
|
};
|
||||||
|
|
||||||
const calc = (): {
|
const calc = (): {
|
||||||
left: number;
|
left: number;
|
||||||
@ -172,7 +172,7 @@ const setPosition = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return null as never;
|
return null as never;
|
||||||
}
|
};
|
||||||
|
|
||||||
const { left, top, transformOrigin } = calc();
|
const { left, top, transformOrigin } = calc();
|
||||||
el.value.style.transformOrigin = transformOrigin;
|
el.value.style.transformOrigin = transformOrigin;
|
||||||
|
@ -90,7 +90,7 @@ fetch(`/url?url=${encodeURIComponent(requestUrl.href)}&lang=${requestLang}`).the
|
|||||||
sitename = info.sitename;
|
sitename = info.sitename;
|
||||||
fetching = false;
|
fetching = false;
|
||||||
player = info.player;
|
player = info.player;
|
||||||
})
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function adjustTweetHeight(message: any) {
|
function adjustTweetHeight(message: any) {
|
||||||
|
@ -9,7 +9,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
return el.parentElement ? getBgColor(el.parentElement) : 'transparent';
|
return el.parentElement ? getBgColor(el.parentElement) : 'transparent';
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
const parentBg = getBgColor(src.parentElement);
|
const parentBg = getBgColor(src.parentElement);
|
||||||
|
|
||||||
|
@ -25,12 +25,12 @@ function calc(src: Element) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (info.intersection) {
|
if (info.intersection) {
|
||||||
info.intersection.disconnect()
|
info.intersection.disconnect();
|
||||||
delete info.intersection;
|
delete info.intersection;
|
||||||
};
|
}
|
||||||
|
|
||||||
info.fn(width, height);
|
info.fn(width, height);
|
||||||
};
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mounted(src, binding, vn) {
|
mounted(src, binding, vn) {
|
||||||
|
@ -9,7 +9,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
return el.parentElement ? getBgColor(el.parentElement) : 'transparent';
|
return el.parentElement ? getBgColor(el.parentElement) : 'transparent';
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
const parentBg = getBgColor(src.parentElement);
|
const parentBg = getBgColor(src.parentElement);
|
||||||
|
|
||||||
|
@ -60,9 +60,9 @@ function calc(el: Element) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (info.intersection) {
|
if (info.intersection) {
|
||||||
info.intersection.disconnect()
|
info.intersection.disconnect();
|
||||||
delete info.intersection;
|
delete info.intersection;
|
||||||
};
|
}
|
||||||
|
|
||||||
mountings.set(el, Object.assign(info, { previousWidth: width }));
|
mountings.set(el, Object.assign(info, { previousWidth: width }));
|
||||||
|
|
||||||
|
@ -285,7 +285,7 @@ export function inputDate(props: {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function select<C extends any = any>(props: {
|
export function select<C = any>(props: {
|
||||||
title?: string | null;
|
title?: string | null;
|
||||||
text?: string | null;
|
text?: string | null;
|
||||||
default?: string | null;
|
default?: string | null;
|
||||||
|
@ -159,7 +159,7 @@ const remoteMenu = (emoji, ev: MouseEvent) => {
|
|||||||
}, {
|
}, {
|
||||||
text: i18n.ts.import,
|
text: i18n.ts.import,
|
||||||
icon: 'fas fa-plus',
|
icon: 'fas fa-plus',
|
||||||
action: () => { im(emoji) }
|
action: () => { im(emoji); }
|
||||||
}], ev.currentTarget ?? ev.target);
|
}], ev.currentTarget ?? ev.target);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -132,7 +132,7 @@ export default defineComponent({
|
|||||||
overviewHeight: '1fr',
|
overviewHeight: '1fr',
|
||||||
queueHeight: '1fr',
|
queueHeight: '1fr',
|
||||||
paused: false,
|
paused: false,
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -20,7 +20,7 @@ import * as symbols from '@/symbols';
|
|||||||
import * as config from '@/config';
|
import * as config from '@/config';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const connection = markRaw(stream.useChannel('queueStats'))
|
const connection = markRaw(stream.useChannel('queueStats'));
|
||||||
|
|
||||||
function clear() {
|
function clear() {
|
||||||
os.confirm({
|
os.confirm({
|
||||||
@ -41,7 +41,7 @@ onMounted(() => {
|
|||||||
length: 200
|
length: 200
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
connection.dispose();
|
connection.dispose();
|
||||||
|
@ -32,7 +32,7 @@ export default defineComponent({
|
|||||||
computed: {
|
computed: {
|
||||||
name(): string {
|
name(): string {
|
||||||
const el = document.createElement('div');
|
const el = document.createElement('div');
|
||||||
el.textContent = this.app.name
|
el.textContent = this.app.name;
|
||||||
return el.innerHTML;
|
return el.innerHTML;
|
||||||
},
|
},
|
||||||
app(): any {
|
app(): any {
|
||||||
|
@ -58,7 +58,7 @@ export default defineComponent({
|
|||||||
tags: emojiTags,
|
tags: emojiTags,
|
||||||
selectedTags: new Set(),
|
selectedTags: new Set(),
|
||||||
searchEmojis: null,
|
searchEmojis: null,
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -127,7 +127,7 @@ function getStatus(instance) {
|
|||||||
if (instance.isSuspended) return 'suspended';
|
if (instance.isSuspended) return 'suspended';
|
||||||
if (instance.isNotResponding) return 'error';
|
if (instance.isNotResponding) return 'error';
|
||||||
return 'alive';
|
return 'alive';
|
||||||
};
|
}
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
[symbols.PAGE_INFO]: {
|
[symbols.PAGE_INFO]: {
|
||||||
|
@ -71,7 +71,7 @@ export default defineComponent({
|
|||||||
description: null,
|
description: null,
|
||||||
title: null,
|
title: null,
|
||||||
isSensitive: false,
|
isSensitive: false,
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -123,11 +123,11 @@ export default defineComponent({
|
|||||||
os.popupMenu([{
|
os.popupMenu([{
|
||||||
text: this.$ts.messagingWithUser,
|
text: this.$ts.messagingWithUser,
|
||||||
icon: 'fas fa-user',
|
icon: 'fas fa-user',
|
||||||
action: () => { this.startUser() }
|
action: () => { this.startUser(); }
|
||||||
}, {
|
}, {
|
||||||
text: this.$ts.messagingWithGroup,
|
text: this.$ts.messagingWithGroup,
|
||||||
icon: 'fas fa-users',
|
icon: 'fas fa-users',
|
||||||
action: () => { this.startGroup() }
|
action: () => { this.startGroup(); }
|
||||||
}], ev.currentTarget ?? ev.target);
|
}], ev.currentTarget ?? ev.target);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -200,7 +200,7 @@ export default defineComponent({
|
|||||||
text: this.text,
|
text: this.text,
|
||||||
file: this.file
|
file: this.file
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
localStorage.setItem('message_drafts', JSON.stringify(drafts));
|
localStorage.setItem('message_drafts', JSON.stringify(drafts));
|
||||||
},
|
},
|
||||||
|
@ -341,7 +341,7 @@ export default defineComponent({
|
|||||||
preview_rainbow: `$[rainbow 🍮] $[rainbow.speed=5s 🍮]`,
|
preview_rainbow: `$[rainbow 🍮] $[rainbow.speed=5s 🍮]`,
|
||||||
preview_sparkle: `$[sparkle 🍮]`,
|
preview_sparkle: `$[sparkle 🍮]`,
|
||||||
preview_rotate: `$[rotate 🍮]`,
|
preview_rotate: `$[rotate 🍮]`,
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@ -32,7 +32,7 @@ defineExpose({
|
|||||||
icon: 'fas fa-satellite',
|
icon: 'fas fa-satellite',
|
||||||
bg: 'var(--bg)'
|
bg: 'var(--bg)'
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -114,7 +114,7 @@ export default defineComponent({
|
|||||||
readonly: this.readonly,
|
readonly: this.readonly,
|
||||||
getScriptBlockList: this.getScriptBlockList,
|
getScriptBlockList: this.getScriptBlockList,
|
||||||
getPageBlockList: this.getPageBlockList
|
getPageBlockList: this.getPageBlockList
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
|
@ -100,7 +100,7 @@ async function run() {
|
|||||||
text: error.message
|
text: error.message
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
function highlighter(code) {
|
function highlighter(code) {
|
||||||
return highlight(code, languages.js, 'javascript');
|
return highlight(code, languages.js, 'javascript');
|
||||||
|
@ -142,7 +142,7 @@ function registerKey() {
|
|||||||
registration.value = null;
|
registration.value = null;
|
||||||
key.lastUsed = new Date();
|
key.lastUsed = new Date();
|
||||||
os.success();
|
os.success();
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function unregisterKey(key) {
|
function unregisterKey(key) {
|
||||||
|
@ -45,7 +45,7 @@ const init = async () => {
|
|||||||
accounts.value = response;
|
accounts.value = response;
|
||||||
console.log(accounts.value);
|
console.log(accounts.value);
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
function menu(account, ev) {
|
function menu(account, ev) {
|
||||||
os.popupMenu([{
|
os.popupMenu([{
|
||||||
|
@ -52,7 +52,7 @@ const pagination = {
|
|||||||
params: {
|
params: {
|
||||||
sort: '+lastUsedAt'
|
sort: '+lastUsedAt'
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
function revoke(token) {
|
function revoke(token) {
|
||||||
os.api('i/revoke-token', { tokenId: token.id }).then(() => {
|
os.api('i/revoke-token', { tokenId: token.id }).then(() => {
|
||||||
|
@ -120,7 +120,7 @@ const darkThemeId = computed({
|
|||||||
return darkTheme.value.id;
|
return darkTheme.value.id;
|
||||||
},
|
},
|
||||||
set(id) {
|
set(id) {
|
||||||
ColdDeviceStorage.set('darkTheme', themes.value.find(x => x.id === id))
|
ColdDeviceStorage.set('darkTheme', themes.value.find(x => x.id === id));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
const lightTheme = ColdDeviceStorage.ref('lightTheme');
|
const lightTheme = ColdDeviceStorage.ref('lightTheme');
|
||||||
@ -129,7 +129,7 @@ const lightThemeId = computed({
|
|||||||
return lightTheme.value.id;
|
return lightTheme.value.id;
|
||||||
},
|
},
|
||||||
set(id) {
|
set(id) {
|
||||||
ColdDeviceStorage.set('lightTheme', themes.value.find(x => x.id === id))
|
ColdDeviceStorage.set('lightTheme', themes.value.find(x => x.id === id));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
const darkMode = computed(defaultStore.makeGetterSetter('darkMode'));
|
const darkMode = computed(defaultStore.makeGetterSetter('darkMode'));
|
||||||
|
@ -75,7 +75,7 @@ async function save() {
|
|||||||
|
|
||||||
// check each line if it is a RegExp or not
|
// check each line if it is a RegExp or not
|
||||||
for (let i = 0; i < lines.length; i++) {
|
for (let i = 0; i < lines.length; i++) {
|
||||||
const line = lines[i]
|
const line = lines[i];
|
||||||
const regexp = line.match(/^\/(.+)\/(.*)$/);
|
const regexp = line.match(/^\/(.+)\/(.*)$/);
|
||||||
if (regexp) {
|
if (regexp) {
|
||||||
// check that the RegExp is valid
|
// check that the RegExp is valid
|
||||||
|
@ -56,7 +56,7 @@ export default defineComponent({
|
|||||||
localOnly: null as boolean | null,
|
localOnly: null as boolean | null,
|
||||||
files: [] as Misskey.entities.DriveFile[],
|
files: [] as Misskey.entities.DriveFile[],
|
||||||
visibleUsers: [] as Misskey.entities.User[],
|
visibleUsers: [] as Misskey.entities.User[],
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
async created() {
|
async created() {
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
export default {
|
export default {
|
||||||
name: 'MkTimelinePage',
|
name: 'MkTimelinePage',
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
@ -41,7 +41,7 @@ export default defineComponent({
|
|||||||
password: '',
|
password: '',
|
||||||
submitting: false,
|
submitting: false,
|
||||||
host,
|
host,
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -39,7 +39,7 @@ export default defineComponent({
|
|||||||
return {
|
return {
|
||||||
notes: [],
|
notes: [],
|
||||||
isScrolling: false,
|
isScrolling: false,
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
|
@ -22,7 +22,7 @@ export function getNoteMenu(props: {
|
|||||||
props.note.poll == null
|
props.note.poll == null
|
||||||
);
|
);
|
||||||
|
|
||||||
let appearNote = isRenote ? props.note.renote as misskey.entities.Note : props.note;
|
const appearNote = isRenote ? props.note.renote as misskey.entities.Note : props.note;
|
||||||
|
|
||||||
function del(): void {
|
function del(): void {
|
||||||
os.confirm({
|
os.confirm({
|
||||||
|
@ -148,7 +148,7 @@ export function getUserMenu(user) {
|
|||||||
userId: user.id
|
userId: user.id
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
user.isFollowed = !user.isFollowed;
|
user.isFollowed = !user.isFollowed;
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
let menu = [{
|
let menu = [{
|
||||||
|
@ -42,7 +42,7 @@ export const getBuiltinThemesRef = () => {
|
|||||||
const builtinThemes = ref<Theme[]>([]);
|
const builtinThemes = ref<Theme[]>([]);
|
||||||
getBuiltinThemes().then(themes => builtinThemes.value = themes);
|
getBuiltinThemes().then(themes => builtinThemes.value = themes);
|
||||||
return builtinThemes;
|
return builtinThemes;
|
||||||
}
|
};
|
||||||
|
|
||||||
let timeout = null;
|
let timeout = null;
|
||||||
|
|
||||||
|
@ -256,7 +256,7 @@ type Plugin = {
|
|||||||
* 常にメモリにロードしておく必要がないような設定情報を保管するストレージ(非リアクティブ)
|
* 常にメモリにロードしておく必要がないような設定情報を保管するストレージ(非リアクティブ)
|
||||||
*/
|
*/
|
||||||
import lightTheme from '@/themes/l-light.json5';
|
import lightTheme from '@/themes/l-light.json5';
|
||||||
import darkTheme from '@/themes/d-dark.json5'
|
import darkTheme from '@/themes/d-dark.json5';
|
||||||
|
|
||||||
export class ColdDeviceStorage {
|
export class ColdDeviceStorage {
|
||||||
public static default = {
|
public static default = {
|
||||||
|
@ -94,7 +94,6 @@ onBeforeUnmount(() => {
|
|||||||
os.deckGlobalEvents.off('column.dragEnd', onOtherDragEnd);
|
os.deckGlobalEvents.off('column.dragEnd', onOtherDragEnd);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
function onOtherDragStart() {
|
function onOtherDragStart() {
|
||||||
dropready = true;
|
dropready = true;
|
||||||
}
|
}
|
||||||
|
@ -103,19 +103,19 @@ const choose = async (ev) => {
|
|||||||
os.popupMenu([{
|
os.popupMenu([{
|
||||||
text: i18n.ts._timelines.home,
|
text: i18n.ts._timelines.home,
|
||||||
icon: 'fas fa-home',
|
icon: 'fas fa-home',
|
||||||
action: () => { setSrc('home') }
|
action: () => { setSrc('home'); }
|
||||||
}, {
|
}, {
|
||||||
text: i18n.ts._timelines.local,
|
text: i18n.ts._timelines.local,
|
||||||
icon: 'fas fa-comments',
|
icon: 'fas fa-comments',
|
||||||
action: () => { setSrc('local') }
|
action: () => { setSrc('local'); }
|
||||||
}, {
|
}, {
|
||||||
text: i18n.ts._timelines.social,
|
text: i18n.ts._timelines.social,
|
||||||
icon: 'fas fa-share-alt',
|
icon: 'fas fa-share-alt',
|
||||||
action: () => { setSrc('social') }
|
action: () => { setSrc('social'); }
|
||||||
}, {
|
}, {
|
||||||
text: i18n.ts._timelines.global,
|
text: i18n.ts._timelines.global,
|
||||||
icon: 'fas fa-globe',
|
icon: 'fas fa-globe',
|
||||||
action: () => { setSrc('global') }
|
action: () => { setSrc('global'); }
|
||||||
}, antennaItems.length > 0 ? null : undefined, ...antennaItems, listItems.length > 0 ? null : undefined, ...listItems], ev.currentTarget ?? ev.target).then(() => {
|
}, antennaItems.length > 0 ? null : undefined, ...antennaItems, listItems.length > 0 ? null : undefined, ...listItems], ev.currentTarget ?? ev.target).then(() => {
|
||||||
menuOpened.value = false;
|
menuOpened.value = false;
|
||||||
});
|
});
|
||||||
|
@ -45,7 +45,7 @@ export const useWidgetPropsManager = <F extends Form & Record<string, { default:
|
|||||||
}, { deep: true, immediate: true, });
|
}, { deep: true, immediate: true, });
|
||||||
|
|
||||||
const save = throttle(3000, () => {
|
const save = throttle(3000, () => {
|
||||||
emit('updateProps', widgetProps)
|
emit('updateProps', widgetProps);
|
||||||
});
|
});
|
||||||
|
|
||||||
const configure = async () => {
|
const configure = async () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user