mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-11-22 02:28:35 +01:00
wip
This commit is contained in:
parent
27c7900b0c
commit
d3c1926519
22 changed files with 24 additions and 23 deletions
|
@ -29,7 +29,7 @@ import { customEmojisMap } from '@/custom-emojis.js';
|
|||
|
||||
import { DI } from '@/di.js';
|
||||
|
||||
const mediaProxy = inject(DI.mediaProxy);
|
||||
const mediaProxy = inject(DI.mediaProxy)!;
|
||||
|
||||
const props = defineProps<{
|
||||
name: string;
|
||||
|
|
|
@ -15,7 +15,7 @@ import { computed, inject } from 'vue';
|
|||
|
||||
import { DI } from '@/di.js';
|
||||
|
||||
const mediaProxy = inject(DI.mediaProxy);
|
||||
const mediaProxy = inject(DI.mediaProxy)!;
|
||||
|
||||
const props = defineProps<{
|
||||
instance: {
|
||||
|
|
|
@ -44,7 +44,7 @@ import { i18n } from '@/i18n.js';
|
|||
|
||||
import { DI } from '@/di.js';
|
||||
|
||||
const mediaProxy = inject(DI.mediaProxy);
|
||||
const mediaProxy = inject(DI.mediaProxy)!;
|
||||
|
||||
const emit = defineEmits<{
|
||||
(ev: 'ok', cropped: Misskey.entities.DriveFile): void;
|
||||
|
|
|
@ -22,7 +22,7 @@ import { misskeyApiGet } from '@/scripts/misskey-api.js';
|
|||
|
||||
import { DI } from '@/di.js';
|
||||
|
||||
const mediaProxy = inject(DI.mediaProxy);
|
||||
const mediaProxy = inject(DI.mediaProxy)!;
|
||||
|
||||
const props = defineProps<{
|
||||
instance: Misskey.entities.FederationInstance;
|
||||
|
|
|
@ -16,7 +16,8 @@ import { instanceName } from '@/config.js';
|
|||
|
||||
import { DI } from '@/di.js';
|
||||
|
||||
const mediaProxy = inject(DI.mediaProxy);
|
||||
const serverMetadata = inject(DI.serverMetadata)!;
|
||||
const mediaProxy = inject(DI.mediaProxy)!;
|
||||
|
||||
const props = defineProps<{
|
||||
instance?: {
|
||||
|
@ -32,7 +33,7 @@ const instance = props.instance ?? {
|
|||
themeColor: (document.querySelector('meta[name="theme-color-orig"]') as HTMLMetaElement).content,
|
||||
};
|
||||
|
||||
const faviconUrl = computed(() => props.instance ? mediaProxy.getProxiedImageUrlNullable(props.instance.faviconUrl, 'preview') : mediaProxy.getProxiedImageUrlNullable(Instance.iconUrl, 'preview') ?? '/favicon.ico');
|
||||
const faviconUrl = computed(() => props.instance ? mediaProxy.getProxiedImageUrlNullable(props.instance.faviconUrl, 'preview') : mediaProxy.getProxiedImageUrlNullable(serverMetadata.iconUrl, 'preview') ?? '/favicon.ico');
|
||||
|
||||
const themeColor = instance.themeColor ?? '#777777';
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ import { $i, iAmModerator } from '@/account.js';
|
|||
|
||||
import { DI } from '@/di.js';
|
||||
|
||||
const mediaProxy = inject(DI.mediaProxy);
|
||||
const mediaProxy = inject(DI.mediaProxy)!;
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
image: Misskey.entities.DriveFile;
|
||||
|
|
|
@ -24,7 +24,7 @@ import { MkABehavior } from '@/components/global/MkA.vue';
|
|||
|
||||
import { DI } from '@/di.js';
|
||||
|
||||
const mediaProxy = inject(DI.mediaProxy);
|
||||
const mediaProxy = inject(DI.mediaProxy)!;
|
||||
|
||||
const props = defineProps<{
|
||||
username: string;
|
||||
|
|
|
@ -77,7 +77,7 @@ function prepend(note) {
|
|||
|
||||
tlNotesCount++;
|
||||
|
||||
if (instance.notesPerOneAd > 0 && tlNotesCount % instance.notesPerOneAd === 0) {
|
||||
if (serverMetadata.notesPerOneAd > 0 && tlNotesCount % serverMetadata.notesPerOneAd === 0) {
|
||||
note._shouldInsertAd_ = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ import { defaultStore } from '@/store.js';
|
|||
|
||||
import { DI } from '@/di.js';
|
||||
|
||||
const mediaProxy = inject(DI.mediaProxy);
|
||||
const mediaProxy = inject(DI.mediaProxy)!;
|
||||
|
||||
defineProps<{
|
||||
user: Misskey.entities.UserDetailed;
|
||||
|
|
|
@ -70,7 +70,7 @@ import { isFollowingVisibleForMe, isFollowersVisibleForMe } from '@/scripts/isFf
|
|||
import { DI } from '@/di.js';
|
||||
|
||||
const serverMetadata = inject(DI.serverMetadata)!;
|
||||
const mediaProxy = inject(DI.mediaProxy);
|
||||
const mediaProxy = inject(DI.mediaProxy)!;
|
||||
|
||||
const props = defineProps<{
|
||||
showing: boolean;
|
||||
|
|
|
@ -51,7 +51,7 @@ import { defaultStore } from '@/store.js';
|
|||
|
||||
import { DI } from '@/di.js';
|
||||
|
||||
const mediaProxy = inject(DI.mediaProxy);
|
||||
const mediaProxy = inject(DI.mediaProxy)!;
|
||||
|
||||
const animation = ref(defaultStore.state.animation);
|
||||
const squareAvatars = ref(defaultStore.state.squareAvatars);
|
||||
|
|
|
@ -37,7 +37,7 @@ import MkCustomEmojiDetailedDialog from '@/components/MkCustomEmojiDetailedDialo
|
|||
|
||||
import { DI } from '@/di.js';
|
||||
|
||||
const mediaProxy = inject(DI.mediaProxy);
|
||||
const mediaProxy = inject(DI.mediaProxy)!;
|
||||
|
||||
const props = defineProps<{
|
||||
name: string;
|
||||
|
|
|
@ -157,7 +157,7 @@ import MkTextarea from '@/components/MkTextarea.vue';
|
|||
|
||||
import { DI } from '@/di.js';
|
||||
|
||||
const mediaProxy = inject(DI.mediaProxy);
|
||||
const mediaProxy = inject(DI.mediaProxy)!;
|
||||
|
||||
const props = defineProps<{
|
||||
host: string;
|
||||
|
|
|
@ -124,7 +124,7 @@ import { MenuItem } from '@/types/menu';
|
|||
import { DI } from '@/di.js';
|
||||
|
||||
const serverMetadata = inject(DI.serverMetadata)!;
|
||||
const mediaProxy = inject(DI.mediaProxy);
|
||||
const mediaProxy = inject(DI.mediaProxy)!;
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
|
|
|
@ -229,7 +229,7 @@ watch(router.currentRef, (to) => {
|
|||
}
|
||||
});
|
||||
|
||||
const emailNotConfigured = computed(() => instance.enableEmail && ($i.email == null || !$i.emailVerified));
|
||||
const emailNotConfigured = computed(() => serverMetadata.enableEmail && ($i.email == null || !$i.emailVerified));
|
||||
|
||||
provideMetadataReceiver((metadataGetter) => {
|
||||
const info = metadataGetter();
|
||||
|
|
|
@ -178,7 +178,7 @@ import { useRouter } from '@/router/supplier.js';
|
|||
import { DI } from '@/di.js';
|
||||
|
||||
const serverMetadata = inject(DI.serverMetadata)!;
|
||||
const mediaProxy = inject(DI.mediaProxy);
|
||||
const mediaProxy = inject(DI.mediaProxy)!;
|
||||
|
||||
function calcAge(birthdate: string): number {
|
||||
const date = new Date(birthdate);
|
||||
|
|
|
@ -44,7 +44,7 @@ import { i18n } from '@/i18n.js';
|
|||
|
||||
import { DI } from '@/di.js';
|
||||
|
||||
const mediaProxy = inject(DI.mediaProxy);
|
||||
const mediaProxy = inject(DI.mediaProxy)!;
|
||||
|
||||
const props = defineProps<{
|
||||
user: Misskey.entities.UserDetailed;
|
||||
|
|
|
@ -48,7 +48,7 @@ import MkVisitorDashboard from '@/components/MkVisitorDashboard.vue';
|
|||
import { DI } from '@/di.js';
|
||||
|
||||
const serverMetadata = inject(DI.serverMetadata)!;
|
||||
const mediaProxy = inject(DI.mediaProxy);
|
||||
const mediaProxy = inject(DI.mediaProxy)!;
|
||||
|
||||
const instances = ref<Misskey.entities.FederationInstance[]>();
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ import { misskeyApi } from '@/scripts/misskey-api.js';
|
|||
|
||||
import { DI } from '@/di.js';
|
||||
|
||||
const mediaProxy = inject(DI.mediaProxy);
|
||||
const mediaProxy = inject(DI.mediaProxy)!;
|
||||
|
||||
const props = defineProps<{
|
||||
display?: 'marquee' | 'oneByOne';
|
||||
|
|
|
@ -58,7 +58,7 @@ const { widgetProps, configure } = useWidgetPropsManager(name,
|
|||
|
||||
import { DI } from '@/di.js';
|
||||
|
||||
const mediaProxy = inject(DI.mediaProxy);
|
||||
const mediaProxy = inject(DI.mediaProxy)!;
|
||||
|
||||
const instances = ref<Misskey.entities.FederationInstance[]>([]);
|
||||
const charts = ref<Misskey.entities.ChartsInstanceResponse[]>([]);
|
||||
|
|
|
@ -50,7 +50,7 @@ const { widgetProps, configure } = useWidgetPropsManager(name,
|
|||
|
||||
import { DI } from '@/di.js';
|
||||
|
||||
const mediaProxy = inject(DI.mediaProxy);
|
||||
const mediaProxy = inject(DI.mediaProxy)!;
|
||||
|
||||
const cloud = shallowRef<InstanceType<typeof MkTagCloud> | null>();
|
||||
const activeInstances = shallowRef<Misskey.entities.FederationInstance[] | null>(null);
|
||||
|
|
|
@ -58,7 +58,7 @@ const { widgetProps, configure } = useWidgetPropsManager(name,
|
|||
|
||||
import { DI } from '@/di.js';
|
||||
|
||||
const mediaProxy = inject(DI.mediaProxy);
|
||||
const mediaProxy = inject(DI.mediaProxy)!;
|
||||
|
||||
const connection = useStream().useChannel('main');
|
||||
const images = ref<Misskey.entities.DriveFile[]>([]);
|
||||
|
|
Loading…
Reference in a new issue