Merge remote-tracking branch 'misskey-original/develop' into develop
# Conflicts: # package.json # packages/misskey-js/etc/misskey-js.api.md
This commit is contained in:
commit
cba5f494ff
14 changed files with 89 additions and 7 deletions
|
|
@ -107,6 +107,22 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</MkInput>
|
||||
</div>
|
||||
</FormSection>
|
||||
|
||||
<FormSection>
|
||||
<template #label>{{ i18n.ts._ad.adsSettings }}</template>
|
||||
|
||||
<div class="_gaps_m">
|
||||
<div class="_gaps_s">
|
||||
<MkInput v-model="notesPerOneAd" :min="0" type="number">
|
||||
<template #label>{{ i18n.ts._ad.notesPerOneAd }}</template>
|
||||
<template #caption>{{ i18n.ts._ad.setZeroToDisable }}</template>
|
||||
</MkInput>
|
||||
<MkInfo v-if="notesPerOneAd > 0 && notesPerOneAd < 20" :warn="true">
|
||||
{{ i18n.ts._ad.adsTooClose }}
|
||||
</MkInfo>
|
||||
</div>
|
||||
</div>
|
||||
</FormSection>
|
||||
</div>
|
||||
</FormSuspense>
|
||||
</MkSpacer>
|
||||
|
|
@ -127,6 +143,7 @@ import XHeader from './_header_.vue';
|
|||
import MkSwitch from '@/components/MkSwitch.vue';
|
||||
import MkInput from '@/components/MkInput.vue';
|
||||
import MkTextarea from '@/components/MkTextarea.vue';
|
||||
import MkInfo from '@/components/MkInfo.vue';
|
||||
import FormSection from '@/components/form/section.vue';
|
||||
import FormSplit from '@/components/form/split.vue';
|
||||
import FormSuspense from '@/components/form/suspense.vue';
|
||||
|
|
@ -152,6 +169,7 @@ let perLocalUserUserTimelineCacheMax: number = $ref(0);
|
|||
let perRemoteUserUserTimelineCacheMax: number = $ref(0);
|
||||
let perUserHomeTimelineCacheMax: number = $ref(0);
|
||||
let perUserListTimelineCacheMax: number = $ref(0);
|
||||
let notesPerOneAd: number = $ref(0);
|
||||
|
||||
async function init(): Promise<void> {
|
||||
const meta = await os.api('admin/meta');
|
||||
|
|
@ -171,10 +189,11 @@ async function init(): Promise<void> {
|
|||
perRemoteUserUserTimelineCacheMax = meta.perRemoteUserUserTimelineCacheMax;
|
||||
perUserHomeTimelineCacheMax = meta.perUserHomeTimelineCacheMax;
|
||||
perUserListTimelineCacheMax = meta.perUserListTimelineCacheMax;
|
||||
notesPerOneAd = meta.notesPerOneAd;
|
||||
}
|
||||
|
||||
function save(): void {
|
||||
os.apiWithDialog('admin/update-meta', {
|
||||
async function save(): void {
|
||||
await os.apiWithDialog('admin/update-meta', {
|
||||
name,
|
||||
shortName: shortName === '' ? null : shortName,
|
||||
description,
|
||||
|
|
@ -191,9 +210,10 @@ function save(): void {
|
|||
perRemoteUserUserTimelineCacheMax,
|
||||
perUserHomeTimelineCacheMax,
|
||||
perUserListTimelineCacheMax,
|
||||
}).then(() => {
|
||||
fetchInstance();
|
||||
notesPerOneAd,
|
||||
});
|
||||
|
||||
fetchInstance();
|
||||
}
|
||||
|
||||
const headerTabs = $computed(() => []);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue