chore, refactor: remove unused, fix some type errors (client/src/pages)
This commit is contained in:
parent
f10c64f526
commit
c0f31fcb8f
165 changed files with 582 additions and 1139 deletions
|
@ -7,7 +7,7 @@ export default (v, digits = 0) => {
|
||||||
const i = Math.floor(Math.log(v) / Math.log(1024));
|
const i = Math.floor(Math.log(v) / Math.log(1024));
|
||||||
return (
|
return (
|
||||||
(isMinus ? "-" : "") +
|
(isMinus ? "-" : "") +
|
||||||
(v / Math.pow(1024, i)).toFixed(digits).replace(/\.0+$/, "") +
|
(v / 1024 ** i).toFixed(digits).replace(/\.0+$/, "") +
|
||||||
sizes[i]
|
sizes[i]
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,6 +2,4 @@
|
||||||
<div></div>
|
<div></div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup></script>
|
||||||
import {} from "vue";
|
|
||||||
</script>
|
|
||||||
|
|
|
@ -35,9 +35,8 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, computed } from "vue";
|
import { ref } from "vue";
|
||||||
|
|
||||||
import {} from "vue";
|
|
||||||
import * as misskey from "firefish-js";
|
import * as misskey from "firefish-js";
|
||||||
import MkButton from "@/components/MkButton.vue";
|
import MkButton from "@/components/MkButton.vue";
|
||||||
import { version } from "@/config";
|
import { version } from "@/config";
|
||||||
|
@ -53,9 +52,9 @@ const props = withDefaults(
|
||||||
{},
|
{},
|
||||||
);
|
);
|
||||||
|
|
||||||
let loaded = ref(false);
|
const loaded = ref(false);
|
||||||
let serverIsDead = ref(false);
|
const serverIsDead = ref(false);
|
||||||
let meta = ref<misskey.entities.LiteInstanceMetadata | null>(null);
|
const meta = ref<misskey.entities.LiteInstanceMetadata | null>(null);
|
||||||
|
|
||||||
os.api("meta", {
|
os.api("meta", {
|
||||||
detail: false,
|
detail: false,
|
||||||
|
@ -76,10 +75,6 @@ function reload() {
|
||||||
unisonReload();
|
unisonReload();
|
||||||
}
|
}
|
||||||
|
|
||||||
const headerActions = computed(() => []);
|
|
||||||
|
|
||||||
const headerTabs = computed(() => []);
|
|
||||||
|
|
||||||
definePageMetadata({
|
definePageMetadata({
|
||||||
title: i18n.ts.error,
|
title: i18n.ts.error,
|
||||||
icon: "ph-warning ph-bold ph-lg",
|
icon: "ph-warning ph-bold ph-lg",
|
||||||
|
|
|
@ -225,8 +225,8 @@ sponsors = patronsResp.sponsors;
|
||||||
patrons = patrons.filter((patron) => !sponsors.includes(patron));
|
patrons = patrons.filter((patron) => !sponsors.includes(patron));
|
||||||
|
|
||||||
let easterEggReady = false;
|
let easterEggReady = false;
|
||||||
let easterEggEmojis = ref([]);
|
const easterEggEmojis = ref([]);
|
||||||
let easterEggEngine = ref(null);
|
const easterEggEngine = ref(null);
|
||||||
const containerEl = ref<HTMLElement>();
|
const containerEl = ref<HTMLElement>();
|
||||||
|
|
||||||
function iconLoaded() {
|
function iconLoaded() {
|
||||||
|
|
|
@ -47,14 +47,13 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent, computed } from "vue";
|
import { defineComponent } from "vue";
|
||||||
import XEmoji from "./emojis.emoji.vue";
|
import XEmoji from "./emojis.emoji.vue";
|
||||||
import MkButton from "@/components/MkButton.vue";
|
import MkButton from "@/components/MkButton.vue";
|
||||||
import MkInput from "@/components/form/input.vue";
|
import MkInput from "@/components/form/input.vue";
|
||||||
import MkSelect from "@/components/form/select.vue";
|
import MkSelect from "@/components/form/select.vue";
|
||||||
import MkFolder from "@/components/MkFolder.vue";
|
import MkFolder from "@/components/MkFolder.vue";
|
||||||
import MkTab from "@/components/MkTab.vue";
|
import MkTab from "@/components/MkTab.vue";
|
||||||
import * as os from "@/os";
|
|
||||||
import { emojiCategories, emojiTags } from "@/instance";
|
import { emojiCategories, emojiTags } from "@/instance";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
|
||||||
|
|
|
@ -113,9 +113,9 @@ import MkInstanceCardMini from "@/components/MkInstanceCardMini.vue";
|
||||||
import FormSplit from "@/components/form/split.vue";
|
import FormSplit from "@/components/form/split.vue";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
|
||||||
let host = ref("");
|
const host = ref("");
|
||||||
let state = ref("federating");
|
const state = ref("federating");
|
||||||
let sort = ref("+pubSub");
|
const sort = ref("+pubSub");
|
||||||
const pagination = {
|
const pagination = {
|
||||||
endpoint: "federation/instances" as const,
|
endpoint: "federation/instances" as const,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
|
|
|
@ -178,7 +178,7 @@ import { Virtual } from "swiper/modules";
|
||||||
import { Swiper, SwiperSlide } from "swiper/vue";
|
import { Swiper, SwiperSlide } from "swiper/vue";
|
||||||
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, instanceName, host } from "@/config";
|
import { version, host } from "@/config";
|
||||||
import FormLink from "@/components/form/link.vue";
|
import FormLink from "@/components/form/link.vue";
|
||||||
import FormSection from "@/components/form/section.vue";
|
import FormSection from "@/components/form/section.vue";
|
||||||
import FormSuspense from "@/components/form/suspense.vue";
|
import FormSuspense from "@/components/form/suspense.vue";
|
||||||
|
@ -205,13 +205,13 @@ withDefaults(
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
let stats = ref(null);
|
const stats = ref(null);
|
||||||
let instanceIcon = ref<HTMLImageElement>();
|
const instanceIcon = ref<HTMLImageElement>();
|
||||||
let iconClicks = 0;
|
let iconClicks = 0;
|
||||||
let iconSrc = ref(instance.iconUrl || instance.faviconUrl || "/favicon.ico");
|
const iconSrc = ref(instance.iconUrl || instance.faviconUrl || "/favicon.ico");
|
||||||
let instanceIconAnimation = ref("");
|
const instanceIconAnimation = ref("");
|
||||||
let tabs = ["overview", "emojis", "charts"];
|
let tabs = ["overview", "emojis", "charts"];
|
||||||
let tab = ref(tabs[0]);
|
const tab = ref(tabs[0]);
|
||||||
watch(tab, () => syncSlide(tabs.indexOf(tab.value)));
|
watch(tab, () => syncSlide(tabs.indexOf(tab.value)));
|
||||||
|
|
||||||
if (iAmModerator) tabs.push("federation");
|
if (iAmModerator) tabs.push("federation");
|
||||||
|
@ -249,7 +249,7 @@ if (iAmModerator) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
let headerTabs = computed(() => theTabs);
|
const headerTabs = computed(() => theTabs);
|
||||||
|
|
||||||
definePageMetadata(
|
definePageMetadata(
|
||||||
computed(() => ({
|
computed(() => ({
|
||||||
|
|
|
@ -172,7 +172,6 @@ import * as os from "@/os";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||||
import { deviceKind } from "@/scripts/device-kind";
|
import { deviceKind } from "@/scripts/device-kind";
|
||||||
import { acct } from "@/filters/user";
|
|
||||||
import { iAmAdmin, iAmModerator } from "@/account";
|
import { iAmAdmin, iAmModerator } from "@/account";
|
||||||
import { defaultStore } from "@/store";
|
import { defaultStore } from "@/store";
|
||||||
import "swiper/scss";
|
import "swiper/scss";
|
||||||
|
@ -181,12 +180,12 @@ import "swiper/scss/virtual";
|
||||||
let tabs = ["overview"];
|
let tabs = ["overview"];
|
||||||
if (iAmModerator) tabs.push("ip");
|
if (iAmModerator) tabs.push("ip");
|
||||||
tabs.push("raw");
|
tabs.push("raw");
|
||||||
let tab = ref(tabs[0]);
|
const tab = ref(tabs[0]);
|
||||||
watch(tab, () => syncSlide(tabs.indexOf(tab.value)));
|
watch(tab, () => syncSlide(tabs.indexOf(tab.value)));
|
||||||
|
|
||||||
let file: any = ref(null);
|
const file = ref(null);
|
||||||
let info: any = ref(null);
|
const info = ref(null);
|
||||||
let isSensitive: boolean = ref(false);
|
const isSensitive = ref(false);
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
fileId: string;
|
fileId: string;
|
||||||
|
|
|
@ -56,21 +56,11 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {
|
import { computed, onMounted, onUnmounted, ref, watch, nextTick } from "vue";
|
||||||
computed,
|
|
||||||
onMounted,
|
|
||||||
onUnmounted,
|
|
||||||
ref,
|
|
||||||
inject,
|
|
||||||
watch,
|
|
||||||
nextTick,
|
|
||||||
} from "vue";
|
|
||||||
import tinycolor from "tinycolor2";
|
import tinycolor from "tinycolor2";
|
||||||
import { popupMenu } from "@/os";
|
import { popupMenu } from "@/os";
|
||||||
import { url } from "@/config";
|
|
||||||
import { scrollToTop } from "@/scripts/scroll";
|
import { scrollToTop } from "@/scripts/scroll";
|
||||||
import MkButton from "@/components/MkButton.vue";
|
import MkButton from "@/components/MkButton.vue";
|
||||||
import { i18n } from "@/i18n";
|
|
||||||
import { globalEvents } from "@/events";
|
import { globalEvents } from "@/events";
|
||||||
import { injectPageMetadata } from "@/scripts/page-metadata";
|
import { injectPageMetadata } from "@/scripts/page-metadata";
|
||||||
|
|
||||||
|
@ -100,11 +90,10 @@ const emit = defineEmits<{
|
||||||
|
|
||||||
const metadata = injectPageMetadata();
|
const metadata = injectPageMetadata();
|
||||||
|
|
||||||
const el = ref<HTMLElement>(null);
|
const el = ref<HTMLElement>();
|
||||||
const tabRefs = {};
|
const tabRefs = {};
|
||||||
const tabHighlightEl = ref<HTMLElement | null>(null);
|
const tabHighlightEl = ref<HTMLElement | null>(null);
|
||||||
const bg = ref(null);
|
const bg = ref<string>();
|
||||||
const height = ref(0);
|
|
||||||
const hasTabs = computed(() => {
|
const hasTabs = computed(() => {
|
||||||
return props.tabs && props.tabs.length > 0;
|
return props.tabs && props.tabs.length > 0;
|
||||||
});
|
});
|
||||||
|
|
|
@ -93,21 +93,19 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, ref } from "vue";
|
import { computed, ref } from "vue";
|
||||||
|
|
||||||
import MkInput from "@/components/form/input.vue";
|
|
||||||
import MkSelect from "@/components/form/select.vue";
|
import MkSelect from "@/components/form/select.vue";
|
||||||
import MkPagination from "@/components/MkPagination.vue";
|
import MkPagination from "@/components/MkPagination.vue";
|
||||||
import XAbuseReport from "@/components/MkAbuseReport.vue";
|
import XAbuseReport from "@/components/MkAbuseReport.vue";
|
||||||
import * as os from "@/os";
|
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||||
|
|
||||||
let reports = ref<InstanceType<typeof MkPagination>>();
|
const reports = ref<InstanceType<typeof MkPagination>>();
|
||||||
|
|
||||||
let state = ref("unresolved");
|
const state = ref("unresolved");
|
||||||
let reporterOrigin = ref("combined");
|
const reporterOrigin = ref("combined");
|
||||||
let targetUserOrigin = ref("combined");
|
const targetUserOrigin = ref("combined");
|
||||||
let searchUsername = ref("");
|
// const searchUsername = ref("");
|
||||||
let searchHost = ref("");
|
// const searchHost = ref("");
|
||||||
|
|
||||||
const pagination = {
|
const pagination = {
|
||||||
endpoint: "admin/abuse-user-reports" as const,
|
endpoint: "admin/abuse-user-reports" as const,
|
||||||
|
@ -120,7 +118,7 @@ const pagination = {
|
||||||
};
|
};
|
||||||
|
|
||||||
function resolved(reportId) {
|
function resolved(reportId) {
|
||||||
reports.value.removeItem((item) => item.id === reportId);
|
reports.value?.removeItem((item) => item.id === reportId);
|
||||||
}
|
}
|
||||||
|
|
||||||
const headerActions = computed(() => []);
|
const headerActions = computed(() => []);
|
||||||
|
|
|
@ -76,7 +76,7 @@ import * as os from "@/os";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||||
|
|
||||||
let announcements: any[] = ref([]);
|
const announcements = ref<any[]>([]);
|
||||||
|
|
||||||
os.api("admin/announcements/list").then((announcementResponse) => {
|
os.api("admin/announcements/list").then((announcementResponse) => {
|
||||||
announcements.value = announcementResponse;
|
announcements.value = announcementResponse;
|
||||||
|
|
|
@ -88,11 +88,11 @@ const MkCaptcha = defineAsyncComponent(
|
||||||
() => import("@/components/MkCaptcha.vue"),
|
() => import("@/components/MkCaptcha.vue"),
|
||||||
);
|
);
|
||||||
|
|
||||||
let provider = ref(null);
|
const provider = ref<any>(null);
|
||||||
let hcaptchaSiteKey: string | null = ref(null);
|
const hcaptchaSiteKey = ref<string | null>(null);
|
||||||
let hcaptchaSecretKey: string | null = ref(null);
|
const hcaptchaSecretKey = ref<string | null>(null);
|
||||||
let recaptchaSiteKey: string | null = ref(null);
|
const recaptchaSiteKey = ref<string | null>(null);
|
||||||
let recaptchaSecretKey: string | null = ref(null);
|
const recaptchaSecretKey = ref<string | null>(null);
|
||||||
|
|
||||||
async function init() {
|
async function init() {
|
||||||
const meta = await os.api("admin/meta");
|
const meta = await os.api("admin/meta");
|
||||||
|
|
|
@ -17,15 +17,13 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, watch, computed } from "vue";
|
// import { ref, watch } from "vue";
|
||||||
import FormTextarea from "@/components/form/textarea.vue";
|
import FormTextarea from "@/components/form/textarea.vue";
|
||||||
import FormInfo from "@/components/MkInfo.vue";
|
import FormInfo from "@/components/MkInfo.vue";
|
||||||
import * as os from "@/os";
|
|
||||||
import { unisonReload } from "@/scripts/unison-reload";
|
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||||
|
|
||||||
const localCustomCss = ref(localStorage.getItem("customCss") ?? "");
|
// const localCustomCss = ref(localStorage.getItem("customCss") ?? "");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
async function apply() {
|
async function apply() {
|
||||||
|
@ -45,10 +43,6 @@ watch(globalCustomCss, async () => {
|
||||||
});
|
});
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const headerActions = computed(() => []);
|
|
||||||
|
|
||||||
const headerTabs = computed(() => []);
|
|
||||||
|
|
||||||
definePageMetadata({
|
definePageMetadata({
|
||||||
title: i18n.ts.customCss,
|
title: i18n.ts.customCss,
|
||||||
icon: "ph-code ph-bold ph-lg",
|
icon: "ph-code ph-bold ph-lg",
|
||||||
|
|
|
@ -36,7 +36,6 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed } from "vue";
|
import { computed } from "vue";
|
||||||
|
|
||||||
import {} from "vue";
|
|
||||||
import FormSuspense from "@/components/form/suspense.vue";
|
import FormSuspense from "@/components/form/suspense.vue";
|
||||||
import FormButton from "@/components/MkButton.vue";
|
import FormButton from "@/components/MkButton.vue";
|
||||||
import MkKeyValue from "@/components/MkKeyValue.vue";
|
import MkKeyValue from "@/components/MkKeyValue.vue";
|
||||||
|
|
|
@ -93,7 +93,6 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, computed } from "vue";
|
import { ref, computed } from "vue";
|
||||||
|
|
||||||
import {} from "vue";
|
|
||||||
import FormSwitch from "@/components/form/switch.vue";
|
import FormSwitch from "@/components/form/switch.vue";
|
||||||
import FormInput from "@/components/form/input.vue";
|
import FormInput from "@/components/form/input.vue";
|
||||||
import FormInfo from "@/components/MkInfo.vue";
|
import FormInfo from "@/components/MkInfo.vue";
|
||||||
|
@ -105,13 +104,13 @@ import { fetchInstance, instance } from "@/instance";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||||
|
|
||||||
let enableEmail: boolean = ref(false);
|
const enableEmail = ref(false);
|
||||||
let email: any = ref(null);
|
const email: any = ref(null);
|
||||||
let smtpSecure: boolean = ref(false);
|
const smtpSecure = ref(false);
|
||||||
let smtpHost: string = ref("");
|
const smtpHost = ref("");
|
||||||
let smtpPort: number = ref(0);
|
const smtpPort = ref(0);
|
||||||
let smtpUser: string = ref("");
|
const smtpUser = ref("");
|
||||||
let smtpPass: string = ref("");
|
const smtpPass = ref("");
|
||||||
|
|
||||||
async function init() {
|
async function init() {
|
||||||
const meta = await os.api("admin/meta");
|
const meta = await os.api("admin/meta");
|
||||||
|
|
|
@ -43,13 +43,11 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
|
||||||
import {} from "vue";
|
|
||||||
import XModalWindow from "@/components/MkModalWindow.vue";
|
import XModalWindow from "@/components/MkModalWindow.vue";
|
||||||
import MkButton from "@/components/MkButton.vue";
|
import MkButton from "@/components/MkButton.vue";
|
||||||
import MkInput from "@/components/form/input.vue";
|
import MkInput from "@/components/form/input.vue";
|
||||||
import MkTextarea from "@/components/form/textarea.vue";
|
import MkTextarea from "@/components/form/textarea.vue";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import { unique } from "@/scripts/array";
|
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import { emojiCategories } from "@/instance";
|
import { emojiCategories } from "@/instance";
|
||||||
|
|
||||||
|
@ -57,12 +55,12 @@ const props = defineProps<{
|
||||||
emoji: any;
|
emoji: any;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let dialog = ref(null);
|
const dialog = ref<any>(null);
|
||||||
let name: string = ref(props.emoji.name);
|
const name = ref<string>(props.emoji.name);
|
||||||
let category: string = ref(props.emoji.category);
|
const category = ref<string>(props.emoji.category);
|
||||||
let aliases: string = ref(props.emoji.aliases.join(" "));
|
const aliases = ref<string>(props.emoji.aliases.join(" "));
|
||||||
let categories: string[] = ref(emojiCategories);
|
const categories = ref(emojiCategories);
|
||||||
let license: string = ref(props.emoji.license ?? "");
|
const license = ref<string>(props.emoji.license ?? "");
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(ev: "done", v: { deleted?: boolean; updated?: any }): void;
|
(ev: "done", v: { deleted?: boolean; updated?: any }): void;
|
||||||
|
|
|
@ -154,17 +154,10 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {
|
import { computed, defineAsyncComponent, ref } from "vue";
|
||||||
computed,
|
|
||||||
defineAsyncComponent,
|
|
||||||
defineComponent,
|
|
||||||
ref,
|
|
||||||
toRef,
|
|
||||||
} from "vue";
|
|
||||||
import MkButton from "@/components/MkButton.vue";
|
import MkButton from "@/components/MkButton.vue";
|
||||||
import MkInput from "@/components/form/input.vue";
|
import MkInput from "@/components/form/input.vue";
|
||||||
import MkPagination from "@/components/MkPagination.vue";
|
import MkPagination from "@/components/MkPagination.vue";
|
||||||
import MkTab from "@/components/MkTab.vue";
|
|
||||||
import MkSwitch from "@/components/form/switch.vue";
|
import MkSwitch from "@/components/form/switch.vue";
|
||||||
import FormSplit from "@/components/form/split.vue";
|
import FormSplit from "@/components/form/split.vue";
|
||||||
import { selectFile, selectFiles } from "@/scripts/select-file";
|
import { selectFile, selectFiles } from "@/scripts/select-file";
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, computed } from "vue";
|
import { ref, computed } from "vue";
|
||||||
|
|
||||||
import {} from "vue";
|
|
||||||
import MkStickyContainer from "@/components/global/MkStickyContainer.vue";
|
import MkStickyContainer from "@/components/global/MkStickyContainer.vue";
|
||||||
import FormSuspense from "@/components/form/suspense.vue";
|
import FormSuspense from "@/components/form/suspense.vue";
|
||||||
import FormSwitch from "@/components/form/switch.vue";
|
import FormSwitch from "@/components/form/switch.vue";
|
||||||
|
@ -38,8 +37,8 @@ import { fetchInstance } from "@/instance";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||||
|
|
||||||
let enablePostImports = ref(false);
|
const enablePostImports = ref(false);
|
||||||
let meta = ref<MetaExperiments | null>(null);
|
const meta = ref<MetaExperiments | null>(null);
|
||||||
|
|
||||||
type MetaExperiments = {
|
type MetaExperiments = {
|
||||||
experimentalFeatures?: {
|
experimentalFeatures?: {
|
||||||
|
|
|
@ -80,9 +80,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, defineAsyncComponent, ref } from "vue";
|
import { computed, ref } from "vue";
|
||||||
import * as Acct from "firefish-js/built/acct";
|
|
||||||
import MkButton from "@/components/MkButton.vue";
|
|
||||||
import MkInput from "@/components/form/input.vue";
|
import MkInput from "@/components/form/input.vue";
|
||||||
import MkSelect from "@/components/form/select.vue";
|
import MkSelect from "@/components/form/select.vue";
|
||||||
import MkFileListForAdmin from "@/components/MkFileListForAdmin.vue";
|
import MkFileListForAdmin from "@/components/MkFileListForAdmin.vue";
|
||||||
|
@ -91,11 +89,11 @@ import * as os from "@/os";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||||
|
|
||||||
let origin = ref("local");
|
const origin = ref("local");
|
||||||
let type = ref(null);
|
const type = ref(null);
|
||||||
let searchHost = ref("");
|
const searchHost = ref("");
|
||||||
let userId = ref("");
|
const userId = ref("");
|
||||||
let viewMode = ref("grid");
|
const viewMode = ref("grid");
|
||||||
const pagination = {
|
const pagination = {
|
||||||
endpoint: "admin/drive/files" as const,
|
endpoint: "admin/drive/files" as const,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
|
@ -134,8 +132,6 @@ const headerActions = computed(() => [
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const headerTabs = computed(() => []);
|
|
||||||
|
|
||||||
definePageMetadata(
|
definePageMetadata(
|
||||||
computed(() => ({
|
computed(() => ({
|
||||||
title: i18n.ts.files,
|
title: i18n.ts.files,
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, computed } from "vue";
|
import { ref, computed } from "vue";
|
||||||
|
|
||||||
import {} from "vue";
|
|
||||||
import FormButton from "@/components/MkButton.vue";
|
import FormButton from "@/components/MkButton.vue";
|
||||||
import FormTextarea from "@/components/form/textarea.vue";
|
import FormTextarea from "@/components/form/textarea.vue";
|
||||||
import FormSuspense from "@/components/form/suspense.vue";
|
import FormSuspense from "@/components/form/suspense.vue";
|
||||||
|
@ -37,7 +36,7 @@ import { fetchInstance } from "@/instance";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||||
|
|
||||||
let hiddenTags: string = ref("");
|
const hiddenTags = ref("");
|
||||||
|
|
||||||
async function init() {
|
async function init() {
|
||||||
const meta = await os.api("admin/meta");
|
const meta = await os.api("admin/meta");
|
||||||
|
|
|
@ -60,9 +60,6 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {
|
import {
|
||||||
defineAsyncComponent,
|
|
||||||
inject,
|
|
||||||
nextTick,
|
|
||||||
onMounted,
|
onMounted,
|
||||||
onUnmounted,
|
onUnmounted,
|
||||||
onActivated,
|
onActivated,
|
||||||
|
@ -74,7 +71,6 @@ import {
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import MkSuperMenu from "@/components/MkSuperMenu.vue";
|
import MkSuperMenu from "@/components/MkSuperMenu.vue";
|
||||||
import MkInfo from "@/components/MkInfo.vue";
|
import MkInfo from "@/components/MkInfo.vue";
|
||||||
import { scroll } from "@/scripts/scroll";
|
|
||||||
import { instance } from "@/instance";
|
import { instance } from "@/instance";
|
||||||
import { version } from "@/config";
|
import { version } from "@/config";
|
||||||
import { $i } from "@/account";
|
import { $i } from "@/account";
|
||||||
|
@ -88,7 +84,6 @@ import { useRouter } from "@/router";
|
||||||
import {
|
import {
|
||||||
definePageMetadata,
|
definePageMetadata,
|
||||||
provideMetadataReceiver,
|
provideMetadataReceiver,
|
||||||
setPageMetadata,
|
|
||||||
} from "@/scripts/page-metadata";
|
} from "@/scripts/page-metadata";
|
||||||
|
|
||||||
const isEmpty = (x: string | null) => x == null || x === "";
|
const isEmpty = (x: string | null) => x == null || x === "";
|
||||||
|
@ -103,21 +98,19 @@ const indexInfo = {
|
||||||
|
|
||||||
provide("shouldOmitHeaderTitle", false);
|
provide("shouldOmitHeaderTitle", false);
|
||||||
|
|
||||||
let INFO = ref(indexInfo);
|
const INFO = ref(indexInfo);
|
||||||
let childInfo = ref(null);
|
const childInfo = ref(null);
|
||||||
let narrow = ref(false);
|
const narrow = ref(false);
|
||||||
let view = ref(null);
|
const noMaintainerInformation =
|
||||||
let pageProps = ref({});
|
|
||||||
let noMaintainerInformation =
|
|
||||||
isEmpty(instance.maintainerName) || isEmpty(instance.maintainerEmail);
|
isEmpty(instance.maintainerName) || isEmpty(instance.maintainerEmail);
|
||||||
let noBotProtection =
|
const noBotProtection =
|
||||||
!instance.disableRegistration &&
|
!instance.disableRegistration &&
|
||||||
!instance.enableHcaptcha &&
|
!instance.enableHcaptcha &&
|
||||||
!instance.enableRecaptcha;
|
!instance.enableRecaptcha;
|
||||||
let noEmailServer = !instance.enableEmail;
|
const noEmailServer = !instance.enableEmail;
|
||||||
let thereIsUnresolvedAbuseReport = ref(false);
|
const thereIsUnresolvedAbuseReport = ref(false);
|
||||||
let updateAvailable = ref(false);
|
const updateAvailable = ref(false);
|
||||||
let currentPage = computed(() => router.currentRef.value.child);
|
const currentPage = computed(() => router.currentRef.value.child);
|
||||||
|
|
||||||
os.api("admin/abuse-user-reports", {
|
os.api("admin/abuse-user-reports", {
|
||||||
state: "unresolved",
|
state: "unresolved",
|
||||||
|
|
|
@ -45,7 +45,6 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, computed } from "vue";
|
import { ref, computed } from "vue";
|
||||||
|
|
||||||
import {} from "vue";
|
|
||||||
import FormButton from "@/components/MkButton.vue";
|
import FormButton from "@/components/MkButton.vue";
|
||||||
import FormTextarea from "@/components/form/textarea.vue";
|
import FormTextarea from "@/components/form/textarea.vue";
|
||||||
import FormSuspense from "@/components/form/suspense.vue";
|
import FormSuspense from "@/components/form/suspense.vue";
|
||||||
|
@ -55,9 +54,9 @@ import { fetchInstance } from "@/instance";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||||
|
|
||||||
let blockedHosts: string = ref("");
|
const blockedHosts = ref("");
|
||||||
let silencedHosts: string = ref("");
|
const silencedHosts = ref("");
|
||||||
let tab = ref("block");
|
const tab = ref("block");
|
||||||
|
|
||||||
async function init() {
|
async function init() {
|
||||||
const meta = await os.api("admin/meta");
|
const meta = await os.api("admin/meta");
|
||||||
|
|
|
@ -36,7 +36,6 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
|
||||||
import {} from "vue";
|
|
||||||
import FormSwitch from "@/components/form/switch.vue";
|
import FormSwitch from "@/components/form/switch.vue";
|
||||||
import FormInput from "@/components/form/input.vue";
|
import FormInput from "@/components/form/input.vue";
|
||||||
import FormButton from "@/components/MkButton.vue";
|
import FormButton from "@/components/MkButton.vue";
|
||||||
|
@ -46,10 +45,10 @@ import * as os from "@/os";
|
||||||
import { fetchInstance } from "@/instance";
|
import { fetchInstance } from "@/instance";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
|
||||||
let uri: string = ref("");
|
const uri = ref("");
|
||||||
let enableDiscordIntegration: boolean = ref(false);
|
const enableDiscordIntegration = ref(false);
|
||||||
let discordClientId: string | null = ref(null);
|
const discordClientId = ref(null);
|
||||||
let discordClientSecret: string | null = ref(null);
|
const discordClientSecret = ref(null);
|
||||||
|
|
||||||
async function init() {
|
async function init() {
|
||||||
const meta = await os.api("admin/meta");
|
const meta = await os.api("admin/meta");
|
||||||
|
|
|
@ -36,7 +36,6 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
|
||||||
import {} from "vue";
|
|
||||||
import FormSwitch from "@/components/form/switch.vue";
|
import FormSwitch from "@/components/form/switch.vue";
|
||||||
import FormInput from "@/components/form/input.vue";
|
import FormInput from "@/components/form/input.vue";
|
||||||
import FormButton from "@/components/MkButton.vue";
|
import FormButton from "@/components/MkButton.vue";
|
||||||
|
@ -46,10 +45,10 @@ import * as os from "@/os";
|
||||||
import { fetchInstance } from "@/instance";
|
import { fetchInstance } from "@/instance";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
|
||||||
let uri: string = ref("");
|
const uri = ref("");
|
||||||
let enableGithubIntegration: boolean = ref(false);
|
const enableGithubIntegration = ref(false);
|
||||||
let githubClientId: string | null = ref(null);
|
const githubClientId = ref(null);
|
||||||
let githubClientSecret: string | null = ref(null);
|
const githubClientSecret = ref(null);
|
||||||
|
|
||||||
async function init() {
|
async function init() {
|
||||||
const meta = await os.api("admin/meta");
|
const meta = await os.api("admin/meta");
|
||||||
|
|
|
@ -40,7 +40,6 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, computed } from "vue";
|
import { ref, computed } from "vue";
|
||||||
|
|
||||||
import {} from "vue";
|
|
||||||
import XGithub from "./integrations.github.vue";
|
import XGithub from "./integrations.github.vue";
|
||||||
import XDiscord from "./integrations.discord.vue";
|
import XDiscord from "./integrations.discord.vue";
|
||||||
import FormSuspense from "@/components/form/suspense.vue";
|
import FormSuspense from "@/components/form/suspense.vue";
|
||||||
|
@ -49,13 +48,11 @@ import * as os from "@/os";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||||
|
|
||||||
let enableTwitterIntegration: boolean = ref(false);
|
const enableGithubIntegration = ref(false);
|
||||||
let enableGithubIntegration: boolean = ref(false);
|
const enableDiscordIntegration = ref(false);
|
||||||
let enableDiscordIntegration: boolean = ref(false);
|
|
||||||
|
|
||||||
async function init() {
|
async function init() {
|
||||||
const meta = await os.api("admin/meta");
|
const meta = await os.api("admin/meta");
|
||||||
enableTwitterIntegration.value = meta.enableTwitterIntegration;
|
|
||||||
enableGithubIntegration.value = meta.enableGithubIntegration;
|
enableGithubIntegration.value = meta.enableGithubIntegration;
|
||||||
enableDiscordIntegration.value = meta.enableDiscordIntegration;
|
enableDiscordIntegration.value = meta.enableDiscordIntegration;
|
||||||
}
|
}
|
||||||
|
|
|
@ -151,7 +151,6 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, computed } from "vue";
|
import { ref, computed } from "vue";
|
||||||
|
|
||||||
import {} from "vue";
|
|
||||||
import FormSwitch from "@/components/form/switch.vue";
|
import FormSwitch from "@/components/form/switch.vue";
|
||||||
import FormInput from "@/components/form/input.vue";
|
import FormInput from "@/components/form/input.vue";
|
||||||
import FormSuspense from "@/components/form/suspense.vue";
|
import FormSuspense from "@/components/form/suspense.vue";
|
||||||
|
@ -161,19 +160,19 @@ import { fetchInstance } from "@/instance";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||||
|
|
||||||
let useObjectStorage: boolean = ref(false);
|
const useObjectStorage = ref(false);
|
||||||
let objectStorageBaseUrl: string | null = ref(null);
|
const objectStorageBaseUrl = ref<string | null>(null);
|
||||||
let objectStorageBucket: string | null = ref(null);
|
const objectStorageBucket = ref<string | null>(null);
|
||||||
let objectStoragePrefix: string | null = ref(null);
|
const objectStoragePrefix = ref<string | null>(null);
|
||||||
let objectStorageEndpoint: string | null = ref(null);
|
const objectStorageEndpoint = ref<string | null>(null);
|
||||||
let objectStorageRegion: string | null = ref(null);
|
const objectStorageRegion = ref<string | null>(null);
|
||||||
let objectStoragePort: number | null = ref(null);
|
const objectStoragePort = ref<string | null>(null);
|
||||||
let objectStorageAccessKey: string | null = ref(null);
|
const objectStorageAccessKey = ref<string | null>(null);
|
||||||
let objectStorageSecretKey: string | null = ref(null);
|
const objectStorageSecretKey = ref<string | null>(null);
|
||||||
let objectStorageUseSSL: boolean = ref(false);
|
const objectStorageUseSSL = ref(false);
|
||||||
let objectStorageUseProxy: boolean = ref(false);
|
const objectStorageUseProxy = ref(false);
|
||||||
let objectStorageSetPublicRead: boolean = ref(false);
|
const objectStorageSetPublicRead = ref(false);
|
||||||
let objectStorageS3ForcePathStyle: boolean = ref(true);
|
const objectStorageS3ForcePathStyle = ref(true);
|
||||||
|
|
||||||
async function init() {
|
async function init() {
|
||||||
const meta = await os.api("admin/meta");
|
const meta = await os.api("admin/meta");
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed } from "vue";
|
import { computed } from "vue";
|
||||||
|
|
||||||
import {} from "vue";
|
|
||||||
import FormSuspense from "@/components/form/suspense.vue";
|
import FormSuspense from "@/components/form/suspense.vue";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import { fetchInstance } from "@/instance";
|
import { fetchInstance } from "@/instance";
|
||||||
|
|
|
@ -8,32 +8,22 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {
|
import { onMounted, shallowRef, ref } from "vue";
|
||||||
markRaw,
|
|
||||||
version as vueVersion,
|
|
||||||
onMounted,
|
|
||||||
onBeforeUnmount,
|
|
||||||
nextTick,
|
|
||||||
shallowRef,
|
|
||||||
ref,
|
|
||||||
} from "vue";
|
|
||||||
import { Chart } from "chart.js";
|
import { Chart } from "chart.js";
|
||||||
import tinycolor from "tinycolor2";
|
|
||||||
import gradient from "chartjs-plugin-gradient";
|
import gradient from "chartjs-plugin-gradient";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import { defaultStore } from "@/store";
|
import { defaultStore } from "@/store";
|
||||||
import { useChartTooltip } from "@/scripts/use-chart-tooltip";
|
import { useChartTooltip } from "@/scripts/use-chart-tooltip";
|
||||||
import { chartVLine } from "@/scripts/chart-vline";
|
import { chartVLine } from "@/scripts/chart-vline";
|
||||||
import { alpha } from "@/scripts/color";
|
|
||||||
import { initChart } from "@/scripts/init-chart";
|
import { initChart } from "@/scripts/init-chart";
|
||||||
|
|
||||||
initChart();
|
initChart();
|
||||||
|
|
||||||
const chartEl = shallowRef<HTMLCanvasElement>(null);
|
const chartEl = shallowRef<HTMLCanvasElement>();
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
let chartInstance: Chart = null;
|
let chartInstance: Chart | null = null;
|
||||||
const chartLimit = 7;
|
const chartLimit = 7;
|
||||||
let fetching = ref(true);
|
const fetching = ref(true);
|
||||||
|
|
||||||
const { handler: externalTooltipHandler } = useChartTooltip();
|
const { handler: externalTooltipHandler } = useChartTooltip();
|
||||||
|
|
||||||
|
@ -69,8 +59,6 @@ async function renderChart() {
|
||||||
const colorRead = "#eb6f92";
|
const colorRead = "#eb6f92";
|
||||||
const colorWrite = "#f6c177";
|
const colorWrite = "#f6c177";
|
||||||
|
|
||||||
const max = Math.max(...raw.read);
|
|
||||||
|
|
||||||
chartInstance = new Chart(chartEl.value, {
|
chartInstance = new Chart(chartEl.value, {
|
||||||
type: "bar",
|
type: "bar",
|
||||||
data: {
|
data: {
|
||||||
|
|
|
@ -15,15 +15,10 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, onUnmounted, ref, shallowRef } from "vue";
|
import { onMounted, ref, shallowRef } from "vue";
|
||||||
import { Chart } from "chart.js";
|
import { Chart } from "chart.js";
|
||||||
import gradient from "chartjs-plugin-gradient";
|
import gradient from "chartjs-plugin-gradient";
|
||||||
import tinycolor from "tinycolor2";
|
|
||||||
import MkMiniChart from "@/components/MkMiniChart.vue";
|
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import number from "@/filters/number";
|
|
||||||
import MkNumberDiff from "@/components/MkNumberDiff.vue";
|
|
||||||
import { i18n } from "@/i18n";
|
|
||||||
import { useChartTooltip } from "@/scripts/use-chart-tooltip";
|
import { useChartTooltip } from "@/scripts/use-chart-tooltip";
|
||||||
import { chartVLine } from "@/scripts/chart-vline";
|
import { chartVLine } from "@/scripts/chart-vline";
|
||||||
import { defaultStore } from "@/store";
|
import { defaultStore } from "@/store";
|
||||||
|
@ -35,7 +30,7 @@ initChart();
|
||||||
const chartLimit = 50;
|
const chartLimit = 50;
|
||||||
const chartEl = shallowRef<HTMLCanvasElement>();
|
const chartEl = shallowRef<HTMLCanvasElement>();
|
||||||
const chartEl2 = shallowRef<HTMLCanvasElement>();
|
const chartEl2 = shallowRef<HTMLCanvasElement>();
|
||||||
let fetching = ref(true);
|
const fetching = ref(true);
|
||||||
|
|
||||||
const { handler: externalTooltipHandler } = useChartTooltip();
|
const { handler: externalTooltipHandler } = useChartTooltip();
|
||||||
const { handler: externalTooltipHandler2 } = useChartTooltip();
|
const { handler: externalTooltipHandler2 } = useChartTooltip();
|
||||||
|
@ -76,9 +71,6 @@ onMounted(async () => {
|
||||||
const succColor = "#9ccfd8";
|
const succColor = "#9ccfd8";
|
||||||
const failColor = "#f6c177";
|
const failColor = "#f6c177";
|
||||||
|
|
||||||
const succMax = Math.max(...raw.deliverSucceeded);
|
|
||||||
const failMax = Math.max(...raw.deliverFailed);
|
|
||||||
|
|
||||||
new Chart(chartEl.value, {
|
new Chart(chartEl.value, {
|
||||||
type: "line",
|
type: "line",
|
||||||
data: {
|
data: {
|
||||||
|
|
|
@ -56,24 +56,23 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, onUnmounted, ref } from "vue";
|
import { onMounted, ref } from "vue";
|
||||||
import XPie from "./overview.pie.vue";
|
import XPie from "./overview.pie.vue";
|
||||||
import MkMiniChart from "@/components/MkMiniChart.vue";
|
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import number from "@/filters/number";
|
import number from "@/filters/number";
|
||||||
import MkNumberDiff from "@/components/MkNumberDiff.vue";
|
import MkNumberDiff from "@/components/MkNumberDiff.vue";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import { useChartTooltip } from "@/scripts/use-chart-tooltip";
|
import { useChartTooltip } from "@/scripts/use-chart-tooltip";
|
||||||
|
|
||||||
let topSubInstancesForPie: any = ref(null);
|
const topSubInstancesForPie = ref<any>(null);
|
||||||
let topPubInstancesForPie: any = ref(null);
|
const topPubInstancesForPie = ref<any>(null);
|
||||||
let federationPubActive = ref<number | null>(null);
|
const federationPubActive = ref<number | null>(null);
|
||||||
let federationPubActiveDiff = ref<number | null>(null);
|
const federationPubActiveDiff = ref<number | null>(null);
|
||||||
let federationSubActive = ref<number | null>(null);
|
const federationSubActive = ref<number | null>(null);
|
||||||
let federationSubActiveDiff = ref<number | null>(null);
|
const federationSubActiveDiff = ref<number | null>(null);
|
||||||
let fetching = ref(true);
|
const fetching = ref(true);
|
||||||
|
|
||||||
const { handler: externalTooltipHandler } = useChartTooltip();
|
useChartTooltip();
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
const chart = await os.apiGet("charts/federation", {
|
const chart = await os.apiGet("charts/federation", {
|
||||||
|
|
|
@ -23,7 +23,7 @@ import { ref } from "vue";
|
||||||
import MkHeatmap from "@/components/MkHeatmap.vue";
|
import MkHeatmap from "@/components/MkHeatmap.vue";
|
||||||
import MkSelect from "@/components/form/select.vue";
|
import MkSelect from "@/components/form/select.vue";
|
||||||
|
|
||||||
let src = ref("notes");
|
const src = ref("notes");
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" module>
|
<style lang="scss" module>
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, onUnmounted, ref } from "vue";
|
import { ref } from "vue";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import { useInterval } from "@/scripts/use-interval";
|
import { useInterval } from "@/scripts/use-interval";
|
||||||
import MkInstanceCardMini from "@/components/MkInstanceCardMini.vue";
|
import MkInstanceCardMini from "@/components/MkInstanceCardMini.vue";
|
||||||
|
|
|
@ -64,17 +64,17 @@ import { i18n } from "@/i18n";
|
||||||
const meta = await os.api("server-info", {});
|
const meta = await os.api("server-info", {});
|
||||||
const serverStats = await os.api("stats");
|
const serverStats = await os.api("stats");
|
||||||
|
|
||||||
let cpuUsage: number = ref(0);
|
const cpuUsage = ref(0);
|
||||||
|
|
||||||
let memUsage: number = ref(0);
|
const memUsage = ref(0);
|
||||||
let memTotal: number = ref(0);
|
const memTotal = ref(0);
|
||||||
let memUsed: number = ref(0);
|
const memUsed = ref(0);
|
||||||
let memFree: number = ref(0);
|
const memFree = ref(0);
|
||||||
|
|
||||||
let meiliProgress: number = ref(0);
|
const meiliProgress = ref(0);
|
||||||
let meiliTotalSize: number = ref(0);
|
const meiliTotalSize = ref(0);
|
||||||
let meiliIndexCount: number = ref(0);
|
const meiliIndexCount = ref(0);
|
||||||
let meiliAvailable: string = ref("unavailable");
|
const meiliAvailable = ref("unavailable");
|
||||||
|
|
||||||
const diskUsage = computed(() => meta.fs.used / meta.fs.total);
|
const diskUsage = computed(() => meta.fs.used / meta.fs.total);
|
||||||
const diskTotal = computed(() => meta.fs.total);
|
const diskTotal = computed(() => meta.fs.total);
|
||||||
|
|
|
@ -25,13 +25,11 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, onUnmounted, ref } from "vue";
|
import { onMounted, ref } from "vue";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import number from "@/filters/number";
|
|
||||||
import { i18n } from "@/i18n";
|
|
||||||
|
|
||||||
let moderators: any = ref(null);
|
const moderators = ref<any>(null);
|
||||||
let fetching = ref(true);
|
const fetching = ref(true);
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
moderators.value = await os.api("admin/show-users", {
|
moderators.value = await os.api("admin/show-users", {
|
||||||
|
|
|
@ -3,10 +3,8 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, onUnmounted, ref, shallowRef } from "vue";
|
import { onMounted, shallowRef } from "vue";
|
||||||
import { Chart } from "chart.js";
|
import { Chart } from "chart.js";
|
||||||
import number from "@/filters/number";
|
|
||||||
import { defaultStore } from "@/store";
|
|
||||||
import { useChartTooltip } from "@/scripts/use-chart-tooltip";
|
import { useChartTooltip } from "@/scripts/use-chart-tooltip";
|
||||||
import { initChart } from "@/scripts/init-chart";
|
import { initChart } from "@/scripts/init-chart";
|
||||||
|
|
||||||
|
@ -21,7 +19,7 @@ const props = defineProps<{
|
||||||
}[];
|
}[];
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const chartEl = shallowRef<HTMLCanvasElement>(null);
|
const chartEl = shallowRef<HTMLCanvasElement>();
|
||||||
|
|
||||||
const { handler: externalTooltipHandler } = useChartTooltip({
|
const { handler: externalTooltipHandler } = useChartTooltip({
|
||||||
position: "middle",
|
position: "middle",
|
||||||
|
@ -83,5 +81,3 @@ onMounted(() => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { defineComponent, onMounted, onUnmounted, ref } from "vue";
|
import { onMounted, onUnmounted, ref } from "vue";
|
||||||
import {
|
import {
|
||||||
Chart,
|
Chart,
|
||||||
ArcElement,
|
ArcElement,
|
||||||
|
@ -21,9 +21,6 @@ import {
|
||||||
SubTitle,
|
SubTitle,
|
||||||
Filler,
|
Filler,
|
||||||
} from "chart.js";
|
} from "chart.js";
|
||||||
import number from "@/filters/number";
|
|
||||||
import * as os from "@/os";
|
|
||||||
import { defaultStore } from "@/store";
|
|
||||||
import { useChartTooltip } from "@/scripts/use-chart-tooltip";
|
import { useChartTooltip } from "@/scripts/use-chart-tooltip";
|
||||||
|
|
||||||
Chart.register(
|
Chart.register(
|
||||||
|
@ -56,11 +53,7 @@ const alpha = (hex, a) => {
|
||||||
return `rgba(${r}, ${g}, ${b}, ${a})`;
|
return `rgba(${r}, ${g}, ${b}, ${a})`;
|
||||||
};
|
};
|
||||||
|
|
||||||
const chartEl = ref<HTMLCanvasElement>(null);
|
const chartEl = ref<HTMLCanvasElement | null>(null);
|
||||||
|
|
||||||
const gridColor = defaultStore.state.darkMode
|
|
||||||
? "rgba(255, 255, 255, 0.1)"
|
|
||||||
: "rgba(0, 0, 0, 0.1)";
|
|
||||||
|
|
||||||
// フォントカラー
|
// フォントカラー
|
||||||
Chart.defaults.color = getComputedStyle(
|
Chart.defaults.color = getComputedStyle(
|
||||||
|
@ -72,7 +65,7 @@ const { handler: externalTooltipHandler } = useChartTooltip();
|
||||||
let chartInstance: Chart;
|
let chartInstance: Chart;
|
||||||
|
|
||||||
const onStats = (stats) => {
|
const onStats = (stats) => {
|
||||||
chartInstance.data.labels.push("");
|
chartInstance.data.labels?.push("");
|
||||||
chartInstance.data.datasets[0].data.push(
|
chartInstance.data.datasets[0].data.push(
|
||||||
stats[props.domain].activeSincePrevTick,
|
stats[props.domain].activeSincePrevTick,
|
||||||
);
|
);
|
||||||
|
@ -80,7 +73,7 @@ const onStats = (stats) => {
|
||||||
chartInstance.data.datasets[2].data.push(stats[props.domain].waiting);
|
chartInstance.data.datasets[2].data.push(stats[props.domain].waiting);
|
||||||
chartInstance.data.datasets[3].data.push(stats[props.domain].delayed);
|
chartInstance.data.datasets[3].data.push(stats[props.domain].delayed);
|
||||||
if (chartInstance.data.datasets[0].data.length > 100) {
|
if (chartInstance.data.datasets[0].data.length > 100) {
|
||||||
chartInstance.data.labels.shift();
|
chartInstance.data.labels?.shift();
|
||||||
chartInstance.data.datasets[0].data.shift();
|
chartInstance.data.datasets[0].data.shift();
|
||||||
chartInstance.data.datasets[1].data.shift();
|
chartInstance.data.datasets[1].data.shift();
|
||||||
chartInstance.data.datasets[2].data.shift();
|
chartInstance.data.datasets[2].data.shift();
|
||||||
|
@ -91,7 +84,7 @@ const onStats = (stats) => {
|
||||||
|
|
||||||
const onStatsLog = (statsLog) => {
|
const onStatsLog = (statsLog) => {
|
||||||
for (const stats of [...statsLog].reverse()) {
|
for (const stats of [...statsLog].reverse()) {
|
||||||
chartInstance.data.labels.push("");
|
chartInstance.data.labels?.push("");
|
||||||
chartInstance.data.datasets[0].data.push(
|
chartInstance.data.datasets[0].data.push(
|
||||||
stats[props.domain].activeSincePrevTick,
|
stats[props.domain].activeSincePrevTick,
|
||||||
);
|
);
|
||||||
|
@ -99,7 +92,7 @@ const onStatsLog = (statsLog) => {
|
||||||
chartInstance.data.datasets[2].data.push(stats[props.domain].waiting);
|
chartInstance.data.datasets[2].data.push(stats[props.domain].waiting);
|
||||||
chartInstance.data.datasets[3].data.push(stats[props.domain].delayed);
|
chartInstance.data.datasets[3].data.push(stats[props.domain].delayed);
|
||||||
if (chartInstance.data.datasets[0].data.length > 100) {
|
if (chartInstance.data.datasets[0].data.length > 100) {
|
||||||
chartInstance.data.labels.shift();
|
chartInstance.data.labels?.shift();
|
||||||
chartInstance.data.datasets[0].data.shift();
|
chartInstance.data.datasets[0].data.shift();
|
||||||
chartInstance.data.datasets[1].data.shift();
|
chartInstance.data.datasets[1].data.shift();
|
||||||
chartInstance.data.datasets[2].data.shift();
|
chartInstance.data.datasets[2].data.shift();
|
||||||
|
@ -218,5 +211,3 @@ onUnmounted(() => {
|
||||||
props.connection.off("statsLog", onStatsLog);
|
props.connection.off("statsLog", onStatsLog);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
|
||||||
|
|
|
@ -3,10 +3,8 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { watch, onMounted, onUnmounted, ref, shallowRef } from "vue";
|
import { onMounted, shallowRef } from "vue";
|
||||||
import { Chart } from "chart.js";
|
import { Chart } from "chart.js";
|
||||||
import number from "@/filters/number";
|
|
||||||
import * as os from "@/os";
|
|
||||||
import { defaultStore } from "@/store";
|
import { defaultStore } from "@/store";
|
||||||
import { useChartTooltip } from "@/scripts/use-chart-tooltip";
|
import { useChartTooltip } from "@/scripts/use-chart-tooltip";
|
||||||
import { chartVLine } from "@/scripts/chart-vline";
|
import { chartVLine } from "@/scripts/chart-vline";
|
||||||
|
@ -19,7 +17,7 @@ const props = defineProps<{
|
||||||
type: string;
|
type: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const chartEl = shallowRef<HTMLCanvasElement>(null);
|
const chartEl = shallowRef<HTMLCanvasElement>();
|
||||||
|
|
||||||
const { handler: externalTooltipHandler } = useChartTooltip();
|
const { handler: externalTooltipHandler } = useChartTooltip();
|
||||||
|
|
||||||
|
@ -28,10 +26,10 @@ let chartInstance: Chart;
|
||||||
function setData(values) {
|
function setData(values) {
|
||||||
if (chartInstance == null) return;
|
if (chartInstance == null) return;
|
||||||
for (const value of values) {
|
for (const value of values) {
|
||||||
chartInstance.data.labels.push("");
|
chartInstance.data.labels?.push("");
|
||||||
chartInstance.data.datasets[0].data.push(value);
|
chartInstance.data.datasets[0].data.push(value);
|
||||||
if (chartInstance.data.datasets[0].data.length > 100) {
|
if (chartInstance.data.datasets[0].data.length > 100) {
|
||||||
chartInstance.data.labels.shift();
|
chartInstance.data.labels?.shift();
|
||||||
chartInstance.data.datasets[0].data.shift();
|
chartInstance.data.datasets[0].data.shift();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -40,10 +38,10 @@ function setData(values) {
|
||||||
|
|
||||||
function pushData(value) {
|
function pushData(value) {
|
||||||
if (chartInstance == null) return;
|
if (chartInstance == null) return;
|
||||||
chartInstance.data.labels.push("");
|
chartInstance.data.labels?.push("");
|
||||||
chartInstance.data.datasets[0].data.push(value);
|
chartInstance.data.datasets[0].data.push(value);
|
||||||
if (chartInstance.data.datasets[0].data.length > 100) {
|
if (chartInstance.data.datasets[0].data.length > 100) {
|
||||||
chartInstance.data.labels.shift();
|
chartInstance.data.labels?.shift();
|
||||||
chartInstance.data.datasets[0].data.shift();
|
chartInstance.data.datasets[0].data.shift();
|
||||||
}
|
}
|
||||||
chartInstance.update();
|
chartInstance.update();
|
||||||
|
@ -145,5 +143,3 @@ defineExpose({
|
||||||
pushData,
|
pushData,
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
|
||||||
|
|
|
@ -45,9 +45,7 @@
|
||||||
import { markRaw, onMounted, onUnmounted, ref, shallowRef } from "vue";
|
import { markRaw, onMounted, onUnmounted, ref, shallowRef } from "vue";
|
||||||
import XChart from "./overview.queue.chart.vue";
|
import XChart from "./overview.queue.chart.vue";
|
||||||
import number from "@/filters/number";
|
import number from "@/filters/number";
|
||||||
import * as os from "@/os";
|
|
||||||
import { stream } from "@/stream";
|
import { stream } from "@/stream";
|
||||||
import { i18n } from "@/i18n";
|
|
||||||
|
|
||||||
const connection = markRaw(stream.useChannel("queueStats"));
|
const connection = markRaw(stream.useChannel("queueStats"));
|
||||||
|
|
||||||
|
@ -55,10 +53,10 @@ 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);
|
||||||
let chartProcess = shallowRef<InstanceType<typeof XChart>>();
|
const chartProcess = shallowRef<InstanceType<typeof XChart>>();
|
||||||
let chartActive = shallowRef<InstanceType<typeof XChart>>();
|
const chartActive = shallowRef<InstanceType<typeof XChart>>();
|
||||||
let chartDelayed = shallowRef<InstanceType<typeof XChart>>();
|
const chartDelayed = shallowRef<InstanceType<typeof XChart>>();
|
||||||
let chartWaiting = shallowRef<InstanceType<typeof XChart>>();
|
const chartWaiting = shallowRef<InstanceType<typeof XChart>>();
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
domain: string;
|
domain: string;
|
||||||
|
@ -70,10 +68,10 @@ const onStats = (stats) => {
|
||||||
delayed.value = stats[props.domain].delayed;
|
delayed.value = stats[props.domain].delayed;
|
||||||
waiting.value = stats[props.domain].waiting;
|
waiting.value = stats[props.domain].waiting;
|
||||||
|
|
||||||
chartProcess.value.pushData(stats[props.domain].activeSincePrevTick);
|
chartProcess.value?.pushData(stats[props.domain].activeSincePrevTick);
|
||||||
chartActive.value.pushData(stats[props.domain].active);
|
chartActive.value?.pushData(stats[props.domain].active);
|
||||||
chartDelayed.value.pushData(stats[props.domain].delayed);
|
chartDelayed.value?.pushData(stats[props.domain].delayed);
|
||||||
chartWaiting.value.pushData(stats[props.domain].waiting);
|
chartWaiting.value?.pushData(stats[props.domain].waiting);
|
||||||
};
|
};
|
||||||
|
|
||||||
const onStatsLog = (statsLog) => {
|
const onStatsLog = (statsLog) => {
|
||||||
|
@ -89,10 +87,10 @@ const onStatsLog = (statsLog) => {
|
||||||
dataWaiting.push(stats[props.domain].waiting);
|
dataWaiting.push(stats[props.domain].waiting);
|
||||||
}
|
}
|
||||||
|
|
||||||
chartProcess.value.setData(dataProcess);
|
chartProcess.value?.setData(dataProcess);
|
||||||
chartActive.value.setData(dataActive);
|
chartActive.value?.setData(dataActive);
|
||||||
chartDelayed.value.setData(dataDelayed);
|
chartDelayed.value?.setData(dataDelayed);
|
||||||
chartWaiting.value.setData(dataWaiting);
|
chartWaiting.value?.setData(dataWaiting);
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|
|
@ -94,20 +94,18 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, onUnmounted, ref } from "vue";
|
import { onMounted, ref } from "vue";
|
||||||
import MkMiniChart from "@/components/MkMiniChart.vue";
|
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import number from "@/filters/number";
|
|
||||||
import MkNumberDiff from "@/components/MkNumberDiff.vue";
|
import MkNumberDiff from "@/components/MkNumberDiff.vue";
|
||||||
import MkNumber from "@/components/MkNumber.vue";
|
import MkNumber from "@/components/MkNumber.vue";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
|
||||||
let stats: any = ref(null);
|
const stats = ref(null);
|
||||||
let usersComparedToThePrevDay = ref<number>();
|
const usersComparedToThePrevDay = ref<number>();
|
||||||
let notesComparedToThePrevDay = ref<number>();
|
const notesComparedToThePrevDay = ref<number>();
|
||||||
let onlineUsersCount = ref(0);
|
const onlineUsersCount = ref(0);
|
||||||
let emojiCount = ref(0);
|
const emojiCount = ref(0);
|
||||||
let fetching = ref(true);
|
const fetching = ref(true);
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
const [_stats, _onlineUsersCount] = await Promise.all([
|
const [_stats, _onlineUsersCount] = await Promise.all([
|
||||||
|
|
|
@ -28,7 +28,7 @@ const props = defineProps<{
|
||||||
user: misskey.entities.User;
|
user: misskey.entities.User;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let chart = ref(null);
|
const chart = ref(null);
|
||||||
|
|
||||||
os.apiGet("charts/user/notes", {
|
os.apiGet("charts/user/notes", {
|
||||||
userId: props.user.id,
|
userId: props.user.id,
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<MkLoading v-if="fetching" />
|
<MkLoading v-if="fetching" />
|
||||||
<div v-else class="users">
|
<div v-else class="users">
|
||||||
<MkA
|
<MkA
|
||||||
v-for="(user, i) in newUsers"
|
v-for="user in newUsers"
|
||||||
:key="user.id"
|
:key="user.id"
|
||||||
:to="`/user-info/${user.id}`"
|
:to="`/user-info/${user.id}`"
|
||||||
class="user"
|
class="user"
|
||||||
|
@ -20,13 +20,13 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, onUnmounted, ref } from "vue";
|
import { ref } from "vue";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import { useInterval } from "@/scripts/use-interval";
|
import { useInterval } from "@/scripts/use-interval";
|
||||||
import MkUserCardMini from "@/components/MkUserCardMini.vue";
|
import MkUserCardMini from "@/components/MkUserCardMini.vue";
|
||||||
|
|
||||||
let newUsers = ref(null);
|
const newUsers = ref(null);
|
||||||
let fetching = ref(true);
|
const fetching = ref(true);
|
||||||
|
|
||||||
const fetch = async () => {
|
const fetch = async () => {
|
||||||
const _newUsers = await os.api("admin/show-users", {
|
const _newUsers = await os.api("admin/show-users", {
|
||||||
|
|
|
@ -62,13 +62,11 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {
|
import {
|
||||||
markRaw,
|
markRaw,
|
||||||
version as vueVersion,
|
|
||||||
onMounted,
|
onMounted,
|
||||||
onBeforeUnmount,
|
onBeforeUnmount,
|
||||||
nextTick,
|
nextTick,
|
||||||
shallowRef,
|
shallowRef,
|
||||||
ref,
|
ref,
|
||||||
computed,
|
|
||||||
} from "vue";
|
} from "vue";
|
||||||
import XFederation from "./overview.federation.vue";
|
import XFederation from "./overview.federation.vue";
|
||||||
import XInstances from "./overview.instances.vue";
|
import XInstances from "./overview.instances.vue";
|
||||||
|
@ -80,37 +78,23 @@ import XStats from "./overview.stats.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 XMetrics from "./overview.metrics.vue";
|
// import XMetrics from "./overview.metrics.vue";
|
||||||
import MkTagCloud from "@/components/MkTagCloud.vue";
|
|
||||||
import { version, url } from "@/config";
|
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import { stream } from "@/stream";
|
import { stream } from "@/stream";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||||
import { defaultStore } from "@/store";
|
|
||||||
import MkFileListForAdmin from "@/components/MkFileListForAdmin.vue";
|
|
||||||
import MkFolder from "@/components/MkFolder.vue";
|
import MkFolder from "@/components/MkFolder.vue";
|
||||||
|
|
||||||
const rootEl = shallowRef<HTMLElement>();
|
const rootEl = shallowRef<HTMLElement>();
|
||||||
let serverInfo: any = ref(null);
|
const serverInfo = ref<any>(null);
|
||||||
let topSubInstancesForPie: any = ref(null);
|
const topSubInstancesForPie = ref<any>(null);
|
||||||
let topPubInstancesForPie: any = ref(null);
|
const topPubInstancesForPie = ref<any>(null);
|
||||||
let federationPubActive = ref<number | null>(null);
|
const federationPubActive = ref<number | null>(null);
|
||||||
let federationPubActiveDiff = ref<number | null>(null);
|
const federationPubActiveDiff = ref<number | null>(null);
|
||||||
let federationSubActive = ref<number | null>(null);
|
const federationSubActive = ref<number | null>(null);
|
||||||
let federationSubActiveDiff = ref<number | null>(null);
|
const federationSubActiveDiff = ref<number | null>(null);
|
||||||
let newUsers = ref(null);
|
const newUsers = ref(null);
|
||||||
let activeInstances = shallowRef(null);
|
const activeInstances = shallowRef(null);
|
||||||
const queueStatsConnection = markRaw(stream.useChannel("queueStats"));
|
const queueStatsConnection = markRaw(stream.useChannel("queueStats"));
|
||||||
const now = new Date();
|
|
||||||
const filesPagination = {
|
|
||||||
endpoint: "admin/drive/files" as const,
|
|
||||||
limit: 9,
|
|
||||||
noPaging: true,
|
|
||||||
};
|
|
||||||
|
|
||||||
function onInstanceClick(i) {
|
|
||||||
os.pageWindow(`/instance-info/${i.host}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
/*
|
/*
|
||||||
|
@ -185,7 +169,7 @@ onMounted(async () => {
|
||||||
|
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
queueStatsConnection.send("requestLog", {
|
queueStatsConnection.send("requestLog", {
|
||||||
id: Math.random().toString().substr(2, 8),
|
id: Math.random().toString().slice(2, 10),
|
||||||
length: 100,
|
length: 100,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -195,10 +179,6 @@ onBeforeUnmount(() => {
|
||||||
queueStatsConnection.dispose();
|
queueStatsConnection.dispose();
|
||||||
});
|
});
|
||||||
|
|
||||||
const headerActions = computed(() => []);
|
|
||||||
|
|
||||||
const headerTabs = computed(() => []);
|
|
||||||
|
|
||||||
definePageMetadata({
|
definePageMetadata({
|
||||||
title: i18n.ts.dashboard,
|
title: i18n.ts.dashboard,
|
||||||
icon: "ph-gauge ph-bold ph-lg",
|
icon: "ph-gauge ph-bold ph-lg",
|
||||||
|
|
|
@ -65,7 +65,6 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, computed } from "vue";
|
import { ref, computed } from "vue";
|
||||||
|
|
||||||
import {} from "vue";
|
|
||||||
import MkButton from "@/components/MkButton.vue";
|
import MkButton from "@/components/MkButton.vue";
|
||||||
import MkInput from "@/components/form/input.vue";
|
import MkInput from "@/components/form/input.vue";
|
||||||
import MkTextarea from "@/components/form/textarea.vue";
|
import MkTextarea from "@/components/form/textarea.vue";
|
||||||
|
@ -76,12 +75,12 @@ import { i18n } from "@/i18n";
|
||||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||||
import { formatDateTimeString } from "@/scripts/format-time-string";
|
import { formatDateTimeString } from "@/scripts/format-time-string";
|
||||||
|
|
||||||
let ads: any[] = ref([]);
|
const ads = ref([]);
|
||||||
|
|
||||||
os.api("admin/ad/list").then((adsResponse) => {
|
os.api("admin/ad/list").then((adsResponse) => {
|
||||||
ads.value = adsResponse;
|
ads.value = adsResponse;
|
||||||
// The date format should be changed to yyyy-MM-dd in order to be properly displayed
|
// The date format should be changed to yyyy-MM-dd in order to be properly displayed
|
||||||
for (let i in ads.value) {
|
for (const i in ads.value) {
|
||||||
ads.value[i].expiresAt = ads.value[i].expiresAt.substr(0, 10);
|
ads.value[i].expiresAt = ads.value[i].expiresAt.substr(0, 10);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -37,7 +37,6 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, computed } from "vue";
|
import { ref, computed } from "vue";
|
||||||
|
|
||||||
import {} from "vue";
|
|
||||||
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";
|
||||||
|
@ -47,8 +46,8 @@ import { fetchInstance } from "@/instance";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||||
|
|
||||||
let proxyAccount: any = ref(null);
|
const proxyAccount = ref<any>(null);
|
||||||
let proxyAccountId: any = ref(null);
|
const proxyAccountId = ref<any>(null);
|
||||||
|
|
||||||
async function init() {
|
async function init() {
|
||||||
const meta = await os.api("admin/meta");
|
const meta = await os.api("admin/meta");
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { watch, onMounted, onUnmounted, ref } from "vue";
|
import { onMounted, ref } from "vue";
|
||||||
import {
|
import {
|
||||||
Chart,
|
Chart,
|
||||||
ArcElement,
|
ArcElement,
|
||||||
|
@ -21,8 +21,6 @@ import {
|
||||||
SubTitle,
|
SubTitle,
|
||||||
Filler,
|
Filler,
|
||||||
} from "chart.js";
|
} from "chart.js";
|
||||||
import number from "@/filters/number";
|
|
||||||
import * as os from "@/os";
|
|
||||||
import { defaultStore } from "@/store";
|
import { defaultStore } from "@/store";
|
||||||
import { useChartTooltip } from "@/scripts/use-chart-tooltip";
|
import { useChartTooltip } from "@/scripts/use-chart-tooltip";
|
||||||
|
|
||||||
|
@ -55,7 +53,7 @@ const alpha = (hex, a) => {
|
||||||
return `rgba(${r}, ${g}, ${b}, ${a})`;
|
return `rgba(${r}, ${g}, ${b}, ${a})`;
|
||||||
};
|
};
|
||||||
|
|
||||||
const chartEl = ref<HTMLCanvasElement>(null);
|
const chartEl = ref<HTMLCanvasElement | null>(null);
|
||||||
|
|
||||||
const gridColor = defaultStore.state.darkMode
|
const gridColor = defaultStore.state.darkMode
|
||||||
? "rgba(255, 255, 255, 0.1)"
|
? "rgba(255, 255, 255, 0.1)"
|
||||||
|
@ -189,5 +187,3 @@ defineExpose({
|
||||||
pushData,
|
pushData,
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
|
||||||
|
|
|
@ -72,10 +72,10 @@ 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([]);
|
||||||
let chartProcess = ref<InstanceType<typeof XChart>>();
|
const chartProcess = ref<InstanceType<typeof XChart>>();
|
||||||
let chartActive = ref<InstanceType<typeof XChart>>();
|
const chartActive = ref<InstanceType<typeof XChart>>();
|
||||||
let chartDelayed = ref<InstanceType<typeof XChart>>();
|
const chartDelayed = ref<InstanceType<typeof XChart>>();
|
||||||
let chartWaiting = ref<InstanceType<typeof XChart>>();
|
const chartWaiting = ref<InstanceType<typeof XChart>>();
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
domain: string;
|
domain: string;
|
||||||
|
|
|
@ -15,34 +15,13 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {
|
import { ref, computed } from "vue";
|
||||||
markRaw,
|
|
||||||
onMounted,
|
|
||||||
onBeforeUnmount,
|
|
||||||
nextTick,
|
|
||||||
ref,
|
|
||||||
computed,
|
|
||||||
} from "vue";
|
|
||||||
import XQueue from "./queue.chart.vue";
|
import XQueue from "./queue.chart.vue";
|
||||||
import MkButton from "@/components/MkButton.vue";
|
|
||||||
import * as os from "@/os";
|
|
||||||
import * as config from "@/config";
|
import * as config from "@/config";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||||
|
|
||||||
let tab = ref("deliver");
|
const tab = ref("deliver");
|
||||||
|
|
||||||
function clear() {
|
|
||||||
os.confirm({
|
|
||||||
type: "warning",
|
|
||||||
title: i18n.ts.clearQueueConfirmTitle,
|
|
||||||
text: i18n.ts.clearQueueConfirmText,
|
|
||||||
}).then(({ canceled }) => {
|
|
||||||
if (canceled) return;
|
|
||||||
|
|
||||||
os.apiWithDialog("admin/queue/clear");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
const headerActions = computed(() => [
|
const headerActions = computed(() => [
|
||||||
{
|
{
|
||||||
|
|
|
@ -45,13 +45,12 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, computed } from "vue";
|
import { ref, computed } from "vue";
|
||||||
|
|
||||||
import {} from "vue";
|
|
||||||
import MkButton from "@/components/MkButton.vue";
|
import MkButton from "@/components/MkButton.vue";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||||
|
|
||||||
let relays: any[] = ref([]);
|
const relays = ref([]);
|
||||||
|
|
||||||
async function addRelay() {
|
async function addRelay() {
|
||||||
const { canceled, result: inbox } = await os.inputText({
|
const { canceled, result: inbox } = await os.inputText({
|
||||||
|
|
|
@ -257,12 +257,10 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, computed } from "vue";
|
import { ref, computed } from "vue";
|
||||||
|
|
||||||
import {} from "vue";
|
|
||||||
import XBotProtection from "./bot-protection.vue";
|
import XBotProtection from "./bot-protection.vue";
|
||||||
import FormFolder from "@/components/form/folder.vue";
|
import FormFolder from "@/components/form/folder.vue";
|
||||||
import FormRadios from "@/components/form/radios.vue";
|
import FormRadios from "@/components/form/radios.vue";
|
||||||
import FormSwitch from "@/components/form/switch.vue";
|
import FormSwitch from "@/components/form/switch.vue";
|
||||||
import FormInfo from "@/components/MkInfo.vue";
|
|
||||||
import FormSuspense from "@/components/form/suspense.vue";
|
import FormSuspense from "@/components/form/suspense.vue";
|
||||||
import FormRange from "@/components/form/range.vue";
|
import FormRange from "@/components/form/range.vue";
|
||||||
import FormInput from "@/components/form/input.vue";
|
import FormInput from "@/components/form/input.vue";
|
||||||
|
@ -273,19 +271,19 @@ import { fetchInstance } from "@/instance";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||||
|
|
||||||
let summalyProxy: string = ref("");
|
const summalyProxy = ref("");
|
||||||
let enableHcaptcha: boolean = ref(false);
|
const enableHcaptcha = ref(false);
|
||||||
let enableRecaptcha: boolean = ref(false);
|
const enableRecaptcha = ref(false);
|
||||||
let sensitiveMediaDetection: string = ref("none");
|
const sensitiveMediaDetection = ref("none");
|
||||||
let sensitiveMediaDetectionSensitivity: number = ref(0);
|
const sensitiveMediaDetectionSensitivity = ref(0);
|
||||||
let setSensitiveFlagAutomatically: boolean = ref(false);
|
const setSensitiveFlagAutomatically = ref(false);
|
||||||
let enableSensitiveMediaDetectionForVideos: boolean = ref(false);
|
const enableSensitiveMediaDetectionForVideos = ref(false);
|
||||||
let enableIpLogging: boolean = ref(false);
|
const enableIpLogging = ref(false);
|
||||||
let enableActiveEmailValidation: boolean = ref(false);
|
const enableActiveEmailValidation = ref(false);
|
||||||
|
|
||||||
let secureMode: boolean = ref(false);
|
const secureMode = ref(false);
|
||||||
let privateMode: boolean = ref(false);
|
const privateMode = ref(false);
|
||||||
let allowedHosts: string = ref("");
|
const allowedHosts = ref("");
|
||||||
|
|
||||||
async function init() {
|
async function init() {
|
||||||
const meta = await os.api("admin/meta");
|
const meta = await os.api("admin/meta");
|
||||||
|
|
|
@ -209,7 +209,7 @@
|
||||||
|
|
||||||
<FormInput v-model="themeColor" class="_formBlock">
|
<FormInput v-model="themeColor" class="_formBlock">
|
||||||
<template #prefix
|
<template #prefix
|
||||||
><i class="ph-palette ph-bold ph-lg"></i
|
><i class="ph-paconstte ph-bold ph-lg"></i
|
||||||
></template>
|
></template>
|
||||||
<template #label>{{
|
<template #label>{{
|
||||||
i18n.ts.themeColor
|
i18n.ts.themeColor
|
||||||
|
@ -442,42 +442,42 @@ import { fetchInstance } from "@/instance";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||||
|
|
||||||
let name: string | null = ref(null);
|
const name = ref<string | null>(null);
|
||||||
let description: string | null = ref(null);
|
const description = ref<string | null>(null);
|
||||||
let tosUrl: string | null = ref(null);
|
const tosUrl = ref<string | null>(null);
|
||||||
let maintainerName: string | null = ref(null);
|
const maintainerName = ref<string | null>(null);
|
||||||
let maintainerEmail: string | null = ref(null);
|
const maintainerEmail = ref<string | null>(null);
|
||||||
let donationLink: string | null = ref(null);
|
const donationLink = ref<string | null>(null);
|
||||||
let iconUrl: string | null = ref(null);
|
const iconUrl = ref<string | null>(null);
|
||||||
let bannerUrl: string | null = ref(null);
|
const bannerUrl = ref<string | null>(null);
|
||||||
let logoImageUrl: string | null = ref(null);
|
const logoImageUrl = ref<string | null>(null);
|
||||||
let backgroundImageUrl: string | null = ref(null);
|
const backgroundImageUrl = ref<string | null>(null);
|
||||||
let themeColor: any = ref(null);
|
const themeColor: any = ref(null);
|
||||||
let defaultLightTheme: any = ref(null);
|
const defaultLightTheme: any = ref(null);
|
||||||
let defaultDarkTheme: any = ref(null);
|
const defaultDarkTheme: any = ref(null);
|
||||||
let enableLocalTimeline: boolean = ref(false);
|
const enableLocalTimeline = ref(false);
|
||||||
let enableGlobalTimeline: boolean = ref(false);
|
const enableGlobalTimeline = ref(false);
|
||||||
let enableRecommendedTimeline: boolean = ref(false);
|
const enableRecommendedTimeline = ref(false);
|
||||||
let pinnedUsers: string = ref("");
|
const pinnedUsers = ref("");
|
||||||
let customMOTD: string = ref("");
|
const customMOTD = ref("");
|
||||||
let recommendedInstances: string = ref("");
|
const recommendedInstances = ref("");
|
||||||
let customSplashIcons: string = ref("");
|
const customSplashIcons = ref("");
|
||||||
let cacheRemoteFiles: boolean = ref(false);
|
const cacheRemoteFiles = ref(false);
|
||||||
let localDriveCapacityMb: any = ref(0);
|
const localDriveCapacityMb = ref(0);
|
||||||
let remoteDriveCapacityMb: any = ref(0);
|
const remoteDriveCapacityMb = ref(0);
|
||||||
let enableRegistration: boolean = ref(false);
|
const enableRegistration = ref(false);
|
||||||
let emailRequiredForSignup: boolean = ref(false);
|
const emailRequiredForSignup = ref(false);
|
||||||
let enableServiceWorker: boolean = ref(false);
|
const enableServiceWorker = ref(false);
|
||||||
let swPublicKey: any = ref(null);
|
const swPublicKey = ref(null);
|
||||||
let swPrivateKey: any = ref(null);
|
const swPrivateKey = ref(null);
|
||||||
let deeplAuthKey: string = ref("");
|
const deeplAuthKey = ref("");
|
||||||
let deeplIsPro: boolean = ref(false);
|
const deeplIsPro = ref(false);
|
||||||
let libreTranslateApiUrl: string = ref("");
|
const libreTranslateApiUrl = ref("");
|
||||||
let libreTranslateApiKey: string = ref("");
|
const libreTranslateApiKey = ref("");
|
||||||
let defaultReaction: string = ref("");
|
const defaultReaction = ref("");
|
||||||
let defaultReactionCustom: string = ref("");
|
const defaultReactionCustom = ref("");
|
||||||
let enableServerMachineStats: boolean = ref(false);
|
const enableServerMachineStats = ref(false);
|
||||||
let enableIdenticonGeneration: boolean = ref(false);
|
const enableIdenticonGeneration = ref(false);
|
||||||
|
|
||||||
async function init() {
|
async function init() {
|
||||||
const meta = await os.api("admin/meta");
|
const meta = await os.api("admin/meta");
|
||||||
|
@ -554,8 +554,8 @@ function save() {
|
||||||
customSplashIcons: customSplashIcons.value.split("\n"),
|
customSplashIcons: customSplashIcons.value.split("\n"),
|
||||||
recommendedInstances: recommendedInstances.value.split("\n"),
|
recommendedInstances: recommendedInstances.value.split("\n"),
|
||||||
cacheRemoteFiles: cacheRemoteFiles.value,
|
cacheRemoteFiles: cacheRemoteFiles.value,
|
||||||
localDriveCapacityMb: parseInt(localDriveCapacityMb.value, 10),
|
localDriveCapacityMb: localDriveCapacityMb.value,
|
||||||
remoteDriveCapacityMb: parseInt(remoteDriveCapacityMb.value, 10),
|
remoteDriveCapacityMb: remoteDriveCapacityMb.value,
|
||||||
disableRegistration: !enableRegistration.value,
|
disableRegistration: !enableRegistration.value,
|
||||||
emailRequiredForSignup: emailRequiredForSignup.value,
|
emailRequiredForSignup: emailRequiredForSignup.value,
|
||||||
enableServiceWorker: enableServiceWorker.value,
|
enableServiceWorker: enableServiceWorker.value,
|
||||||
|
|
|
@ -133,13 +133,13 @@ import { i18n } from "@/i18n";
|
||||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||||
import MkUserCardMini from "@/components/MkUserCardMini.vue";
|
import MkUserCardMini from "@/components/MkUserCardMini.vue";
|
||||||
|
|
||||||
let paginationComponent = ref<InstanceType<typeof MkPagination>>();
|
const paginationComponent = ref<InstanceType<typeof MkPagination>>();
|
||||||
|
|
||||||
let sort = ref("+createdAt");
|
const sort = ref("+createdAt");
|
||||||
let state = ref("all");
|
const state = ref("all");
|
||||||
let origin = ref("local");
|
const origin = ref("local");
|
||||||
let searchUsername = ref("");
|
const searchUsername = ref("");
|
||||||
let searchHost = ref("");
|
const searchHost = ref("");
|
||||||
const pagination = {
|
const pagination = {
|
||||||
endpoint: "admin/show-users" as const,
|
endpoint: "admin/show-users" as const,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, inject, watch, ref } from "vue";
|
import { computed, watch, ref } from "vue";
|
||||||
import XTimeline from "@/components/MkTimeline.vue";
|
import XTimeline from "@/components/MkTimeline.vue";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import { useRouter } from "@/router";
|
import { useRouter } from "@/router";
|
||||||
|
@ -37,41 +37,28 @@ const props = defineProps<{
|
||||||
antennaId: string;
|
antennaId: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let antenna = ref(null);
|
const antenna = ref(null);
|
||||||
let rootEl = ref<HTMLElement>();
|
const rootEl = ref<HTMLElement>();
|
||||||
let tlEl = ref<InstanceType<typeof XTimeline>>();
|
const tlEl = ref<InstanceType<typeof XTimeline>>();
|
||||||
const keymap = computed(() => ({
|
const keymap = computed(() => ({
|
||||||
t: focus,
|
t: focus,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
async function timetravel() {
|
|
||||||
const { canceled, result: date } = await os.inputDate({
|
|
||||||
title: i18n.ts.date,
|
|
||||||
});
|
|
||||||
if (canceled) return;
|
|
||||||
|
|
||||||
tlEl.value.timetravel(date);
|
|
||||||
}
|
|
||||||
|
|
||||||
function settings() {
|
function settings() {
|
||||||
router.push(`/my/antennas/${props.antennaId}`);
|
router.push(`/my/antennas/${props.antennaId}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function doMarkRead() {
|
// async function doMarkRead() {
|
||||||
const ret = await os.api("antennas/mark-read", {
|
// const ret = await os.api("antennas/mark-read", {
|
||||||
antennaId: props.antennaId,
|
// antennaId: props.antennaId,
|
||||||
});
|
// });
|
||||||
|
//
|
||||||
if (ret) {
|
// if (ret) {
|
||||||
return true;
|
// return true;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
throw new Error("Failed to mark all as read");
|
// throw new Error("Failed to mark all as read");
|
||||||
}
|
// }
|
||||||
|
|
||||||
async function markRead() {
|
|
||||||
await os.promiseDialog(doMarkRead());
|
|
||||||
}
|
|
||||||
|
|
||||||
function focus() {
|
function focus() {
|
||||||
tlEl.value.focus();
|
tlEl.value.focus();
|
||||||
|
@ -90,21 +77,11 @@ watch(
|
||||||
const headerActions = computed(() =>
|
const headerActions = computed(() =>
|
||||||
antenna.value
|
antenna.value
|
||||||
? [
|
? [
|
||||||
// {
|
|
||||||
// icon: "ph-calendar-blank ph-bold ph-lg",
|
|
||||||
// text: i18n.ts.jumpToSpecifiedDate,
|
|
||||||
// handler: timetravel,
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
icon: "ph-gear-six ph-bold ph-lg",
|
icon: "ph-gear-six ph-bold ph-lg",
|
||||||
text: i18n.ts.settings,
|
text: i18n.ts.settings,
|
||||||
handler: settings,
|
handler: settings,
|
||||||
},
|
},
|
||||||
// {
|
|
||||||
// icon: "ph-check ph-bold ph-lg",
|
|
||||||
// text: i18n.ts.markAllAsRead,
|
|
||||||
// handler: markRead,
|
|
||||||
// },
|
|
||||||
]
|
]
|
||||||
: [],
|
: [],
|
||||||
);
|
);
|
||||||
|
|
|
@ -26,7 +26,6 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { defineComponent } from "vue";
|
|
||||||
import MkButton from "@/components/MkButton.vue";
|
import MkButton from "@/components/MkButton.vue";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
|
|
@ -150,5 +150,3 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, inject, watch, ref } from "vue";
|
import { computed, watch, ref } from "vue";
|
||||||
import MkTextarea from "@/components/form/textarea.vue";
|
import MkTextarea from "@/components/form/textarea.vue";
|
||||||
import MkButton from "@/components/MkButton.vue";
|
import MkButton from "@/components/MkButton.vue";
|
||||||
import MkInput from "@/components/form/input.vue";
|
import MkInput from "@/components/form/input.vue";
|
||||||
|
@ -56,11 +56,11 @@ const props = defineProps<{
|
||||||
channelId?: string;
|
channelId?: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let channel = ref(null);
|
const channel = ref(null);
|
||||||
let name = ref(null);
|
const name = ref(null);
|
||||||
let description = ref(null);
|
const description = ref(null);
|
||||||
let bannerUrl = ref<string | null>(null);
|
const bannerUrl = ref<string | null>(null);
|
||||||
let bannerId = ref<string | null>(null);
|
const bannerId = ref<string | null>(null);
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => bannerId.value,
|
() => bannerId.value,
|
||||||
|
@ -140,5 +140,3 @@ definePageMetadata(
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
|
||||||
|
|
|
@ -101,8 +101,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, inject, watch, ref } from "vue";
|
import { computed, watch, ref } from "vue";
|
||||||
import MkContainer from "@/components/MkContainer.vue";
|
|
||||||
import XPostForm from "@/components/MkPostForm.vue";
|
import XPostForm from "@/components/MkPostForm.vue";
|
||||||
import XTimeline from "@/components/MkTimeline.vue";
|
import XTimeline from "@/components/MkTimeline.vue";
|
||||||
import XChannelFollowButton from "@/components/MkChannelFollowButton.vue";
|
import XChannelFollowButton from "@/components/MkChannelFollowButton.vue";
|
||||||
|
@ -118,8 +117,8 @@ const props = defineProps<{
|
||||||
channelId: string;
|
channelId: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let channel = ref(null);
|
const channel = ref(null);
|
||||||
let showBanner = ref(true);
|
const showBanner = ref(true);
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.channelId,
|
() => props.channelId,
|
||||||
|
|
|
@ -111,16 +111,13 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, onMounted, defineComponent, inject, watch, ref } from "vue";
|
import { computed, onMounted, watch, ref } from "vue";
|
||||||
import { Virtual } from "swiper/modules";
|
import { Virtual } from "swiper/modules";
|
||||||
import { Swiper, SwiperSlide } from "swiper/vue";
|
import { Swiper, SwiperSlide } from "swiper/vue";
|
||||||
import MkChannelPreview from "@/components/MkChannelPreview.vue";
|
|
||||||
import MkChannelList from "@/components/MkChannelList.vue";
|
import MkChannelList from "@/components/MkChannelList.vue";
|
||||||
import MkPagination from "@/components/MkPagination.vue";
|
|
||||||
import MkInput from "@/components/form/input.vue";
|
import MkInput from "@/components/form/input.vue";
|
||||||
import MkRadios from "@/components/form/radios.vue";
|
import MkRadios from "@/components/form/radios.vue";
|
||||||
import MkButton from "@/components/MkButton.vue";
|
import MkButton from "@/components/MkButton.vue";
|
||||||
import MkFolder from "@/components/MkFolder.vue";
|
|
||||||
import MkInfo from "@/components/MkInfo.vue";
|
import MkInfo from "@/components/MkInfo.vue";
|
||||||
import { useRouter } from "@/router";
|
import { useRouter } from "@/router";
|
||||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||||
|
@ -133,17 +130,17 @@ import "swiper/scss/virtual";
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
const tabs = ["search", "featured", "following", "owned"];
|
const tabs = ["search", "featured", "following", "owned"];
|
||||||
let tab = ref(tabs[1]);
|
const tab = ref(tabs[1]);
|
||||||
watch(tab, () => syncSlide(tabs.indexOf(tab.value)));
|
watch(tab, () => syncSlide(tabs.indexOf(tab.value)));
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
query: string;
|
query: string;
|
||||||
type?: string;
|
type?: string;
|
||||||
}>();
|
}>();
|
||||||
let key = ref("");
|
const key = ref("");
|
||||||
let searchQuery = ref("");
|
const searchQuery = ref("");
|
||||||
let searchType = ref("nameAndDescription");
|
const searchType = ref("nameAndDescription");
|
||||||
let channelPagination = ref();
|
const channelPagination = ref();
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
searchQuery.value = props.query ?? "";
|
searchQuery.value = props.query ?? "";
|
||||||
searchType.value = props.type ?? "nameAndDescription";
|
searchType.value = props.type ?? "nameAndDescription";
|
||||||
|
|
|
@ -40,7 +40,7 @@ const props = defineProps<{
|
||||||
clipId: string;
|
clipId: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let clip: misskey.entities.Clip = ref<misskey.entities.Clip>();
|
const clip = ref<misskey.entities.Clip>();
|
||||||
const pagination = {
|
const pagination = {
|
||||||
endpoint: "clips/notes" as const,
|
endpoint: "clips/notes" as const,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
|
|
|
@ -7,15 +7,10 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, ref } from "vue";
|
import { computed, ref } from "vue";
|
||||||
import XDrive from "@/components/MkDrive.vue";
|
import XDrive from "@/components/MkDrive.vue";
|
||||||
import * as os from "@/os";
|
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||||
|
|
||||||
let folder = ref(null);
|
const folder = ref(null);
|
||||||
|
|
||||||
const headerActions = computed(() => []);
|
|
||||||
|
|
||||||
const headerTabs = computed(() => []);
|
|
||||||
|
|
||||||
definePageMetadata(
|
definePageMetadata(
|
||||||
computed(() => ({
|
computed(() => ({
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {} from "vue";
|
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import copyToClipboard from "@/scripts/copy-to-clipboard";
|
import copyToClipboard from "@/scripts/copy-to-clipboard";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
|
|
@ -39,11 +39,5 @@ const paginationForRemote = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
// const paginationForRemote = {
|
const tab = ref("local");
|
||||||
// endpoint: 'notes/polls/recommendation' as const,
|
|
||||||
// limit: 10,
|
|
||||||
// offsetMode: true,
|
|
||||||
// };
|
|
||||||
|
|
||||||
let tab = ref("local");
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -145,20 +145,18 @@ import { computed, watch, ref } from "vue";
|
||||||
import XUserList from "@/components/MkUserList.vue";
|
import XUserList from "@/components/MkUserList.vue";
|
||||||
import MkFolder from "@/components/MkFolder.vue";
|
import MkFolder from "@/components/MkFolder.vue";
|
||||||
import MkTab from "@/components/MkTab.vue";
|
import MkTab from "@/components/MkTab.vue";
|
||||||
import number from "@/filters/number";
|
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import { $i } from "@/account";
|
import { $i } from "@/account";
|
||||||
import { instance } from "@/instance";
|
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
tag?: string;
|
tag?: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let origin = ref("local");
|
const origin = ref("local");
|
||||||
let tagsEl = ref<InstanceType<typeof MkFolder>>();
|
const tagsEl = ref<InstanceType<typeof MkFolder>>();
|
||||||
let tagsLocal = ref([]);
|
const tagsLocal = ref([]);
|
||||||
let tagsRemote = ref([]);
|
const tagsRemote = ref([]);
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.tag,
|
() => props.tag,
|
||||||
|
|
|
@ -50,7 +50,7 @@ import "swiper/scss";
|
||||||
import "swiper/scss/virtual";
|
import "swiper/scss/virtual";
|
||||||
|
|
||||||
const tabs = ["users", "featured"];
|
const tabs = ["users", "featured"];
|
||||||
let tab = ref(tabs[0]);
|
const tab = ref(tabs[0]);
|
||||||
watch(tab, () => syncSlide(tabs.indexOf(tab.value)));
|
watch(tab, () => syncSlide(tabs.indexOf(tab.value)));
|
||||||
|
|
||||||
const headerActions = computed(() => []);
|
const headerActions = computed(() => []);
|
||||||
|
|
|
@ -109,10 +109,6 @@ function reject(user) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const headerActions = computed(() => []);
|
|
||||||
|
|
||||||
const headerTabs = computed(() => []);
|
|
||||||
|
|
||||||
definePageMetadata(
|
definePageMetadata(
|
||||||
computed(() => ({
|
computed(() => ({
|
||||||
title: i18n.ts.followRequests,
|
title: i18n.ts.followRequests,
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {} from "vue";
|
|
||||||
import * as Acct from "firefish-js/built/acct";
|
import * as Acct from "firefish-js/built/acct";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import { mainRouter } from "@/router";
|
import { mainRouter } from "@/router";
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, inject, watch, ref } from "vue";
|
import { computed, watch, ref } from "vue";
|
||||||
import FormButton from "@/components/MkButton.vue";
|
import FormButton from "@/components/MkButton.vue";
|
||||||
import FormInput from "@/components/form/input.vue";
|
import FormInput from "@/components/form/input.vue";
|
||||||
import FormTextarea from "@/components/form/textarea.vue";
|
import FormTextarea from "@/components/form/textarea.vue";
|
||||||
|
@ -81,11 +81,11 @@ const props = defineProps<{
|
||||||
postId?: string;
|
postId?: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let init = ref(null);
|
const init = ref(null);
|
||||||
let files = ref([]);
|
const files = ref([]);
|
||||||
let description = ref(null);
|
const description = ref(null);
|
||||||
let title = ref(null);
|
const title = ref(null);
|
||||||
let isSensitive = ref(false);
|
const isSensitive = ref(false);
|
||||||
|
|
||||||
function selectFile(evt) {
|
function selectFile(evt) {
|
||||||
selectFiles(evt.currentTarget ?? evt.target, null).then((selected) => {
|
selectFiles(evt.currentTarget ?? evt.target, null).then((selected) => {
|
||||||
|
|
|
@ -106,7 +106,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, defineComponent, watch, onMounted, ref } from "vue";
|
import { computed, watch, onMounted, ref } from "vue";
|
||||||
import { Virtual } from "swiper/modules";
|
import { Virtual } from "swiper/modules";
|
||||||
import { Swiper, SwiperSlide } from "swiper/vue";
|
import { Swiper, SwiperSlide } from "swiper/vue";
|
||||||
import MkFolder from "@/components/MkFolder.vue";
|
import MkFolder from "@/components/MkFolder.vue";
|
||||||
|
@ -127,10 +127,10 @@ const props = defineProps<{
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const tabs = ["explore", "liked", "my"];
|
const tabs = ["explore", "liked", "my"];
|
||||||
let tab = ref(tabs[0]);
|
const tab = ref(tabs[0]);
|
||||||
watch(tab, () => syncSlide(tabs.indexOf(tab.value)));
|
watch(tab, () => syncSlide(tabs.indexOf(tab.value)));
|
||||||
|
|
||||||
let tagsRef = ref();
|
const tagsRef = ref();
|
||||||
|
|
||||||
const recentPostsPagination = {
|
const recentPostsPagination = {
|
||||||
endpoint: "gallery/posts" as const,
|
endpoint: "gallery/posts" as const,
|
||||||
|
|
|
@ -145,7 +145,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, defineComponent, inject, watch, ref } from "vue";
|
import { computed, watch, ref } from "vue";
|
||||||
import MkButton from "@/components/MkButton.vue";
|
import MkButton from "@/components/MkButton.vue";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import MkContainer from "@/components/MkContainer.vue";
|
import MkContainer from "@/components/MkContainer.vue";
|
||||||
|
@ -164,8 +164,8 @@ const props = defineProps<{
|
||||||
postId: string;
|
postId: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let post = ref(null);
|
const post = ref(null);
|
||||||
let error = ref(null);
|
const error = ref(null);
|
||||||
const otherPostsPagination = {
|
const otherPostsPagination = {
|
||||||
endpoint: "users/gallery/posts" as const,
|
endpoint: "users/gallery/posts" as const,
|
||||||
limit: 6,
|
limit: 6,
|
||||||
|
|
|
@ -378,16 +378,16 @@ const props = defineProps<{
|
||||||
|
|
||||||
let tabs = ["overview"];
|
let tabs = ["overview"];
|
||||||
if (iAmAdmin) tabs.push("chart", "users", "raw");
|
if (iAmAdmin) tabs.push("chart", "users", "raw");
|
||||||
let tab = ref(tabs[0]);
|
const tab = ref(tabs[0]);
|
||||||
watch(tab, () => syncSlide(tabs.indexOf(tab.value)));
|
watch(tab, () => syncSlide(tabs.indexOf(tab.value)));
|
||||||
|
|
||||||
let chartSrc = ref("instance-requests");
|
const chartSrc = ref("instance-requests");
|
||||||
let meta = ref<AugmentedInstanceMetadata | null>(null);
|
const meta = ref<AugmentedInstanceMetadata | null>(null);
|
||||||
let instance = ref<AugmentedInstance | null>(null);
|
const instance = ref<AugmentedInstance | null>(null);
|
||||||
let suspended = ref(false);
|
const suspended = ref(false);
|
||||||
let isBlocked = ref(false);
|
const isBlocked = ref(false);
|
||||||
let isSilenced = ref(false);
|
const isSilenced = ref(false);
|
||||||
let faviconUrl = ref(null);
|
const faviconUrl = ref(null);
|
||||||
|
|
||||||
const usersPagination = {
|
const usersPagination = {
|
||||||
endpoint: iAmAdmin ? "admin/show-users" : ("users" as const),
|
endpoint: iAmAdmin ? "admin/show-users" : ("users" as const),
|
||||||
|
@ -506,7 +506,7 @@ if (iAmAdmin) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
let headerTabs = computed(() => theTabs);
|
const headerTabs = computed(() => theTabs);
|
||||||
|
|
||||||
definePageMetadata({
|
definePageMetadata({
|
||||||
title: props.host,
|
title: props.host,
|
||||||
|
|
|
@ -108,11 +108,11 @@ import "swiper/scss/virtual";
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
let messages = ref([]);
|
const messages = ref([]);
|
||||||
let connection = ref(null);
|
const connection = ref(null);
|
||||||
|
|
||||||
const tabs = ["dms", "groups"];
|
const tabs = ["dms", "groups"];
|
||||||
let tab = ref(tabs[0]);
|
const tab = ref(tabs[0]);
|
||||||
watch(tab, () => syncSlide(tabs.indexOf(tab.value)));
|
watch(tab, () => syncSlide(tabs.indexOf(tab.value)));
|
||||||
|
|
||||||
const MOBILE_THRESHOLD = 500;
|
const MOBILE_THRESHOLD = 500;
|
||||||
|
@ -203,28 +203,6 @@ function onRead(ids): void {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function startMenu(ev) {
|
|
||||||
os.popupMenu(
|
|
||||||
[
|
|
||||||
{
|
|
||||||
text: i18n.ts.messagingWithUser,
|
|
||||||
icon: "ph-user ph-bold ph-lg",
|
|
||||||
action: () => {
|
|
||||||
startUser();
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: i18n.ts.messagingWithGroup,
|
|
||||||
icon: "ph-users-three ph-bold ph-lg",
|
|
||||||
action: () => {
|
|
||||||
startGroup();
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
ev.currentTarget ?? ev.target,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
async function startUser(): void {
|
async function startUser(): void {
|
||||||
os.selectUser().then((user) => {
|
os.selectUser().then((user) => {
|
||||||
router.push(`/my/messaging/${Acct.toString(user)}`);
|
router.push(`/my/messaging/${Acct.toString(user)}`);
|
||||||
|
|
|
@ -74,12 +74,12 @@ const props = defineProps<{
|
||||||
group?: Misskey.entities.UserGroup | null;
|
group?: Misskey.entities.UserGroup | null;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let textEl = ref<HTMLTextAreaElement>();
|
const textEl = ref<HTMLTextAreaElement>();
|
||||||
let fileEl = ref<HTMLInputElement>();
|
const fileEl = ref<HTMLInputElement>();
|
||||||
|
|
||||||
let text = ref<string>("");
|
const text = ref<string>("");
|
||||||
let file = ref<Misskey.entities.DriveFile | null>(null);
|
const file = ref<Misskey.entities.DriveFile | null>(null);
|
||||||
let sending = ref(false);
|
const sending = ref(false);
|
||||||
const typing = throttle(3000, () => {
|
const typing = throttle(3000, () => {
|
||||||
stream.send(
|
stream.send(
|
||||||
"typingOnMessaging",
|
"typingOnMessaging",
|
||||||
|
@ -87,10 +87,10 @@ const typing = throttle(3000, () => {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
let draftKey = computed(() =>
|
const draftKey = computed(() =>
|
||||||
props.user ? "user:" + props.user.id : "group:" + props.group?.id,
|
props.user ? "user:" + props.user.id : "group:" + props.group?.id,
|
||||||
);
|
);
|
||||||
let canSend = computed(
|
const canSend = computed(
|
||||||
() =>
|
() =>
|
||||||
(text.value != null && text.value.trim() !== "") || file.value != null,
|
(text.value != null && text.value.trim() !== "") || file.value != null,
|
||||||
);
|
);
|
||||||
|
@ -166,7 +166,7 @@ function onDrop(ev: DragEvent): void {
|
||||||
|
|
||||||
function onKeydown(ev: KeyboardEvent) {
|
function onKeydown(ev: KeyboardEvent) {
|
||||||
typing();
|
typing();
|
||||||
let sendOnEnter =
|
const sendOnEnter =
|
||||||
localStorage.getItem("enterSendsMessage") === "true" ||
|
localStorage.getItem("enterSendsMessage") === "true" ||
|
||||||
defaultStore.state.enterSendsMessage;
|
defaultStore.state.enterSendsMessage;
|
||||||
if (sendOnEnter) {
|
if (sendOnEnter) {
|
||||||
|
|
|
@ -84,7 +84,6 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed } from "vue";
|
import { computed } from "vue";
|
||||||
|
|
||||||
import {} from "vue";
|
|
||||||
import * as mfm from "mfm-js";
|
import * as mfm from "mfm-js";
|
||||||
import type * as Misskey from "firefish-js";
|
import type * as Misskey from "firefish-js";
|
||||||
import XMediaList from "@/components/MkMediaList.vue";
|
import XMediaList from "@/components/MkMediaList.vue";
|
||||||
|
|
|
@ -129,21 +129,21 @@ const props = defineProps<{
|
||||||
groupId?: string;
|
groupId?: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let rootEl = ref<HTMLDivElement>();
|
const rootEl = ref<HTMLDivElement>();
|
||||||
let formEl = ref<InstanceType<typeof XForm>>();
|
const formEl = ref<InstanceType<typeof XForm>>();
|
||||||
let pagingComponent = ref<InstanceType<typeof MkPagination>>();
|
const pagingComponent = ref<InstanceType<typeof MkPagination>>();
|
||||||
|
|
||||||
let fetching = ref(true);
|
const fetching = ref(true);
|
||||||
let user: Misskey.entities.UserDetailed | null = ref(null);
|
const user = ref<Misskey.entities.UserDetailed | null>(null);
|
||||||
let group: Misskey.entities.UserGroup | null = ref(null);
|
const group = ref<Misskey.entities.UserGroup | null>(null);
|
||||||
let typers: Misskey.entities.User[] = ref([]);
|
const typers = ref<Misskey.entities.User[]>([]);
|
||||||
let connection: Misskey.ChannelConnection<
|
const connection: Misskey.ChannelConnection<
|
||||||
Misskey.Channels["messaging"]
|
Misskey.Channels["messaging"]
|
||||||
> | null = ref(null);
|
> | null = ref(null);
|
||||||
let showIndicator = ref(false);
|
const showIndicator = ref(false);
|
||||||
const { animation } = defaultStore.reactiveState;
|
const { animation } = defaultStore.reactiveState;
|
||||||
|
|
||||||
let pagination: Paging | null = ref(null);
|
const pagination = ref<Paging | null>(null);
|
||||||
|
|
||||||
watch([() => props.userAcct, () => props.groupId], () => {
|
watch([() => props.userAcct, () => props.groupId], () => {
|
||||||
if (connection.value) connection.value.dispose();
|
if (connection.value) connection.value.dispose();
|
||||||
|
@ -323,7 +323,7 @@ function onIndicatorClick() {
|
||||||
thisScrollToBottom();
|
thisScrollToBottom();
|
||||||
}
|
}
|
||||||
|
|
||||||
let scrollRemove: (() => void) | null = ref(null);
|
const scrollRemove = ref<(() => void) | null>(null);
|
||||||
|
|
||||||
function notifyNewMessage() {
|
function notifyNewMessage() {
|
||||||
showIndicator.value = true;
|
showIndicator.value = true;
|
||||||
|
|
|
@ -149,18 +149,18 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- deprecated
|
|
||||||
<div class="section _block">
|
<div class="section _block">
|
||||||
<div class="title">{{ i18n.ts._mfm.search }}</div>
|
<div class="title">{{ i18n.ts._mfm.search }}</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<p>{{ i18n.ts._mfm.searchDescription }}</p>
|
<p>{{ i18n.ts._mfm.searchDescription }}</p>
|
||||||
<div class="preview">
|
<div class="preview">
|
||||||
<Mfm :text="preview_search"/>
|
<Mfm :text="preview_search" />
|
||||||
<MkTextarea v-model="preview_search"><template #label>MFM</template></MkTextarea>
|
<MkTextarea v-model="preview_search"
|
||||||
|
><template #label>MFM</template></MkTextarea
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
-->
|
|
||||||
<div class="section _block">
|
<div class="section _block">
|
||||||
<div class="title">{{ i18n.ts._mfm.flip }}</div>
|
<div class="title">{{ i18n.ts._mfm.flip }}</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
@ -443,7 +443,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { defineComponent, ref } from "vue";
|
import { ref } from "vue";
|
||||||
import MkTextarea from "@/components/form/textarea.vue";
|
import MkTextarea from "@/components/form/textarea.vue";
|
||||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
@ -453,80 +453,82 @@ defineProps<{
|
||||||
popup?: boolean;
|
popup?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let preview_mention = ref("@example");
|
const preview_mention = ref("@example");
|
||||||
let preview_hashtag = ref("#test");
|
const preview_hashtag = ref("#test");
|
||||||
let preview_link = ref(`[${i18n.ts._mfm.dummy}](https://joinfirefish.org)`);
|
const preview_link = ref(`[${i18n.ts._mfm.dummy}](https://joinfirefish.org)`);
|
||||||
let preview_emoji = ref(
|
const preview_emoji = ref(
|
||||||
instance.emojis.length ? `:${instance.emojis[0].name}:` : ":emojiname:",
|
instance.emojis.length ? `:${instance.emojis[0].name}:` : ":emojiname:",
|
||||||
);
|
);
|
||||||
let preview_bold = ref(`**${i18n.ts._mfm.dummy}**`);
|
const preview_bold = ref(`**${i18n.ts._mfm.dummy}**`);
|
||||||
let preview_small = ref(
|
const preview_small = ref(
|
||||||
`<small>${i18n.ts._mfm.dummy}</small> $[small ${i18n.ts._mfm.dummy}]`,
|
`<small>${i18n.ts._mfm.dummy}</small> $[small ${i18n.ts._mfm.dummy}]`,
|
||||||
);
|
);
|
||||||
let preview_center = ref(
|
const preview_center = ref(
|
||||||
`<center>${i18n.ts._mfm.dummy}</center> $[center ${i18n.ts._mfm.dummy}]`,
|
`<center>${i18n.ts._mfm.dummy}</center>\n$[center ${i18n.ts._mfm.dummy}]`,
|
||||||
);
|
);
|
||||||
let preview_inlineCode = ref('`<: "Hello, world!"`');
|
const preview_inlineCode = ref('`<: "Hello, world!"`');
|
||||||
let preview_blockCode = ref(
|
const preview_blockCode = ref(
|
||||||
'```\n~ (#i, 100) {\n\t<: ? ((i % 15) = 0) "FizzBuzz"\n\t\t.? ((i % 3) = 0) "Fizz"\n\t\t.? ((i % 5) = 0) "Buzz"\n\t\t. i\n}\n```',
|
'```\n~ (#i, 100) {\n\t<: ? ((i % 15) = 0) "FizzBuzz"\n\t\t.? ((i % 3) = 0) "Fizz"\n\t\t.? ((i % 5) = 0) "Buzz"\n\t\t. i\n}\n```',
|
||||||
);
|
);
|
||||||
let preview_inlineMath = ref("\\(x= \\frac{-b' \\pm \\sqrt{(b')^2-ac}}{a}\\)");
|
const preview_inlineMath = ref(
|
||||||
let preview_blockMath = ref("\\[x= \\frac{-b' \\pm \\sqrt{(b')^2-ac}}{a}\\]");
|
"\\(x= \\frac{-b' \\pm \\sqrt{(b')^2-ac}}{a}\\)",
|
||||||
let preview_quote = ref(`> ${i18n.ts._mfm.dummy}`);
|
);
|
||||||
let preview_search = ref(
|
const preview_blockMath = ref("\\[x= \\frac{-b' \\pm \\sqrt{(b')^2-ac}}{a}\\]");
|
||||||
|
const preview_quote = ref(`> ${i18n.ts._mfm.dummy}`);
|
||||||
|
const preview_search = ref(
|
||||||
`${i18n.ts._mfm.dummy} [search]\n${i18n.ts._mfm.dummy} [検索]\n${i18n.ts._mfm.dummy} 検索`,
|
`${i18n.ts._mfm.dummy} [search]\n${i18n.ts._mfm.dummy} [検索]\n${i18n.ts._mfm.dummy} 検索`,
|
||||||
);
|
);
|
||||||
let preview_jelly = ref(
|
const preview_jelly = ref(
|
||||||
"$[jelly 🍮] $[jelly.speed=3s 🍮] $[jelly.delay=3s 🍮] $[jelly.loop=3 🍮]",
|
"$[jelly 🍮] $[jelly.speed=3s 🍮] $[jelly.delay=3s 🍮] $[jelly.loop=3 🍮]",
|
||||||
);
|
);
|
||||||
let preview_tada = ref(
|
const preview_tada = ref(
|
||||||
"$[tada 🍮] $[tada.speed=3s 🍮] $[tada.delay=3s 🍮] $[tada.loop=3 🍮]",
|
"$[tada 🍮] $[tada.speed=3s 🍮] $[tada.delay=3s 🍮] $[tada.loop=3 🍮]",
|
||||||
);
|
);
|
||||||
let preview_jump = ref(
|
const preview_jump = ref(
|
||||||
"$[jump 🍮] $[jump.speed=3s 🍮] $[jump.delay=3s 🍮] $[jump.loop=3 🍮]",
|
"$[jump 🍮] $[jump.speed=3s 🍮] $[jump.delay=3s 🍮] $[jump.loop=3 🍮]",
|
||||||
);
|
);
|
||||||
let preview_bounce = ref(
|
const preview_bounce = ref(
|
||||||
"$[bounce 🍮] $[bounce.speed=3s 🍮] $[bounce.delay=3s 🍮] $[bounce.loop=3 🍮]",
|
"$[bounce 🍮] $[bounce.speed=3s 🍮] $[bounce.delay=3s 🍮] $[bounce.loop=3 🍮]",
|
||||||
);
|
);
|
||||||
let preview_shake = ref(
|
const preview_shake = ref(
|
||||||
"$[shake 🍮] $[shake.speed=3s 🍮] $[shake.delay=3s 🍮] $[shake.loop=3 🍮]",
|
"$[shake 🍮] $[shake.speed=3s 🍮] $[shake.delay=3s 🍮] $[shake.loop=3 🍮]",
|
||||||
);
|
);
|
||||||
let preview_twitch = ref(
|
const preview_twitch = ref(
|
||||||
"$[twitch 🍮] $[twitch.speed=3s 🍮] $[twitch.delay=3s 🍮] $[twitch.loop=3 🍮]",
|
"$[twitch 🍮] $[twitch.speed=3s 🍮] $[twitch.delay=3s 🍮] $[twitch.loop=3 🍮]",
|
||||||
);
|
);
|
||||||
let preview_spin = ref(
|
const preview_spin = ref(
|
||||||
"$[spin 🍮] $[spin.left 🍮] $[spin.alternate 🍮]\n$[spin.x 🍮] $[spin.x,left 🍮] $[spin.x,alternate 🍮]\n$[spin.y 🍮] $[spin.y,left 🍮] $[spin.y,alternate 🍮]\n\n$[spin.speed=3s 🍮] $[spin.delay=3s 🍮] $[spin.loop=3 🍮]",
|
"$[spin 🍮] $[spin.left 🍮] $[spin.alternate 🍮]\n$[spin.x 🍮] $[spin.x,left 🍮] $[spin.x,alternate 🍮]\n$[spin.y 🍮] $[spin.y,left 🍮] $[spin.y,alternate 🍮]\n\n$[spin.speed=3s 🍮] $[spin.delay=3s 🍮] $[spin.loop=3 🍮]",
|
||||||
);
|
);
|
||||||
let preview_flip = ref(
|
const preview_flip = ref(
|
||||||
`$[flip ${i18n.ts._mfm.dummy}]\n$[flip.v ${i18n.ts._mfm.dummy}]\n$[flip.h,v ${i18n.ts._mfm.dummy}]`,
|
`$[flip ${i18n.ts._mfm.dummy}]\n$[flip.v ${i18n.ts._mfm.dummy}]\n$[flip.h,v ${i18n.ts._mfm.dummy}]`,
|
||||||
);
|
);
|
||||||
let preview_font = ref(
|
const preview_font = ref(
|
||||||
`$[font.serif ${i18n.ts._mfm.dummy}]\n$[font.monospace ${i18n.ts._mfm.dummy}]\n$[font.cursive ${i18n.ts._mfm.dummy}]\n$[font.fantasy ${i18n.ts._mfm.dummy}]`,
|
`$[font.serif ${i18n.ts._mfm.dummy}]\n$[font.monospace ${i18n.ts._mfm.dummy}]\n$[font.cursive ${i18n.ts._mfm.dummy}]\n$[font.fantasy ${i18n.ts._mfm.dummy}]`,
|
||||||
);
|
);
|
||||||
let preview_x2 = ref("$[x2 🍮]");
|
const preview_x2 = ref("$[x2 🍮]");
|
||||||
let preview_x3 = ref("$[x3 🍮]");
|
const preview_x3 = ref("$[x3 🍮]");
|
||||||
let preview_x4 = ref("$[x4 🍮]");
|
const preview_x4 = ref("$[x4 🍮]");
|
||||||
let preview_blur = ref(`$[blur ${i18n.ts._mfm.dummy}]`);
|
const preview_blur = ref(`$[blur ${i18n.ts._mfm.dummy}]`);
|
||||||
let preview_rainbow = ref(
|
const preview_rainbow = ref(
|
||||||
"$[rainbow 🍮] $[rainbow.speed=3s 🍮] $[rainbow.delay=3s 🍮] $[rainbow.loop=3 🍮]",
|
"$[rainbow 🍮] $[rainbow.speed=3s 🍮] $[rainbow.delay=3s 🍮] $[rainbow.loop=3 🍮]",
|
||||||
);
|
);
|
||||||
let preview_sparkle = ref("$[sparkle 🍮]");
|
const preview_sparkle = ref("$[sparkle 🍮]");
|
||||||
let preview_rotate = ref(
|
const preview_rotate = ref(
|
||||||
"$[rotate 🍮]\n$[rotate.deg=45 🍮]\n$[rotate.x,deg=45 Hello, world!]",
|
"$[rotate 🍮]\n$[rotate.deg=45 🍮]\n$[rotate.x,deg=45 Hello, world!]",
|
||||||
);
|
);
|
||||||
let preview_position = ref("$[position.y=-1 🍮]\n$[position.x=-1 🍮]");
|
const preview_position = ref("$[position.y=-1 🍮]\n$[position.x=-1 🍮]");
|
||||||
let preview_crop = ref(
|
const preview_crop = ref(
|
||||||
"$[crop.top=50 🍮] $[crop.right=50 🍮] $[crop.bottom=50 🍮] $[crop.left=50 🍮]",
|
"$[crop.top=50 🍮] $[crop.right=50 🍮] $[crop.bottom=50 🍮] $[crop.left=50 🍮]",
|
||||||
);
|
);
|
||||||
let preview_scale = ref(
|
const preview_scale = ref(
|
||||||
"$[scale.x=1.3 🍮]\n$[scale.x=1.5,y=3 🍮]\n$[scale.y=0.3 🍮]",
|
"$[scale.x=1.3 🍮]\n$[scale.x=1.5,y=3 🍮]\n$[scale.y=0.3 🍮]",
|
||||||
);
|
);
|
||||||
let preview_fg = ref("$[fg.color=eb6f92 Text color]");
|
const preview_fg = ref("$[fg.color=eb6f92 Text color]");
|
||||||
let preview_bg = ref("$[bg.color=31748f Background color]");
|
const preview_bg = ref("$[bg.color=31748f Background color]");
|
||||||
let preview_plain = ref(
|
const preview_plain = ref(
|
||||||
"<plain>**bold** @mention #hashtag `code` $[x2 🍮]</plain>",
|
"<plain>**bold** @mention #hashtag `code` $[x2 🍮]</plain>",
|
||||||
);
|
);
|
||||||
let preview_fade = ref(
|
const preview_fade = ref(
|
||||||
"$[fade 🍮] $[fade.out 🍮] $[fade.speed=3s 🍮] $[fade.delay=3s 🍮]",
|
"$[fade 🍮] $[fade.out 🍮] $[fade.speed=3s 🍮] $[fade.delay=3s 🍮]",
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,6 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
|
||||||
import {} from "vue";
|
|
||||||
import MkSignin from "@/components/MkSignin.vue";
|
import MkSignin from "@/components/MkSignin.vue";
|
||||||
import MkButton from "@/components/MkButton.vue";
|
import MkButton from "@/components/MkButton.vue";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
|
@ -98,7 +97,7 @@ const props = defineProps<{
|
||||||
|
|
||||||
const _permissions = props.permission.split(",");
|
const _permissions = props.permission.split(",");
|
||||||
|
|
||||||
let state = ref<string | null>(null);
|
const state = ref<string | null>(null);
|
||||||
|
|
||||||
function getIcon(p: string) {
|
function getIcon(p: string) {
|
||||||
return p.includes("write") ? "pencil-simple" : "eye";
|
return p.includes("write") ? "pencil-simple" : "eye";
|
||||||
|
|
|
@ -16,7 +16,7 @@ import { useRouter } from "@/router";
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
let draft = ref({
|
const draft = ref({
|
||||||
name: "",
|
name: "",
|
||||||
src: "all",
|
src: "all",
|
||||||
userListId: null,
|
userListId: null,
|
||||||
|
@ -40,5 +40,3 @@ definePageMetadata({
|
||||||
icon: "ph-flying-saucer ph-bold ph-lg",
|
icon: "ph-flying-saucer ph-bold ph-lg",
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { inject, watch, ref, computed } from "vue";
|
import { ref } from "vue";
|
||||||
import XAntenna from "./editor.vue";
|
import XAntenna from "./editor.vue";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
@ -18,7 +18,7 @@ import { definePageMetadata } from "@/scripts/page-metadata";
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
let antenna: any = ref(null);
|
const antenna = ref();
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
antennaId: string;
|
antennaId: string;
|
||||||
|
@ -34,14 +34,8 @@ os.api("antennas/show", { antennaId: props.antennaId }).then(
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
const headerActions = computed(() => []);
|
|
||||||
|
|
||||||
const headerTabs = computed(() => []);
|
|
||||||
|
|
||||||
definePageMetadata({
|
definePageMetadata({
|
||||||
title: i18n.ts.manageAntennas,
|
title: i18n.ts.manageAntennas,
|
||||||
icon: "ph-flying-saucer ph-bold ph-lg",
|
icon: "ph-flying-saucer ph-bold ph-lg",
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
|
||||||
|
|
|
@ -134,24 +134,24 @@ const emit = defineEmits<{
|
||||||
(ev: "deleted"): void;
|
(ev: "deleted"): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let name: string = ref(props.antenna.name);
|
const name = ref<string>(props.antenna.name);
|
||||||
let src: string = ref(props.antenna.src);
|
const src = ref<string>(props.antenna.src);
|
||||||
let userListId: any = ref(props.antenna.userListId);
|
const userListId = ref(props.antenna.userListId);
|
||||||
let userGroupId: any = ref(props.antenna.userGroupId);
|
const userGroupId = ref(props.antenna.userGroupId);
|
||||||
let users: string = ref(props.antenna.users.join("\n"));
|
const users = ref<string>(props.antenna.users.join("\n"));
|
||||||
let instances: string = ref(props.antenna.instances.join("\n"));
|
const instances = ref<string>(props.antenna.instances.join("\n"));
|
||||||
let keywords: string = ref(
|
const keywords = ref<string>(
|
||||||
props.antenna.keywords.map((x) => x.join(" ")).join("\n"),
|
props.antenna.keywords.map((x) => x.join(" ")).join("\n"),
|
||||||
);
|
);
|
||||||
let excludeKeywords: string = ref(
|
const excludeKeywords = ref<string>(
|
||||||
props.antenna.excludeKeywords.map((x) => x.join(" ")).join("\n"),
|
props.antenna.excludeKeywords.map((x) => x.join(" ")).join("\n"),
|
||||||
);
|
);
|
||||||
let caseSensitive: boolean = ref(props.antenna.caseSensitive);
|
const caseSensitive = ref<boolean>(props.antenna.caseSensitive);
|
||||||
let withReplies: boolean = ref(props.antenna.withReplies);
|
const withReplies = ref<boolean>(props.antenna.withReplies);
|
||||||
let withFile: boolean = ref(props.antenna.withFile);
|
const withFile = ref<boolean>(props.antenna.withFile);
|
||||||
let notify: boolean = ref(props.antenna.notify);
|
const notify = ref<boolean>(props.antenna.notify);
|
||||||
let userLists: any = ref(null);
|
const userLists = ref<any>(null);
|
||||||
let userGroups: any = ref(null);
|
const userGroups = ref<any>(null);
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => src.value,
|
() => src.value,
|
||||||
|
|
|
@ -40,9 +40,7 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, computed } from "vue";
|
import { ref, computed } from "vue";
|
||||||
|
|
||||||
import {} from "vue";
|
|
||||||
import MkPagination from "@/components/MkPagination.vue";
|
import MkPagination from "@/components/MkPagination.vue";
|
||||||
import MkButton from "@/components/MkButton.vue";
|
|
||||||
import MkInfo from "@/components/MkInfo.vue";
|
import MkInfo from "@/components/MkInfo.vue";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
@ -80,14 +78,6 @@ async function create() {
|
||||||
pagingComponent.value.reload();
|
pagingComponent.value.reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
function onClipCreated() {
|
|
||||||
pagingComponent.value.reload();
|
|
||||||
}
|
|
||||||
|
|
||||||
function onClipDeleted() {
|
|
||||||
pagingComponent.value.reload();
|
|
||||||
}
|
|
||||||
|
|
||||||
const headerActions = computed(() => []);
|
const headerActions = computed(() => []);
|
||||||
|
|
||||||
const headerTabs = computed(() => []);
|
const headerTabs = computed(() => []);
|
||||||
|
|
|
@ -44,7 +44,6 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, computed } from "vue";
|
import { ref, computed } from "vue";
|
||||||
|
|
||||||
import {} from "vue";
|
|
||||||
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 MkAvatars from "@/components/MkAvatars.vue";
|
import MkAvatars from "@/components/MkAvatars.vue";
|
||||||
|
|
|
@ -77,8 +77,8 @@ const props = defineProps<{
|
||||||
listId: string;
|
listId: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let list = ref(null);
|
const list = ref<any>(null);
|
||||||
let users = ref([]);
|
const users = ref([]);
|
||||||
|
|
||||||
function fetchList() {
|
function fetchList() {
|
||||||
os.api("users/lists/show", {
|
os.api("users/lists/show", {
|
||||||
|
|
|
@ -12,15 +12,9 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed } from "vue";
|
|
||||||
|
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||||
|
|
||||||
const headerActions = computed(() => []);
|
|
||||||
|
|
||||||
const headerTabs = computed(() => []);
|
|
||||||
|
|
||||||
definePageMetadata({
|
definePageMetadata({
|
||||||
title: i18n.ts.notFound,
|
title: i18n.ts.notFound,
|
||||||
icon: "ph-warning ph-bold ph-lg",
|
icon: "ph-warning ph-bold ph-lg",
|
||||||
|
|
|
@ -69,7 +69,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, defineComponent, watch, ref } from "vue";
|
import { computed, watch, ref } from "vue";
|
||||||
import * as misskey from "firefish-js";
|
import * as misskey from "firefish-js";
|
||||||
import XNoteDetailed from "@/components/MkNoteDetailed.vue";
|
import XNoteDetailed from "@/components/MkNoteDetailed.vue";
|
||||||
import XNotes from "@/components/MkNotes.vue";
|
import XNotes from "@/components/MkNotes.vue";
|
||||||
|
@ -83,14 +83,14 @@ const props = defineProps<{
|
||||||
noteId: string;
|
noteId: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let note = ref<null | misskey.entities.Note>();
|
const note = ref<null | misskey.entities.Note>();
|
||||||
let hasPrev = ref(false);
|
const hasPrev = ref(false);
|
||||||
let hasNext = ref(false);
|
const hasNext = ref(false);
|
||||||
let showPrev = ref(false);
|
const showPrev = ref(false);
|
||||||
let showNext = ref(false);
|
const showNext = ref(false);
|
||||||
let error = ref();
|
const error = ref();
|
||||||
let isRenote = ref(false);
|
const isRenote = ref(false);
|
||||||
let appearNote = ref<null | misskey.entities.Note>();
|
const appearNote = ref<null | misskey.entities.Note>();
|
||||||
|
|
||||||
const prevPagination = {
|
const prevPagination = {
|
||||||
endpoint: "users/notes" as const,
|
endpoint: "users/notes" as const,
|
||||||
|
|
|
@ -66,11 +66,10 @@ import "swiper/scss";
|
||||||
import "swiper/scss/virtual";
|
import "swiper/scss/virtual";
|
||||||
|
|
||||||
const tabs = ["all", "unread", "mentions", "directNotes"];
|
const tabs = ["all", "unread", "mentions", "directNotes"];
|
||||||
let tab = ref(tabs[0]);
|
const tab = ref(tabs[0]);
|
||||||
watch(tab, () => syncSlide(tabs.indexOf(tab.value)));
|
watch(tab, () => syncSlide(tabs.indexOf(tab.value)));
|
||||||
|
|
||||||
let includeTypes = ref<string[] | null>(null);
|
const includeTypes = ref<string[] | null>(null);
|
||||||
let unreadOnly = computed(() => tab.value === "unread");
|
|
||||||
os.api("notifications/mark-all-as-read");
|
os.api("notifications/mark-all-as-read");
|
||||||
|
|
||||||
const MOBILE_THRESHOLD = 500;
|
const MOBILE_THRESHOLD = 500;
|
||||||
|
|
|
@ -96,7 +96,6 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {} from "vue";
|
|
||||||
import XContainer from "../page-editor.container.vue";
|
import XContainer from "../page-editor.container.vue";
|
||||||
import MkSelect from "@/components/form/select.vue";
|
import MkSelect from "@/components/form/select.vue";
|
||||||
import MkInput from "@/components/form/input.vue";
|
import MkInput from "@/components/form/input.vue";
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {} from "vue";
|
|
||||||
import XContainer from "../page-editor.container.vue";
|
import XContainer from "../page-editor.container.vue";
|
||||||
import MkInput from "@/components/form/input.vue";
|
import MkInput from "@/components/form/input.vue";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {} from "vue";
|
|
||||||
import XContainer from "../page-editor.container.vue";
|
import XContainer from "../page-editor.container.vue";
|
||||||
import MkInput from "@/components/form/input.vue";
|
import MkInput from "@/components/form/input.vue";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
|
|
@ -40,7 +40,7 @@ const props = withDefaults(
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
let file: any = ref(null);
|
const file = ref<any>(null);
|
||||||
|
|
||||||
async function choose() {
|
async function choose() {
|
||||||
os.selectDriveFile(false).then((fileResponse: any) => {
|
os.selectDriveFile(false).then((fileResponse: any) => {
|
||||||
|
|
|
@ -56,8 +56,8 @@ const props = withDefaults(
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
let id: any = ref(props.value.note);
|
const id = ref(props.value.note);
|
||||||
let note: any = ref(null);
|
const note = ref(null);
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
id.value,
|
id.value,
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {} from "vue";
|
|
||||||
import XContainer from "../page-editor.container.vue";
|
import XContainer from "../page-editor.container.vue";
|
||||||
import MkInput from "@/components/form/input.vue";
|
import MkInput from "@/components/form/input.vue";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
|
|
@ -26,7 +26,6 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {} from "vue";
|
|
||||||
import XContainer from "../page-editor.container.vue";
|
import XContainer from "../page-editor.container.vue";
|
||||||
import MkTextarea from "@/components/form/textarea.vue";
|
import MkTextarea from "@/components/form/textarea.vue";
|
||||||
import MkInput from "@/components/form/input.vue";
|
import MkInput from "@/components/form/input.vue";
|
||||||
|
|
|
@ -52,7 +52,7 @@ const props = withDefaults(
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
let values: string = ref(props.value.values.join("\n"));
|
const values = ref<string>(props.value.values.join("\n"));
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
values.value,
|
values.value,
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {} from "vue";
|
|
||||||
import XContainer from "../page-editor.container.vue";
|
import XContainer from "../page-editor.container.vue";
|
||||||
import MkSwitch from "@/components/form/switch.vue";
|
import MkSwitch from "@/components/form/switch.vue";
|
||||||
import MkInput from "@/components/form/input.vue";
|
import MkInput from "@/components/form/input.vue";
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {} from "vue";
|
|
||||||
import XContainer from "../page-editor.container.vue";
|
import XContainer from "../page-editor.container.vue";
|
||||||
import MkInput from "@/components/form/input.vue";
|
import MkInput from "@/components/form/input.vue";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {} from "vue";
|
|
||||||
import XContainer from "../page-editor.container.vue";
|
import XContainer from "../page-editor.container.vue";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {} from "vue";
|
|
||||||
import XContainer from "../page-editor.container.vue";
|
import XContainer from "../page-editor.container.vue";
|
||||||
import MkTextarea from "@/components/form/textarea.vue";
|
import MkTextarea from "@/components/form/textarea.vue";
|
||||||
import MkInput from "@/components/form/input.vue";
|
import MkInput from "@/components/form/input.vue";
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {} from "vue";
|
|
||||||
import XContainer from "../page-editor.container.vue";
|
import XContainer from "../page-editor.container.vue";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent, defineAsyncComponent } from "vue";
|
import { defineComponent } from "vue";
|
||||||
import { VueDraggable } from "vue-draggable-plus";
|
import { VueDraggable } from "vue-draggable-plus";
|
||||||
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";
|
||||||
|
@ -37,7 +37,6 @@ import XCounter from "./els/page-editor.el.counter.vue";
|
||||||
import XRadioButton from "./els/page-editor.el.radio-button.vue";
|
import XRadioButton from "./els/page-editor.el.radio-button.vue";
|
||||||
import XCanvas from "./els/page-editor.el.canvas.vue";
|
import XCanvas from "./els/page-editor.el.canvas.vue";
|
||||||
import XNote from "./els/page-editor.el.note.vue";
|
import XNote from "./els/page-editor.el.note.vue";
|
||||||
import * as os from "@/os";
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
|
|
|
@ -160,7 +160,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { defineAsyncComponent, computed, provide, watch, ref } from "vue";
|
import { computed, provide, watch, ref } from "vue";
|
||||||
import { v4 as uuid } from "uuid";
|
import { v4 as uuid } from "uuid";
|
||||||
import XVariable from "./page-editor.script-block.vue";
|
import XVariable from "./page-editor.script-block.vue";
|
||||||
import XBlocks from "./page-editor.blocks.vue";
|
import XBlocks from "./page-editor.blocks.vue";
|
||||||
|
@ -187,25 +187,25 @@ const props = defineProps<{
|
||||||
initUser?: string;
|
initUser?: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let tab = ref("settings");
|
const tab = ref("settings");
|
||||||
let author = ref($i);
|
const author = ref($i);
|
||||||
let readonly = ref(false);
|
const readonly = ref(false);
|
||||||
let page = ref(null);
|
const page = ref(null);
|
||||||
let pageId = ref(null);
|
const pageId = ref(null);
|
||||||
let currentName = ref(null);
|
const currentName = ref(null);
|
||||||
let title = ref("");
|
const title = ref("");
|
||||||
let summary = ref(null);
|
const summary = ref(null);
|
||||||
let name = ref(Date.now().toString());
|
const name = ref(Date.now().toString());
|
||||||
let eyeCatchingImage = ref(null);
|
const eyeCatchingImage = ref(null);
|
||||||
let eyeCatchingImageId = ref(null);
|
const eyeCatchingImageId = ref(null);
|
||||||
let font = ref("sans-serif");
|
const font = ref("sans-serif");
|
||||||
let content = ref([]);
|
const content = ref([]);
|
||||||
let alignCenter = ref(false);
|
const alignCenter = ref(false);
|
||||||
let isPublic = ref(true);
|
const isPublic = ref(true);
|
||||||
let hideTitleWhenPinned = ref(false);
|
const hideTitleWhenPinned = ref(false);
|
||||||
let variables = ref([]);
|
const variables = ref([]);
|
||||||
let hpml = ref(null);
|
const hpml = ref(null);
|
||||||
let script = ref("");
|
const script = ref("");
|
||||||
|
|
||||||
provide("readonly", readonly.value);
|
provide("readonly", readonly.value);
|
||||||
provide("getScriptBlockList", getScriptBlockList);
|
provide("getScriptBlockList", getScriptBlockList);
|
||||||
|
|
|
@ -219,9 +219,9 @@ const props = defineProps<{
|
||||||
username: string;
|
username: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let page = ref(null);
|
const page = ref(null);
|
||||||
let bgImg = ref(null);
|
const bgImg = ref(null);
|
||||||
let error = ref(null);
|
const error = ref(null);
|
||||||
const otherPostsPagination = {
|
const otherPostsPagination = {
|
||||||
endpoint: "users/pages" as const,
|
endpoint: "users/pages" as const,
|
||||||
limit: 6,
|
limit: 6,
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue