merge: upstream
This commit is contained in:
commit
7552cea69a
413 changed files with 5517 additions and 2309 deletions
|
|
@ -70,11 +70,12 @@ import MkSelect from '@/components/MkSelect.vue';
|
|||
import MkSwitch from '@/components/MkSwitch.vue';
|
||||
import MkInput from '@/components/MkInput.vue';
|
||||
import * as os from '@/os.js';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import { selectFile } from '@/scripts/select-file.js';
|
||||
import { mainRouter } from '@/router.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||
import { $i } from '@/account.js';
|
||||
import { mainRouter } from '@/global/router/main.js';
|
||||
|
||||
const props = defineProps<{
|
||||
initPageId?: string;
|
||||
|
|
@ -105,7 +106,7 @@ watch(eyeCatchingImageId, async () => {
|
|||
if (eyeCatchingImageId.value == null) {
|
||||
eyeCatchingImage.value = null;
|
||||
} else {
|
||||
eyeCatchingImage.value = await os.api('drive/files/show', {
|
||||
eyeCatchingImage.value = await misskeyApi('drive/files/show', {
|
||||
fileId: eyeCatchingImageId.value,
|
||||
});
|
||||
}
|
||||
|
|
@ -148,7 +149,7 @@ function save() {
|
|||
|
||||
if (pageId.value) {
|
||||
options.pageId = pageId.value;
|
||||
os.api('pages/update', options)
|
||||
misskeyApi('pages/update', options)
|
||||
.then(page => {
|
||||
currentName.value = name.value.trim();
|
||||
os.alert({
|
||||
|
|
@ -157,7 +158,7 @@ function save() {
|
|||
});
|
||||
}).catch(onError);
|
||||
} else {
|
||||
os.api('pages/create', options)
|
||||
misskeyApi('pages/create', options)
|
||||
.then(created => {
|
||||
pageId.value = created.id;
|
||||
currentName.value = name.value.trim();
|
||||
|
|
@ -176,7 +177,7 @@ function del() {
|
|||
text: i18n.t('removeAreYouSure', { x: title.value.trim() }),
|
||||
}).then(({ canceled }) => {
|
||||
if (canceled) return;
|
||||
os.api('pages/delete', {
|
||||
misskeyApi('pages/delete', {
|
||||
pageId: pageId.value,
|
||||
}).then(() => {
|
||||
os.alert({
|
||||
|
|
@ -191,7 +192,7 @@ function del() {
|
|||
function duplicate() {
|
||||
title.value = title.value + ' - copy';
|
||||
name.value = name.value + '-copy';
|
||||
os.api('pages/create', getSaveOptions()).then(created => {
|
||||
misskeyApi('pages/create', getSaveOptions()).then(created => {
|
||||
pageId.value = created.id;
|
||||
currentName.value = name.value.trim();
|
||||
os.alert({
|
||||
|
|
@ -235,11 +236,11 @@ function removeEyeCatchingImage() {
|
|||
|
||||
async function init() {
|
||||
if (props.initPageId) {
|
||||
page.value = await os.api('pages/show', {
|
||||
page.value = await misskeyApi('pages/show', {
|
||||
pageId: props.initPageId,
|
||||
});
|
||||
} else if (props.initPageName && props.initUser) {
|
||||
page.value = await os.api('pages/show', {
|
||||
page.value = await misskeyApi('pages/show', {
|
||||
name: props.initPageName,
|
||||
username: props.initUser,
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue