Merge branch 'develop' of misskey-dev into merge-upstream

This commit is contained in:
まっちゃとーにゅ 2024-01-10 03:10:45 +09:00
commit abe95d9b67
No known key found for this signature in database
GPG key ID: 143DE582A97FE052
376 changed files with 5293 additions and 2636 deletions

View file

@ -97,6 +97,7 @@ import MkFolder from '@/components/MkFolder.vue';
import MkSelect from '@/components/MkSelect.vue';
import FormSplit from '@/components/form/split.vue';
import * as os from '@/os.js';
import { misskeyApi } from '@/scripts/misskey-api.js';
import { i18n } from '@/i18n.js';
import { definePageMetadata } from '@/scripts/page-metadata.js';
@ -109,7 +110,7 @@ const daysOfWeek: string[] = [i18n.ts._weekday.sunday, i18n.ts._weekday.monday,
const filterType = ref('all');
let publishing: boolean | null = null;
os.api('admin/ad/list', { publishing: publishing }).then(adsResponse => {
misskeyApi('admin/ad/list', { publishing: publishing }).then(adsResponse => {
if (adsResponse != null) {
ads.value = adsResponse.map(r => {
const exdate = new Date(r.expiresAt);
@ -175,7 +176,7 @@ function remove(ad) {
function save(ad) {
if (ad.id == null) {
os.api('admin/ad/create', {
misskeyApi('admin/ad/create', {
...ad,
expiresAt: new Date(ad.expiresAt).getTime(),
startsAt: new Date(ad.startsAt).getTime(),
@ -192,7 +193,7 @@ function save(ad) {
});
});
} else {
os.api('admin/ad/update', {
misskeyApi('admin/ad/update', {
...ad,
expiresAt: new Date(ad.expiresAt).getTime(),
startsAt: new Date(ad.startsAt).getTime(),
@ -211,7 +212,7 @@ function save(ad) {
}
function more() {
os.api('admin/ad/list', { untilId: ads.value.reduce((acc, ad) => ad.id != null ? ad : acc).id, publishing: publishing }).then(adsResponse => {
misskeyApi('admin/ad/list', { untilId: ads.value.reduce((acc, ad) => ad.id != null ? ad : acc).id, publishing: publishing }).then(adsResponse => {
if (adsResponse == null) return;
ads.value = ads.value.concat(adsResponse.map(r => {
const exdate = new Date(r.expiresAt);
@ -228,7 +229,7 @@ function more() {
}
function refresh() {
os.api('admin/ad/list', { publishing: publishing }).then(adsResponse => {
misskeyApi('admin/ad/list', { publishing: publishing }).then(adsResponse => {
if (adsResponse == null) return;
ads.value = adsResponse.map(r => {
const exdate = new Date(r.expiresAt);