Merge remote-tracking branch 'misskey/develop' into develop

This commit is contained in:
ThatOneCalculator 2022-09-05 15:00:45 -07:00
commit 79be45c65c
249 changed files with 880 additions and 972 deletions

3
.gitignore vendored
View File

@ -24,6 +24,9 @@ packages/sw/.yarn/cache
cypress/screenshots cypress/screenshots
cypress/videos cypress/videos
# Coverage
coverage
# config # config
/.config/* /.config/*
!/.config/example.yml !/.config/example.yml

View File

@ -146,7 +146,7 @@ export async function openAccountMenu(opts: {
onChoose?: (account: misskey.entities.UserDetailed) => void; onChoose?: (account: misskey.entities.UserDetailed) => void;
}, ev: MouseEvent) { }, ev: MouseEvent) {
function showSigninDialog() { function showSigninDialog() {
popup(defineAsyncComponent(() => import('@/components/signin-dialog.vue')), {}, { popup(defineAsyncComponent(() => import('@/components/MkSigninDialog.vue')), {}, {
done: res => { done: res => {
addAccount(res.id, res.i); addAccount(res.id, res.i);
success(); success();
@ -155,7 +155,7 @@ export async function openAccountMenu(opts: {
} }
function createAccount() { function createAccount() {
popup(defineAsyncComponent(() => import('@/components/signup-dialog.vue')), {}, { popup(defineAsyncComponent(() => import('@/components/MkSignupDialog.vue')), {}, {
done: res => { done: res => {
addAccount(res.id, res.i); addAccount(res.id, res.i);
switchAccountWithToken(res.i); switchAccountWithToken(res.i);

View File

@ -38,7 +38,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import MkButton from '@/components/ui/button.vue'; import MkButton from '@/components/ui/button.vue';
import MkSwitch from '@/components/form/switch.vue'; import MkSwitch from '@/components/form/switch.vue';
import MkKeyValue from '@/components/key-value.vue'; import MkKeyValue from '@/components/MkKeyValue.vue';
import { acct, userPage } from '@/filters/user'; import { acct, userPage } from '@/filters/user';
import * as os from '@/os'; import * as os from '@/os';
import { i18n } from '@/i18n'; import { i18n } from '@/i18n';

View File

@ -40,7 +40,7 @@
<line <line
class="s" class="s"
:class="{ animate: !disableSAnimate }" :class="{ animate: !disableSAnimate && sAnimation !== 'none', elastic: sAnimation === 'elastic', easeOut: sAnimation === 'easeOut' }"
:x1="5 - (0 * (sHandLengthRatio * handsTailLength))" :x1="5 - (0 * (sHandLengthRatio * handsTailLength))"
:y1="5 + (1 * (sHandLengthRatio * handsTailLength))" :y1="5 + (1 * (sHandLengthRatio * handsTailLength))"
:x2="5 + (0 * ((sHandLengthRatio * 5) - handsPadding))" :x2="5 + (0 * ((sHandLengthRatio * 5) - handsPadding))"
@ -99,6 +99,7 @@ const props = withDefaults(defineProps<{
twentyfour?: boolean; twentyfour?: boolean;
graduations?: 'none' | 'dots' | 'numbers'; graduations?: 'none' | 'dots' | 'numbers';
fadeGraduations?: boolean; fadeGraduations?: boolean;
sAnimation?: 'none' | 'elastic' | 'easeOut';
}>(), { }>(), {
numbers: false, numbers: false,
thickness: 0.1, thickness: 0.1,
@ -106,6 +107,7 @@ const props = withDefaults(defineProps<{
twentyfour: false, twentyfour: false,
graduations: 'dots', graduations: 'dots',
fadeGraduations: true, fadeGraduations: true,
sAnimation: 'elastic',
}); });
const graduationsMajor = computed(() => { const graduationsMajor = computed(() => {
@ -161,7 +163,7 @@ function tick() {
disableSAnimate = false; disableSAnimate = false;
}, 100); }, 100);
}, 100); }, 100);
}, 500); }, 700);
} else { } else {
sAngle = Math.PI * s / 30; sAngle = Math.PI * s / 30;
} }
@ -211,9 +213,13 @@ onBeforeUnmount(() => {
will-change: transform; will-change: transform;
transform-origin: 50% 50%; transform-origin: 50% 50%;
&.animate { &.animate.elastic {
transition: transform .2s cubic-bezier(.4,2.08,.55,.44); transition: transform .2s cubic-bezier(.4,2.08,.55,.44);
} }
&.animate.easeOut {
transition: transform .7s cubic-bezier(0,.7,.3,1);
}
} }
} }
</style> </style>

View File

@ -11,5 +11,5 @@ defineProps<{
inline?: boolean; inline?: boolean;
}>(); }>();
const XCode = defineAsyncComponent(() => import('./code-core.vue')); const XCode = defineAsyncComponent(() => import('@/components/MkCode.core.vue'));
</script> </script>

View File

@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import { defineComponent, h, PropType, TransitionGroup } from 'vue'; import { defineComponent, h, PropType, TransitionGroup } from 'vue';
import MkAd from '@/components/global/ad.vue'; import MkAd from '@/components/global/MkAd.vue';
import { i18n } from '@/i18n'; import { i18n } from '@/i18n';
import { defaultStore } from '@/store'; import { defaultStore } from '@/store';
@ -13,22 +13,22 @@ export default defineComponent({
direction: { direction: {
type: String, type: String,
required: false, required: false,
default: 'down' default: 'down',
}, },
reversed: { reversed: {
type: Boolean, type: Boolean,
required: false, required: false,
default: false default: false,
}, },
noGap: { noGap: {
type: Boolean, type: Boolean,
required: false, required: false,
default: false default: false,
}, },
ad: { ad: {
type: Boolean, type: Boolean,
required: false, required: false,
default: false default: false,
}, },
}, },
@ -38,7 +38,7 @@ export default defineComponent({
const month = new Date(time).getMonth() + 1; const month = new Date(time).getMonth() + 1;
return i18n.t('monthAndDay', { return i18n.t('monthAndDay', {
month: month.toString(), month: month.toString(),
day: date.toString() day: date.toString(),
}); });
} }
@ -48,7 +48,7 @@ export default defineComponent({
if (!slots || !slots.default) return; if (!slots || !slots.default) return;
const el = slots.default({ const el = slots.default({
item: item item: item,
})[0]; })[0];
if (el.key == null && item.id) el.key = item.id; if (el.key == null && item.id) el.key = item.id;
@ -60,20 +60,20 @@ export default defineComponent({
class: 'separator', class: 'separator',
key: item.id + ':separator', key: item.id + ':separator',
}, h('p', { }, h('p', {
class: 'date' class: 'date',
}, [ }, [
h('span', [ h('span', [
h('i', { h('i', {
class: 'fas fa-angle-up icon', class: 'fas fa-angle-up icon',
}), }),
getDateText(item.createdAt) getDateText(item.createdAt),
]), ]),
h('span', [ h('span', [
getDateText(props.items[i + 1].createdAt), getDateText(props.items[i + 1].createdAt),
h('i', { h('i', {
class: 'fas fa-angle-down icon', class: 'fas fa-angle-down icon',
}) }),
]) ]),
])); ]));
return [el, separator]; return [el, separator];
@ -102,7 +102,7 @@ export default defineComponent({
class: 'sqadhkmv' + (props.noGap ? ' noGap' : ''), class: 'sqadhkmv' + (props.noGap ? ' noGap' : ''),
}, },
{ default: renderChildren }); { default: renderChildren });
} },
}); });
</script> </script>

View File

@ -1,5 +1,6 @@
<template> <template>
<div class="ncvczrfv" <div
class="ncvczrfv"
:class="{ isSelected }" :class="{ isSelected }"
draggable="true" draggable="true"
:title="title" :title="title"
@ -34,7 +35,7 @@
import { computed, defineAsyncComponent, ref } from 'vue'; import { computed, defineAsyncComponent, ref } from 'vue';
import * as Misskey from 'misskey-js'; import * as Misskey from 'misskey-js';
import copyToClipboard from '@/scripts/copy-to-clipboard'; import copyToClipboard from '@/scripts/copy-to-clipboard';
import MkDriveFileThumbnail from './drive-file-thumbnail.vue'; import MkDriveFileThumbnail from '@/components/MkDriveFileThumbnail.vue';
import bytes from '@/filters/bytes'; import bytes from '@/filters/bytes';
import * as os from '@/os'; import * as os from '@/os';
import { i18n } from '@/i18n'; import { i18n } from '@/i18n';
@ -63,31 +64,31 @@ function getMenu() {
return [{ return [{
text: i18n.ts.rename, text: i18n.ts.rename,
icon: 'fas fa-i-cursor', icon: 'fas fa-i-cursor',
action: rename action: rename,
}, { }, {
text: props.file.isSensitive ? i18n.ts.unmarkAsSensitive : i18n.ts.markAsSensitive, text: props.file.isSensitive ? i18n.ts.unmarkAsSensitive : i18n.ts.markAsSensitive,
icon: props.file.isSensitive ? 'fas fa-eye' : 'fas fa-eye-slash', icon: props.file.isSensitive ? 'fas fa-eye' : 'fas fa-eye-slash',
action: toggleSensitive action: toggleSensitive,
}, { }, {
text: i18n.ts.describeFile, text: i18n.ts.describeFile,
icon: 'fas fa-i-cursor', icon: 'fas fa-i-cursor',
action: describe action: describe,
}, null, { }, null, {
text: i18n.ts.copyUrl, text: i18n.ts.copyUrl,
icon: 'fas fa-link', icon: 'fas fa-link',
action: copyUrl action: copyUrl,
}, { }, {
type: 'a', type: 'a',
href: props.file.url, href: props.file.url,
target: '_blank', target: '_blank',
text: i18n.ts.download, text: i18n.ts.download,
icon: 'fas fa-download', icon: 'fas fa-download',
download: props.file.name download: props.file.name,
}, null, { }, null, {
text: i18n.ts.delete, text: i18n.ts.delete,
icon: 'fas fa-trash-alt', icon: 'fas fa-trash-alt',
danger: true, danger: true,
action: deleteFile action: deleteFile,
}]; }];
} }
@ -127,35 +128,35 @@ function rename() {
if (canceled) return; if (canceled) return;
os.api('drive/files/update', { os.api('drive/files/update', {
fileId: props.file.id, fileId: props.file.id,
name: name name: name,
}); });
}); });
} }
function describe() { function describe() {
os.popup(defineAsyncComponent(() => import('@/components/media-caption.vue')), { os.popup(defineAsyncComponent(() => import('@/components/MkMediaCaption.vue')), {
title: i18n.ts.describeFile, title: i18n.ts.describeFile,
input: { input: {
placeholder: i18n.ts.inputNewDescription, placeholder: i18n.ts.inputNewDescription,
default: props.file.comment != null ? props.file.comment : '', default: props.file.comment != null ? props.file.comment : '',
}, },
image: props.file image: props.file,
}, { }, {
done: result => { done: result => {
if (!result || result.canceled) return; if (!result || result.canceled) return;
let comment = result.result; let comment = result.result;
os.api('drive/files/update', { os.api('drive/files/update', {
fileId: props.file.id, fileId: props.file.id,
comment: comment.length === 0 ? null : comment comment: comment.length === 0 ? null : comment,
}); });
} },
}, 'closed'); }, 'closed');
} }
function toggleSensitive() { function toggleSensitive() {
os.api('drive/files/update', { os.api('drive/files/update', {
fileId: props.file.id, fileId: props.file.id,
isSensitive: !props.file.isSensitive isSensitive: !props.file.isSensitive,
}); });
} }
@ -176,7 +177,7 @@ async function deleteFile() {
if (canceled) return; if (canceled) return;
os.api('drive/files/delete', { os.api('drive/files/delete', {
fileId: props.file.id fileId: props.file.id,
}); });
} }
</script> </script>

View File

@ -1,5 +1,6 @@
<template> <template>
<div class="rghtznwe" <div
class="rghtznwe"
:class="{ draghover }" :class="{ draghover }"
draggable="true" draggable="true"
:title="title" :title="title"
@ -123,7 +124,7 @@ function onDrop(ev: DragEvent) {
emit('removeFile', file.id); emit('removeFile', file.id);
os.api('drive/files/update', { os.api('drive/files/update', {
fileId: file.id, fileId: file.id,
folderId: props.folder.id folderId: props.folder.id,
}); });
} }
//#endregion //#endregion
@ -139,7 +140,7 @@ function onDrop(ev: DragEvent) {
emit('removeFolder', folder.id); emit('removeFolder', folder.id);
os.api('drive/folders/update', { os.api('drive/folders/update', {
folderId: folder.id, folderId: folder.id,
parentId: props.folder.id parentId: props.folder.id,
}).then(() => { }).then(() => {
// noop // noop
}).catch(err => { }).catch(err => {
@ -147,13 +148,13 @@ function onDrop(ev: DragEvent) {
case 'detected-circular-definition': case 'detected-circular-definition':
os.alert({ os.alert({
title: i18n.ts.unableToProcess, title: i18n.ts.unableToProcess,
text: i18n.ts.circularReferenceFolder text: i18n.ts.circularReferenceFolder,
}); });
break; break;
default: default:
os.alert({ os.alert({
type: 'error', type: 'error',
text: i18n.ts.somethingHappened text: i18n.ts.somethingHappened,
}); });
} }
}); });
@ -186,19 +187,19 @@ function rename() {
os.inputText({ os.inputText({
title: i18n.ts.renameFolder, title: i18n.ts.renameFolder,
placeholder: i18n.ts.inputNewFolderName, placeholder: i18n.ts.inputNewFolderName,
default: props.folder.name default: props.folder.name,
}).then(({ canceled, result: name }) => { }).then(({ canceled, result: name }) => {
if (canceled) return; if (canceled) return;
os.api('drive/folders/update', { os.api('drive/folders/update', {
folderId: props.folder.id, folderId: props.folder.id,
name: name name: name,
}); });
}); });
} }
function deleteFolder() { function deleteFolder() {
os.api('drive/folders/delete', { os.api('drive/folders/delete', {
folderId: props.folder.id folderId: props.folder.id,
}).then(() => { }).then(() => {
if (defaultStore.state.uploadFolder === props.folder.id) { if (defaultStore.state.uploadFolder === props.folder.id) {
defaultStore.set('uploadFolder', null); defaultStore.set('uploadFolder', null);
@ -209,13 +210,13 @@ function deleteFolder() {
os.alert({ os.alert({
type: 'error', type: 'error',
title: i18n.ts.unableToDelete, title: i18n.ts.unableToDelete,
text: i18n.ts.hasChildFilesOrFolders text: i18n.ts.hasChildFilesOrFolders,
}); });
break; break;
default: default:
os.alert({ os.alert({
type: 'error', type: 'error',
text: i18n.ts.unableToDelete text: i18n.ts.unableToDelete,
}); });
} }
}); });
@ -230,11 +231,11 @@ function onContextmenu(ev: MouseEvent) {
text: i18n.ts.openInWindow, text: i18n.ts.openInWindow,
icon: 'fas fa-window-restore', icon: 'fas fa-window-restore',
action: () => { action: () => {
os.popup(defineAsyncComponent(() => import('./drive-window.vue')), { os.popup(defineAsyncComponent(() => import('@/components/MkDriveWindow.vue')), {
initialFolder: props.folder initialFolder: props.folder,
}, { }, {
}, 'closed'); }, 'closed');
} },
}, null, { }, null, {
text: i18n.ts.rename, text: i18n.ts.rename,
icon: 'fas fa-i-cursor', icon: 'fas fa-i-cursor',

View File

@ -90,10 +90,10 @@
<script lang="ts" setup> <script lang="ts" setup>
import { markRaw, nextTick, onActivated, onBeforeUnmount, onMounted, ref, watch } from 'vue'; import { markRaw, nextTick, onActivated, onBeforeUnmount, onMounted, ref, watch } from 'vue';
import * as Misskey from 'misskey-js'; import * as Misskey from 'misskey-js';
import XNavFolder from './drive.nav-folder.vue';
import XFolder from './drive.folder.vue';
import XFile from './drive.file.vue';
import MkButton from './ui/button.vue'; import MkButton from './ui/button.vue';
import XNavFolder from '@/components/MkDrive.navFolder.vue';
import XFolder from '@/components/MkDrive.folder.vue';
import XFile from '@/components/MkDrive.file.vue';
import * as os from '@/os'; import * as os from '@/os';
import { stream } from '@/stream'; import { stream } from '@/stream';
import { defaultStore } from '@/store'; import { defaultStore } from '@/store';

View File

@ -17,7 +17,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { computed } from 'vue'; import { computed } from 'vue';
import * as Misskey from 'misskey-js'; import * as Misskey from 'misskey-js';
import ImgWithBlurhash from '@/components/img-with-blurhash.vue'; import ImgWithBlurhash from '@/components/MkImgWithBlurhash.vue';
const props = defineProps<{ const props = defineProps<{
file: Misskey.entities.DriveFile; file: Misskey.entities.DriveFile;

View File

@ -1,5 +1,6 @@
<template> <template>
<XModalWindow ref="dialog" <XModalWindow
ref="dialog"
:width="800" :width="800"
:height="500" :height="500"
:with-ok-button="true" :with-ok-button="true"
@ -20,7 +21,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { ref } from 'vue'; import { ref } from 'vue';
import * as Misskey from 'misskey-js'; import * as Misskey from 'misskey-js';
import XDrive from './drive.vue'; import XDrive from '@/components/MkDrive.vue';
import XModalWindow from '@/components/ui/modal-window.vue'; import XModalWindow from '@/components/ui/modal-window.vue';
import number from '@/filters/number'; import number from '@/filters/number';
import { i18n } from '@/i18n'; import { i18n } from '@/i18n';

View File

@ -1,5 +1,6 @@
<template> <template>
<XWindow ref="window" <XWindow
ref="window"
:initial-width="800" :initial-width="800"
:initial-height="500" :initial-height="500"
:can-resize="true" :can-resize="true"
@ -15,7 +16,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { } from 'vue'; import { } from 'vue';
import * as Misskey from 'misskey-js'; import * as Misskey from 'misskey-js';
import XDrive from './drive.vue'; import XDrive from '@/components/MkDrive.vue';
import XWindow from '@/components/ui/window.vue'; import XWindow from '@/components/ui/window.vue';
import { i18n } from '@/i18n'; import { i18n } from '@/i18n';

View File

@ -80,10 +80,10 @@
<script lang="ts" setup> <script lang="ts" setup>
import { ref, computed, watch, onMounted } from 'vue'; import { ref, computed, watch, onMounted } from 'vue';
import * as Misskey from 'misskey-js'; import * as Misskey from 'misskey-js';
import XSection from './emoji-picker.section.vue'; import XSection from '@/components/MkEmojiPicker.section.vue';
import { emojilist, UnicodeEmojiDef, unicodeEmojiCategories as categories } from '@/scripts/emojilist'; import { emojilist, UnicodeEmojiDef, unicodeEmojiCategories as categories } from '@/scripts/emojilist';
import { getStaticImageUrl } from '@/scripts/get-static-image-url'; import { getStaticImageUrl } from '@/scripts/get-static-image-url';
import Ripple from '@/components/ripple.vue'; import Ripple from '@/components/MkRipple.vue';
import * as os from '@/os'; import * as os from '@/os';
import { isTouchUsing } from '@/scripts/touch'; import { isTouchUsing } from '@/scripts/touch';
import { deviceKind } from '@/scripts/device-kind'; import { deviceKind } from '@/scripts/device-kind';

View File

@ -28,7 +28,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { ref } from 'vue'; import { ref } from 'vue';
import MkModal from '@/components/ui/modal.vue'; import MkModal from '@/components/ui/modal.vue';
import MkEmojiPicker from '@/components/emoji-picker.vue'; import MkEmojiPicker from '@/components/MkEmojiPicker.vue';
import { defaultStore } from '@/store'; import { defaultStore } from '@/store';
withDefaults(defineProps<{ withDefaults(defineProps<{

View File

@ -14,7 +14,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { } from 'vue'; import { } from 'vue';
import MkWindow from '@/components/ui/window.vue'; import MkWindow from '@/components/ui/window.vue';
import MkEmojiPicker from '@/components/emoji-picker.vue'; import MkEmojiPicker from '@/components/MkEmojiPicker.vue';
withDefaults(defineProps<{ withDefaults(defineProps<{
src?: HTMLElement; src?: HTMLElement;

View File

@ -36,7 +36,7 @@ import { computed } from 'vue';
import * as Acct from 'misskey-js/built/acct'; import * as Acct from 'misskey-js/built/acct';
import MkSwitch from '@/components/ui/switch.vue'; import MkSwitch from '@/components/ui/switch.vue';
import MkPagination from '@/components/ui/pagination.vue'; import MkPagination from '@/components/ui/pagination.vue';
import MkDriveFileThumbnail from '@/components/drive-file-thumbnail.vue'; import MkDriveFileThumbnail from '@/components/MkDriveFileThumbnail.vue';
import bytes from '@/filters/bytes'; import bytes from '@/filters/bytes';
import * as os from '@/os'; import * as os from '@/os';
import { i18n } from '@/i18n'; import { i18n } from '@/i18n';

View File

@ -1,5 +1,5 @@
<template> <template>
<XFormula :formula="formula" :block="block" /> <XFormula :formula="formula" :block="block"/>
</template> </template>
<script lang="ts"> <script lang="ts">
@ -8,17 +8,17 @@ import * as os from '@/os';
export default defineComponent({ export default defineComponent({
components: { components: {
XFormula: defineAsyncComponent(() => import('./formula-core.vue')) XFormula: defineAsyncComponent(() => import('@/components/MkFormulaCore.vue')),
}, },
props: { props: {
formula: { formula: {
type: String, type: String,
required: true required: true,
}, },
block: { block: {
type: Boolean, type: Boolean,
required: true required: true,
} },
} },
}); });
</script> </script>

View File

@ -14,26 +14,14 @@
</MkA> </MkA>
</template> </template>
<script lang="ts"> <script lang="ts" setup>
import { defineComponent } from 'vue'; import { } from 'vue';
import { userName } from '@/filters/user'; import { userName } from '@/filters/user';
import ImgWithBlurhash from '@/components/img-with-blurhash.vue'; import ImgWithBlurhash from '@/components/MkImgWithBlurhash.vue';
import * as os from '@/os';
export default defineComponent({ const props = defineProps<{
components: { post: any;
ImgWithBlurhash }>();
},
props: {
post: {
type: Object,
required: true
},
},
methods: {
userName,
}
});
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -11,7 +11,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import * as misskey from 'misskey-js'; import * as misskey from 'misskey-js';
import MkMiniChart from '@/components/mini-chart.vue'; import MkMiniChart from '@/components/MkMiniChart.vue';
import * as os from '@/os'; import * as os from '@/os';
const props = defineProps<{ const props = defineProps<{

View File

@ -68,7 +68,7 @@ import {
DoughnutController, DoughnutController,
} from 'chart.js'; } from 'chart.js';
import MkSelect from '@/components/form/select.vue'; import MkSelect from '@/components/form/select.vue';
import MkChart from '@/components/chart.vue'; import MkChart from '@/components/MkChart.vue';
import { useChartTooltip } from '@/scripts/use-chart-tooltip'; import { useChartTooltip } from '@/scripts/use-chart-tooltip';
import * as os from '@/os'; import * as os from '@/os';
import { i18n } from '@/i18n'; import { i18n } from '@/i18n';

View File

@ -26,7 +26,7 @@ const target = self ? null : '_blank';
const el = $ref(); const el = $ref();
useTooltip($$(el), (showing) => { useTooltip($$(el), (showing) => {
os.popup(defineAsyncComponent(() => import('@/components/url-preview-popup.vue')), { os.popup(defineAsyncComponent(() => import('@/components/MkUrlPreviewPopup.vue')), {
showing, showing,
url: props.url, url: props.url,
source: el, source: el,

View File

@ -24,7 +24,7 @@
import { watch } from 'vue'; import { watch } from 'vue';
import * as misskey from 'misskey-js'; import * as misskey from 'misskey-js';
import { getStaticImageUrl } from '@/scripts/get-static-image-url'; import { getStaticImageUrl } from '@/scripts/get-static-image-url';
import ImgWithBlurhash from '@/components/img-with-blurhash.vue'; import ImgWithBlurhash from '@/components/MkImgWithBlurhash.vue';
import { defaultStore } from '@/store'; import { defaultStore } from '@/store';
const props = defineProps<{ const props = defineProps<{

View File

@ -18,9 +18,9 @@ import * as misskey from 'misskey-js';
import PhotoSwipeLightbox from 'photoswipe/lightbox'; import PhotoSwipeLightbox from 'photoswipe/lightbox';
import PhotoSwipe from 'photoswipe'; import PhotoSwipe from 'photoswipe';
import 'photoswipe/style.css'; import 'photoswipe/style.css';
import XBanner from './media-banner.vue'; import XBanner from '@/components/MkMediaBanner.vue';
import XImage from './media-image.vue'; import XImage from '@/components/MkMediaImage.vue';
import XVideo from './media-video.vue'; import XVideo from '@/components/MkMediaVideo.vue';
import * as os from '@/os'; import * as os from '@/os';
import { FILE_TYPE_BROWSERSAFE } from '@/const'; import { FILE_TYPE_BROWSERSAFE } from '@/const';
import { defaultStore } from '@/store'; import { defaultStore } from '@/store';

View File

@ -105,17 +105,17 @@
import { computed, inject, onMounted, onUnmounted, reactive, ref, Ref } from 'vue'; import { computed, inject, onMounted, onUnmounted, reactive, ref, Ref } from 'vue';
import * as mfm from 'mfm-js'; import * as mfm from 'mfm-js';
import * as misskey from 'misskey-js'; import * as misskey from 'misskey-js';
import MkNoteSub from './MkNoteSub.vue'; import MkNoteSub from '@/components/MkNoteSub.vue';
import XNoteHeader from './note-header.vue'; import XNoteHeader from '@/components/MkNoteHeader.vue';
import XNoteSimple from './note-simple.vue'; import XNoteSimple from '@/components/MkNoteSimple.vue';
import XReactionsViewer from './reactions-viewer.vue'; import XReactionsViewer from '@/components/MkReactionsViewer.vue';
import XMediaList from './media-list.vue'; import XMediaList from '@/components/MkMediaList.vue';
import XCwButton from './cw-button.vue'; import XCwButton from '@/components/MkCwButton.vue';
import XPoll from './poll.vue'; import XPoll from '@/components/MkPoll.vue';
import XRenoteButton from './renote-button.vue'; import XRenoteButton from '@/components/MkRenoteButton.vue';
import MkUrlPreview from '@/components/url-preview.vue'; import MkUrlPreview from '@/components/MkUrlPreview.vue';
import MkInstanceTicker from '@/components/instance-ticker.vue'; import MkInstanceTicker from '@/components/MkInstanceTicker.vue';
import MkVisibility from '@/components/visibility.vue'; import MkVisibility from '@/components/MkVisibility.vue';
import { pleaseLogin } from '@/scripts/please-login'; import { pleaseLogin } from '@/scripts/please-login';
import { focusPrev, focusNext } from '@/scripts/focus'; import { focusPrev, focusNext } from '@/scripts/focus';
import { checkWordMute } from '@/scripts/check-word-mute'; import { checkWordMute } from '@/scripts/check-word-mute';

View File

@ -116,16 +116,16 @@
import { computed, inject, onMounted, onUnmounted, reactive, ref } from 'vue'; import { computed, inject, onMounted, onUnmounted, reactive, ref } from 'vue';
import * as mfm from 'mfm-js'; import * as mfm from 'mfm-js';
import * as misskey from 'misskey-js'; import * as misskey from 'misskey-js';
import MkNoteSub from './MkNoteSub.vue'; import MkNoteSub from '@/components/MkNoteSub.vue';
import XNoteSimple from './note-simple.vue'; import XNoteSimple from '@/components/MkNoteSimple.vue';
import XReactionsViewer from './reactions-viewer.vue'; import XReactionsViewer from '@/components/MkReactionsViewer.vue';
import XMediaList from './media-list.vue'; import XMediaList from '@/components/MkMediaList.vue';
import XCwButton from './cw-button.vue'; import XCwButton from '@/components/MkCwButton.vue';
import XPoll from './poll.vue'; import XPoll from '@/components/MkPoll.vue';
import XRenoteButton from './renote-button.vue'; import XRenoteButton from '@/components/MkRenoteButton.vue';
import MkUrlPreview from '@/components/url-preview.vue'; import MkUrlPreview from '@/components/MkUrlPreview.vue';
import MkInstanceTicker from '@/components/instance-ticker.vue'; import MkInstanceTicker from '@/components/MkInstanceTicker.vue';
import MkVisibility from '@/components/visibility.vue'; import MkVisibility from '@/components/MkVisibility.vue';
import { pleaseLogin } from '@/scripts/please-login'; import { pleaseLogin } from '@/scripts/please-login';
import { checkWordMute } from '@/scripts/check-word-mute'; import { checkWordMute } from '@/scripts/check-word-mute';
import { userPage } from '@/filters/user'; import { userPage } from '@/filters/user';

View File

@ -17,7 +17,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { } from 'vue'; import { } from 'vue';
import * as misskey from 'misskey-js'; import * as misskey from 'misskey-js';
import MkVisibility from '@/components/visibility.vue'; import MkVisibility from '@/components/MkVisibility.vue';
import { notePage } from '@/filters/note'; import { notePage } from '@/filters/note';
import { userPage } from '@/filters/user'; import { userPage } from '@/filters/user';

View File

@ -9,7 +9,7 @@
<XCwButton v-model="showContent" :note="note"/> <XCwButton v-model="showContent" :note="note"/>
</p> </p>
<div v-show="note.cw == null || showContent" class="content"> <div v-show="note.cw == null || showContent" class="content">
<MkNoteSubNoteContent class="text" :note="note"/> <MkSubNoteContent class="text" :note="note"/>
</div> </div>
</div> </div>
</div> </div>
@ -19,9 +19,9 @@
<script lang="ts" setup> <script lang="ts" setup>
import { } from 'vue'; import { } from 'vue';
import * as misskey from 'misskey-js'; import * as misskey from 'misskey-js';
import XNoteHeader from './note-header.vue'; import XNoteHeader from '@/components/MkNoteHeader.vue';
import MkNoteSubNoteContent from './sub-note-content.vue'; import MkSubNoteContent from '@/components/MkSubNoteContent.vue';
import XCwButton from './cw-button.vue'; import XCwButton from '@/components/MkCwButton.vue';
const props = defineProps<{ const props = defineProps<{
note: misskey.entities.Note; note: misskey.entities.Note;

View File

@ -10,7 +10,7 @@
<XCwButton v-model="showContent" :note="note"/> <XCwButton v-model="showContent" :note="note"/>
</p> </p>
<div v-show="note.cw == null || showContent" class="content"> <div v-show="note.cw == null || showContent" class="content">
<MkNoteSubNoteContent class="text" :note="note"/> <MkSubNoteContent class="text" :note="note"/>
</div> </div>
</div> </div>
</div> </div>
@ -29,9 +29,9 @@
<script lang="ts" setup> <script lang="ts" setup>
import { } from 'vue'; import { } from 'vue';
import * as misskey from 'misskey-js'; import * as misskey from 'misskey-js';
import XNoteHeader from './note-header.vue'; import XNoteHeader from '@/components/MkNoteHeader.vue';
import MkNoteSubNoteContent from './sub-note-content.vue'; import MkSubNoteContent from '@/components/MkSubNoteContent.vue';
import XCwButton from './cw-button.vue'; import XCwButton from '@/components/MkCwButton.vue';
import { notePage } from '@/filters/note'; import { notePage } from '@/filters/note';
import * as os from '@/os'; import * as os from '@/os';
import { i18n } from '@/i18n'; import { i18n } from '@/i18n';

View File

@ -19,8 +19,8 @@
<script lang="ts" setup> <script lang="ts" setup>
import { ref } from 'vue'; import { ref } from 'vue';
import XNote from '@/components/note.vue'; import XNote from '@/components/MkNote.vue';
import XList from '@/components/date-separated-list.vue'; import XList from '@/components/MkDateSeparatedList.vue';
import MkPagination, { Paging } from '@/components/ui/pagination.vue'; import MkPagination, { Paging } from '@/components/ui/pagination.vue';
import { i18n } from '@/i18n'; import { i18n } from '@/i18n';

View File

@ -75,9 +75,9 @@
<script lang="ts" setup> <script lang="ts" setup>
import { ref, onMounted, onUnmounted, watch } from 'vue'; import { ref, onMounted, onUnmounted, watch } from 'vue';
import * as misskey from 'misskey-js'; import * as misskey from 'misskey-js';
import XReactionIcon from './reaction-icon.vue'; import XReactionIcon from '@/components/MkReactionIcon.vue';
import MkFollowButton from './follow-button.vue'; import MkFollowButton from '@/components/MkFollowButton.vue';
import XReactionTooltip from './reaction-tooltip.vue'; import XReactionTooltip from '@/components/MkReactionTooltip.vue';
import { getNoteSummary } from '@/scripts/get-note-summary'; import { getNoteSummary } from '@/scripts/get-note-summary';
import { notePage } from '@/filters/note'; import { notePage } from '@/filters/note';
import { userPage } from '@/filters/user'; import { userPage } from '@/filters/user';

View File

@ -8,7 +8,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onMounted } from 'vue'; import { onMounted } from 'vue';
import XNotification from './notification.vue'; import XNotification from '@/components/MkNotification.vue';
import * as os from '@/os'; import * as os from '@/os';
defineProps<{ defineProps<{

View File

@ -20,9 +20,9 @@
import { defineComponent, markRaw, onUnmounted, onMounted, computed, ref } from 'vue'; import { defineComponent, markRaw, onUnmounted, onMounted, computed, ref } from 'vue';
import { notificationTypes } from 'misskey-js'; import { notificationTypes } from 'misskey-js';
import MkPagination, { Paging } from '@/components/ui/pagination.vue'; import MkPagination, { Paging } from '@/components/ui/pagination.vue';
import XNotification from '@/components/notification.vue'; import XNotification from '@/components/MkNotification.vue';
import XList from '@/components/date-separated-list.vue'; import XList from '@/components/MkDateSeparatedList.vue';
import XNote from '@/components/note.vue'; import XNote from '@/components/MkNote.vue';
import * as os from '@/os'; import * as os from '@/os';
import { stream } from '@/stream'; import { stream } from '@/stream';
import { $i } from '@/account'; import { $i } from '@/account';

View File

@ -6,7 +6,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { } from 'vue'; import { } from 'vue';
import XValue from './object-view.value.vue'; import XValue from './MkObjectView.value.vue';
const props = defineProps<{ const props = defineProps<{
value: Record<string, unknown>; value: Record<string, unknown>;

View File

@ -25,7 +25,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { ComputedRef, inject, provide } from 'vue'; import { ComputedRef, inject, provide } from 'vue';
import RouterView from './global/router-view.vue'; import RouterView from '@/components/global/RouterView.vue';
import XWindow from '@/components/ui/window.vue'; import XWindow from '@/components/ui/window.vue';
import { popout as _popout } from '@/scripts/popout'; import { popout as _popout } from '@/scripts/popout';
import copyToClipboard from '@/scripts/copy-to-clipboard'; import copyToClipboard from '@/scripts/copy-to-clipboard';

View File

@ -71,10 +71,10 @@ import { length } from 'stringz';
import { toASCII } from 'punycode/'; import { toASCII } from 'punycode/';
import * as Acct from 'misskey-js/built/acct'; import * as Acct from 'misskey-js/built/acct';
import { throttle } from 'throttle-debounce'; import { throttle } from 'throttle-debounce';
import XNoteSimple from './note-simple.vue'; import XNoteSimple from '@/components/MkNoteSimple.vue';
import XNotePreview from './note-preview.vue'; import XNotePreview from '@/components/MkNotePreview.vue';
import XPostFormAttaches from './post-form-attaches.vue'; import XPostFormAttaches from '@/components/MkPostFormAttaches.vue';
import XPollEditor from './poll-editor.vue'; import XPollEditor from '@/components/MkPollEditor.vue';
import { host, url } from '@/config'; import { host, url } from '@/config';
import { erase, unique } from '@/scripts/array'; import { erase, unique } from '@/scripts/array';
import { extractMentions } from '@/scripts/extract-mentions'; import { extractMentions } from '@/scripts/extract-mentions';
@ -384,7 +384,7 @@ function setVisibility() {
return; return;
} }
os.popup(defineAsyncComponent(() => import('./visibility-picker.vue')), { os.popup(defineAsyncComponent(() => import('@/components/MkVisibilityPicker.vue')), {
currentVisibility: visibility, currentVisibility: visibility,
currentLocalOnly: localOnly, currentLocalOnly: localOnly,
src: visibilityButton, src: visibilityButton,

View File

@ -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 '@/components/MkDriveFileThumbnail.vue';
import * as os from '@/os'; import * as os from '@/os';
export default defineComponent({ export default defineComponent({
@ -88,7 +88,7 @@ export default defineComponent({
}, },
async describe(file) { async describe(file) {
os.popup(defineAsyncComponent(() => import('@/components/media-caption.vue')), { os.popup(defineAsyncComponent(() => import('@/components/MkMediaCaption.vue')), {
title: this.$ts.describeFile, title: this.$ts.describeFile,
input: { input: {
placeholder: this.$ts.inputNewDescription, placeholder: this.$ts.inputNewDescription,

View File

@ -7,7 +7,7 @@
<script lang="ts"> <script lang="ts">
import { defineComponent } from 'vue'; import { defineComponent } from 'vue';
import MkModal from '@/components/ui/modal.vue'; import MkModal from '@/components/ui/modal.vue';
import MkPostForm from '@/components/post-form.vue'; import MkPostForm from '@/components/MkPostForm.vue';
export default defineComponent({ export default defineComponent({
components: { components: {

View File

@ -10,7 +10,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { } from 'vue'; import { } from 'vue';
import MkTooltip from './ui/tooltip.vue'; import MkTooltip from './ui/tooltip.vue';
import XReactionIcon from './reaction-icon.vue'; import XReactionIcon from '@/components/MkReactionIcon.vue';
const props = defineProps<{ const props = defineProps<{
reaction: string; reaction: string;

View File

@ -19,7 +19,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { } from 'vue'; import { } from 'vue';
import MkTooltip from './ui/tooltip.vue'; import MkTooltip from './ui/tooltip.vue';
import XReactionIcon from './reaction-icon.vue'; import XReactionIcon from '@/components/MkReactionIcon.vue';
const props = defineProps<{ const props = defineProps<{
reaction: string; reaction: string;

View File

@ -15,8 +15,8 @@
<script lang="ts" setup> <script lang="ts" setup>
import { computed, onMounted, ref, watch } from 'vue'; import { computed, onMounted, ref, watch } from 'vue';
import * as misskey from 'misskey-js'; import * as misskey from 'misskey-js';
import XDetails from '@/components/reactions-viewer.details.vue'; import XDetails from '@/components/MkReactionsViewer.details.vue';
import XReactionIcon from '@/components/reaction-icon.vue'; import XReactionIcon from '@/components/MkReactionIcon.vue';
import * as os from '@/os'; import * as os from '@/os';
import { useTooltip } from '@/scripts/use-tooltip'; import { useTooltip } from '@/scripts/use-tooltip';
import { $i } from '@/account'; import { $i } from '@/account';

View File

@ -8,7 +8,7 @@
import { computed } from 'vue'; import { computed } from 'vue';
import * as misskey from 'misskey-js'; import * as misskey from 'misskey-js';
import { $i } from '@/account'; import { $i } from '@/account';
import XReaction from './reactions-viewer.reaction.vue'; import XReaction from '@/components/MkReactionsViewer.reaction.vue';
const props = defineProps<{ const props = defineProps<{
note: misskey.entities.Note; note: misskey.entities.Note;

View File

@ -0,0 +1,99 @@
<template>
<button
v-if="canRenote"
ref="buttonRef"
class="eddddedb _button canRenote"
@click="renote()"
>
<i class="fas fa-retweet"></i>
<p v-if="count > 0" class="count">{{ count }}</p>
</button>
<button v-else class="eddddedb _button">
<i class="fas fa-ban"></i>
</button>
</template>
<script lang="ts" setup>
import { computed, ref } from 'vue';
import * as misskey from 'misskey-js';
import XDetails from '@/components/MkUsersTooltip.vue';
import { pleaseLogin } from '@/scripts/please-login';
import * as os from '@/os';
import { $i } from '@/account';
import { useTooltip } from '@/scripts/use-tooltip';
import { i18n } from '@/i18n';
const props = defineProps<{
note: misskey.entities.Note;
count: number;
}>();
const buttonRef = ref<HTMLElement>();
const canRenote = computed(() => ['public', 'home'].includes(props.note.visibility) || props.note.userId === $i.id);
useTooltip(buttonRef, async (showing) => {
const renotes = await os.api('notes/renotes', {
noteId: props.note.id,
limit: 11,
});
const users = renotes.map(x => x.user);
if (users.length < 1) return;
os.popup(XDetails, {
showing,
users,
count: props.count,
targetElement: buttonRef.value,
}, {}, 'closed');
});
const renote = (viaKeyboard = false) => {
pleaseLogin();
os.popupMenu([{
text: i18n.ts.renote,
icon: 'fas fa-retweet',
action: () => {
os.api('notes/create', {
renoteId: props.note.id,
});
},
}, {
text: i18n.ts.quote,
icon: 'fas fa-quote-right',
action: () => {
os.post({
renote: props.note,
});
},
}], buttonRef.value, {
viaKeyboard,
});
};
</script>
<style lang="scss" scoped>
.eddddedb {
display: inline-block;
height: 32px;
margin: 2px;
padding: 0 6px;
border-radius: 4px;
&:not(.canRenote) {
cursor: default;
}
&.renoted {
background: var(--accent);
}
> .count {
display: inline;
margin-left: 8px;
opacity: 0.7;
}
}
</style>

View File

@ -1,8 +1,9 @@
<template> <template>
<div class="vswabwbm" :style="{ zIndex, top: `${y - 64}px`, left: `${x - 64}px` }" :class="{ active }"> <div class="vswabwbm" :style="{ zIndex, top: `${y - 64}px`, left: `${x - 64}px` }">
<svg width="128" height="128" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg"> <svg width="128" height="128" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg">
<circle fill="none" cx="64" cy="64"> <circle fill="none" cx="64" cy="64">
<animate attributeName="r" <animate
attributeName="r"
begin="0s" dur="0.5s" begin="0s" dur="0.5s"
values="4; 32" values="4; 32"
calcMode="spline" calcMode="spline"
@ -10,7 +11,8 @@
keySplines="0.165, 0.84, 0.44, 1" keySplines="0.165, 0.84, 0.44, 1"
repeatCount="1" repeatCount="1"
/> />
<animate attributeName="stroke-width" <animate
attributeName="stroke-width"
begin="0s" dur="0.5s" begin="0s" dur="0.5s"
values="16; 0" values="16; 0"
calcMode="spline" calcMode="spline"
@ -21,7 +23,8 @@
</circle> </circle>
<g fill="none" fill-rule="evenodd"> <g fill="none" fill-rule="evenodd">
<circle v-for="(particle, i) in particles" :key="i" :fill="particle.color"> <circle v-for="(particle, i) in particles" :key="i" :fill="particle.color">
<animate attributeName="r" <animate
attributeName="r"
begin="0s" dur="0.8s" begin="0s" dur="0.8s"
:values="`${particle.size}; 0`" :values="`${particle.size}; 0`"
calcMode="spline" calcMode="spline"
@ -29,7 +32,8 @@
keySplines="0.165, 0.84, 0.44, 1" keySplines="0.165, 0.84, 0.44, 1"
repeatCount="1" repeatCount="1"
/> />
<animate attributeName="cx" <animate
attributeName="cx"
begin="0s" dur="0.8s" begin="0s" dur="0.8s"
:values="`${particle.xA}; ${particle.xB}`" :values="`${particle.xA}; ${particle.xB}`"
calcMode="spline" calcMode="spline"
@ -37,7 +41,8 @@
keySplines="0.3, 0.61, 0.355, 1" keySplines="0.3, 0.61, 0.355, 1"
repeatCount="1" repeatCount="1"
/> />
<animate attributeName="cy" <animate
attributeName="cy"
begin="0s" dur="0.8s" begin="0s" dur="0.8s"
:values="`${particle.yA}; ${particle.yB}`" :values="`${particle.yA}; ${particle.yB}`"
calcMode="spline" calcMode="spline"
@ -51,33 +56,28 @@
</div> </div>
</template> </template>
<script lang="ts"> <script lang="ts" setup>
import { defineComponent, onMounted } from 'vue'; import { onMounted } from 'vue';
import * as os from '@/os'; import * as os from '@/os';
export default defineComponent({ const props = withDefaults(defineProps<{
props: { x: number;
x: { y: number;
type: Number, particle?: boolean;
required: true }>(), {
}, particle: true,
y: { });
type: Number,
required: true
},
particle: {
type: Boolean,
required: false,
default: true,
}
},
emits: ['end'],
setup(props, context) {
const particles = [];
const origin = 64;
const colors = ['#FF1493', '#00FFFF', '#FFE202'];
if (props.particle) { const emit = defineEmits<{
(ev: 'end'): void;
}>();
const particles = [];
const origin = 64;
const colors = ['#FF1493', '#00FFFF', '#FFE202'];
const zIndex = os.claimZIndex('high');
if (props.particle) {
for (let i = 0; i < 12; i++) { for (let i = 0; i < 12; i++) {
const angle = Math.random() * (Math.PI * 2); const angle = Math.random() * (Math.PI * 2);
const pos = Math.random() * 16; const pos = Math.random() * 16;
@ -88,22 +88,15 @@ export default defineComponent({
yA: origin + (Math.cos(angle) * pos), yA: origin + (Math.cos(angle) * pos),
xB: origin + (Math.sin(angle) * (pos + velocity)), xB: origin + (Math.sin(angle) * (pos + velocity)),
yB: origin + (Math.cos(angle) * (pos + velocity)), yB: origin + (Math.cos(angle) * (pos + velocity)),
color: colors[Math.floor(Math.random() * colors.length)] color: colors[Math.floor(Math.random() * colors.length)],
}); });
} }
} }
onMounted(() => { onMounted(() => {
window.setTimeout(() => { window.setTimeout(() => {
context.emit('end'); emit('end');
}, 1100); }, 1100);
});
return {
particles,
zIndex: os.claimZIndex('high'),
};
},
}); });
</script> </script>

View File

@ -237,7 +237,7 @@ function loginFailed(err) {
} }
function resetPassword() { function resetPassword() {
os.popup(defineAsyncComponent(() => import('@/components/forgot-password.vue')), {}, { os.popup(defineAsyncComponent(() => import('@/components/MkForgotPassword.vue')), {}, {
}, 'closed'); }, 'closed');
} }
</script> </script>

View File

@ -14,7 +14,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { } from 'vue'; import { } from 'vue';
import MkSignin from './signin.vue'; import MkSignin from '@/components/MkSignin.vue';
import XModalWindow from '@/components/ui/modal-window.vue'; import XModalWindow from '@/components/ui/modal-window.vue';
import { i18n } from '@/i18n'; import { i18n } from '@/i18n';

View File

@ -68,9 +68,9 @@ import { } from 'vue';
import getPasswordStrength from 'syuilo-password-strength'; import getPasswordStrength from 'syuilo-password-strength';
import { toUnicode } from 'punycode/'; import { toUnicode } from 'punycode/';
import MkButton from './ui/button.vue'; import MkButton from './ui/button.vue';
import MkCaptcha from './captcha.vue';
import MkInput from './form/input.vue'; import MkInput from './form/input.vue';
import MkSwitch from './form/switch.vue'; import MkSwitch from './form/switch.vue';
import MkCaptcha from '@/components/MkCaptcha.vue';
import * as config from '@/config'; import * as config from '@/config';
import * as os from '@/os'; import * as os from '@/os';
import { login } from '@/account'; import { login } from '@/account';

View File

@ -18,7 +18,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { } from 'vue'; import { } from 'vue';
import XSignup from './signup.vue'; import XSignup from '@/components/MkSignup.vue';
import XModalWindow from '@/components/ui/modal-window.vue'; import XModalWindow from '@/components/ui/modal-window.vue';
import { i18n } from '@/i18n'; import { i18n } from '@/i18n';

View File

@ -26,8 +26,8 @@
<script lang="ts" setup> <script lang="ts" setup>
import { } from 'vue'; import { } from 'vue';
import * as misskey from 'misskey-js'; import * as misskey from 'misskey-js';
import XPoll from './poll.vue'; import XMediaList from '@/components/MkMediaList.vue';
import XMediaList from './media-list.vue'; import XPoll from '@/components/MkPoll.vue';
import { i18n } from '@/i18n'; import { i18n } from '@/i18n';
const props = defineProps<{ const props = defineProps<{

View File

@ -4,7 +4,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { ref, computed, provide, onUnmounted } from 'vue'; import { ref, computed, provide, onUnmounted } from 'vue';
import XNotes from './notes.vue'; import XNotes from '@/components/MkNotes.vue';
import * as os from '@/os'; import * as os from '@/os';
import { stream } from '@/stream'; import { stream } from '@/stream';
import * as sound from '@/scripts/sound'; import * as sound from '@/scripts/sound';
@ -59,10 +59,10 @@ let connection2;
if (props.src === 'antenna') { if (props.src === 'antenna') {
endpoint = 'antennas/notes'; endpoint = 'antennas/notes';
query = { query = {
antennaId: props.antenna antennaId: props.antenna,
}; };
connection = stream.useChannel('antenna', { connection = stream.useChannel('antenna', {
antennaId: props.antenna antennaId: props.antenna,
}); });
connection.on('note', prepend); connection.on('note', prepend);
} else if (props.src === 'home') { } else if (props.src === 'home') {
@ -96,7 +96,7 @@ if (props.src === 'antenna') {
} else if (props.src === 'directs') { } else if (props.src === 'directs') {
endpoint = 'notes/mentions'; endpoint = 'notes/mentions';
query = { query = {
visibility: 'specified' visibility: 'specified',
}; };
const onNote = note => { const onNote = note => {
if (note.visibility === 'specified') { if (note.visibility === 'specified') {
@ -108,10 +108,10 @@ if (props.src === 'antenna') {
} else if (props.src === 'list') { } else if (props.src === 'list') {
endpoint = 'notes/user-list-timeline'; endpoint = 'notes/user-list-timeline';
query = { query = {
listId: props.list listId: props.list,
}; };
connection = stream.useChannel('userList', { connection = stream.useChannel('userList', {
listId: props.list listId: props.list,
}); });
connection.on('note', prepend); connection.on('note', prepend);
connection.on('userAdded', onUserAdded); connection.on('userAdded', onUserAdded);
@ -119,10 +119,10 @@ if (props.src === 'antenna') {
} else if (props.src === 'channel') { } else if (props.src === 'channel') {
endpoint = 'channels/timeline'; endpoint = 'channels/timeline';
query = { query = {
channelId: props.channel channelId: props.channel,
}; };
connection = stream.useChannel('channel', { connection = stream.useChannel('channel', {
channelId: props.channel channelId: props.channel,
}); });
connection.on('note', prepend); connection.on('note', prepend);
} }

View File

@ -13,7 +13,7 @@
import { ref } from 'vue'; import { ref } from 'vue';
import MkModal from '@/components/ui/modal.vue'; import MkModal from '@/components/ui/modal.vue';
import MkButton from '@/components/ui/button.vue'; import MkButton from '@/components/ui/button.vue';
import MkSparkle from '@/components/sparkle.vue'; import MkSparkle from '@/components/MkSparkle.vue';
import { version } from '@/config'; import { version } from '@/config';
import { i18n } from '@/i18n'; import { i18n } from '@/i18n';

Some files were not shown because too many files have changed in this diff Show More