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