mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-30 03:13:10 +02:00
refactor(frontend): Reactivityで型を明示するように (#12791)
* refactor(frontend): Reactivityで型を明示するように * fix: プロパティの参照が誤っているのを修正 * fix: 初期化の値を空配列に書き換えていた部分をnullに置き換え
This commit is contained in:
parent
a9b42765f9
commit
75034d9240
110 changed files with 370 additions and 344 deletions
|
@ -381,6 +381,10 @@ export const meta = {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
optional: false, nullable: true,
|
optional: false, nullable: true,
|
||||||
},
|
},
|
||||||
|
shortName: {
|
||||||
|
type: 'string',
|
||||||
|
optional: false, nullable: true,
|
||||||
|
},
|
||||||
objectStorageS3ForcePathStyle: {
|
objectStorageS3ForcePathStyle: {
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
optional: false, nullable: false,
|
optional: false, nullable: false,
|
||||||
|
|
|
@ -29,37 +29,10 @@ export const meta = {
|
||||||
optional: false,
|
optional: false,
|
||||||
nullable: false,
|
nullable: false,
|
||||||
items: {
|
items: {
|
||||||
properties: {
|
type: 'object',
|
||||||
id: { type: 'string' },
|
optional: false,
|
||||||
firstRetrievedAt: { type: 'string' },
|
nullable: false,
|
||||||
host: { type: 'string' },
|
ref: 'FederationInstance',
|
||||||
usersCount: { type: 'number' },
|
|
||||||
notesCount: { type: 'number' },
|
|
||||||
followingCount: { type: 'number' },
|
|
||||||
followersCount: { type: 'number' },
|
|
||||||
isNotResponding: { type: 'boolean' },
|
|
||||||
isSuspended: { type: 'boolean' },
|
|
||||||
isBlocked: { type: 'boolean' },
|
|
||||||
softwareName: { type: 'string' },
|
|
||||||
softwareVersion: { type: 'string' },
|
|
||||||
openRegistrations: { type: 'boolean' },
|
|
||||||
name: { type: 'string' },
|
|
||||||
description: { type: 'string' },
|
|
||||||
maintainerName: { type: 'string' },
|
|
||||||
maintainerEmail: { type: 'string' },
|
|
||||||
isSilenced: { type: 'boolean' },
|
|
||||||
iconUrl: { type: 'string' },
|
|
||||||
faviconUrl: { type: 'string' },
|
|
||||||
themeColor: { type: 'string' },
|
|
||||||
infoUpdatedAt: {
|
|
||||||
type: 'string',
|
|
||||||
nullable: true,
|
|
||||||
},
|
|
||||||
latestRequestReceivedAt: {
|
|
||||||
type: 'string',
|
|
||||||
nullable: true,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
otherFollowersCount: { type: 'number' },
|
otherFollowersCount: { type: 'number' },
|
||||||
|
@ -68,42 +41,15 @@ export const meta = {
|
||||||
optional: false,
|
optional: false,
|
||||||
nullable: false,
|
nullable: false,
|
||||||
items: {
|
items: {
|
||||||
properties: {
|
type: 'object',
|
||||||
id: { type: 'string' },
|
optional: false,
|
||||||
firstRetrievedAt: { type: 'string' },
|
nullable: false,
|
||||||
host: { type: 'string' },
|
ref: 'FederationInstance',
|
||||||
usersCount: { type: 'number' },
|
|
||||||
notesCount: { type: 'number' },
|
|
||||||
followingCount: { type: 'number' },
|
|
||||||
followersCount: { type: 'number' },
|
|
||||||
isNotResponding: { type: 'boolean' },
|
|
||||||
isSuspended: { type: 'boolean' },
|
|
||||||
isBlocked: { type: 'boolean' },
|
|
||||||
softwareName: { type: 'string' },
|
|
||||||
softwareVersion: { type: 'string' },
|
|
||||||
openRegistrations: { type: 'boolean' },
|
|
||||||
name: { type: 'string' },
|
|
||||||
description: { type: 'string' },
|
|
||||||
maintainerName: { type: 'string' },
|
|
||||||
maintainerEmail: { type: 'string' },
|
|
||||||
isSilenced: { type: 'boolean' },
|
|
||||||
iconUrl: { type: 'string' },
|
|
||||||
faviconUrl: { type: 'string' },
|
|
||||||
themeColor: { type: 'string' },
|
|
||||||
infoUpdatedAt: {
|
|
||||||
type: 'string',
|
|
||||||
nullable: true,
|
|
||||||
},
|
|
||||||
latestRequestReceivedAt: {
|
|
||||||
type: 'string',
|
|
||||||
nullable: true,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
otherFollowingCount: { type: 'number' },
|
otherFollowingCount: { type: 'number' },
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export const paramDef = {
|
export const paramDef = {
|
||||||
|
|
|
@ -164,20 +164,34 @@ export const meta = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
optional: false, nullable: false,
|
optional: false, nullable: false,
|
||||||
properties: {
|
properties: {
|
||||||
place: {
|
id: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
optional: false, nullable: false,
|
optional: false, nullable: false,
|
||||||
|
format: 'id',
|
||||||
|
example: 'xxxxxxxxxx',
|
||||||
},
|
},
|
||||||
url: {
|
url: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
optional: false, nullable: false,
|
optional: false, nullable: false,
|
||||||
format: 'url',
|
format: 'url',
|
||||||
},
|
},
|
||||||
|
place: {
|
||||||
|
type: 'string',
|
||||||
|
optional: false, nullable: false,
|
||||||
|
},
|
||||||
|
ratio: {
|
||||||
|
type: 'number',
|
||||||
|
optional: false, nullable: false,
|
||||||
|
},
|
||||||
imageUrl: {
|
imageUrl: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
optional: false, nullable: false,
|
optional: false, nullable: false,
|
||||||
format: 'url',
|
format: 'url',
|
||||||
},
|
},
|
||||||
|
dayOfWeek: {
|
||||||
|
type: 'integer',
|
||||||
|
optional: false, nullable: false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -21,6 +21,10 @@ export const meta = {
|
||||||
res: {
|
res: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
optional: false, nullable: false,
|
optional: false, nullable: false,
|
||||||
|
properties: {
|
||||||
|
sourceLang: { type: 'string' },
|
||||||
|
text: { type: 'string' },
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
errors: {
|
errors: {
|
||||||
|
|
|
@ -67,7 +67,7 @@ const props = withDefaults(defineProps<{
|
||||||
withDescription: true,
|
withDescription: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
const achievements = ref();
|
const achievements = ref<Misskey.entities.UsersAchievementsResponse | null>(null);
|
||||||
const lockedAchievements = computed(() => ACHIEVEMENT_TYPES.filter(x => !(achievements.value ?? []).some(a => a.name === x)));
|
const lockedAchievements = computed(() => ACHIEVEMENT_TYPES.filter(x => !(achievements.value ?? []).some(a => a.name === x)));
|
||||||
|
|
||||||
function fetch() {
|
function fetch() {
|
||||||
|
|
|
@ -26,7 +26,7 @@ export type Captcha = {
|
||||||
getResponse(id: string): string;
|
getResponse(id: string): string;
|
||||||
};
|
};
|
||||||
|
|
||||||
type CaptchaProvider = 'hcaptcha' | 'recaptcha' | 'turnstile';
|
export type CaptchaProvider = 'hcaptcha' | 'recaptcha' | 'turnstile';
|
||||||
|
|
||||||
type CaptchaContainer = {
|
type CaptchaContainer = {
|
||||||
readonly [_ in CaptchaProvider]?: Captcha;
|
readonly [_ in CaptchaProvider]?: Captcha;
|
||||||
|
|
|
@ -29,7 +29,7 @@ const self = props.url.startsWith(local);
|
||||||
const attr = self ? 'to' : 'href';
|
const attr = self ? 'to' : 'href';
|
||||||
const target = self ? null : '_blank';
|
const target = self ? null : '_blank';
|
||||||
|
|
||||||
const el = ref();
|
const el = ref<HTMLElement>();
|
||||||
|
|
||||||
useTooltip(el, (showing) => {
|
useTooltip(el, (showing) => {
|
||||||
os.popup(defineAsyncComponent(() => import('@/components/MkUrlPreviewPopup.vue')), {
|
os.popup(defineAsyncComponent(() => import('@/components/MkUrlPreviewPopup.vue')), {
|
||||||
|
|
|
@ -27,7 +27,7 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
setup(props) {
|
setup(props) {
|
||||||
const contentEl = ref();
|
const contentEl = ref<HTMLElement>();
|
||||||
|
|
||||||
function calc() {
|
function calc() {
|
||||||
const eachLength = contentEl.value.offsetWidth / props.repeat;
|
const eachLength = contentEl.value.offsetWidth / props.repeat;
|
||||||
|
|
|
@ -250,7 +250,7 @@ const collapsed = ref(appearNote.value.cw == null && isLong);
|
||||||
const isDeleted = ref(false);
|
const isDeleted = ref(false);
|
||||||
const muted = ref(checkMute(appearNote.value, $i?.mutedWords));
|
const muted = ref(checkMute(appearNote.value, $i?.mutedWords));
|
||||||
const hardMuted = ref(props.withHardMute && checkMute(appearNote.value, $i?.hardMutedWords));
|
const hardMuted = ref(props.withHardMute && checkMute(appearNote.value, $i?.hardMutedWords));
|
||||||
const translation = ref<any>(null);
|
const translation = ref<Misskey.entities.NotesTranslateResponse | null>(null);
|
||||||
const translating = ref(false);
|
const translating = ref(false);
|
||||||
const showTicker = (defaultStore.state.instanceTicker === 'always') || (defaultStore.state.instanceTicker === 'remote' && appearNote.value.user.instance);
|
const showTicker = (defaultStore.state.instanceTicker === 'always') || (defaultStore.state.instanceTicker === 'remote' && appearNote.value.user.instance);
|
||||||
const canRenote = computed(() => ['public', 'home'].includes(appearNote.value.visibility) || (appearNote.value.visibility === 'followers' && appearNote.value.userId === $i.id));
|
const canRenote = computed(() => ['public', 'home'].includes(appearNote.value.visibility) || (appearNote.value.visibility === 'followers' && appearNote.value.userId === $i.id));
|
||||||
|
|
|
@ -273,7 +273,7 @@ const isMyRenote = $i && ($i.id === note.value.userId);
|
||||||
const showContent = ref(false);
|
const showContent = ref(false);
|
||||||
const isDeleted = ref(false);
|
const isDeleted = ref(false);
|
||||||
const muted = ref($i ? checkWordMute(appearNote.value, $i, $i.mutedWords) : false);
|
const muted = ref($i ? checkWordMute(appearNote.value, $i, $i.mutedWords) : false);
|
||||||
const translation = ref(null);
|
const translation = ref<Misskey.entities.NotesTranslateResponse | null>(null);
|
||||||
const translating = ref(false);
|
const translating = ref(false);
|
||||||
const parsed = appearNote.value.text ? mfm.parse(appearNote.value.text) : null;
|
const parsed = appearNote.value.text ? mfm.parse(appearNote.value.text) : null;
|
||||||
const urls = parsed ? extractUrlFromMfm(parsed) : null;
|
const urls = parsed ? extractUrlFromMfm(parsed) : null;
|
||||||
|
@ -299,7 +299,7 @@ provide('react', (reaction: string) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const tab = ref('replies');
|
const tab = ref('replies');
|
||||||
const reactionTabType = ref(null);
|
const reactionTabType = ref<string | null>(null);
|
||||||
|
|
||||||
const renotesPagination = computed(() => ({
|
const renotesPagination = computed(() => ({
|
||||||
endpoint: 'notes/renotes',
|
endpoint: 'notes/renotes',
|
||||||
|
|
|
@ -52,7 +52,7 @@ const emit = defineEmits<{
|
||||||
const dialog = shallowRef<InstanceType<typeof MkModalWindow>>();
|
const dialog = shallowRef<InstanceType<typeof MkModalWindow>>();
|
||||||
const passwordInput = shallowRef<InstanceType<typeof MkInput>>();
|
const passwordInput = shallowRef<InstanceType<typeof MkInput>>();
|
||||||
const password = ref('');
|
const password = ref('');
|
||||||
const token = ref(null);
|
const token = ref<string | null>(null);
|
||||||
|
|
||||||
function onClose() {
|
function onClose() {
|
||||||
emit('cancelled');
|
emit('cancelled');
|
||||||
|
|
|
@ -185,14 +185,14 @@ watch(showPreview, () => defaultStore.set('showPreview', showPreview.value));
|
||||||
const cw = ref<string | null>(props.initialCw ?? null);
|
const cw = ref<string | null>(props.initialCw ?? null);
|
||||||
const localOnly = ref<boolean>(props.initialLocalOnly ?? defaultStore.state.rememberNoteVisibility ? defaultStore.state.localOnly : defaultStore.state.defaultNoteLocalOnly);
|
const localOnly = ref<boolean>(props.initialLocalOnly ?? defaultStore.state.rememberNoteVisibility ? defaultStore.state.localOnly : defaultStore.state.defaultNoteLocalOnly);
|
||||||
const visibility = ref(props.initialVisibility ?? (defaultStore.state.rememberNoteVisibility ? defaultStore.state.visibility : defaultStore.state.defaultNoteVisibility) as typeof Misskey.noteVisibilities[number]);
|
const visibility = ref(props.initialVisibility ?? (defaultStore.state.rememberNoteVisibility ? defaultStore.state.visibility : defaultStore.state.defaultNoteVisibility) as typeof Misskey.noteVisibilities[number]);
|
||||||
const visibleUsers = ref([]);
|
const visibleUsers = ref<Misskey.entities.UserDetailed[]>([]);
|
||||||
if (props.initialVisibleUsers) {
|
if (props.initialVisibleUsers) {
|
||||||
props.initialVisibleUsers.forEach(pushVisibleUser);
|
props.initialVisibleUsers.forEach(pushVisibleUser);
|
||||||
}
|
}
|
||||||
const reactionAcceptance = ref(defaultStore.state.reactionAcceptance);
|
const reactionAcceptance = ref(defaultStore.state.reactionAcceptance);
|
||||||
const autocomplete = ref(null);
|
const autocomplete = ref(null);
|
||||||
const draghover = ref(false);
|
const draghover = ref(false);
|
||||||
const quoteId = ref(null);
|
const quoteId = ref<string | null>(null);
|
||||||
const hasNotSpecifiedMentions = ref(false);
|
const hasNotSpecifiedMentions = ref(false);
|
||||||
const recentHashtags = ref(JSON.parse(miLocalStorage.getItem('hashtags') ?? '[]'));
|
const recentHashtags = ref(JSON.parse(miLocalStorage.getItem('hashtags') ?? '[]'));
|
||||||
const imeText = ref('');
|
const imeText = ref('');
|
||||||
|
|
|
@ -28,10 +28,11 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { } from 'vue';
|
import { } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
role: any;
|
role: Misskey.entities.Role;
|
||||||
forModeration: boolean;
|
forModeration: boolean;
|
||||||
detailed: boolean;
|
detailed: boolean;
|
||||||
}>(), {
|
}>(), {
|
||||||
|
|
|
@ -65,10 +65,10 @@ const opening = ref(false);
|
||||||
const changed = ref(false);
|
const changed = ref(false);
|
||||||
const invalid = ref(false);
|
const invalid = ref(false);
|
||||||
const filled = computed(() => v.value !== '' && v.value != null);
|
const filled = computed(() => v.value !== '' && v.value != null);
|
||||||
const inputEl = ref(null);
|
const inputEl = ref<HTMLObjectElement | null>(null);
|
||||||
const prefixEl = ref(null);
|
const prefixEl = ref<HTMLElement | null>(null);
|
||||||
const suffixEl = ref(null);
|
const suffixEl = ref<HTMLElement | null>(null);
|
||||||
const container = ref(null);
|
const container = ref<HTMLElement | null>(null);
|
||||||
const height =
|
const height =
|
||||||
props.small ? 33 :
|
props.small ? 33 :
|
||||||
props.large ? 39 :
|
props.large ? 39 :
|
||||||
|
|
|
@ -71,8 +71,6 @@ const host = ref(toUnicode(configHost));
|
||||||
const totpLogin = ref(false);
|
const totpLogin = ref(false);
|
||||||
const queryingKey = ref(false);
|
const queryingKey = ref(false);
|
||||||
const credentialRequest = ref<CredentialRequestOptions | null>(null);
|
const credentialRequest = ref<CredentialRequestOptions | null>(null);
|
||||||
const hCaptchaResponse = ref(null);
|
|
||||||
const reCaptchaResponse = ref(null);
|
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(ev: 'login', v: any): void;
|
(ev: 'login', v: any): void;
|
||||||
|
@ -126,8 +124,6 @@ async function queryKey(): Promise<void> {
|
||||||
username: username.value,
|
username: username.value,
|
||||||
password: password.value,
|
password: password.value,
|
||||||
credential: credential.toJSON(),
|
credential: credential.toJSON(),
|
||||||
'hcaptcha-response': hCaptchaResponse.value,
|
|
||||||
'g-recaptcha-response': reCaptchaResponse.value,
|
|
||||||
});
|
});
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
emit('login', res);
|
emit('login', res);
|
||||||
|
@ -149,8 +145,6 @@ function onSubmit(): void {
|
||||||
os.api('signin', {
|
os.api('signin', {
|
||||||
username: username.value,
|
username: username.value,
|
||||||
password: password.value,
|
password: password.value,
|
||||||
'hcaptcha-response': hCaptchaResponse.value,
|
|
||||||
'g-recaptcha-response': reCaptchaResponse.value,
|
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
totpLogin.value = true;
|
totpLogin.value = true;
|
||||||
signing.value = false;
|
signing.value = false;
|
||||||
|
@ -168,8 +162,6 @@ function onSubmit(): void {
|
||||||
os.api('signin', {
|
os.api('signin', {
|
||||||
username: username.value,
|
username: username.value,
|
||||||
password: password.value,
|
password: password.value,
|
||||||
'hcaptcha-response': hCaptchaResponse.value,
|
|
||||||
'g-recaptcha-response': reCaptchaResponse.value,
|
|
||||||
token: user.value?.twoFactorEnabled ? token.value : undefined,
|
token: user.value?.twoFactorEnabled ? token.value : undefined,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
emit('login', res);
|
emit('login', res);
|
||||||
|
|
|
@ -115,9 +115,9 @@ const emailState = ref<null | 'wait' | 'ok' | 'unavailable:used' | 'unavailable:
|
||||||
const passwordStrength = ref<'' | 'low' | 'medium' | 'high'>('');
|
const passwordStrength = ref<'' | 'low' | 'medium' | 'high'>('');
|
||||||
const passwordRetypeState = ref<null | 'match' | 'not-match'>(null);
|
const passwordRetypeState = ref<null | 'match' | 'not-match'>(null);
|
||||||
const submitting = ref<boolean>(false);
|
const submitting = ref<boolean>(false);
|
||||||
const hCaptchaResponse = ref(null);
|
const hCaptchaResponse = ref<string | null>(null);
|
||||||
const reCaptchaResponse = ref(null);
|
const reCaptchaResponse = ref<string | null>(null);
|
||||||
const turnstileResponse = ref(null);
|
const turnstileResponse = ref<string | null>(null);
|
||||||
const usernameAbortController = ref<null | AbortController>(null);
|
const usernameAbortController = ref<null | AbortController>(null);
|
||||||
const emailAbortController = ref<null | AbortController>(null);
|
const emailAbortController = ref<null | AbortController>(null);
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,14 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, onUnmounted, ref, shallowRef } from 'vue';
|
import { onMounted, onUnmounted, ref, shallowRef } from 'vue';
|
||||||
|
|
||||||
const particles = ref([]);
|
const particles = ref<{
|
||||||
|
id: string,
|
||||||
|
x: number,
|
||||||
|
y: number,
|
||||||
|
size: number,
|
||||||
|
dur: number,
|
||||||
|
color: string
|
||||||
|
}[]>([]);
|
||||||
const el = shallowRef<HTMLElement>();
|
const el = shallowRef<HTMLElement>();
|
||||||
const width = ref(0);
|
const width = ref(0);
|
||||||
const height = ref(0);
|
const height = ref(0);
|
||||||
|
|
|
@ -66,7 +66,7 @@ const props = defineProps<{
|
||||||
announcement?: any,
|
announcement?: any,
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const dialog = ref(null);
|
const dialog = ref<InstanceType<typeof MkModalWindow> | null>(null);
|
||||||
const title = ref<string>(props.announcement ? props.announcement.title : '');
|
const title = ref<string>(props.announcement ? props.announcement.title : '');
|
||||||
const text = ref<string>(props.announcement ? props.announcement.text : '');
|
const text = ref<string>(props.announcement ? props.announcement.text : '');
|
||||||
const icon = ref<string>(props.announcement ? props.announcement.icon : 'info');
|
const icon = ref<string>(props.announcement ? props.announcement.icon : 'info');
|
||||||
|
|
|
@ -77,7 +77,7 @@ const widgetRefs = {};
|
||||||
const configWidget = (id: string) => {
|
const configWidget = (id: string) => {
|
||||||
widgetRefs[id].configure();
|
widgetRefs[id].configure();
|
||||||
};
|
};
|
||||||
const widgetAdderSelected = ref(null);
|
const widgetAdderSelected = ref<string | null>(null);
|
||||||
const addWidget = () => {
|
const addWidget = () => {
|
||||||
if (widgetAdderSelected.value == null) return;
|
if (widgetAdderSelected.value == null) return;
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ const props = defineProps<{
|
||||||
const pending = ref(true);
|
const pending = ref(true);
|
||||||
const resolved = ref(false);
|
const resolved = ref(false);
|
||||||
const rejected = ref(false);
|
const rejected = ref(false);
|
||||||
const result = ref(null);
|
const result = ref<any>(null);
|
||||||
|
|
||||||
const process = () => {
|
const process = () => {
|
||||||
if (props.p == null) {
|
if (props.p == null) {
|
||||||
|
|
|
@ -11,7 +11,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, Ref, ref } from 'vue';
|
import { onMounted, ref } from 'vue';
|
||||||
import * as Misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import { NoteBlock } from './block.type.js';
|
import { NoteBlock } from './block.type.js';
|
||||||
import MkNote from '@/components/MkNote.vue';
|
import MkNote from '@/components/MkNote.vue';
|
||||||
|
@ -23,7 +23,7 @@ const props = defineProps<{
|
||||||
page: Misskey.entities.Page,
|
page: Misskey.entities.Page,
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const note: Ref<Misskey.entities.Note | null> = ref(null);
|
const note = ref<Misskey.entities.Note | null>(null);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
os.api('notes/show', { noteId: props.block.note })
|
os.api('notes/show', { noteId: props.block.note })
|
||||||
|
|
|
@ -313,8 +313,13 @@ const patrons = [
|
||||||
const thereIsTreasure = ref($i && !claimedAchievements.includes('foundTreasure'));
|
const thereIsTreasure = ref($i && !claimedAchievements.includes('foundTreasure'));
|
||||||
|
|
||||||
let easterEggReady = false;
|
let easterEggReady = false;
|
||||||
const easterEggEmojis = ref([]);
|
const easterEggEmojis = ref<{
|
||||||
const easterEggEngine = ref(null);
|
id: string,
|
||||||
|
top: number,
|
||||||
|
left: number,
|
||||||
|
emoji: string
|
||||||
|
}[]>([]);
|
||||||
|
const easterEggEngine = ref<{ stop: () => void } | null>(null);
|
||||||
const containerEl = shallowRef<HTMLElement>();
|
const containerEl = shallowRef<HTMLElement>();
|
||||||
|
|
||||||
function iconLoaded() {
|
function iconLoaded() {
|
||||||
|
|
|
@ -103,6 +103,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, watch, ref } from 'vue';
|
import { computed, watch, ref } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import XEmojis from './about.emojis.vue';
|
import XEmojis from './about.emojis.vue';
|
||||||
import XFederation from './about.federation.vue';
|
import XFederation from './about.federation.vue';
|
||||||
import { version, host } from '@/config.js';
|
import { version, host } from '@/config.js';
|
||||||
|
@ -126,7 +127,7 @@ const props = withDefaults(defineProps<{
|
||||||
initialTab: 'overview',
|
initialTab: 'overview',
|
||||||
});
|
});
|
||||||
|
|
||||||
const stats = ref(null);
|
const stats = ref<Misskey.entities.StatsResponse | null>(null);
|
||||||
const tab = ref(props.initialTab);
|
const tab = ref(props.initialTab);
|
||||||
|
|
||||||
watch(tab, () => {
|
watch(tab, () => {
|
||||||
|
|
|
@ -68,6 +68,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, ref } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import MkSwitch from '@/components/MkSwitch.vue';
|
import MkSwitch from '@/components/MkSwitch.vue';
|
||||||
import MkObjectView from '@/components/MkObjectView.vue';
|
import MkObjectView from '@/components/MkObjectView.vue';
|
||||||
|
@ -83,8 +84,8 @@ import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||||
import { iAmAdmin, iAmModerator } from '@/account.js';
|
import { iAmAdmin, iAmModerator } from '@/account.js';
|
||||||
|
|
||||||
const tab = ref('overview');
|
const tab = ref('overview');
|
||||||
const file = ref<any>(null);
|
const file = ref<Misskey.entities.DriveFile | null>(null);
|
||||||
const info = ref<any>(null);
|
const info = ref<Misskey.entities.AdminDriveShowFileResponse | null>(null);
|
||||||
const isSensitive = ref<boolean>(false);
|
const isSensitive = ref<boolean>(false);
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
|
|
|
@ -238,9 +238,9 @@ const tab = ref(props.initialTab);
|
||||||
const chartSrc = ref('per-user-notes');
|
const chartSrc = ref('per-user-notes');
|
||||||
const user = ref<null | Misskey.entities.UserDetailed>();
|
const user = ref<null | Misskey.entities.UserDetailed>();
|
||||||
const init = ref<ReturnType<typeof createFetcher>>();
|
const init = ref<ReturnType<typeof createFetcher>>();
|
||||||
const info = ref();
|
const info = ref<any>();
|
||||||
const ips = ref(null);
|
const ips = ref<Misskey.entities.AdminGetUserIpsResponse | null>(null);
|
||||||
const ap = ref(null);
|
const ap = ref<any>(null);
|
||||||
const moderator = ref(false);
|
const moderator = ref(false);
|
||||||
const silenced = ref(false);
|
const silenced = ref(false);
|
||||||
const suspended = ref(false);
|
const suspended = ref(false);
|
||||||
|
|
|
@ -70,7 +70,7 @@ const metadata = injectPageMetadata();
|
||||||
const el = shallowRef<HTMLElement>(null);
|
const el = shallowRef<HTMLElement>(null);
|
||||||
const tabRefs = {};
|
const tabRefs = {};
|
||||||
const tabHighlightEl = shallowRef<HTMLElement | null>(null);
|
const tabHighlightEl = shallowRef<HTMLElement | null>(null);
|
||||||
const bg = ref(null);
|
const bg = ref<string | null>(null);
|
||||||
const height = ref(0);
|
const height = ref(0);
|
||||||
const hasTabs = computed(() => {
|
const hasTabs = computed(() => {
|
||||||
return props.tabs && props.tabs.length > 0;
|
return props.tabs && props.tabs.length > 0;
|
||||||
|
|
|
@ -86,6 +86,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, computed } from 'vue';
|
import { ref, computed } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import XHeader from './_header_.vue';
|
import XHeader from './_header_.vue';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import MkInput from '@/components/MkInput.vue';
|
import MkInput from '@/components/MkInput.vue';
|
||||||
|
@ -98,7 +99,7 @@ import * as os from '@/os.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||||
|
|
||||||
const ads = ref<any[]>([]);
|
const ads = ref<Misskey.entities.Ad[]>([]);
|
||||||
|
|
||||||
// ISO形式はTZがUTCになってしまうので、TZ分ずらして時間を初期化
|
// ISO形式はTZがUTCになってしまうので、TZ分ずらして時間を初期化
|
||||||
const localTime = new Date();
|
const localTime = new Date();
|
||||||
|
|
|
@ -65,6 +65,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { defineAsyncComponent, ref } from 'vue';
|
import { defineAsyncComponent, ref } from 'vue';
|
||||||
|
import type { CaptchaProvider } from '@/components/MkCaptcha.vue';
|
||||||
import MkRadios from '@/components/MkRadios.vue';
|
import MkRadios from '@/components/MkRadios.vue';
|
||||||
import MkInput from '@/components/MkInput.vue';
|
import MkInput from '@/components/MkInput.vue';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
|
@ -76,7 +77,7 @@ import { i18n } from '@/i18n.js';
|
||||||
|
|
||||||
const MkCaptcha = defineAsyncComponent(() => import('@/components/MkCaptcha.vue'));
|
const MkCaptcha = defineAsyncComponent(() => import('@/components/MkCaptcha.vue'));
|
||||||
|
|
||||||
const provider = ref(null);
|
const provider = ref<CaptchaProvider | null>(null);
|
||||||
const hcaptchaSiteKey = ref<string | null>(null);
|
const hcaptchaSiteKey = ref<string | null>(null);
|
||||||
const hcaptchaSecretKey = ref<string | null>(null);
|
const hcaptchaSecretKey = ref<string | null>(null);
|
||||||
const recaptchaSiteKey = ref<string | null>(null);
|
const recaptchaSiteKey = ref<string | null>(null);
|
||||||
|
|
|
@ -113,9 +113,9 @@ const app192IconUrl = ref<string | null>(null);
|
||||||
const app512IconUrl = ref<string | null>(null);
|
const app512IconUrl = ref<string | null>(null);
|
||||||
const bannerUrl = ref<string | null>(null);
|
const bannerUrl = ref<string | null>(null);
|
||||||
const backgroundImageUrl = ref<string | null>(null);
|
const backgroundImageUrl = ref<string | null>(null);
|
||||||
const themeColor = ref<any>(null);
|
const themeColor = ref<string | null>(null);
|
||||||
const defaultLightTheme = ref<any>(null);
|
const defaultLightTheme = ref<string | null>(null);
|
||||||
const defaultDarkTheme = ref<any>(null);
|
const defaultDarkTheme = ref<string | null>(null);
|
||||||
const serverErrorImageUrl = ref<string | null>(null);
|
const serverErrorImageUrl = ref<string | null>(null);
|
||||||
const infoImageUrl = ref<string | null>(null);
|
const infoImageUrl = ref<string | null>(null);
|
||||||
const notFoundImageUrl = ref<string | null>(null);
|
const notFoundImageUrl = ref<string | null>(null);
|
||||||
|
|
|
@ -79,7 +79,7 @@ import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
|
|
||||||
const enableEmail = ref<boolean>(false);
|
const enableEmail = ref<boolean>(false);
|
||||||
const email = ref<any>(null);
|
const email = ref<string | null>(null);
|
||||||
const smtpSecure = ref<boolean>(false);
|
const smtpSecure = ref<boolean>(false);
|
||||||
const smtpHost = ref<string>('');
|
const smtpHost = ref<string>('');
|
||||||
const smtpPort = ref<number>(0);
|
const smtpPort = ref<number>(0);
|
||||||
|
|
|
@ -46,7 +46,7 @@ import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||||
|
|
||||||
const origin = ref('local');
|
const origin = ref('local');
|
||||||
const type = ref(null);
|
const type = ref<string | null>(null);
|
||||||
const searchHost = ref('');
|
const searchHost = ref('');
|
||||||
const userId = ref('');
|
const userId = ref('');
|
||||||
const viewMode = ref('grid');
|
const viewMode = ref('grid');
|
||||||
|
|
|
@ -28,7 +28,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onActivated, onMounted, onUnmounted, provide, watch, ref, computed } from 'vue';
|
import { ComputedRef, Ref, onActivated, onMounted, onUnmounted, provide, watch, ref, computed } from 'vue';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import MkSuperMenu from '@/components/MkSuperMenu.vue';
|
import MkSuperMenu from '@/components/MkSuperMenu.vue';
|
||||||
import MkInfo from '@/components/MkInfo.vue';
|
import MkInfo from '@/components/MkInfo.vue';
|
||||||
|
@ -36,7 +36,7 @@ import { instance } from '@/instance.js';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { lookupUser, lookupUserByEmail } from '@/scripts/lookup-user.js';
|
import { lookupUser, lookupUserByEmail } from '@/scripts/lookup-user.js';
|
||||||
import { useRouter } from '@/router.js';
|
import { useRouter } from '@/router.js';
|
||||||
import { definePageMetadata, provideMetadataReceiver } from '@/scripts/page-metadata.js';
|
import { PageMetadata, definePageMetadata, provideMetadataReceiver } from '@/scripts/page-metadata.js';
|
||||||
|
|
||||||
const isEmpty = (x: string | null) => x == null || x === '';
|
const isEmpty = (x: string | null) => x == null || x === '';
|
||||||
|
|
||||||
|
@ -51,10 +51,10 @@ const indexInfo = {
|
||||||
provide('shouldOmitHeaderTitle', false);
|
provide('shouldOmitHeaderTitle', false);
|
||||||
|
|
||||||
const INFO = ref(indexInfo);
|
const INFO = ref(indexInfo);
|
||||||
const childInfo = ref(null);
|
const childInfo: Ref<ComputedRef<PageMetadata> | null> = ref(null);
|
||||||
const narrow = ref(false);
|
const narrow = ref(false);
|
||||||
const view = ref(null);
|
const view = ref(null);
|
||||||
const el = ref(null);
|
const el = ref<HTMLDivElement | null>(null);
|
||||||
const pageProps = ref({});
|
const pageProps = ref({});
|
||||||
let noMaintainerInformation = isEmpty(instance.maintainerName) || isEmpty(instance.maintainerEmail);
|
let noMaintainerInformation = isEmpty(instance.maintainerName) || isEmpty(instance.maintainerEmail);
|
||||||
let noBotProtection = !instance.disableRegistration && !instance.enableHcaptcha && !instance.enableRecaptcha && !instance.enableTurnstile;
|
let noBotProtection = !instance.disableRegistration && !instance.enableHcaptcha && !instance.enableRecaptcha && !instance.enableTurnstile;
|
||||||
|
|
|
@ -42,7 +42,7 @@ import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||||
|
|
||||||
const logs = shallowRef<InstanceType<typeof MkPagination>>();
|
const logs = shallowRef<InstanceType<typeof MkPagination>>();
|
||||||
|
|
||||||
const type = ref(null);
|
const type = ref<string | null>(null);
|
||||||
const moderatorId = ref('');
|
const moderatorId = ref('');
|
||||||
|
|
||||||
const pagination = {
|
const pagination = {
|
||||||
|
|
|
@ -47,15 +47,15 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, ref } from 'vue';
|
import { onMounted, ref } from 'vue';
|
||||||
import XPie from './overview.pie.vue';
|
import XPie, { type InstanceForPie } from './overview.pie.vue';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import number from '@/filters/number.js';
|
import number from '@/filters/number.js';
|
||||||
import MkNumberDiff from '@/components/MkNumberDiff.vue';
|
import MkNumberDiff from '@/components/MkNumberDiff.vue';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { useChartTooltip } from '@/scripts/use-chart-tooltip.js';
|
import { useChartTooltip } from '@/scripts/use-chart-tooltip.js';
|
||||||
|
|
||||||
const topSubInstancesForPie = ref<any>(null);
|
const topSubInstancesForPie = ref<InstanceForPie[] | null>(null);
|
||||||
const topPubInstancesForPie = ref<any>(null);
|
const topPubInstancesForPie = ref<InstanceForPie[] | null>(null);
|
||||||
const federationPubActive = ref<number | null>(null);
|
const federationPubActive = ref<number | null>(null);
|
||||||
const federationPubActiveDiff = ref<number | null>(null);
|
const federationPubActiveDiff = ref<number | null>(null);
|
||||||
const federationSubActive = ref<number | null>(null);
|
const federationSubActive = ref<number | null>(null);
|
||||||
|
@ -72,22 +72,28 @@ onMounted(async () => {
|
||||||
federationSubActiveDiff.value = chart.subActive[0] - chart.subActive[1];
|
federationSubActiveDiff.value = chart.subActive[0] - chart.subActive[1];
|
||||||
|
|
||||||
os.apiGet('federation/stats', { limit: 10 }).then(res => {
|
os.apiGet('federation/stats', { limit: 10 }).then(res => {
|
||||||
topSubInstancesForPie.value = res.topSubInstances.map(x => ({
|
topSubInstancesForPie.value = [
|
||||||
name: x.host,
|
...res.topSubInstances.map(x => ({
|
||||||
color: x.themeColor,
|
name: x.host,
|
||||||
value: x.followersCount,
|
color: x.themeColor,
|
||||||
onClick: () => {
|
value: x.followersCount,
|
||||||
os.pageWindow(`/instance-info/${x.host}`);
|
onClick: () => {
|
||||||
},
|
os.pageWindow(`/instance-info/${x.host}`);
|
||||||
})).concat([{ name: '(other)', color: '#80808080', value: res.otherFollowersCount }]);
|
},
|
||||||
topPubInstancesForPie.value = res.topPubInstances.map(x => ({
|
})),
|
||||||
name: x.host,
|
{ name: '(other)', color: '#80808080', value: res.otherFollowersCount },
|
||||||
color: x.themeColor,
|
];
|
||||||
value: x.followingCount,
|
topPubInstancesForPie.value = [
|
||||||
onClick: () => {
|
...res.topPubInstances.map(x => ({
|
||||||
os.pageWindow(`/instance-info/${x.host}`);
|
name: x.host,
|
||||||
},
|
color: x.themeColor,
|
||||||
})).concat([{ name: '(other)', color: '#80808080', value: res.otherFollowingCount }]);
|
value: x.followingCount,
|
||||||
|
onClick: () => {
|
||||||
|
os.pageWindow(`/instance-info/${x.host}`);
|
||||||
|
},
|
||||||
|
})),
|
||||||
|
{ name: '(other)', color: '#80808080', value: res.otherFollowingCount },
|
||||||
|
];
|
||||||
});
|
});
|
||||||
|
|
||||||
fetching.value = false;
|
fetching.value = false;
|
||||||
|
|
|
@ -18,12 +18,13 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { useInterval } from '@/scripts/use-interval.js';
|
import { useInterval } from '@/scripts/use-interval.js';
|
||||||
import MkInstanceCardMini from '@/components/MkInstanceCardMini.vue';
|
import MkInstanceCardMini from '@/components/MkInstanceCardMini.vue';
|
||||||
import { defaultStore } from '@/store.js';
|
import { defaultStore } from '@/store.js';
|
||||||
|
|
||||||
const instances = ref([]);
|
const instances = ref<Misskey.entities.FederationInstance[]>([]);
|
||||||
const fetching = ref(true);
|
const fetching = ref(true);
|
||||||
|
|
||||||
const fetch = async () => {
|
const fetch = async () => {
|
||||||
|
|
|
@ -18,10 +18,11 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, ref } from 'vue';
|
import { onMounted, ref } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { defaultStore } from '@/store.js';
|
import { defaultStore } from '@/store.js';
|
||||||
|
|
||||||
const moderators = ref<any>(null);
|
const moderators = ref<Misskey.entities.UserDetailed[] | null>(null);
|
||||||
const fetching = ref(true);
|
const fetching = ref(true);
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
|
|
@ -13,10 +13,17 @@ import { Chart } from 'chart.js';
|
||||||
import { useChartTooltip } from '@/scripts/use-chart-tooltip.js';
|
import { useChartTooltip } from '@/scripts/use-chart-tooltip.js';
|
||||||
import { initChart } from '@/scripts/init-chart.js';
|
import { initChart } from '@/scripts/init-chart.js';
|
||||||
|
|
||||||
|
export type InstanceForPie = {
|
||||||
|
name: string,
|
||||||
|
color: string | null,
|
||||||
|
value: number,
|
||||||
|
onClick?: () => void
|
||||||
|
};
|
||||||
|
|
||||||
initChart();
|
initChart();
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
data: { name: string; value: number; color: string; onClick?: () => void }[];
|
data: InstanceForPie[];
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const chartEl = shallowRef<HTMLCanvasElement>(null);
|
const chartEl = shallowRef<HTMLCanvasElement>(null);
|
||||||
|
|
|
@ -62,6 +62,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, ref } from 'vue';
|
import { onMounted, ref } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import MkNumberDiff from '@/components/MkNumberDiff.vue';
|
import MkNumberDiff from '@/components/MkNumberDiff.vue';
|
||||||
import MkNumber from '@/components/MkNumber.vue';
|
import MkNumber from '@/components/MkNumber.vue';
|
||||||
|
@ -69,7 +70,7 @@ import { i18n } from '@/i18n.js';
|
||||||
import { customEmojis } from '@/custom-emojis.js';
|
import { customEmojis } from '@/custom-emojis.js';
|
||||||
import { defaultStore } from '@/store.js';
|
import { defaultStore } from '@/store.js';
|
||||||
|
|
||||||
const stats = ref<any>(null);
|
const stats = ref<Misskey.entities.StatsResponse | null>(null);
|
||||||
const usersComparedToThePrevDay = ref<number>();
|
const usersComparedToThePrevDay = ref<number>();
|
||||||
const notesComparedToThePrevDay = ref<number>();
|
const notesComparedToThePrevDay = ref<number>();
|
||||||
const onlineUsersCount = ref(0);
|
const onlineUsersCount = ref(0);
|
||||||
|
|
|
@ -18,12 +18,13 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { useInterval } from '@/scripts/use-interval.js';
|
import { useInterval } from '@/scripts/use-interval.js';
|
||||||
import MkUserCardMini from '@/components/MkUserCardMini.vue';
|
import MkUserCardMini from '@/components/MkUserCardMini.vue';
|
||||||
import { defaultStore } from '@/store.js';
|
import { defaultStore } from '@/store.js';
|
||||||
|
|
||||||
const newUsers = ref(null);
|
const newUsers = ref<Misskey.entities.UserDetailed[] | null>(null);
|
||||||
const fetching = ref(true);
|
const fetching = ref(true);
|
||||||
|
|
||||||
const fetch = async () => {
|
const fetch = async () => {
|
||||||
|
|
|
@ -66,6 +66,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { markRaw, onMounted, onBeforeUnmount, nextTick, shallowRef, ref, computed } from 'vue';
|
import { markRaw, onMounted, onBeforeUnmount, nextTick, shallowRef, ref, computed } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import XFederation from './overview.federation.vue';
|
import XFederation from './overview.federation.vue';
|
||||||
import XInstances from './overview.instances.vue';
|
import XInstances from './overview.instances.vue';
|
||||||
import XQueue from './overview.queue.vue';
|
import XQueue from './overview.queue.vue';
|
||||||
|
@ -76,6 +77,7 @@ import XStats from './overview.stats.vue';
|
||||||
import XRetention from './overview.retention.vue';
|
import XRetention from './overview.retention.vue';
|
||||||
import XModerators from './overview.moderators.vue';
|
import XModerators from './overview.moderators.vue';
|
||||||
import XHeatmap from './overview.heatmap.vue';
|
import XHeatmap from './overview.heatmap.vue';
|
||||||
|
import type { InstanceForPie } from './overview.pie.vue';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { useStream } from '@/stream.js';
|
import { useStream } from '@/stream.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
|
@ -83,15 +85,15 @@ import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||||
import MkFoldableSection from '@/components/MkFoldableSection.vue';
|
import MkFoldableSection from '@/components/MkFoldableSection.vue';
|
||||||
|
|
||||||
const rootEl = shallowRef<HTMLElement>();
|
const rootEl = shallowRef<HTMLElement>();
|
||||||
const serverInfo = ref<any>(null);
|
const serverInfo = ref<Misskey.entities.ServerInfoResponse | null>(null);
|
||||||
const topSubInstancesForPie = ref<any>(null);
|
const topSubInstancesForPie = ref<InstanceForPie[] | null>(null);
|
||||||
const topPubInstancesForPie = ref<any>(null);
|
const topPubInstancesForPie = ref<InstanceForPie[] | null>(null);
|
||||||
const federationPubActive = ref<number | null>(null);
|
const federationPubActive = ref<number | null>(null);
|
||||||
const federationPubActiveDiff = ref<number | null>(null);
|
const federationPubActiveDiff = ref<number | null>(null);
|
||||||
const federationSubActive = ref<number | null>(null);
|
const federationSubActive = ref<number | null>(null);
|
||||||
const federationSubActiveDiff = ref<number | null>(null);
|
const federationSubActiveDiff = ref<number | null>(null);
|
||||||
const newUsers = ref(null);
|
const newUsers = ref<Misskey.entities.UserDetailed[] | null>(null);
|
||||||
const activeInstances = shallowRef(null);
|
const activeInstances = shallowRef<Misskey.entities.FederationInstance | null>(null);
|
||||||
const queueStatsConnection = markRaw(useStream().useChannel('queueStats'));
|
const queueStatsConnection = markRaw(useStream().useChannel('queueStats'));
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
const filesPagination = {
|
const filesPagination = {
|
||||||
|
@ -123,22 +125,28 @@ onMounted(async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
os.apiGet('federation/stats', { limit: 10 }).then(res => {
|
os.apiGet('federation/stats', { limit: 10 }).then(res => {
|
||||||
topSubInstancesForPie.value = res.topSubInstances.map(x => ({
|
topSubInstancesForPie.value = [
|
||||||
name: x.host,
|
...res.topSubInstances.map(x => ({
|
||||||
color: x.themeColor,
|
name: x.host,
|
||||||
value: x.followersCount,
|
color: x.themeColor,
|
||||||
onClick: () => {
|
value: x.followersCount,
|
||||||
os.pageWindow(`/instance-info/${x.host}`);
|
onClick: () => {
|
||||||
},
|
os.pageWindow(`/instance-info/${x.host}`);
|
||||||
})).concat([{ name: '(other)', color: '#80808080', value: res.otherFollowersCount }]);
|
},
|
||||||
topPubInstancesForPie.value = res.topPubInstances.map(x => ({
|
})),
|
||||||
name: x.host,
|
{ name: '(other)', color: '#80808080', value: res.otherFollowersCount },
|
||||||
color: x.themeColor,
|
];
|
||||||
value: x.followingCount,
|
topPubInstancesForPie.value = [
|
||||||
onClick: () => {
|
...res.topPubInstances.map(x => ({
|
||||||
os.pageWindow(`/instance-info/${x.host}`);
|
name: x.host,
|
||||||
},
|
color: x.themeColor,
|
||||||
})).concat([{ name: '(other)', color: '#80808080', value: res.otherFollowingCount }]);
|
value: x.followingCount,
|
||||||
|
onClick: () => {
|
||||||
|
os.pageWindow(`/instance-info/${x.host}`);
|
||||||
|
},
|
||||||
|
})),
|
||||||
|
{ name: '(other)', color: '#80808080', value: res.otherFollowingCount },
|
||||||
|
];
|
||||||
});
|
});
|
||||||
|
|
||||||
os.api('admin/server-info').then(serverInfoResponse => {
|
os.api('admin/server-info').then(serverInfoResponse => {
|
||||||
|
|
|
@ -22,6 +22,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, computed } from 'vue';
|
import { ref, computed } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import MkKeyValue from '@/components/MkKeyValue.vue';
|
import MkKeyValue from '@/components/MkKeyValue.vue';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import MkInfo from '@/components/MkInfo.vue';
|
import MkInfo from '@/components/MkInfo.vue';
|
||||||
|
@ -31,8 +32,8 @@ import { fetchInstance } from '@/instance.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||||
|
|
||||||
const proxyAccount = ref<any>(null);
|
const proxyAccount = ref<Misskey.entities.UserDetailed | null>(null);
|
||||||
const proxyAccountId = ref<any>(null);
|
const proxyAccountId = ref<string | null>(null);
|
||||||
|
|
||||||
async function init() {
|
async function init() {
|
||||||
const meta = await os.api('admin/meta');
|
const meta = await os.api('admin/meta');
|
||||||
|
|
|
@ -62,7 +62,7 @@ const activeSincePrevTick = ref(0);
|
||||||
const active = ref(0);
|
const active = ref(0);
|
||||||
const delayed = ref(0);
|
const delayed = ref(0);
|
||||||
const waiting = ref(0);
|
const waiting = ref(0);
|
||||||
const jobs = ref([]);
|
const jobs = ref<(string | number)[][]>([]);
|
||||||
const chartProcess = shallowRef<InstanceType<typeof XChart>>();
|
const chartProcess = shallowRef<InstanceType<typeof XChart>>();
|
||||||
const chartActive = shallowRef<InstanceType<typeof XChart>>();
|
const chartActive = shallowRef<InstanceType<typeof XChart>>();
|
||||||
const chartDelayed = shallowRef<InstanceType<typeof XChart>>();
|
const chartDelayed = shallowRef<InstanceType<typeof XChart>>();
|
||||||
|
@ -104,9 +104,11 @@ const onStatsLog = (statsLog) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
os.api(props.domain === 'inbox' ? 'admin/queue/inbox-delayed' : props.domain === 'deliver' ? 'admin/queue/deliver-delayed' : null, {}).then(result => {
|
if (props.domain === 'inbox' || props.domain === 'deliver') {
|
||||||
jobs.value = result;
|
os.api(`admin/queue/${props.domain}-delayed`).then(result => {
|
||||||
});
|
jobs.value = result;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
connection.on('stats', onStats);
|
connection.on('stats', onStats);
|
||||||
connection.on('statsLog', onStatsLog);
|
connection.on('statsLog', onStatsLog);
|
||||||
|
|
|
@ -25,13 +25,14 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, computed } from 'vue';
|
import { ref, computed } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import XHeader from './_header_.vue';
|
import XHeader from './_header_.vue';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||||
|
|
||||||
const relays = ref<any[]>([]);
|
const relays = ref<Misskey.entities.AdminRelaysListResponse>([]);
|
||||||
|
|
||||||
async function addRelay() {
|
async function addRelay() {
|
||||||
const { canceled, result: inbox } = await os.inputText({
|
const { canceled, result: inbox } = await os.inputText({
|
||||||
|
@ -66,7 +67,7 @@ function remove(inbox: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function refresh() {
|
function refresh() {
|
||||||
os.api('admin/relays/list').then((relayList: any) => {
|
os.api('admin/relays/list').then(relayList => {
|
||||||
relays.value = relayList;
|
relays.value = relayList;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, ref } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import { v4 as uuid } from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
import XHeader from './_header_.vue';
|
import XHeader from './_header_.vue';
|
||||||
import XEditor from './roles.editor.vue';
|
import XEditor from './roles.editor.vue';
|
||||||
|
@ -39,8 +40,8 @@ const props = defineProps<{
|
||||||
id?: string;
|
id?: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const role = ref(null);
|
const role = ref<Misskey.entities.Role | null>(null);
|
||||||
const data = ref(null);
|
const data = ref<any>(null);
|
||||||
|
|
||||||
if (props.id) {
|
if (props.id) {
|
||||||
role.value = await os.api('admin/roles/show', {
|
role.value = await os.api('admin/roles/show', {
|
||||||
|
|
|
@ -173,8 +173,8 @@ const pinnedUsers = ref<string>('');
|
||||||
const cacheRemoteFiles = ref<boolean>(false);
|
const cacheRemoteFiles = ref<boolean>(false);
|
||||||
const cacheRemoteSensitiveFiles = ref<boolean>(false);
|
const cacheRemoteSensitiveFiles = ref<boolean>(false);
|
||||||
const enableServiceWorker = ref<boolean>(false);
|
const enableServiceWorker = ref<boolean>(false);
|
||||||
const swPublicKey = ref<any>(null);
|
const swPublicKey = ref<string | null>(null);
|
||||||
const swPrivateKey = ref<any>(null);
|
const swPrivateKey = ref<string | null>(null);
|
||||||
const enableFanoutTimeline = ref<boolean>(false);
|
const enableFanoutTimeline = ref<boolean>(false);
|
||||||
const enableFanoutTimelineDbFallback = ref<boolean>(false);
|
const enableFanoutTimelineDbFallback = ref<boolean>(false);
|
||||||
const perLocalUserUserTimelineCacheMax = ref<number>(0);
|
const perLocalUserUserTimelineCacheMax = ref<number>(0);
|
||||||
|
|
|
@ -25,6 +25,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, watch, ref, shallowRef } from 'vue';
|
import { computed, watch, ref, shallowRef } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import MkTimeline from '@/components/MkTimeline.vue';
|
import MkTimeline from '@/components/MkTimeline.vue';
|
||||||
import { scroll } from '@/scripts/scroll.js';
|
import { scroll } from '@/scripts/scroll.js';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
|
@ -38,7 +39,7 @@ const props = defineProps<{
|
||||||
antennaId: string;
|
antennaId: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const antenna = ref(null);
|
const antenna = ref<Misskey.entities.Antenna | null>(null);
|
||||||
const queue = ref(0);
|
const queue = ref(0);
|
||||||
const rootEl = shallowRef<HTMLElement>();
|
const rootEl = shallowRef<HTMLElement>();
|
||||||
const tlEl = shallowRef<InstanceType<typeof MkTimeline>>();
|
const tlEl = shallowRef<InstanceType<typeof MkTimeline>>();
|
||||||
|
|
|
@ -46,7 +46,7 @@ import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||||
|
|
||||||
const body = ref('{}');
|
const body = ref('{}');
|
||||||
const endpoint = ref('');
|
const endpoint = ref('');
|
||||||
const endpoints = ref<any[]>([]);
|
const endpoints = ref<string[]>([]);
|
||||||
const sending = ref(false);
|
const sending = ref(false);
|
||||||
const res = ref('');
|
const res = ref('');
|
||||||
const withCredential = ref(true);
|
const withCredential = ref(true);
|
||||||
|
|
|
@ -35,6 +35,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, computed } from 'vue';
|
import { ref, computed } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import MkInput from '@/components/MkInput.vue';
|
import MkInput from '@/components/MkInput.vue';
|
||||||
import MkTextarea from '@/components/MkTextarea.vue';
|
import MkTextarea from '@/components/MkTextarea.vue';
|
||||||
|
@ -43,7 +44,7 @@ import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||||
import MkFolder from '@/components/MkFolder.vue';
|
import MkFolder from '@/components/MkFolder.vue';
|
||||||
|
|
||||||
const avatarDecorations = ref<any[]>([]);
|
const avatarDecorations = ref<Misskey.entities.AdminAvatarDecorationsListResponse>([]);
|
||||||
|
|
||||||
function add() {
|
function add() {
|
||||||
avatarDecorations.value.unshift({
|
avatarDecorations.value.unshift({
|
||||||
|
|
|
@ -70,6 +70,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, ref, watch, defineAsyncComponent } from 'vue';
|
import { computed, ref, watch, defineAsyncComponent } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import MkInput from '@/components/MkInput.vue';
|
import MkInput from '@/components/MkInput.vue';
|
||||||
import MkColorInput from '@/components/MkColorInput.vue';
|
import MkColorInput from '@/components/MkColorInput.vue';
|
||||||
|
@ -90,15 +91,15 @@ const props = defineProps<{
|
||||||
channelId?: string;
|
channelId?: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const channel = ref(null);
|
const channel = ref<Misskey.entities.Channel | null>(null);
|
||||||
const name = ref(null);
|
const name = ref<string | null>(null);
|
||||||
const description = ref(null);
|
const description = ref<string | null>(null);
|
||||||
const bannerUrl = ref<string | null>(null);
|
const bannerUrl = ref<string | null>(null);
|
||||||
const bannerId = ref<string | null>(null);
|
const bannerId = ref<string | null>(null);
|
||||||
const color = ref('#000');
|
const color = ref('#000');
|
||||||
const isSensitive = ref(false);
|
const isSensitive = ref(false);
|
||||||
const allowRenoteToExternal = ref(true);
|
const allowRenoteToExternal = ref(true);
|
||||||
const pinnedNotes = ref([]);
|
const pinnedNotes = ref<Partial<Misskey.entities.Note>[]>([]);
|
||||||
|
|
||||||
watch(() => bannerId.value, async () => {
|
watch(() => bannerId.value, async () => {
|
||||||
if (bannerId.value == null) {
|
if (bannerId.value == null) {
|
||||||
|
|
|
@ -88,9 +88,9 @@ import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||||
const emojisPaginationComponent = shallowRef<InstanceType<typeof MkPagination>>();
|
const emojisPaginationComponent = shallowRef<InstanceType<typeof MkPagination>>();
|
||||||
|
|
||||||
const tab = ref('local');
|
const tab = ref('local');
|
||||||
const query = ref(null);
|
const query = ref<string | null>(null);
|
||||||
const queryRemote = ref(null);
|
const queryRemote = ref<string | null>(null);
|
||||||
const host = ref(null);
|
const host = ref<string | null>(null);
|
||||||
const selectMode = ref(false);
|
const selectMode = ref(false);
|
||||||
const selectedEmojis = ref<string[]>([]);
|
const selectedEmojis = ref<string[]>([]);
|
||||||
|
|
||||||
|
|
|
@ -11,11 +11,12 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, ref } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import XDrive from '@/components/MkDrive.vue';
|
import XDrive from '@/components/MkDrive.vue';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||||
|
|
||||||
const folder = ref(null);
|
const folder = ref<Misskey.entities.DriveFolder | null>(null);
|
||||||
|
|
||||||
const headerActions = computed(() => []);
|
const headerActions = computed(() => []);
|
||||||
|
|
||||||
|
|
|
@ -92,7 +92,7 @@ const props = defineProps<{
|
||||||
emoji?: any,
|
emoji?: any,
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const dialog = ref(null);
|
const dialog = ref<InstanceType<typeof MkModalWindow> | null>(null);
|
||||||
const name = ref<string>(props.emoji ? props.emoji.name : '');
|
const name = ref<string>(props.emoji ? props.emoji.name : '');
|
||||||
const category = ref<string>(props.emoji ? props.emoji.category : '');
|
const category = ref<string>(props.emoji ? props.emoji.category : '');
|
||||||
const aliases = ref<string>(props.emoji ? props.emoji.aliases.join(' ') : '');
|
const aliases = ref<string>(props.emoji ? props.emoji.aliases.join(' ') : '');
|
||||||
|
@ -100,7 +100,7 @@ const license = ref<string>(props.emoji ? (props.emoji.license ?? '') : '');
|
||||||
const isSensitive = ref(props.emoji ? props.emoji.isSensitive : false);
|
const isSensitive = ref(props.emoji ? props.emoji.isSensitive : false);
|
||||||
const localOnly = ref(props.emoji ? props.emoji.localOnly : false);
|
const localOnly = ref(props.emoji ? props.emoji.localOnly : false);
|
||||||
const roleIdsThatCanBeUsedThisEmojiAsReaction = ref(props.emoji ? props.emoji.roleIdsThatCanBeUsedThisEmojiAsReaction : []);
|
const roleIdsThatCanBeUsedThisEmojiAsReaction = ref(props.emoji ? props.emoji.roleIdsThatCanBeUsedThisEmojiAsReaction : []);
|
||||||
const rolesThatCanBeUsedThisEmojiAsReaction = ref([]);
|
const rolesThatCanBeUsedThisEmojiAsReaction = ref<Misskey.entities.Role[]>([]);
|
||||||
const file = ref<Misskey.entities.DriveFile>();
|
const file = ref<Misskey.entities.DriveFile>();
|
||||||
|
|
||||||
watch(roleIdsThatCanBeUsedThisEmojiAsReaction, async () => {
|
watch(roleIdsThatCanBeUsedThisEmojiAsReaction, async () => {
|
||||||
|
|
|
@ -13,10 +13,11 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import MkRolePreview from '@/components/MkRolePreview.vue';
|
import MkRolePreview from '@/components/MkRolePreview.vue';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
|
|
||||||
const roles = ref();
|
const roles = ref<Misskey.entities.Role[] | null>(null);
|
||||||
|
|
||||||
os.api('roles/list').then(res => {
|
os.api('roles/list').then(res => {
|
||||||
roles.value = res.filter(x => x.target === 'manual').sort((a, b) => b.displayOrder - a.displayOrder);
|
roles.value = res.filter(x => x.target === 'manual').sort((a, b) => b.displayOrder - a.displayOrder);
|
||||||
|
|
|
@ -64,6 +64,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { watch, ref, shallowRef, computed } from 'vue';
|
import { watch, ref, shallowRef, computed } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import MkUserList from '@/components/MkUserList.vue';
|
import MkUserList from '@/components/MkUserList.vue';
|
||||||
import MkFoldableSection from '@/components/MkFoldableSection.vue';
|
import MkFoldableSection from '@/components/MkFoldableSection.vue';
|
||||||
import MkTab from '@/components/MkTab.vue';
|
import MkTab from '@/components/MkTab.vue';
|
||||||
|
@ -76,8 +77,8 @@ const props = defineProps<{
|
||||||
|
|
||||||
const origin = ref('local');
|
const origin = ref('local');
|
||||||
const tagsEl = shallowRef<InstanceType<typeof MkFoldableSection>>();
|
const tagsEl = shallowRef<InstanceType<typeof MkFoldableSection>>();
|
||||||
const tagsLocal = ref([]);
|
const tagsLocal = ref<Misskey.entities.Hashtag[]>([]);
|
||||||
const tagsRemote = ref([]);
|
const tagsRemote = ref<Misskey.entities.Hashtag[]>([]);
|
||||||
|
|
||||||
watch(() => props.tag, () => {
|
watch(() => props.tag, () => {
|
||||||
if (tagsEl.value) tagsEl.value.toggleContent(props.tag == null);
|
if (tagsEl.value) tagsEl.value.toggleContent(props.tag == null);
|
||||||
|
|
|
@ -35,6 +35,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, ref } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
|
@ -364,8 +365,8 @@ const props = defineProps<{
|
||||||
id?: string;
|
id?: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const flash = ref(null);
|
const flash = ref<Misskey.entities.Flash | null>(null);
|
||||||
const visibility = ref('public');
|
const visibility = ref<Misskey.entities.FlashUpdateRequest['visibility']>('public');
|
||||||
|
|
||||||
if (props.id) {
|
if (props.id) {
|
||||||
flash.value = await os.api('flash/show', {
|
flash.value = await os.api('flash/show', {
|
||||||
|
|
|
@ -58,6 +58,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, onDeactivated, onUnmounted, Ref, ref, watch, shallowRef } from 'vue';
|
import { computed, onDeactivated, onUnmounted, Ref, ref, watch, shallowRef } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import { Interpreter, Parser, values } from '@syuilo/aiscript';
|
import { Interpreter, Parser, values } from '@syuilo/aiscript';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
|
@ -78,8 +79,8 @@ const props = defineProps<{
|
||||||
id: string;
|
id: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const flash = ref(null);
|
const flash = ref<Misskey.entities.Flash | null>(null);
|
||||||
const error = ref(null);
|
const error = ref<any>(null);
|
||||||
|
|
||||||
function fetchFlash() {
|
function fetchFlash() {
|
||||||
flash.value = null;
|
flash.value = null;
|
||||||
|
|
|
@ -39,6 +39,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, watch, ref } from 'vue';
|
import { computed, watch, ref } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import MkInput from '@/components/MkInput.vue';
|
import MkInput from '@/components/MkInput.vue';
|
||||||
import MkTextarea from '@/components/MkTextarea.vue';
|
import MkTextarea from '@/components/MkTextarea.vue';
|
||||||
|
@ -56,10 +57,10 @@ const props = defineProps<{
|
||||||
postId?: string;
|
postId?: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const init = ref(null);
|
const init = ref<(() => Promise<any>) | null>(null);
|
||||||
const files = ref([]);
|
const files = ref<Misskey.entities.DriveFile[]>([]);
|
||||||
const description = ref(null);
|
const description = ref<string | null>(null);
|
||||||
const title = ref(null);
|
const title = ref<string | null>(null);
|
||||||
const isSensitive = ref(false);
|
const isSensitive = ref(false);
|
||||||
|
|
||||||
function selectFile(evt) {
|
function selectFile(evt) {
|
||||||
|
@ -109,7 +110,7 @@ watch(() => props.postId, () => {
|
||||||
init.value = () => props.postId ? os.api('gallery/posts/show', {
|
init.value = () => props.postId ? os.api('gallery/posts/show', {
|
||||||
postId: props.postId,
|
postId: props.postId,
|
||||||
}).then(post => {
|
}).then(post => {
|
||||||
files.value = post.files;
|
files.value = post.files ?? [];
|
||||||
title.value = post.title;
|
title.value = post.title;
|
||||||
description.value = post.description;
|
description.value = post.description;
|
||||||
isSensitive.value = post.isSensitive;
|
isSensitive.value = post.isSensitive;
|
||||||
|
|
|
@ -63,6 +63,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, watch, ref } from 'vue';
|
import { computed, watch, ref } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import MkContainer from '@/components/MkContainer.vue';
|
import MkContainer from '@/components/MkContainer.vue';
|
||||||
|
@ -84,8 +85,8 @@ const props = defineProps<{
|
||||||
postId: string;
|
postId: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const post = ref(null);
|
const post = ref<Misskey.entities.GalleryPost | null>(null);
|
||||||
const error = ref(null);
|
const error = ref<any>(null);
|
||||||
const otherPostsPagination = {
|
const otherPostsPagination = {
|
||||||
endpoint: 'users/gallery/posts' as const,
|
endpoint: 'users/gallery/posts' as const,
|
||||||
limit: 6,
|
limit: 6,
|
||||||
|
|
|
@ -35,6 +35,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { watch, computed, ref } from 'vue';
|
import { watch, computed, ref } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { userPage } from '@/filters/user.js';
|
import { userPage } from '@/filters/user.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
|
@ -47,9 +48,9 @@ const props = defineProps<{
|
||||||
listId: string;
|
listId: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const list = ref(null);
|
const list = ref<Misskey.entities.UserList | null>(null);
|
||||||
const error = ref();
|
const error = ref();
|
||||||
const users = ref([]);
|
const users = ref<Misskey.entities.UserDetailed[]>([]);
|
||||||
|
|
||||||
function fetchList(): void {
|
function fetchList(): void {
|
||||||
os.api('users/lists/show', {
|
os.api('users/lists/show', {
|
||||||
|
|
|
@ -11,6 +11,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import XAntenna from './editor.vue';
|
import XAntenna from './editor.vue';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
|
@ -20,7 +21,7 @@ import { antennasCache } from '@/cache.js';
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
const antenna = ref<any>(null);
|
const antenna = ref<Misskey.entities.Antenna | null>(null);
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
antennaId: string
|
antennaId: string
|
||||||
|
|
|
@ -60,7 +60,7 @@ import * as os from '@/os.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
antenna: any
|
antenna: Misskey.entities.Antenna
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
@ -70,8 +70,8 @@ const emit = defineEmits<{
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const name = ref<string>(props.antenna.name);
|
const name = ref<string>(props.antenna.name);
|
||||||
const src = ref<string>(props.antenna.src);
|
const src = ref<Misskey.entities.AntennasCreateRequest['src']>(props.antenna.src);
|
||||||
const userListId = ref<any>(props.antenna.userListId);
|
const userListId = ref<string | null>(props.antenna.userListId);
|
||||||
const users = ref<string>(props.antenna.users.join('\n'));
|
const users = ref<string>(props.antenna.users.join('\n'));
|
||||||
const keywords = ref<string>(props.antenna.keywords.map(x => x.join(' ')).join('\n'));
|
const keywords = ref<string>(props.antenna.keywords.map(x => x.join(' ')).join('\n'));
|
||||||
const excludeKeywords = ref<string>(props.antenna.excludeKeywords.map(x => x.join(' ')).join('\n'));
|
const excludeKeywords = ref<string>(props.antenna.excludeKeywords.map(x => x.join(' ')).join('\n'));
|
||||||
|
@ -80,7 +80,7 @@ const localOnly = ref<boolean>(props.antenna.localOnly);
|
||||||
const withReplies = ref<boolean>(props.antenna.withReplies);
|
const withReplies = ref<boolean>(props.antenna.withReplies);
|
||||||
const withFile = ref<boolean>(props.antenna.withFile);
|
const withFile = ref<boolean>(props.antenna.withFile);
|
||||||
const notify = ref<boolean>(props.antenna.notify);
|
const notify = ref<boolean>(props.antenna.notify);
|
||||||
const userLists = ref<any>(null);
|
const userLists = ref<Misskey.entities.UserList[] | null>(null);
|
||||||
|
|
||||||
watch(() => src.value, async () => {
|
watch(() => src.value, async () => {
|
||||||
if (src.value === 'list' && userLists.value === null) {
|
if (src.value === 'list' && userLists.value === null) {
|
||||||
|
@ -107,8 +107,7 @@ async function saveAntenna() {
|
||||||
await os.apiWithDialog('antennas/create', antennaData);
|
await os.apiWithDialog('antennas/create', antennaData);
|
||||||
emit('created');
|
emit('created');
|
||||||
} else {
|
} else {
|
||||||
antennaData['antennaId'] = props.antenna.id;
|
await os.apiWithDialog('antennas/update', { ...antennaData, antennaId: props.antenna.id });
|
||||||
await os.apiWithDialog('antennas/update', antennaData);
|
|
||||||
emit('updated');
|
emit('updated');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { watch, ref, shallowRef, computed } from 'vue';
|
import { watch, ref, shallowRef, computed } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import MkPagination from '@/components/MkPagination.vue';
|
import MkPagination from '@/components/MkPagination.vue';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import MkClipPreview from '@/components/MkClipPreview.vue';
|
import MkClipPreview from '@/components/MkClipPreview.vue';
|
||||||
|
@ -42,7 +43,7 @@ const pagination = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const tab = ref('my');
|
const tab = ref('my');
|
||||||
const favorites = ref();
|
const favorites = ref<Misskey.entities.Clip[] | null>(null);
|
||||||
|
|
||||||
const pagingComponent = shallowRef<InstanceType<typeof MkPagination>>();
|
const pagingComponent = shallowRef<InstanceType<typeof MkPagination>>();
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ const props = defineProps<{
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const note = ref<null | Misskey.entities.Note>();
|
const note = ref<null | Misskey.entities.Note>();
|
||||||
const clips = ref();
|
const clips = ref<Misskey.entities.Clip[]>();
|
||||||
const showPrev = ref(false);
|
const showPrev = ref(false);
|
||||||
const showNext = ref(false);
|
const showNext = ref(false);
|
||||||
const error = ref();
|
const error = ref();
|
||||||
|
|
|
@ -22,6 +22,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
/* eslint-disable vue/no-mutating-props */
|
/* eslint-disable vue/no-mutating-props */
|
||||||
import { onMounted, ref } from 'vue';
|
import { onMounted, ref } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import XContainer from '../page-editor.container.vue';
|
import XContainer from '../page-editor.container.vue';
|
||||||
import MkDriveFileThumbnail from '@/components/MkDriveFileThumbnail.vue';
|
import MkDriveFileThumbnail from '@/components/MkDriveFileThumbnail.vue';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
|
@ -35,7 +36,7 @@ const emit = defineEmits<{
|
||||||
(ev: 'update:modelValue', value: any): void;
|
(ev: 'update:modelValue', value: any): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const file = ref<any>(null);
|
const file = ref<Misskey.entities.DriveFile | null>(null);
|
||||||
|
|
||||||
async function choose() {
|
async function choose() {
|
||||||
os.selectDriveFile(false).then((fileResponse) => {
|
os.selectDriveFile(false).then((fileResponse) => {
|
||||||
|
|
|
@ -24,6 +24,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
/* eslint-disable vue/no-mutating-props */
|
/* eslint-disable vue/no-mutating-props */
|
||||||
import { watch, ref } from 'vue';
|
import { watch, ref } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import XContainer from '../page-editor.container.vue';
|
import XContainer from '../page-editor.container.vue';
|
||||||
import MkInput from '@/components/MkInput.vue';
|
import MkInput from '@/components/MkInput.vue';
|
||||||
import MkSwitch from '@/components/MkSwitch.vue';
|
import MkSwitch from '@/components/MkSwitch.vue';
|
||||||
|
@ -41,7 +42,7 @@ const emit = defineEmits<{
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const id = ref<any>(props.modelValue.note);
|
const id = ref<any>(props.modelValue.note);
|
||||||
const note = ref<any>(null);
|
const note = ref<Misskey.entities.Note | null>(null);
|
||||||
|
|
||||||
watch(id, async () => {
|
watch(id, async () => {
|
||||||
if (id.value && (id.value.startsWith('http://') || id.value.startsWith('https://'))) {
|
if (id.value && (id.value.startsWith('http://') || id.value.startsWith('https://'))) {
|
||||||
|
|
|
@ -16,6 +16,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { defineAsyncComponent } from 'vue';
|
import { defineAsyncComponent } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import XSection from './els/page-editor.el.section.vue';
|
import XSection from './els/page-editor.el.section.vue';
|
||||||
import XText from './els/page-editor.el.text.vue';
|
import XText from './els/page-editor.el.text.vue';
|
||||||
import XImage from './els/page-editor.el.image.vue';
|
import XImage from './els/page-editor.el.image.vue';
|
||||||
|
@ -34,11 +35,11 @@ function getComponent(type: string) {
|
||||||
const Sortable = defineAsyncComponent(() => import('vuedraggable').then(x => x.default));
|
const Sortable = defineAsyncComponent(() => import('vuedraggable').then(x => x.default));
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
modelValue: any[];
|
modelValue: Misskey.entities.Page['content'];
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(ev: 'update:modelValue', value: any[]): void;
|
(ev: 'update:modelValue', value: Misskey.entities.Page['content']): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
function updateItem(v) {
|
function updateItem(v) {
|
||||||
|
|
|
@ -62,6 +62,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, provide, watch, ref } from 'vue';
|
import { computed, provide, watch, ref } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import { v4 as uuid } from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
import XBlocks from './page-editor.blocks.vue';
|
import XBlocks from './page-editor.blocks.vue';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
|
@ -85,16 +86,16 @@ const props = defineProps<{
|
||||||
const tab = ref('settings');
|
const tab = ref('settings');
|
||||||
const author = ref($i);
|
const author = ref($i);
|
||||||
const readonly = ref(false);
|
const readonly = ref(false);
|
||||||
const page = ref(null);
|
const page = ref<Misskey.entities.Page | null>(null);
|
||||||
const pageId = ref(null);
|
const pageId = ref<string | null>(null);
|
||||||
const currentName = ref(null);
|
const currentName = ref<string | null>(null);
|
||||||
const title = ref('');
|
const title = ref('');
|
||||||
const summary = ref(null);
|
const summary = ref<string | null>(null);
|
||||||
const name = ref(Date.now().toString());
|
const name = ref(Date.now().toString());
|
||||||
const eyeCatchingImage = ref(null);
|
const eyeCatchingImage = ref<Misskey.entities.DriveFile | null>(null);
|
||||||
const eyeCatchingImageId = ref(null);
|
const eyeCatchingImageId = ref<string | null>(null);
|
||||||
const font = ref('sans-serif');
|
const font = ref('sans-serif');
|
||||||
const content = ref([]);
|
const content = ref<Misskey.entities.Page['content']>([]);
|
||||||
const alignCenter = ref(false);
|
const alignCenter = ref(false);
|
||||||
const hideTitleWhenPinned = ref(false);
|
const hideTitleWhenPinned = ref(false);
|
||||||
|
|
||||||
|
|
|
@ -77,6 +77,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, watch, ref } from 'vue';
|
import { computed, watch, ref } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import XPage from '@/components/page/page.vue';
|
import XPage from '@/components/page/page.vue';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
|
@ -99,8 +100,8 @@ const props = defineProps<{
|
||||||
username: string;
|
username: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const page = ref(null);
|
const page = ref<Misskey.entities.Page | null>(null);
|
||||||
const error = ref(null);
|
const error = ref<any>(null);
|
||||||
const otherPostsPagination = {
|
const otherPostsPagination = {
|
||||||
endpoint: 'users/pages' as const,
|
endpoint: 'users/pages' as const,
|
||||||
limit: 6,
|
limit: 6,
|
||||||
|
|
|
@ -51,7 +51,7 @@ const props = defineProps<{
|
||||||
|
|
||||||
const scope = computed(() => props.path ? props.path.split('/') : []);
|
const scope = computed(() => props.path ? props.path.split('/') : []);
|
||||||
|
|
||||||
const keys = ref(null);
|
const keys = ref<any>(null);
|
||||||
|
|
||||||
function fetchKeys() {
|
function fetchKeys() {
|
||||||
os.api('i/registry/keys-with-type', {
|
os.api('i/registry/keys-with-type', {
|
||||||
|
|
|
@ -64,8 +64,8 @@ const props = defineProps<{
|
||||||
const scope = computed(() => props.path.split('/').slice(0, -1));
|
const scope = computed(() => props.path.split('/').slice(0, -1));
|
||||||
const key = computed(() => props.path.split('/').at(-1));
|
const key = computed(() => props.path.split('/').at(-1));
|
||||||
|
|
||||||
const value = ref(null);
|
const value = ref<any>(null);
|
||||||
const valueForEditor = ref(null);
|
const valueForEditor = ref<string | null>(null);
|
||||||
|
|
||||||
function fetchValue() {
|
function fetchValue() {
|
||||||
os.api('i/registry/get-detail', {
|
os.api('i/registry/get-detail', {
|
||||||
|
|
|
@ -23,6 +23,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, computed } from 'vue';
|
import { ref, computed } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import JSON5 from 'json5';
|
import JSON5 from 'json5';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
|
@ -31,7 +32,7 @@ import FormLink from '@/components/form/link.vue';
|
||||||
import FormSection from '@/components/form/section.vue';
|
import FormSection from '@/components/form/section.vue';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
|
|
||||||
const scopesWithDomain = ref(null);
|
const scopesWithDomain = ref<Misskey.entities.IRegistryScopesWithDomainResponse | null>(null);
|
||||||
|
|
||||||
function fetchScopes() {
|
function fetchScopes() {
|
||||||
os.api('i/registry/scopes-with-domain').then(res => {
|
os.api('i/registry/scopes-with-domain').then(res => {
|
||||||
|
|
|
@ -37,6 +37,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, watch, ref } from 'vue';
|
import { computed, watch, ref } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import MkUserList from '@/components/MkUserList.vue';
|
import MkUserList from '@/components/MkUserList.vue';
|
||||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||||
|
@ -53,7 +54,7 @@ const props = withDefaults(defineProps<{
|
||||||
});
|
});
|
||||||
|
|
||||||
const tab = ref(props.initialTab);
|
const tab = ref(props.initialTab);
|
||||||
const role = ref();
|
const role = ref<Misskey.entities.Role>();
|
||||||
const error = ref();
|
const error = ref();
|
||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
|
|
||||||
|
@ -62,7 +63,7 @@ watch(() => props.role, () => {
|
||||||
roleId: props.role,
|
roleId: props.role,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
role.value = res;
|
role.value = res;
|
||||||
document.title = `${role.value?.name} | ${instanceName}`;
|
document.title = `${role.value.name} | ${instanceName}`;
|
||||||
visible.value = res.isExplorable && res.isPublic;
|
visible.value = res.isExplorable && res.isPublic;
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
if (err.code === 'NO_SUCH_ROLE') {
|
if (err.code === 'NO_SUCH_ROLE') {
|
||||||
|
|
|
@ -59,7 +59,7 @@ const key = ref(0);
|
||||||
const searchQuery = ref('');
|
const searchQuery = ref('');
|
||||||
const searchOrigin = ref('combined');
|
const searchOrigin = ref('combined');
|
||||||
const notePagination = ref();
|
const notePagination = ref();
|
||||||
const user = ref(null);
|
const user = ref<any>(null);
|
||||||
const isLocalOnly = ref(false);
|
const isLocalOnly = ref(false);
|
||||||
|
|
||||||
function selectUser() {
|
function selectUser() {
|
||||||
|
|
|
@ -29,7 +29,7 @@ import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||||
import MkUserCardMini from '@/components/MkUserCardMini.vue';
|
import MkUserCardMini from '@/components/MkUserCardMini.vue';
|
||||||
|
|
||||||
const storedAccounts = ref<any>(null);
|
const storedAccounts = ref<{ id: string, token: string }[] | null>(null);
|
||||||
const accounts = ref<Misskey.entities.UserDetailed[]>([]);
|
const accounts = ref<Misskey.entities.UserDetailed[]>([]);
|
||||||
|
|
||||||
const init = async () => {
|
const init = async () => {
|
||||||
|
|
|
@ -54,7 +54,7 @@ import MkKeyValue from '@/components/MkKeyValue.vue';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import { infoImageUrl } from '@/instance.js';
|
import { infoImageUrl } from '@/instance.js';
|
||||||
|
|
||||||
const list = ref<any>(null);
|
const list = ref<InstanceType<typeof FormPagination>>();
|
||||||
|
|
||||||
const pagination = {
|
const pagination = {
|
||||||
endpoint: 'i/apps' as const,
|
endpoint: 'i/apps' as const,
|
||||||
|
|
|
@ -58,6 +58,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, ref } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import tinycolor from 'tinycolor2';
|
import tinycolor from 'tinycolor2';
|
||||||
import FormLink from '@/components/form/link.vue';
|
import FormLink from '@/components/form/link.vue';
|
||||||
import MkSwitch from '@/components/MkSwitch.vue';
|
import MkSwitch from '@/components/MkSwitch.vue';
|
||||||
|
@ -73,9 +74,9 @@ import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||||
import { $i } from '@/account.js';
|
import { $i } from '@/account.js';
|
||||||
|
|
||||||
const fetching = ref(true);
|
const fetching = ref(true);
|
||||||
const usage = ref<any>(null);
|
const usage = ref<number | null>(null);
|
||||||
const capacity = ref<any>(null);
|
const capacity = ref<number | null>(null);
|
||||||
const uploadFolder = ref<any>(null);
|
const uploadFolder = ref<Misskey.entities.DriveFolder | null>(null);
|
||||||
const alwaysMarkNsfw = ref($i.alwaysMarkNsfw);
|
const alwaysMarkNsfw = ref($i.alwaysMarkNsfw);
|
||||||
const autoSensitive = ref($i.autoSensitive);
|
const autoSensitive = ref($i.autoSensitive);
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, onActivated, onMounted, onUnmounted, ref, shallowRef, watch } from 'vue';
|
import { ComputedRef, Ref, computed, onActivated, onMounted, onUnmounted, ref, shallowRef, watch } from 'vue';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import MkInfo from '@/components/MkInfo.vue';
|
import MkInfo from '@/components/MkInfo.vue';
|
||||||
import MkSuperMenu from '@/components/MkSuperMenu.vue';
|
import MkSuperMenu from '@/components/MkSuperMenu.vue';
|
||||||
|
@ -36,7 +36,7 @@ import { signout, $i } from '@/account.js';
|
||||||
import { clearCache } from '@/scripts/clear-cache.js';
|
import { clearCache } from '@/scripts/clear-cache.js';
|
||||||
import { instance } from '@/instance.js';
|
import { instance } from '@/instance.js';
|
||||||
import { useRouter } from '@/router.js';
|
import { useRouter } from '@/router.js';
|
||||||
import { definePageMetadata, provideMetadataReceiver } from '@/scripts/page-metadata.js';
|
import { PageMetadata, definePageMetadata, provideMetadataReceiver } from '@/scripts/page-metadata.js';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
|
|
||||||
const indexInfo = {
|
const indexInfo = {
|
||||||
|
@ -46,7 +46,7 @@ const indexInfo = {
|
||||||
};
|
};
|
||||||
const INFO = ref(indexInfo);
|
const INFO = ref(indexInfo);
|
||||||
const el = shallowRef<HTMLElement | null>(null);
|
const el = shallowRef<HTMLElement | null>(null);
|
||||||
const childInfo = ref(null);
|
const childInfo: Ref<ComputedRef<PageMetadata> | null> = ref(null);
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
|
|
|
@ -87,6 +87,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { reactive, watch } from 'vue';
|
import { reactive, watch } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import MkSelect from '@/components/MkSelect.vue';
|
import MkSelect from '@/components/MkSelect.vue';
|
||||||
import MkInput from '@/components/MkInput.vue';
|
import MkInput from '@/components/MkInput.vue';
|
||||||
import MkSwitch from '@/components/MkSwitch.vue';
|
import MkSwitch from '@/components/MkSwitch.vue';
|
||||||
|
@ -99,7 +100,7 @@ import { deepClone } from '@/scripts/clone.js';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
_id: string;
|
_id: string;
|
||||||
userLists: any[] | null;
|
userLists: Misskey.entities.UserList[] | null;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const statusbar = reactive(deepClone(defaultStore.state.statusbars.find(x => x.id === props._id)));
|
const statusbar = reactive(deepClone(defaultStore.state.statusbars.find(x => x.id === props._id)));
|
||||||
|
|
|
@ -16,6 +16,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, ref, computed } from 'vue';
|
import { onMounted, ref, computed } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import { v4 as uuid } from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
import XStatusbar from './statusbar.statusbar.vue';
|
import XStatusbar from './statusbar.statusbar.vue';
|
||||||
import MkFolder from '@/components/MkFolder.vue';
|
import MkFolder from '@/components/MkFolder.vue';
|
||||||
|
@ -27,7 +28,7 @@ import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||||
|
|
||||||
const statusbars = defaultStore.reactiveState.statusbars;
|
const statusbars = defaultStore.reactiveState.statusbars;
|
||||||
|
|
||||||
const userLists = ref();
|
const userLists = ref<Misskey.entities.UserList[] | null>(null);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
os.api('users/lists/list').then(res => {
|
os.api('users/lists/list').then(res => {
|
||||||
|
|
|
@ -25,7 +25,7 @@ import * as os from '@/os.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||||
|
|
||||||
const installThemeCode = ref(null);
|
const installThemeCode = ref<string | null>(null);
|
||||||
|
|
||||||
async function install(code: string): Promise<void> {
|
async function install(code: string): Promise<void> {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -46,7 +46,7 @@ import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||||
|
|
||||||
const installedThemes = ref(getThemes());
|
const installedThemes = ref(getThemes());
|
||||||
const builtinThemes = getBuiltinThemesRef();
|
const builtinThemes = getBuiltinThemesRef();
|
||||||
const selectedThemeId = ref(null);
|
const selectedThemeId = ref<string | null>(null);
|
||||||
|
|
||||||
const themes = computed(() => [...installedThemes.value, ...builtinThemes.value]);
|
const themes = computed(() => [...installedThemes.value, ...builtinThemes.value]);
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, watch, ref, shallowRef } from 'vue';
|
import { computed, watch, ref, shallowRef } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import MkTimeline from '@/components/MkTimeline.vue';
|
import MkTimeline from '@/components/MkTimeline.vue';
|
||||||
import { scroll } from '@/scripts/scroll.js';
|
import { scroll } from '@/scripts/scroll.js';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
|
@ -38,7 +39,7 @@ const props = defineProps<{
|
||||||
listId: string;
|
listId: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const list = ref(null);
|
const list = ref<Misskey.entities.UserList | null>(null);
|
||||||
const queue = ref(0);
|
const queue = ref(0);
|
||||||
const tlEl = shallowRef<InstanceType<typeof MkTimeline>>();
|
const tlEl = shallowRef<InstanceType<typeof MkTimeline>>();
|
||||||
const rootEl = shallowRef<HTMLElement>();
|
const rootEl = shallowRef<HTMLElement>();
|
||||||
|
|
|
@ -32,7 +32,7 @@ const props = withDefaults(defineProps<{
|
||||||
});
|
});
|
||||||
|
|
||||||
const user = ref<null | Misskey.entities.UserDetailed>(null);
|
const user = ref<null | Misskey.entities.UserDetailed>(null);
|
||||||
const error = ref(null);
|
const error = ref<any>(null);
|
||||||
|
|
||||||
function fetchUser(): void {
|
function fetchUser(): void {
|
||||||
if (props.acct == null) return;
|
if (props.acct == null) return;
|
||||||
|
|
|
@ -32,7 +32,7 @@ const props = withDefaults(defineProps<{
|
||||||
});
|
});
|
||||||
|
|
||||||
const user = ref<null | Misskey.entities.UserDetailed>(null);
|
const user = ref<null | Misskey.entities.UserDetailed>(null);
|
||||||
const error = ref(null);
|
const error = ref<any>(null);
|
||||||
|
|
||||||
function fetchUser(): void {
|
function fetchUser(): void {
|
||||||
if (props.acct == null) return;
|
if (props.acct == null) return;
|
||||||
|
|
|
@ -58,7 +58,7 @@ const props = withDefaults(defineProps<{
|
||||||
|
|
||||||
const tab = ref(props.page);
|
const tab = ref(props.page);
|
||||||
const user = ref<null | Misskey.entities.UserDetailed>(null);
|
const user = ref<null | Misskey.entities.UserDetailed>(null);
|
||||||
const error = ref(null);
|
const error = ref<any>(null);
|
||||||
|
|
||||||
function fetchUser(): void {
|
function fetchUser(): void {
|
||||||
if (props.acct == null) return;
|
if (props.acct == null) return;
|
||||||
|
|
|
@ -12,13 +12,14 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, ref } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import XSetup from './welcome.setup.vue';
|
import XSetup from './welcome.setup.vue';
|
||||||
import XEntrance from './welcome.entrance.a.vue';
|
import XEntrance from './welcome.entrance.a.vue';
|
||||||
import { instanceName } from '@/config.js';
|
import { instanceName } from '@/config.js';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||||
|
|
||||||
const meta = ref(null);
|
const meta = ref<Misskey.entities.MetaResponse | null>(null);
|
||||||
|
|
||||||
os.api('meta', { detail: true }).then(res => {
|
os.api('meta', { detail: true }).then(res => {
|
||||||
meta.value = res;
|
meta.value = res;
|
||||||
|
|
|
@ -122,7 +122,7 @@ export function getCopyNoteLinkMenu(note: Misskey.entities.Note, text: string):
|
||||||
export function getNoteMenu(props: {
|
export function getNoteMenu(props: {
|
||||||
note: Misskey.entities.Note;
|
note: Misskey.entities.Note;
|
||||||
menuButton: Ref<HTMLElement>;
|
menuButton: Ref<HTMLElement>;
|
||||||
translation: Ref<any>;
|
translation: Ref<Misskey.entities.NotesTranslateResponse | null>;
|
||||||
translating: Ref<boolean>;
|
translating: Ref<boolean>;
|
||||||
isDeleted: Ref<boolean>;
|
isDeleted: Ref<boolean>;
|
||||||
currentClip?: Misskey.entities.Clip;
|
currentClip?: Misskey.entities.Clip;
|
||||||
|
|
|
@ -11,8 +11,12 @@ export function useChartTooltip(opts: { position: 'top' | 'middle' } = { positio
|
||||||
const tooltipShowing = ref(false);
|
const tooltipShowing = ref(false);
|
||||||
const tooltipX = ref(0);
|
const tooltipX = ref(0);
|
||||||
const tooltipY = ref(0);
|
const tooltipY = ref(0);
|
||||||
const tooltipTitle = ref(null);
|
const tooltipTitle = ref<string | null>(null);
|
||||||
const tooltipSeries = ref(null);
|
const tooltipSeries = ref<{
|
||||||
|
backgroundColor: string;
|
||||||
|
borderColor: string;
|
||||||
|
text: string;
|
||||||
|
}[] | null>(null);
|
||||||
let disposeTooltipComponent;
|
let disposeTooltipComponent;
|
||||||
|
|
||||||
os.popup(MkChartTooltip, {
|
os.popup(MkChartTooltip, {
|
||||||
|
|
|
@ -71,8 +71,8 @@ const globalHeaderHeight = ref(0);
|
||||||
const wallpaper = miLocalStorage.getItem('wallpaper') != null;
|
const wallpaper = miLocalStorage.getItem('wallpaper') != null;
|
||||||
const showMenuOnTop = computed(() => defaultStore.state.menuDisplay === 'top');
|
const showMenuOnTop = computed(() => defaultStore.state.menuDisplay === 'top');
|
||||||
const live2d = shallowRef<HTMLIFrameElement>();
|
const live2d = shallowRef<HTMLIFrameElement>();
|
||||||
const widgetsLeft = ref();
|
const widgetsLeft = ref<HTMLElement>();
|
||||||
const widgetsRight = ref();
|
const widgetsRight = ref<HTMLElement>();
|
||||||
|
|
||||||
provide('router', mainRouter);
|
provide('router', mainRouter);
|
||||||
provideMetadataReceiver((info) => {
|
provideMetadataReceiver((info) => {
|
||||||
|
@ -84,7 +84,7 @@ provideMetadataReceiver((info) => {
|
||||||
provide('shouldHeaderThin', showMenuOnTop.value);
|
provide('shouldHeaderThin', showMenuOnTop.value);
|
||||||
provide('forceSpacerMin', true);
|
provide('forceSpacerMin', true);
|
||||||
|
|
||||||
function attachSticky(el) {
|
function attachSticky(el: HTMLElement) {
|
||||||
const sticky = new StickySidebar(el, 0, defaultStore.state.menuDisplay === 'top' ? 60 : 0); // TODO: ヘッダーの高さを60pxと決め打ちしているのを直す
|
const sticky = new StickySidebar(el, 0, defaultStore.state.menuDisplay === 'top' ? 60 : 0); // TODO: ヘッダーの高さを60pxと決め打ちしているのを直す
|
||||||
window.addEventListener('scroll', () => {
|
window.addEventListener('scroll', () => {
|
||||||
sticky.calc(window.scrollY);
|
sticky.calc(window.scrollY);
|
||||||
|
|
|
@ -70,6 +70,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ComputedRef, onMounted, provide, ref, computed } from 'vue';
|
import { ComputedRef, onMounted, provide, ref, computed } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import XCommon from './_common_/common.vue';
|
import XCommon from './_common_/common.vue';
|
||||||
import { instanceName } from '@/config.js';
|
import { instanceName } from '@/config.js';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
|
@ -104,7 +105,7 @@ const isTimelineAvailable = ref(instance.policies?.ltlAvailable || instance.poli
|
||||||
const showMenu = ref(false);
|
const showMenu = ref(false);
|
||||||
const isDesktop = ref(window.innerWidth >= DESKTOP_THRESHOLD);
|
const isDesktop = ref(window.innerWidth >= DESKTOP_THRESHOLD);
|
||||||
const narrow = ref(window.innerWidth < 1280);
|
const narrow = ref(window.innerWidth < 1280);
|
||||||
const meta = ref();
|
const meta = ref<Misskey.entities.MetaResponse>();
|
||||||
|
|
||||||
const keymap = computed(() => {
|
const keymap = computed(() => {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -36,7 +36,12 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
activity: any[]
|
activity: {
|
||||||
|
total: number;
|
||||||
|
notes: number;
|
||||||
|
replies: number;
|
||||||
|
renotes: number;
|
||||||
|
}[]
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
for (const d of props.activity) {
|
for (const d of props.activity) {
|
||||||
|
|
|
@ -36,17 +36,22 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
activity: any[]
|
activity: {
|
||||||
|
total: number;
|
||||||
|
notes: number;
|
||||||
|
replies: number;
|
||||||
|
renotes: number;
|
||||||
|
}[]
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const viewBoxX = ref(147);
|
const viewBoxX = ref(147);
|
||||||
const viewBoxY = ref(60);
|
const viewBoxY = ref(60);
|
||||||
const zoom = ref(1);
|
const zoom = ref(1);
|
||||||
const pos = ref(0);
|
const pos = ref(0);
|
||||||
const pointsNote = ref<any>(null);
|
const pointsNote = ref<string>();
|
||||||
const pointsReply = ref<any>(null);
|
const pointsReply = ref<string>();
|
||||||
const pointsRenote = ref<any>(null);
|
const pointsRenote = ref<string>();
|
||||||
const pointsTotal = ref<any>(null);
|
const pointsTotal = ref<string>();
|
||||||
|
|
||||||
function dragListen(fn) {
|
function dragListen(fn) {
|
||||||
window.addEventListener('mousemove', fn);
|
window.addEventListener('mousemove', fn);
|
||||||
|
|
|
@ -12,8 +12,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<div>
|
<div>
|
||||||
<MkLoading v-if="fetching"/>
|
<MkLoading v-if="fetching"/>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<XCalendar v-show="widgetProps.view === 0" :activity="[].concat(activity)"/>
|
<XCalendar v-show="widgetProps.view === 0" :activity="activity ?? []"/>
|
||||||
<XChart v-show="widgetProps.view === 1" :activity="[].concat(activity)"/>
|
<XChart v-show="widgetProps.view === 1" :activity="activity ?? []"/>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</MkContainer>
|
</MkContainer>
|
||||||
|
@ -59,7 +59,12 @@ const { widgetProps, configure, save } = useWidgetPropsManager(name,
|
||||||
emit,
|
emit,
|
||||||
);
|
);
|
||||||
|
|
||||||
const activity = ref(null);
|
const activity = ref<{
|
||||||
|
total: number;
|
||||||
|
notes: number;
|
||||||
|
replies: number;
|
||||||
|
renotes: number;
|
||||||
|
}[] | null>(null);
|
||||||
const fetching = ref(true);
|
const fetching = ref(true);
|
||||||
|
|
||||||
const toggleView = () => {
|
const toggleView = () => {
|
||||||
|
|
|
@ -26,6 +26,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import { useWidgetPropsManager, WidgetComponentEmits, WidgetComponentExpose, WidgetComponentProps } from './widget.js';
|
import { useWidgetPropsManager, WidgetComponentEmits, WidgetComponentExpose, WidgetComponentProps } from './widget.js';
|
||||||
import { GetFormResultType } from '@/scripts/form.js';
|
import { GetFormResultType } from '@/scripts/form.js';
|
||||||
import MkContainer from '@/components/MkContainer.vue';
|
import MkContainer from '@/components/MkContainer.vue';
|
||||||
|
@ -56,8 +57,8 @@ const { widgetProps, configure } = useWidgetPropsManager(name,
|
||||||
emit,
|
emit,
|
||||||
);
|
);
|
||||||
|
|
||||||
const instances = ref([]);
|
const instances = ref<Misskey.entities.FederationInstance[]>([]);
|
||||||
const charts = ref([]);
|
const charts = ref<Misskey.entities.ChartsInstanceResponse[]>([]);
|
||||||
const fetching = ref(true);
|
const fetching = ref(true);
|
||||||
|
|
||||||
const fetch = async () => {
|
const fetch = async () => {
|
||||||
|
|
|
@ -19,6 +19,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { shallowRef } from 'vue';
|
import { shallowRef } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import { useWidgetPropsManager, WidgetComponentEmits, WidgetComponentExpose, WidgetComponentProps } from './widget.js';
|
import { useWidgetPropsManager, WidgetComponentEmits, WidgetComponentExpose, WidgetComponentProps } from './widget.js';
|
||||||
import { GetFormResultType } from '@/scripts/form.js';
|
import { GetFormResultType } from '@/scripts/form.js';
|
||||||
import MkContainer from '@/components/MkContainer.vue';
|
import MkContainer from '@/components/MkContainer.vue';
|
||||||
|
@ -48,7 +49,7 @@ const { widgetProps, configure } = useWidgetPropsManager(name,
|
||||||
);
|
);
|
||||||
|
|
||||||
const cloud = shallowRef<InstanceType<typeof MkTagCloud> | null>();
|
const cloud = shallowRef<InstanceType<typeof MkTagCloud> | null>();
|
||||||
const activeInstances = shallowRef(null);
|
const activeInstances = shallowRef<Misskey.entities.FederationInstance[] | null>(null);
|
||||||
|
|
||||||
function onInstanceClick(i) {
|
function onInstanceClick(i) {
|
||||||
os.pageWindow(`/instance-info/${i.host}`);
|
os.pageWindow(`/instance-info/${i.host}`);
|
||||||
|
|
|
@ -23,6 +23,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onUnmounted, ref } from 'vue';
|
import { onUnmounted, ref } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import { useWidgetPropsManager, WidgetComponentEmits, WidgetComponentExpose, WidgetComponentProps } from './widget.js';
|
import { useWidgetPropsManager, WidgetComponentEmits, WidgetComponentExpose, WidgetComponentProps } from './widget.js';
|
||||||
import { GetFormResultType } from '@/scripts/form.js';
|
import { GetFormResultType } from '@/scripts/form.js';
|
||||||
import { useStream } from '@/stream.js';
|
import { useStream } from '@/stream.js';
|
||||||
|
@ -57,7 +58,7 @@ const { widgetProps, configure } = useWidgetPropsManager(name,
|
||||||
);
|
);
|
||||||
|
|
||||||
const connection = useStream().useChannel('main');
|
const connection = useStream().useChannel('main');
|
||||||
const images = ref([]);
|
const images = ref<Misskey.entities.DriveFile[]>([]);
|
||||||
const fetching = ref(true);
|
const fetching = ref(true);
|
||||||
|
|
||||||
const onDriveFileCreated = (file) => {
|
const onDriveFileCreated = (file) => {
|
||||||
|
|
|
@ -18,6 +18,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, ref, shallowRef } from 'vue';
|
import { onMounted, ref, shallowRef } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import { useWidgetPropsManager, WidgetComponentEmits, WidgetComponentExpose, WidgetComponentProps } from './widget.js';
|
import { useWidgetPropsManager, WidgetComponentEmits, WidgetComponentExpose, WidgetComponentProps } from './widget.js';
|
||||||
import { GetFormResultType } from '@/scripts/form.js';
|
import { GetFormResultType } from '@/scripts/form.js';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
|
@ -49,7 +50,7 @@ const { widgetProps, configure, save } = useWidgetPropsManager(name,
|
||||||
emit,
|
emit,
|
||||||
);
|
);
|
||||||
|
|
||||||
const images = ref([]);
|
const images = ref<Misskey.entities.DriveFile[]>([]);
|
||||||
const fetching = ref(true);
|
const fetching = ref(true);
|
||||||
const slideA = shallowRef<HTMLElement>();
|
const slideA = shallowRef<HTMLElement>();
|
||||||
const slideB = shallowRef<HTMLElement>();
|
const slideB = shallowRef<HTMLElement>();
|
||||||
|
|
|
@ -25,6 +25,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import { useWidgetPropsManager, WidgetComponentEmits, WidgetComponentExpose, WidgetComponentProps } from './widget.js';
|
import { useWidgetPropsManager, WidgetComponentEmits, WidgetComponentExpose, WidgetComponentProps } from './widget.js';
|
||||||
import { GetFormResultType } from '@/scripts/form.js';
|
import { GetFormResultType } from '@/scripts/form.js';
|
||||||
import MkContainer from '@/components/MkContainer.vue';
|
import MkContainer from '@/components/MkContainer.vue';
|
||||||
|
@ -54,7 +55,7 @@ const { widgetProps, configure } = useWidgetPropsManager(name,
|
||||||
emit,
|
emit,
|
||||||
);
|
);
|
||||||
|
|
||||||
const stats = ref([]);
|
const stats = ref<Misskey.entities.HashtagsTrendResponse>([]);
|
||||||
const fetching = ref(true);
|
const fetching = ref(true);
|
||||||
|
|
||||||
const fetch = () => {
|
const fetch = () => {
|
||||||
|
|
|
@ -25,6 +25,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import { useWidgetPropsManager, WidgetComponentEmits, WidgetComponentExpose, WidgetComponentProps } from './widget.js';
|
import { useWidgetPropsManager, WidgetComponentEmits, WidgetComponentExpose, WidgetComponentProps } from './widget.js';
|
||||||
import { GetFormResultType } from '@/scripts/form.js';
|
import { GetFormResultType } from '@/scripts/form.js';
|
||||||
import MkContainer from '@/components/MkContainer.vue';
|
import MkContainer from '@/components/MkContainer.vue';
|
||||||
|
@ -58,8 +59,8 @@ const { widgetProps, configure, save } = useWidgetPropsManager(name,
|
||||||
emit,
|
emit,
|
||||||
);
|
);
|
||||||
|
|
||||||
const list = ref();
|
const list = ref<Misskey.entities.UserList>();
|
||||||
const users = ref([]);
|
const users = ref<Misskey.entities.UserDetailed[]>([]);
|
||||||
const fetching = ref(true);
|
const fetching = ref(true);
|
||||||
|
|
||||||
async function chooseList() {
|
async function chooseList() {
|
||||||
|
|
|
@ -76,11 +76,12 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, onBeforeUnmount, ref } from 'vue';
|
import { onMounted, onBeforeUnmount, ref } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import { v4 as uuid } from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
connection: any,
|
connection: any,
|
||||||
meta: any
|
meta: Misskey.entities.ServerInfoResponse
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const viewBoxX = ref<number>(50);
|
const viewBoxX = ref<number>(50);
|
||||||
|
@ -94,10 +95,10 @@ const cpuPolylinePoints = ref<string>('');
|
||||||
const memPolylinePoints = ref<string>('');
|
const memPolylinePoints = ref<string>('');
|
||||||
const cpuPolygonPoints = ref<string>('');
|
const cpuPolygonPoints = ref<string>('');
|
||||||
const memPolygonPoints = ref<string>('');
|
const memPolygonPoints = ref<string>('');
|
||||||
const cpuHeadX = ref<any>(null);
|
const cpuHeadX = ref<number>();
|
||||||
const cpuHeadY = ref<any>(null);
|
const cpuHeadY = ref<number>();
|
||||||
const memHeadX = ref<any>(null);
|
const memHeadX = ref<number>();
|
||||||
const memHeadY = ref<any>(null);
|
const memHeadY = ref<number>();
|
||||||
const cpuP = ref<string>('');
|
const cpuP = ref<string>('');
|
||||||
const memP = ref<string>('');
|
const memP = ref<string>('');
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue