merge: upstream

This commit is contained in:
Marie 2024-02-19 10:47:42 +01:00
commit 10bfc61670
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828
1855 changed files with 5717 additions and 4115 deletions

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->

View file

@ -1,16 +1,16 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->
<template>
<div ref="el" class="fdidabkc" :style="{ background: bg }" @click="onClick">
<template v-if="metadata">
<template v-if="pageMetadata">
<div class="titleContainer" @click="showTabsPopup">
<i v-if="metadata.icon" class="icon" :class="metadata.icon"></i>
<i v-if="pageMetadata.icon" class="icon" :class="pageMetadata.icon"></i>
<div class="title">
<div class="title">{{ metadata.title }}</div>
<div class="title">{{ pageMetadata.title }}</div>
</div>
</div>
<div class="tabs">
@ -39,7 +39,7 @@ import { popupMenu } from '@/os.js';
import { scrollToTop } from '@/scripts/scroll.js';
import MkButton from '@/components/MkButton.vue';
import { globalEvents } from '@/events.js';
import { injectPageMetadata } from '@/scripts/page-metadata.js';
import { injectReactiveMetadata } from '@/scripts/page-metadata.js';
type Tab = {
key?: string | null;
@ -65,7 +65,7 @@ const emit = defineEmits<{
(ev: 'update:tab', key: string);
}>();
const metadata = injectPageMetadata();
const pageMetadata = injectReactiveMetadata();
const el = shallowRef<HTMLElement>(null);
const tabRefs = {};
@ -118,7 +118,7 @@ function onTabClick(tab: Tab, ev: MouseEvent): void {
}
const calcBg = () => {
const rawBg = metadata?.bg ?? 'var(--bg)';
const rawBg = pageMetadata.value?.bg ?? 'var(--bg)';
const tinyBg = tinycolor(rawBg.startsWith('var(') ? getComputedStyle(document.documentElement).getPropertyValue(rawBg.slice(4, -1)) : rawBg);
tinyBg.setAlpha(0.85);
bg.value = tinyBg.toRgbString();

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->
@ -87,8 +87,8 @@ const headerActions = computed(() => []);
const headerTabs = computed(() => []);
definePageMetadata({
definePageMetadata(() => ({
title: i18n.ts.abuseReports,
icon: 'ph-warning-circle ph-bold ph-lg',
});
}));
</script>

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->
@ -255,10 +255,10 @@ const headerActions = computed(() => [{
const headerTabs = computed(() => []);
definePageMetadata({
definePageMetadata(() => ({
title: i18n.ts.ads,
icon: 'ph-flag ph-bold ph-lg',
});
}));
</script>
<style lang="scss" module>

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->
@ -157,8 +157,8 @@ const headerActions = computed(() => [{
const headerTabs = computed(() => []);
definePageMetadata({
definePageMetadata(() => ({
title: i18n.ts.announcements,
icon: 'ph-megaphone ph-bold ph-lg',
});
}));
</script>

View file

@ -48,10 +48,10 @@ const headerActions = computed(() => []);
const headerTabs = computed(() => []);
definePageMetadata(computed(() => ({
definePageMetadata(() => ({
title: i18n.ts.approvals,
icon: 'ph-chalkboard-teacher ph-bold ph-lg',
})));
}));
</script>
<style lang="scss" module>

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->
@ -83,6 +83,16 @@ SPDX-License-Identifier: AGPL-3.0-only
<template #caption>{{ i18n.ts.instanceDefaultThemeDescription }}</template>
</MkTextarea>
<MkInput v-model="repositoryUrl" type="url">
<template #prefix><i class="ti ti-link"></i></template>
<template #label>{{ i18n.ts.repositoryUrl }}</template>
</MkInput>
<MkInput v-model="feedbackUrl" type="url">
<template #prefix><i class="ti ti-link"></i></template>
<template #label>{{ i18n.ts.feedbackUrl }}</template>
</MkInput>
<MkTextarea v-model="manifestJsonOverride">
<template #label>{{ i18n.ts._serverSettings.manifestJsonOverride }}</template>
</MkTextarea>
@ -129,6 +139,8 @@ const defaultLike = ref<string>('');
const serverErrorImageUrl = ref<string | null>(null);
const infoImageUrl = ref<string | null>(null);
const notFoundImageUrl = ref<string | null>(null);
const repositoryUrl = ref<string | null>(null);
const feedbackUrl = ref<string | null>(null);
const manifestJsonOverride = ref<string>('{}');
async function init() {
@ -145,6 +157,8 @@ async function init() {
serverErrorImageUrl.value = meta.serverErrorImageUrl;
infoImageUrl.value = meta.infoImageUrl;
notFoundImageUrl.value = meta.notFoundImageUrl;
repositoryUrl.value = meta.repositoryUrl;
feedbackUrl.value = meta.feedbackUrl;
manifestJsonOverride.value = meta.manifestJsonOverride === '' ? '{}' : JSON.stringify(JSON.parse(meta.manifestJsonOverride), null, '\t');
}
@ -161,6 +175,8 @@ function save() {
infoImageUrl: infoImageUrl.value === '' ? null : infoImageUrl.value,
notFoundImageUrl: notFoundImageUrl.value === '' ? null : notFoundImageUrl.value,
serverErrorImageUrl: serverErrorImageUrl.value === '' ? null : serverErrorImageUrl.value,
repositoryUrl: repositoryUrl.value === '' ? null : repositoryUrl.value,
feedbackUrl: feedbackUrl.value === '' ? null : feedbackUrl.value,
manifestJsonOverride: manifestJsonOverride.value === '' ? '{}' : JSON.stringify(JSON5.parse(manifestJsonOverride.value)),
}).then(() => {
fetchInstance();
@ -182,10 +198,10 @@ function chooseNewLike(ev: MouseEvent) {
const headerTabs = computed(() => []);
definePageMetadata({
definePageMetadata(() => ({
title: i18n.ts.branding,
icon: 'ph-paint-roller ph-bold ph-lg',
});
}));
</script>
<style lang="scss" module>

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->
@ -33,8 +33,8 @@ const headerActions = computed(() => []);
const headerTabs = computed(() => []);
definePageMetadata({
definePageMetadata(() => ({
title: i18n.ts.database,
icon: 'ph-database ph-bold ph-lg',
});
}));
</script>

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->
@ -130,10 +130,10 @@ function save() {
const headerTabs = computed(() => []);
definePageMetadata({
definePageMetadata(() => ({
title: i18n.ts.emailServer,
icon: 'ph-envelope ph-bold ph-lg',
});
}));
</script>
<style lang="scss" module>

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->
@ -83,10 +83,10 @@ const headerActions = computed(() => []);
const headerTabs = computed(() => []);
definePageMetadata({
definePageMetadata(() => ({
title: i18n.ts.externalServices,
icon: 'ph-arrow-square-out ph-bold ph-lg',
});
}));
</script>
<style lang="scss" module>

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->
@ -105,10 +105,10 @@ const headerActions = computed(() => []);
const headerTabs = computed(() => []);
definePageMetadata(computed(() => ({
definePageMetadata(() => ({
title: i18n.ts.federation,
icon: 'ph-globe-hemisphere-west ph-bold ph-lg',
})));
}));
</script>
<style lang="scss" module>

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->
@ -108,8 +108,8 @@ const headerActions = computed(() => [{
const headerTabs = computed(() => []);
definePageMetadata(computed(() => ({
definePageMetadata(() => ({
title: i18n.ts.files,
icon: 'ph-cloud ph-bold ph-lg',
})));
}));
</script>

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->
@ -29,7 +29,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</template>
<script lang="ts" setup>
import { ComputedRef, Ref, onActivated, onMounted, onUnmounted, provide, watch, ref, computed } from 'vue';
import { onActivated, onMounted, onUnmounted, provide, watch, ref, computed } from 'vue';
import { i18n } from '@/i18n.js';
import MkSuperMenu from '@/components/MkSuperMenu.vue';
import MkInfo from '@/components/MkInfo.vue';
@ -37,7 +37,7 @@ import { instance } from '@/instance.js';
import * as os from '@/os.js';
import { misskeyApi } from '@/scripts/misskey-api.js';
import { lookupUser, lookupUserByEmail } from '@/scripts/lookup-user.js';
import { PageMetadata, definePageMetadata, provideMetadataReceiver } from '@/scripts/page-metadata.js';
import { PageMetadata, definePageMetadata, provideMetadataReceiver, provideReactiveMetadata } from '@/scripts/page-metadata.js';
import { useRouter } from '@/router/supplier.js';
const isEmpty = (x: string | null) => x == null || x === '';
@ -53,7 +53,7 @@ const indexInfo = {
provide('shouldOmitHeaderTitle', false);
const INFO = ref(indexInfo);
const childInfo: Ref<ComputedRef<PageMetadata> | null> = ref(null);
const childInfo = ref<null | PageMetadata>(null);
const narrow = ref(false);
const view = ref(null);
const el = ref<HTMLDivElement | null>(null);
@ -272,14 +272,16 @@ watch(router.currentRef, (to) => {
}
});
provideMetadataReceiver((info) => {
provideMetadataReceiver((metadataGetter) => {
const info = metadataGetter();
if (info == null) {
childInfo.value = null;
} else {
childInfo.value = info;
INFO.value.needWideArea = info.value.needWideArea ?? undefined;
INFO.value.needWideArea = info.needWideArea ?? undefined;
}
});
provideReactiveMetadata(INFO);
function invite() {
misskeyApi('admin/invite/create').then(x => {
@ -333,7 +335,7 @@ const headerActions = computed(() => []);
const headerTabs = computed(() => []);
definePageMetadata(INFO.value);
definePageMetadata(() => INFO.value);
defineExpose({
header: {

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->
@ -66,8 +66,8 @@ const headerTabs = computed(() => [{
icon: 'ph-eye-closed ph-bold ph-lg',
}]);
definePageMetadata({
definePageMetadata(() => ({
title: i18n.ts.instanceBlocking,
icon: 'ph-prohibit ph-bold ph-lg',
});
}));
</script>

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->
@ -113,10 +113,10 @@ function deleted(id: string) {
const headerActions = computed(() => []);
const headerTabs = computed(() => []);
definePageMetadata({
definePageMetadata(() => ({
title: i18n.ts.invite,
icon: 'ph-user-plus ph-bold ph-lg',
});
}));
</script>
<style lang="scss" module>

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->
@ -133,10 +133,10 @@ function save() {
const headerTabs = computed(() => []);
definePageMetadata({
definePageMetadata(() => ({
title: i18n.ts.moderation,
icon: 'ph-shield ph-bold ph-lg',
});
}));
</script>
<style lang="scss" module>

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->
@ -54,14 +54,12 @@ const pagination = {
})),
};
console.log(Misskey);
const headerActions = computed(() => []);
const headerTabs = computed(() => []);
definePageMetadata({
definePageMetadata(() => ({
title: i18n.ts.moderationLogs,
icon: 'ph-list ph-bold ph-lg-search',
});
}));
</script>

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->
@ -149,10 +149,10 @@ function save() {
const headerTabs = computed(() => []);
definePageMetadata({
definePageMetadata(() => ({
title: i18n.ts.objectStorage,
icon: 'ph-cloud ph-bold ph-lg',
});
}));
</script>
<style lang="scss" module>

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->
@ -106,8 +106,8 @@ const headerActions = computed(() => [{
const headerTabs = computed(() => []);
definePageMetadata({
definePageMetadata(() => ({
title: i18n.ts.other,
icon: 'ph-faders ph-bold ph-lg',
});
}));
</script>

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->
@ -184,10 +184,10 @@ const headerActions = computed(() => []);
const headerTabs = computed(() => []);
definePageMetadata({
definePageMetadata(() => ({
title: i18n.ts.dashboard,
icon: 'ph-gauge ph-bold ph-lg',
});
}));
</script>
<style lang="scss" module>

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->
@ -64,8 +64,8 @@ const headerActions = computed(() => []);
const headerTabs = computed(() => []);
definePageMetadata({
definePageMetadata(() => ({
title: i18n.ts.proxyAccount,
icon: 'ph-ghost ph-bold ph-lg',
});
}));
</script>

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->
@ -68,8 +68,8 @@ const headerTabs = computed(() => [{
title: 'Inbox',
}]);
definePageMetadata({
definePageMetadata(() => ({
title: i18n.ts.jobQueue,
icon: 'ph-clock ph-bold ph-lg-play',
});
}));
</script>

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->
@ -84,10 +84,10 @@ const headerActions = computed(() => [{
const headerTabs = computed(() => []);
definePageMetadata({
definePageMetadata(() => ({
title: i18n.ts.relays,
icon: 'ph-planet ph-bold ph-lg',
});
}));
</script>
<style lang="scss" module>

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->
@ -87,11 +87,8 @@ async function save() {
const headerTabs = computed(() => []);
definePageMetadata(computed(() => role.value ? {
title: i18n.ts._role.edit + ': ' + role.value.name,
icon: 'ph-seal-check ph-bold ph-lg',
} : {
title: i18n.ts._role.new,
definePageMetadata(() => ({
title: role.value ? `${i18n.ts._role.edit}: ${role.value.name}` : i18n.ts._role.new,
icon: 'ph-seal-check ph-bold ph-lg',
}));
</script>

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->
@ -170,10 +170,10 @@ const headerActions = computed(() => []);
const headerTabs = computed(() => []);
definePageMetadata(computed(() => ({
title: i18n.ts.role + ': ' + role.name,
definePageMetadata(() => ({
title: `${i18n.ts.role}: ${role.name}`,
icon: 'ph-seal-check ph-bold ph-lg',
})));
}));
</script>
<style lang="scss" module>

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->
@ -290,10 +290,10 @@ const headerActions = computed(() => []);
const headerTabs = computed(() => []);
definePageMetadata(computed(() => ({
definePageMetadata(() => ({
title: i18n.ts.roles,
icon: 'ph-seal-check ph-bold ph-lg',
})));
}));
</script>
<style lang="scss" module>

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->
@ -163,8 +163,8 @@ const headerActions = computed(() => []);
const headerTabs = computed(() => []);
definePageMetadata({
definePageMetadata(() => ({
title: i18n.ts.security,
icon: 'ph-lock ph-bold ph-lg',
});
}));
</script>

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->
@ -67,10 +67,10 @@ const remove = (index: number): void => {
const headerTabs = computed(() => []);
definePageMetadata({
definePageMetadata(() => ({
title: i18n.ts.serverRules,
icon: 'ph-check ph-bold ph-lgbox',
});
icon: 'ph-check ph-bold ph-lg',
}));
</script>
<style lang="scss" module>

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->
@ -34,6 +34,16 @@ SPDX-License-Identifier: AGPL-3.0-only
</MkInput>
</FormSplit>
<MkInput v-model="repositoryUrl" type="url">
<template #label>{{ i18n.ts.repositoryUrl }}</template>
<template #prefix><i class="ti ti-link"></i></template>
<template #caption>{{ i18n.ts.repositoryUrlDescription }}</template>
</MkInput>
<MkInfo v-if="!instance.providesTarball && !repositoryUrl" warn>
{{ i18n.ts.repositoryUrlOrTarballRequired }}
</MkInfo>
<MkInput v-model="impressumUrl" type="url">
<template #label>{{ i18n.ts.impressumUrl }}</template>
<template #prefix><i class="ph-link ph-bold ph-lg"></i></template>
@ -164,7 +174,7 @@ import FormSplit from '@/components/form/split.vue';
import FormSuspense from '@/components/form/suspense.vue';
import * as os from '@/os.js';
import { misskeyApi } from '@/scripts/misskey-api.js';
import { fetchInstance } from '@/instance.js';
import { fetchInstance, instance } from '@/instance.js';
import { i18n } from '@/i18n.js';
import { definePageMetadata } from '@/scripts/page-metadata.js';
import MkButton from '@/components/MkButton.vue';
@ -174,6 +184,7 @@ const shortName = ref<string | null>(null);
const description = ref<string | null>(null);
const maintainerName = ref<string | null>(null);
const maintainerEmail = ref<string | null>(null);
const repositoryUrl = ref<string | null>(null);
const impressumUrl = ref<string | null>(null);
const donationUrl = ref<string | null>(null);
const pinnedUsers = ref<string>('');
@ -197,6 +208,7 @@ async function init(): Promise<void> {
description.value = meta.description;
maintainerName.value = meta.maintainerName;
maintainerEmail.value = meta.maintainerEmail;
repositoryUrl.value = meta.repositoryUrl;
impressumUrl.value = meta.impressumUrl;
donationUrl.value = meta.donationUrl;
pinnedUsers.value = meta.pinnedUsers.join('\n');
@ -221,6 +233,7 @@ async function save(): void {
description: description.value,
maintainerName: maintainerName.value,
maintainerEmail: maintainerEmail.value,
repositoryUrl: repositoryUrl.value,
impressumUrl: impressumUrl.value,
donationUrl: donationUrl.value,
pinnedUsers: pinnedUsers.value.split('\n'),
@ -243,10 +256,10 @@ async function save(): void {
const headerTabs = computed(() => []);
definePageMetadata({
definePageMetadata(() => ({
title: i18n.ts.general,
icon: 'ph-gear ph-bold ph-lg',
});
}));
</script>
<style lang="scss" module>

View file

@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->
@ -138,10 +138,10 @@ const headerActions = computed(() => [{
const headerTabs = computed(() => []);
definePageMetadata(computed(() => ({
definePageMetadata(() => ({
title: i18n.ts.users,
icon: 'ph-users ph-bold ph-lg',
})));
}));
</script>
<style lang="scss" module>