This commit is contained in:
NoriDev 2023-09-25 16:54:08 +09:00
parent 8a4b682cb5
commit 2936641e0f
13 changed files with 45 additions and 45 deletions

View file

@ -42,7 +42,7 @@ export default defineComponent({
type: Function, // Note => date string
required: false,
default: undefined,
}
},
},
setup(props, { slots, expose }) {

View file

@ -138,7 +138,7 @@ onMounted(() => {
connection.on('unfollow', onFollowChange);
showFollowButton = $i != null && $i.id !== props.user.id;
globalEvents.emit('showFollowButton', showFollowButton);
globalEvents.emit('showFollowButton', showFollowButton);
});
onBeforeUnmount(() => {

View file

@ -30,8 +30,8 @@ const emit = defineEmits<{
}>();
function close() {
visible.value = false;
emit('closed');
visible.value = false;
emit('closed');
}
</script>

View file

@ -45,7 +45,7 @@ const props = defineProps<{
const showContent = $ref(false);
onMounted(() => {
globalEvents.on('showEl', (showEl_receive) => {
globalEvents.on('showEl', (showEl_receive) => {
showEl = showEl_receive;
});
});

View file

@ -218,7 +218,7 @@ onMounted(() => {
calcBg();
globalEvents.on('themeChanged', calcBg);
globalEvents.on('showFollowButton', (showFollowButton_receive) => {
globalEvents.on('showFollowButton', (showFollowButton_receive) => {
showFollowButton = showFollowButton_receive;
});
});

View file

@ -101,7 +101,7 @@ onMounted(() => {
observer.observe(headerEl);
observer.observe(footerEl);
globalEvents.on('showEl', (showEl_receive) => {
globalEvents.on('showEl', (showEl_receive) => {
showEl = showEl_receive;
});
});

View file

@ -447,7 +447,7 @@ watch($$(user), () => {
});
onMounted(() => {
globalEvents.on('refreshUser', () => updateRemoteUser());
globalEvents.on('refreshUser', () => updateRemoteUser());
});
const headerActions = $computed(() => []);

View file

@ -164,13 +164,13 @@ async function toggleItem(item) {
}
const headerActions = $computed(() => [{
text: i18n.ts.edit,
icon: 'ti ti-pencil',
handler: edit,
text: i18n.ts.edit,
icon: 'ti ti-pencil',
handler: edit,
}, {
text: i18n.ts.delete,
icon: 'ti ti-trash',
handler: del,
text: i18n.ts.delete,
icon: 'ti ti-trash',
handler: del,
}]);
const headerTabs = $computed(() => []);

View file

@ -76,7 +76,7 @@ import { useRouter } from '@/router.js';
import { definePageMetadata } from '@/scripts/page-metadata.js';
import { i18n } from '@/i18n.js';
import MkFolder from '@/components/MkFolder.vue';
import MkSwitch from "@/components/MkSwitch.vue";
import MkSwitch from '@/components/MkSwitch.vue';
const Sortable = defineAsyncComponent(() => import('vuedraggable').then(x => x.default));

View file

@ -173,25 +173,25 @@ const remoteMenu = (emoji, ev: MouseEvent) => {
};
const uploadMenu = (ev: MouseEvent) => {
os.popupMenu([{
icon: 'ti ti-file',
text: i18n.ts.addSingle,
action: add,
}, {
icon: 'ti ti-files',
text: i18n.ts.addMultiple,
action: async () => {
const files = await selectFiles(ev.currentTarget ?? ev.target, null);
os.popupMenu([{
icon: 'ti ti-file',
text: i18n.ts.addSingle,
action: add,
}, {
icon: 'ti ti-files',
text: i18n.ts.addMultiple,
action: async () => {
const files = await selectFiles(ev.currentTarget ?? ev.target, null);
const promise = Promise.all(files.map(file => os.api('admin/emoji/adds', {
fileId: file.id,
})));
promise.then(() => {
emojisPaginationComponent.value.reload();
});
os.promiseDialog(promise);
},
}], ev.currentTarget ?? ev.target);
const promise = Promise.all(files.map(file => os.api('admin/emoji/adds', {
fileId: file.id,
})));
promise.then(() => {
emojisPaginationComponent.value.reload();
});
os.promiseDialog(promise);
},
}], ev.currentTarget ?? ev.target);
};
const menu = (ev: MouseEvent) => {
@ -309,10 +309,10 @@ const delBulk = async () => {
};
const headerActions = $computed(() => [{
asFullButton: true,
icon: 'ti ti-plus',
text: i18n.ts.addEmoji,
handler: uploadMenu,
asFullButton: true,
icon: 'ti ti-plus',
text: i18n.ts.addEmoji,
handler: uploadMenu,
}, {
icon: 'ti ti-dots',
handler: menu,

View file

@ -54,27 +54,27 @@ export const defaultStore = markRaw(new Storage('base', {
default: 0,
},
tlHomeHintClosed: {
where: "device",
where: 'device',
default: false,
},
tlLocalHintClosed: {
where: "device",
where: 'device',
default: false,
},
tlMediaHintClosed: {
where: "device",
where: 'device',
default: false,
},
tlSocialHintClosed: {
where: "device",
where: 'device',
default: false,
},
tlCatHintClosed: {
where: "device",
where: 'device',
default: false,
},
tlGlobalHintClosed: {
where: "device",
where: 'device',
default: false,
},
keepCw: {

View file

@ -65,7 +65,7 @@ const dev = _DEV_;
let notifications = $ref<Misskey.entities.Notification[]>([]);
function onNotification(notification: Misskey.entities.Notification, isClient: boolean = false) {
function onNotification(notification: Misskey.entities.Notification, isClient = false) {
if ($i.mutingNotificationTypes.includes(notification.type)) return;
if (document.visibilityState === 'visible') {

View file

@ -53,7 +53,7 @@ function reload() {
useStream().on('_disconnected_', onDisconnected);
onMounted(() => {
globalEvents.on('hasRequireRefresh', (hasRequireRefresh_receive) => {
globalEvents.on('hasRequireRefresh', (hasRequireRefresh_receive) => {
hasRequireRefresh = hasRequireRefresh_receive;
});
});