@@ -34,11 +38,11 @@ import FormSuspense from "@/components/form/suspense.vue";
import FormButton from "@/components/MkButton.vue";
import * as os from "@/os";
import {
- getAccounts,
- addAccount as addAccounts,
- removeAccount as _removeAccount,
- login,
$i,
+ addAccount as addAccounts,
+ getAccounts,
+ login,
+ removeAccount as _removeAccount,
} from "@/account";
import { i18n } from "@/i18n";
import { definePageMetadata } from "@/scripts/page-metadata";
diff --git a/fe_calckey/frontend/client/src/pages/settings/profile.vue b/fe_calckey/frontend/client/src/pages/settings/profile.vue
index 6e8d810..1f2446e 100644
--- a/fe_calckey/frontend/client/src/pages/settings/profile.vue
+++ b/fe_calckey/frontend/client/src/pages/settings/profile.vue
@@ -11,7 +11,7 @@
}"
>
-
// SPECIFICATION: https://misskey-hub.net/docs/features/share-form.html
-import {} from "vue";
+import * as Misskey from "calckey-js";
import { noteVisibilities } from "calckey-js";
import * as Acct from "calckey-js/built/acct";
-import * as Misskey from "calckey-js";
import MkButton from "@/components/MkButton.vue";
import XPostForm from "@/components/MkPostForm.vue";
import * as os from "@/os";
import { mainRouter } from "@/router";
import { definePageMetadata } from "@/scripts/page-metadata";
import { i18n } from "@/i18n";
+import { endpoints, packed } from "magnetar-common";
const urlParams = new URLSearchParams(window.location.search);
const localOnlyQuery = urlParams.get("localOnly");
@@ -51,9 +51,9 @@ let state = $ref("fetching" as "fetching" | "writing" | "posted");
let title = $ref(urlParams.get("title"));
const text = urlParams.get("text");
const url = urlParams.get("url");
-let initialText = $ref(null as string | null);
-let reply = $ref(null as Misskey.entities.Note | null);
-let renote = $ref(null as Misskey.entities.Note | null);
+let initialText = $ref(null);
+let reply = $ref(null);
+let renote = $ref(null);
let visibility = $ref(
noteVisibilities.includes(visibilityQuery) ? visibilityQuery : null
);
@@ -114,15 +114,21 @@ async function init() {
const replyId = urlParams.get("replyId");
const replyUri = urlParams.get("replyUri");
if (replyId) {
- reply = await os.api("notes/show", {
- noteId: replyId,
- });
+ reply = await os.magApi(
+ endpoints.GetNoteById,
+ { attachments: true, context: true },
+ { id: replyId }
+ );
} else if (replyUri) {
const obj = await os.api("ap/show", {
uri: replyUri,
});
if (obj.type === "Note") {
- reply = obj.object;
+ reply = await os.magApi(
+ endpoints.GetNoteById,
+ { attachments: true, context: true },
+ { id: obj.object.id }
+ );
}
}
//#endregion
@@ -131,15 +137,21 @@ async function init() {
const renoteId = urlParams.get("renoteId");
const renoteUri = urlParams.get("renoteUri");
if (renoteId) {
- renote = await os.api("notes/show", {
- noteId: renoteId,
- });
+ renote = await os.magApi(
+ endpoints.GetNoteById,
+ { attachments: true, context: true },
+ { id: renoteId }
+ );
} else if (renoteUri) {
const obj = await os.api("ap/show", {
uri: renoteUri,
});
if (obj.type === "Note") {
- renote = obj.object;
+ renote = await os.magApi(
+ endpoints.GetNoteById,
+ { attachments: true, context: true },
+ { id: obj.object.id }
+ );
}
}
//#endregion
diff --git a/fe_calckey/frontend/client/src/pages/user-info.vue b/fe_calckey/frontend/client/src/pages/user-info.vue
index 66a8423..e4b6d85 100644
--- a/fe_calckey/frontend/client/src/pages/user-info.vue
+++ b/fe_calckey/frontend/client/src/pages/user-info.vue
@@ -10,7 +10,7 @@
-
import { computed, ref } from "vue";
-import * as misskey from "calckey-js";
import XNotes from "@/components/MkNotes.vue";
import MkTab from "@/components/MkTab.vue";
import { i18n } from "@/i18n";
import { packed } from "magnetar-common";
const props = defineProps<{
- user: packed.PackUserBase | misskey.entities.UserDetailed;
+ user: packed.PackUserBase;
}>();
const include = ref(null);
diff --git a/fe_calckey/frontend/client/src/pages/user/reactions.vue b/fe_calckey/frontend/client/src/pages/user/reactions.vue
index 21ef38a..9b3a81a 100644
--- a/fe_calckey/frontend/client/src/pages/user/reactions.vue
+++ b/fe_calckey/frontend/client/src/pages/user/reactions.vue
@@ -8,7 +8,7 @@
class="item _panel _gap afdcfbfb"
>