Merge branch 'refactor/firefishjs-imports' into 'develop'
Refactor: firefishjs imports See merge request firefish/firefish!10607
This commit is contained in:
commit
081d723cff
87 changed files with 312 additions and 2990 deletions
|
@ -24,7 +24,7 @@ export const packedUserLiteSchema = {
|
|||
type: "string",
|
||||
nullable: true,
|
||||
optional: false,
|
||||
example: "misskey.example.com",
|
||||
example: "firefish.example.com",
|
||||
description: "The local host is represented with `null`.",
|
||||
},
|
||||
avatarUrl: {
|
||||
|
|
|
@ -15,7 +15,7 @@ import {
|
|||
failedApiCall,
|
||||
uploadFile,
|
||||
} from "../utils.js";
|
||||
import type * as misskey from "misskey-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import type { INestApplicationContext } from "@nestjs/common";
|
||||
|
||||
describe("ユーザー", () => {
|
||||
|
@ -34,16 +34,16 @@ describe("ユーザー", () => {
|
|||
};
|
||||
|
||||
// BUG misskey-jsとjson-schemaと実際に返ってくるデータが全部違う
|
||||
type UserLite = misskey.entities.UserLite & {
|
||||
type UserLite = firefish.entities.UserLite & {
|
||||
badgeRoles: any[];
|
||||
};
|
||||
|
||||
type UserDetailedNotMe = UserLite &
|
||||
misskey.entities.UserDetailed & {
|
||||
firefish.entities.UserDetailed & {
|
||||
roles: any[];
|
||||
};
|
||||
|
||||
type MeDetailed = UserDetailedNotMe & misskey.entities.MeDetailed;
|
||||
type MeDetailed = UserDetailedNotMe & firefish.entities.MeDetailed;
|
||||
|
||||
type User = MeDetailed & { token: string };
|
||||
|
||||
|
@ -183,12 +183,12 @@ describe("ユーザー", () => {
|
|||
|
||||
let root: User;
|
||||
let alice: User;
|
||||
let aliceNote: misskey.entities.Note;
|
||||
let alicePage: misskey.entities.Page;
|
||||
let aliceList: misskey.entities.UserList;
|
||||
let aliceNote: firefish.entities.Note;
|
||||
let alicePage: firefish.entities.Page;
|
||||
let aliceList: firefish.entities.UserList;
|
||||
|
||||
let bob: User;
|
||||
let bobNote: misskey.entities.Note;
|
||||
let bobNote: firefish.entities.Note;
|
||||
|
||||
let carol: User;
|
||||
let dave: User;
|
||||
|
|
|
@ -6,7 +6,7 @@ import * as childProcess from "child_process";
|
|||
import * as http from "node:http";
|
||||
import { SIGKILL } from "constants";
|
||||
import WebSocket from "ws";
|
||||
import * as misskey from "firefish-js";
|
||||
import * as firefish from "firefish-js";
|
||||
import fetch from "node-fetch";
|
||||
import FormData from "form-data";
|
||||
import { DataSource } from "typeorm";
|
||||
|
@ -113,8 +113,8 @@ export const signup = async (params?: any): Promise<any> => {
|
|||
|
||||
export const post = async (
|
||||
user: any,
|
||||
params?: misskey.Endpoints["notes/create"]["req"],
|
||||
): Promise<misskey.entities.Note> => {
|
||||
params?: firefish.Endpoints["notes/create"]["req"],
|
||||
): Promise<firefish.entities.Note> => {
|
||||
const q = Object.assign(
|
||||
{
|
||||
text: "test",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { defineAsyncComponent, reactive } from "vue";
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import { i18n } from "./i18n";
|
||||
import { del, get, set } from "@/scripts/idb-proxy";
|
||||
import { apiUrl } from "@/config";
|
||||
|
@ -8,7 +8,7 @@ import { reloadChannel, unisonReload } from "@/scripts/unison-reload";
|
|||
|
||||
// TODO: 他のタブと永続化されたstateを同期
|
||||
|
||||
type Account = misskey.entities.MeDetailed;
|
||||
type Account = firefish.entities.MeDetailed;
|
||||
|
||||
const accountData = localStorage.getItem("account");
|
||||
|
||||
|
@ -150,8 +150,8 @@ export async function openAccountMenu(
|
|||
opts: {
|
||||
includeCurrentAccount?: boolean;
|
||||
withExtraOperation: boolean;
|
||||
active?: misskey.entities.UserDetailed["id"];
|
||||
onChoose?: (account: misskey.entities.UserDetailed) => void;
|
||||
active?: firefish.entities.UserDetailed["id"];
|
||||
onChoose?: (account: firefish.entities.UserDetailed) => void;
|
||||
},
|
||||
ev: MouseEvent,
|
||||
) {
|
||||
|
@ -183,7 +183,7 @@ export async function openAccountMenu(
|
|||
);
|
||||
}
|
||||
|
||||
async function switchAccount(account: misskey.entities.UserDetailed) {
|
||||
async function switchAccount(account: firefish.entities.UserDetailed) {
|
||||
const storedAccounts = await getAccounts();
|
||||
const token = storedAccounts.find((x) => x.id === account.id).token;
|
||||
switchAccountWithToken(token);
|
||||
|
@ -200,7 +200,7 @@ export async function openAccountMenu(
|
|||
userIds: storedAccounts.map((x) => x.id),
|
||||
});
|
||||
|
||||
function createItem(account: misskey.entities.UserDetailed) {
|
||||
function createItem(account: firefish.entities.UserDetailed) {
|
||||
return {
|
||||
type: "user",
|
||||
user: account,
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
import type * as Misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import XWindow from "@/components/MkWindow.vue";
|
||||
import MkTextarea from "@/components/form/textarea.vue";
|
||||
import MkButton from "@/components/MkButton.vue";
|
||||
|
@ -49,7 +49,7 @@ import * as os from "@/os";
|
|||
import { i18n } from "@/i18n";
|
||||
|
||||
const props = defineProps<{
|
||||
user: Misskey.entities.User;
|
||||
user: firefish.entities.User;
|
||||
initialComment?: string;
|
||||
}>();
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, ref } from "vue";
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import Cropper from "cropperjs";
|
||||
import tinycolor from "tinycolor2";
|
||||
import XModalWindow from "@/components/MkModalWindow.vue";
|
||||
|
@ -49,13 +49,13 @@ import { query } from "@/scripts/url";
|
|||
import { i18n } from "@/i18n";
|
||||
|
||||
const emit = defineEmits<{
|
||||
(ev: "ok", cropped: misskey.entities.DriveFile): void;
|
||||
(ev: "ok", cropped: firefish.entities.DriveFile): void;
|
||||
(ev: "cancel"): void;
|
||||
(ev: "closed"): void;
|
||||
}>();
|
||||
|
||||
const props = defineProps<{
|
||||
file: misskey.entities.DriveFile;
|
||||
file: firefish.entities.DriveFile;
|
||||
aspectRatio: number;
|
||||
}>();
|
||||
|
||||
|
@ -68,7 +68,7 @@ let cropper: Cropper | null = null,
|
|||
loading = ref(true);
|
||||
|
||||
const ok = async () => {
|
||||
const promise = new Promise<misskey.entities.DriveFile>(async (res) => {
|
||||
const promise = new Promise<firefish.entities.DriveFile>(async (res) => {
|
||||
const croppedCanvas = await cropper?.getCropperSelection()?.$toCanvas();
|
||||
croppedCanvas.toBlob((blob) => {
|
||||
const formData = new FormData();
|
||||
|
|
|
@ -15,13 +15,13 @@
|
|||
<script lang="ts" setup>
|
||||
import { computed, ref } from "vue";
|
||||
import { length } from "stringz";
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import { concat } from "@/scripts/array";
|
||||
import { i18n } from "@/i18n";
|
||||
|
||||
const props = defineProps<{
|
||||
modelValue: boolean;
|
||||
note: misskey.entities.Note;
|
||||
note: firefish.entities.Note;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed, defineAsyncComponent, ref } from "vue";
|
||||
import type * as Misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import copyToClipboard from "@/scripts/copy-to-clipboard";
|
||||
import MkDriveFileThumbnail from "@/components/MkDriveFileThumbnail.vue";
|
||||
import bytes from "@/filters/bytes";
|
||||
|
@ -49,7 +49,7 @@ import { $i } from "@/account";
|
|||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
file: Misskey.entities.DriveFile;
|
||||
file: firefish.entities.DriveFile;
|
||||
isSelected?: boolean;
|
||||
selectMode?: boolean;
|
||||
}>(),
|
||||
|
@ -60,7 +60,7 @@ const props = withDefaults(
|
|||
);
|
||||
|
||||
const emit = defineEmits<{
|
||||
(ev: "chosen", r: Misskey.entities.DriveFile): void;
|
||||
(ev: "chosen", r: firefish.entities.DriveFile): void;
|
||||
(ev: "dragstart"): void;
|
||||
(ev: "dragend"): void;
|
||||
}>();
|
||||
|
|
|
@ -38,14 +38,14 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed, defineAsyncComponent, ref } from "vue";
|
||||
import type * as Misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import * as os from "@/os";
|
||||
import { i18n } from "@/i18n";
|
||||
import { defaultStore } from "@/store";
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
folder: Misskey.entities.DriveFolder;
|
||||
folder: firefish.entities.DriveFolder;
|
||||
isSelected?: boolean;
|
||||
selectMode?: boolean;
|
||||
}>(),
|
||||
|
@ -56,11 +56,11 @@ const props = withDefaults(
|
|||
);
|
||||
|
||||
const emit = defineEmits<{
|
||||
(ev: "chosen", v: Misskey.entities.DriveFolder): void;
|
||||
(ev: "move", v: Misskey.entities.DriveFolder): void;
|
||||
(ev: "upload", file: File, folder: Misskey.entities.DriveFolder);
|
||||
(ev: "removeFile", v: Misskey.entities.DriveFile["id"]): void;
|
||||
(ev: "removeFolder", v: Misskey.entities.DriveFolder["id"]): void;
|
||||
(ev: "chosen", v: firefish.entities.DriveFolder): void;
|
||||
(ev: "move", v: firefish.entities.DriveFolder): void;
|
||||
(ev: "upload", file: File, folder: firefish.entities.DriveFolder);
|
||||
(ev: "removeFile", v: firefish.entities.DriveFile["id"]): void;
|
||||
(ev: "removeFolder", v: firefish.entities.DriveFolder["id"]): void;
|
||||
(ev: "dragstart"): void;
|
||||
(ev: "dragend"): void;
|
||||
}>();
|
||||
|
|
|
@ -15,24 +15,24 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from "vue";
|
||||
import type * as Misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import * as os from "@/os";
|
||||
import { i18n } from "@/i18n";
|
||||
|
||||
const props = defineProps<{
|
||||
folder?: Misskey.entities.DriveFolder;
|
||||
parentFolder: Misskey.entities.DriveFolder | null;
|
||||
folder?: firefish.entities.DriveFolder;
|
||||
parentFolder: firefish.entities.DriveFolder | null;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
(ev: "move", v?: Misskey.entities.DriveFolder): void;
|
||||
(ev: "move", v?: firefish.entities.DriveFolder): void;
|
||||
(
|
||||
ev: "upload",
|
||||
file: File,
|
||||
folder?: Misskey.entities.DriveFolder | null,
|
||||
folder?: firefish.entities.DriveFolder | null,
|
||||
): void;
|
||||
(ev: "removeFile", v: Misskey.entities.DriveFile["id"]): void;
|
||||
(ev: "removeFolder", v: Misskey.entities.DriveFolder["id"]): void;
|
||||
(ev: "removeFile", v: firefish.entities.DriveFile["id"]): void;
|
||||
(ev: "removeFolder", v: firefish.entities.DriveFolder["id"]): void;
|
||||
}>();
|
||||
|
||||
const hover = ref(false);
|
||||
|
|
|
@ -139,7 +139,7 @@ import {
|
|||
ref,
|
||||
watch,
|
||||
} from "vue";
|
||||
import type * as Misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import MkButton from "./MkButton.vue";
|
||||
import XNavFolder from "@/components/MkDrive.navFolder.vue";
|
||||
import XFolder from "@/components/MkDrive.folder.vue";
|
||||
|
@ -152,7 +152,7 @@ import { uploadFile, uploads } from "@/scripts/upload";
|
|||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
initialFolder?: Misskey.entities.DriveFolder;
|
||||
initialFolder?: firefish.entities.DriveFolder;
|
||||
type?: string;
|
||||
multiple?: boolean;
|
||||
select?: "file" | "folder" | null;
|
||||
|
@ -166,28 +166,28 @@ const props = withDefaults(
|
|||
const emit = defineEmits<{
|
||||
(
|
||||
ev: "selected",
|
||||
v: Misskey.entities.DriveFile | Misskey.entities.DriveFolder,
|
||||
v: firefish.entities.DriveFile | firefish.entities.DriveFolder,
|
||||
): void;
|
||||
(
|
||||
ev: "change-selection",
|
||||
v: Misskey.entities.DriveFile[] | Misskey.entities.DriveFolder[],
|
||||
v: firefish.entities.DriveFile[] | firefish.entities.DriveFolder[],
|
||||
): void;
|
||||
(ev: "move-root"): void;
|
||||
(ev: "cd", v: Misskey.entities.DriveFolder | null): void;
|
||||
(ev: "open-folder", v: Misskey.entities.DriveFolder): void;
|
||||
(ev: "cd", v: firefish.entities.DriveFolder | null): void;
|
||||
(ev: "open-folder", v: firefish.entities.DriveFolder): void;
|
||||
}>();
|
||||
|
||||
const loadMoreFiles = ref<InstanceType<typeof MkButton>>();
|
||||
const fileInput = ref<HTMLInputElement>();
|
||||
|
||||
const folder = ref<Misskey.entities.DriveFolder | null>(null);
|
||||
const files = ref<Misskey.entities.DriveFile[]>([]);
|
||||
const folders = ref<Misskey.entities.DriveFolder[]>([]);
|
||||
const folder = ref<firefish.entities.DriveFolder | null>(null);
|
||||
const files = ref<firefish.entities.DriveFile[]>([]);
|
||||
const folders = ref<firefish.entities.DriveFolder[]>([]);
|
||||
const moreFiles = ref(false);
|
||||
const moreFolders = ref(false);
|
||||
const hierarchyFolders = ref<Misskey.entities.DriveFolder[]>([]);
|
||||
const selectedFiles = ref<Misskey.entities.DriveFile[]>([]);
|
||||
const selectedFolders = ref<Misskey.entities.DriveFolder[]>([]);
|
||||
const hierarchyFolders = ref<firefish.entities.DriveFolder[]>([]);
|
||||
const selectedFiles = ref<firefish.entities.DriveFile[]>([]);
|
||||
const selectedFolders = ref<firefish.entities.DriveFolder[]>([]);
|
||||
const uploadings = uploads;
|
||||
const connection = stream.useChannel("drive");
|
||||
const keepOriginal = ref<boolean>(defaultStore.state.keepOriginalUploading); // 外部渡しが多いので$refは使わないほうがよい
|
||||
|
@ -211,11 +211,11 @@ const ilFilesObserver = new IntersectionObserver(
|
|||
|
||||
watch(folder, () => emit("cd", folder.value));
|
||||
|
||||
function onStreamDriveFileCreated(file: Misskey.entities.DriveFile) {
|
||||
function onStreamDriveFileCreated(file: firefish.entities.DriveFile) {
|
||||
addFile(file, true);
|
||||
}
|
||||
|
||||
function onStreamDriveFileUpdated(file: Misskey.entities.DriveFile) {
|
||||
function onStreamDriveFileUpdated(file: firefish.entities.DriveFile) {
|
||||
const current = folder.value ? folder.value.id : null;
|
||||
if (current !== file.folderId) {
|
||||
removeFile(file);
|
||||
|
@ -229,13 +229,13 @@ function onStreamDriveFileDeleted(fileId: string) {
|
|||
}
|
||||
|
||||
function onStreamDriveFolderCreated(
|
||||
createdFolder: Misskey.entities.DriveFolder,
|
||||
createdFolder: firefish.entities.DriveFolder,
|
||||
) {
|
||||
addFolder(createdFolder, true);
|
||||
}
|
||||
|
||||
function onStreamDriveFolderUpdated(
|
||||
updatedFolder: Misskey.entities.DriveFolder,
|
||||
updatedFolder: firefish.entities.DriveFolder,
|
||||
) {
|
||||
const current = folder.value ? folder.value.id : null;
|
||||
if (current !== updatedFolder.parentId) {
|
||||
|
@ -380,7 +380,7 @@ function createFolder() {
|
|||
});
|
||||
}
|
||||
|
||||
function renameFolder(folderToRename: Misskey.entities.DriveFolder) {
|
||||
function renameFolder(folderToRename: firefish.entities.DriveFolder) {
|
||||
os.inputText({
|
||||
title: i18n.ts.renameFolder,
|
||||
placeholder: i18n.ts.inputNewFolderName,
|
||||
|
@ -397,7 +397,7 @@ function renameFolder(folderToRename: Misskey.entities.DriveFolder) {
|
|||
});
|
||||
}
|
||||
|
||||
function deleteFolder(folderToDelete: Misskey.entities.DriveFolder) {
|
||||
function deleteFolder(folderToDelete: firefish.entities.DriveFolder) {
|
||||
os.api("drive/folders/delete", {
|
||||
folderId: folderToDelete.id,
|
||||
})
|
||||
|
@ -432,7 +432,7 @@ function onChangeFileInput() {
|
|||
|
||||
function upload(
|
||||
file: File,
|
||||
folderToUpload?: Misskey.entities.DriveFolder | null,
|
||||
folderToUpload?: firefish.entities.DriveFolder | null,
|
||||
) {
|
||||
uploadFile(
|
||||
file,
|
||||
|
@ -446,7 +446,7 @@ function upload(
|
|||
});
|
||||
}
|
||||
|
||||
function chooseFile(file: Misskey.entities.DriveFile) {
|
||||
function chooseFile(file: firefish.entities.DriveFile) {
|
||||
const isAlreadySelected = selectedFiles.value.some((f) => f.id === file.id);
|
||||
if (props.multiple) {
|
||||
if (isAlreadySelected) {
|
||||
|
@ -467,7 +467,7 @@ function chooseFile(file: Misskey.entities.DriveFile) {
|
|||
}
|
||||
}
|
||||
|
||||
function chooseFolder(folderToChoose: Misskey.entities.DriveFolder) {
|
||||
function chooseFolder(folderToChoose: firefish.entities.DriveFolder) {
|
||||
const isAlreadySelected = selectedFolders.value.some(
|
||||
(f) => f.id === folderToChoose.id,
|
||||
);
|
||||
|
@ -490,7 +490,7 @@ function chooseFolder(folderToChoose: Misskey.entities.DriveFolder) {
|
|||
}
|
||||
}
|
||||
|
||||
function move(target?: Misskey.entities.DriveFolder) {
|
||||
function move(target?: firefish.entities.DriveFolder) {
|
||||
if (!target) {
|
||||
goRoot();
|
||||
return;
|
||||
|
@ -518,7 +518,10 @@ function move(target?: Misskey.entities.DriveFolder) {
|
|||
});
|
||||
}
|
||||
|
||||
function addFolder(folderToAdd: Misskey.entities.DriveFolder, unshift = false) {
|
||||
function addFolder(
|
||||
folderToAdd: firefish.entities.DriveFolder,
|
||||
unshift = false,
|
||||
) {
|
||||
const current = folder.value ? folder.value.id : null;
|
||||
if (current !== folderToAdd.parentId) return;
|
||||
|
||||
|
@ -535,7 +538,7 @@ function addFolder(folderToAdd: Misskey.entities.DriveFolder, unshift = false) {
|
|||
}
|
||||
}
|
||||
|
||||
function addFile(fileToAdd: Misskey.entities.DriveFile, unshift = false) {
|
||||
function addFile(fileToAdd: firefish.entities.DriveFile, unshift = false) {
|
||||
const current = folder.value ? folder.value.id : null;
|
||||
if (current !== fileToAdd.folderId) return;
|
||||
|
||||
|
@ -552,30 +555,30 @@ function addFile(fileToAdd: Misskey.entities.DriveFile, unshift = false) {
|
|||
}
|
||||
}
|
||||
|
||||
function removeFolder(folderToRemove: Misskey.entities.DriveFolder | string) {
|
||||
function removeFolder(folderToRemove: firefish.entities.DriveFolder | string) {
|
||||
const folderIdToRemove =
|
||||
typeof folderToRemove === "object" ? folderToRemove.id : folderToRemove;
|
||||
folders.value = folders.value.filter((f) => f.id !== folderIdToRemove);
|
||||
}
|
||||
|
||||
function removeFile(file: Misskey.entities.DriveFile | string) {
|
||||
function removeFile(file: firefish.entities.DriveFile | string) {
|
||||
const fileId = typeof file === "object" ? file.id : file;
|
||||
files.value = files.value.filter((f) => f.id !== fileId);
|
||||
}
|
||||
|
||||
function appendFile(file: Misskey.entities.DriveFile) {
|
||||
function appendFile(file: firefish.entities.DriveFile) {
|
||||
addFile(file);
|
||||
}
|
||||
|
||||
function appendFolder(folderToAppend: Misskey.entities.DriveFolder) {
|
||||
function appendFolder(folderToAppend: firefish.entities.DriveFolder) {
|
||||
addFolder(folderToAppend);
|
||||
}
|
||||
/*
|
||||
function prependFile(file: Misskey.entities.DriveFile) {
|
||||
function prependFile(file: firefish.entities.DriveFile) {
|
||||
addFile(file, true);
|
||||
}
|
||||
|
||||
function prependFolder(folderToPrepend: Misskey.entities.DriveFolder) {
|
||||
function prependFolder(folderToPrepend: firefish.entities.DriveFolder) {
|
||||
addFolder(folderToPrepend, true);
|
||||
}
|
||||
*/
|
||||
|
@ -706,7 +709,7 @@ function getMenu() {
|
|||
icon: "ph-trash ph-bold ph-lg",
|
||||
action: () => {
|
||||
deleteFolder(
|
||||
folder.value as Misskey.entities.DriveFolder,
|
||||
folder.value as firefish.entities.DriveFolder,
|
||||
);
|
||||
},
|
||||
}
|
||||
|
|
|
@ -41,11 +41,11 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed } from "vue";
|
||||
import type * as Misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import ImgWithBlurhash from "@/components/MkImgWithBlurhash.vue";
|
||||
|
||||
const props = defineProps<{
|
||||
file: Misskey.entities.DriveFile;
|
||||
file: firefish.entities.DriveFile;
|
||||
fit: string;
|
||||
}>();
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from "vue";
|
||||
import type * as Misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import XDrive from "@/components/MkDrive.vue";
|
||||
import XModalWindow from "@/components/MkModalWindow.vue";
|
||||
import number from "@/filters/number";
|
||||
|
@ -54,13 +54,13 @@ withDefaults(
|
|||
);
|
||||
|
||||
const emit = defineEmits<{
|
||||
(ev: "done", r?: Misskey.entities.DriveFile[]): void;
|
||||
(ev: "done", r?: firefish.entities.DriveFile[]): void;
|
||||
(ev: "closed"): void;
|
||||
}>();
|
||||
|
||||
const dialog = ref<InstanceType<typeof XModalWindow>>();
|
||||
|
||||
const selected = ref<Misskey.entities.DriveFile[]>([]);
|
||||
const selected = ref<firefish.entities.DriveFile[]>([]);
|
||||
|
||||
function ok() {
|
||||
emit("done", selected.value);
|
||||
|
@ -72,7 +72,7 @@ function cancel() {
|
|||
dialog.value?.close();
|
||||
}
|
||||
|
||||
function onChangeSelection(files: Misskey.entities.DriveFile[]) {
|
||||
function onChangeSelection(files: firefish.entities.DriveFile[]) {
|
||||
selected.value = files;
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -15,13 +15,13 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import {} from "vue";
|
||||
import type * as Misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import XDrive from "@/components/MkDrive.vue";
|
||||
import XWindow from "@/components/MkWindow.vue";
|
||||
import { i18n } from "@/i18n";
|
||||
|
||||
defineProps<{
|
||||
initialFolder?: Misskey.entities.DriveFolder;
|
||||
initialFolder?: firefish.entities.DriveFolder;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
|
|
|
@ -165,7 +165,7 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed, onMounted, ref, watch } from "vue";
|
||||
import type * as Misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import { FocusTrap } from "focus-trap-vue";
|
||||
import XSection from "@/components/MkEmojiPicker.section.vue";
|
||||
import type { UnicodeEmojiDef } from "@/scripts/emojilist";
|
||||
|
@ -241,7 +241,7 @@ const height = computed(() =>
|
|||
const customEmojiCategories = emojiCategories;
|
||||
const customEmojis = instance.emojis;
|
||||
const q = ref<string | null>(null);
|
||||
const searchResultCustom = ref<Misskey.entities.CustomEmoji[]>([]);
|
||||
const searchResultCustom = ref<firefish.entities.CustomEmoji[]>([]);
|
||||
const searchResultUnicode = ref<UnicodeEmojiDef[]>([]);
|
||||
const tab = ref<"index" | "custom" | "unicode" | "tags">("index");
|
||||
|
||||
|
@ -259,7 +259,7 @@ watch(q, () => {
|
|||
const searchCustom = () => {
|
||||
const max = 16;
|
||||
const emojis = customEmojis;
|
||||
const matches = new Set<Misskey.entities.CustomEmoji>();
|
||||
const matches = new Set<firefish.entities.CustomEmoji>();
|
||||
|
||||
const exactMatch = emojis.find((emoji) => emoji.name === newQ);
|
||||
if (exactMatch) matches.add(exactMatch);
|
||||
|
@ -420,7 +420,7 @@ function reset() {
|
|||
}
|
||||
|
||||
function getKey(
|
||||
emoji: string | Misskey.entities.CustomEmoji | UnicodeEmojiDef,
|
||||
emoji: string | firefish.entities.CustomEmoji | UnicodeEmojiDef,
|
||||
): string {
|
||||
return typeof emoji === "string" ? emoji : emoji.emoji || `:${emoji.name}:`;
|
||||
}
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from "vue";
|
||||
import type * as Misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import * as os from "@/os";
|
||||
|
||||
const meta = ref<Misskey.entities.DetailedInstanceMetadata>();
|
||||
const meta = ref<firefish.entities.DetailedInstanceMetadata>();
|
||||
|
||||
os.api("meta", { detail: true }).then((gotMeta) => {
|
||||
meta.value = gotMeta;
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed, onBeforeUnmount, onMounted, ref } from "vue";
|
||||
import type * as Misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import * as os from "@/os";
|
||||
import { stream } from "@/stream";
|
||||
import { i18n } from "@/i18n";
|
||||
|
@ -76,7 +76,7 @@ const router = useRouter();
|
|||
const emit = defineEmits(["refresh"]);
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
user: Misskey.entities.UserDetailed;
|
||||
user: firefish.entities.UserDetailed;
|
||||
full?: boolean;
|
||||
large?: boolean;
|
||||
hideMenu?: boolean;
|
||||
|
@ -104,7 +104,7 @@ if (props.user.isFollowing == null) {
|
|||
}).then(onFollowChange);
|
||||
}
|
||||
|
||||
function onFollowChange(user: Misskey.entities.UserDetailed) {
|
||||
function onFollowChange(user: firefish.entities.UserDetailed) {
|
||||
if (user.id === props.user.id) {
|
||||
isFollowing.value = user.isFollowing;
|
||||
hasPendingFollowRequestFromYou.value =
|
||||
|
|
|
@ -28,14 +28,14 @@
|
|||
<script lang="ts" setup>
|
||||
import { ref } from "vue";
|
||||
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import bytes from "@/filters/bytes";
|
||||
import number from "@/filters/number";
|
||||
import MkModal from "@/components/MkModal.vue";
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
image: misskey.entities.DriveFile;
|
||||
image: firefish.entities.DriveFile;
|
||||
}>(),
|
||||
{},
|
||||
);
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
import { computed, ref, watch } from "vue";
|
||||
import VuePlyr from "vue-plyr";
|
||||
import "vue-plyr/dist/vue-plyr.css";
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import { getStaticImageUrl } from "@/scripts/get-static-image-url";
|
||||
import ImgWithBlurhash from "@/components/MkImgWithBlurhash.vue";
|
||||
import { defaultStore } from "@/store";
|
||||
|
@ -100,7 +100,7 @@ import { i18n } from "@/i18n";
|
|||
import * as os from "@/os";
|
||||
|
||||
const props = defineProps<{
|
||||
media: misskey.entities.DriveFile;
|
||||
media: firefish.entities.DriveFile;
|
||||
raw?: boolean;
|
||||
}>();
|
||||
|
||||
|
|
|
@ -58,14 +58,14 @@
|
|||
<script lang="ts" setup>
|
||||
import { onMounted, ref } from "vue";
|
||||
import VuePlyr from "vue-plyr";
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import { ColdDeviceStorage } from "@/store";
|
||||
import "vue-plyr/dist/vue-plyr.css";
|
||||
import { i18n } from "@/i18n";
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
media: misskey.entities.DriveFile;
|
||||
media: firefish.entities.DriveFile;
|
||||
}>(),
|
||||
{},
|
||||
);
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, ref } from "vue";
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import PhotoSwipeLightbox from "photoswipe/lightbox";
|
||||
import PhotoSwipe from "photoswipe";
|
||||
import "photoswipe/style.css";
|
||||
|
@ -56,7 +56,7 @@ import {
|
|||
} from "@/const";
|
||||
|
||||
const props = defineProps<{
|
||||
mediaList: misskey.entities.DriveFile[];
|
||||
mediaList: firefish.entities.DriveFile[];
|
||||
raw?: boolean;
|
||||
inDm?: boolean;
|
||||
}>();
|
||||
|
@ -184,7 +184,7 @@ onMounted(() => {
|
|||
}
|
||||
});
|
||||
|
||||
const previewable = (file: misskey.entities.DriveFile): boolean => {
|
||||
const previewable = (file: firefish.entities.DriveFile): boolean => {
|
||||
if (file.type === "image/svg+xml") return true; // svgのwebpublic/thumbnailはpngなのでtrue
|
||||
// FILE_TYPE_BROWSERSAFEに適合しないものはブラウザで表示するのに不適切
|
||||
if (isModule(file)) return true;
|
||||
|
@ -194,7 +194,7 @@ const previewable = (file: misskey.entities.DriveFile): boolean => {
|
|||
);
|
||||
};
|
||||
|
||||
const isModule = (file: misskey.entities.DriveFile): boolean => {
|
||||
const isModule = (file: firefish.entities.DriveFile): boolean => {
|
||||
return (
|
||||
FILE_TYPE_TRACKER_MODULES.some((type) => {
|
||||
return file.type === type;
|
||||
|
|
|
@ -275,7 +275,7 @@
|
|||
import { computed, inject, onMounted, ref } from "vue";
|
||||
import * as mfm from "mfm-js";
|
||||
import type { Ref } from "vue";
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import { detect as detectLanguage_ } from "tinyld";
|
||||
import MkSubNoteContent from "./MkSubNoteContent.vue";
|
||||
import MkNoteSub from "@/components/MkNoteSub.vue";
|
||||
|
@ -307,7 +307,7 @@ import { getNoteSummary } from "@/scripts/get-note-summary";
|
|||
const router = useRouter();
|
||||
|
||||
const props = defineProps<{
|
||||
note: misskey.entities.Note;
|
||||
note: firefish.entities.Note;
|
||||
pinned?: boolean;
|
||||
detailedView?: boolean;
|
||||
collapsedReply?: boolean;
|
||||
|
@ -352,7 +352,7 @@ const renoteButton = ref<InstanceType<typeof XRenoteButton>>();
|
|||
const renoteTime = ref<HTMLElement>();
|
||||
const reactButton = ref<HTMLElement>();
|
||||
const appearNote = computed(() =>
|
||||
isRenote ? (note.value.renote as misskey.entities.Note) : note.value,
|
||||
isRenote ? (note.value.renote as firefish.entities.Note) : note.value,
|
||||
);
|
||||
const isMyRenote = $i && $i.id === note.value.userId;
|
||||
const showContent = ref(false);
|
||||
|
@ -476,7 +476,7 @@ function undoReact(note): void {
|
|||
});
|
||||
}
|
||||
|
||||
const currentClipPage = inject<Ref<misskey.entities.Clip> | null>(
|
||||
const currentClipPage = inject<Ref<firefish.entities.Clip> | null>(
|
||||
"currentClipPage",
|
||||
null,
|
||||
);
|
||||
|
|
|
@ -151,7 +151,7 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, onUnmounted, onUpdated, ref } from "vue";
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import type { NoteUpdatedEvent } from "firefish-js/built/streaming.types";
|
||||
import MkTab from "@/components/MkTab.vue";
|
||||
import MkNote from "@/components/MkNote.vue";
|
||||
|
@ -173,7 +173,7 @@ import { deepClone } from "@/scripts/clone";
|
|||
import { stream } from "@/stream";
|
||||
|
||||
const props = defineProps<{
|
||||
note: misskey.entities.Note;
|
||||
note: firefish.entities.Note;
|
||||
pinned?: boolean;
|
||||
}>();
|
||||
|
||||
|
@ -219,10 +219,10 @@ const muted = ref(
|
|||
);
|
||||
const translation = ref(null);
|
||||
const translating = ref(false);
|
||||
const conversation = ref<null | misskey.entities.Note[]>([]);
|
||||
const replies = ref<misskey.entities.Note[]>([]);
|
||||
const directReplies = ref<null | misskey.entities.Note[]>([]);
|
||||
const directQuotes = ref<null | misskey.entities.Note[]>([]);
|
||||
const conversation = ref<null | firefish.entities.Note[]>([]);
|
||||
const replies = ref<firefish.entities.Note[]>([]);
|
||||
const directReplies = ref<null | firefish.entities.Note[]>([]);
|
||||
const directQuotes = ref<null | firefish.entities.Note[]>([]);
|
||||
const clips = ref();
|
||||
const renotes = ref();
|
||||
let isScrolling;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { ref } from "vue";
|
||||
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import { defaultStore } from "@/store";
|
||||
import MkVisibility from "@/components/MkVisibility.vue";
|
||||
import MkInstanceTicker from "@/components/MkInstanceTicker.vue";
|
||||
|
@ -60,7 +60,7 @@ import { i18n } from "@/i18n";
|
|||
import { pageWindow } from "@/os";
|
||||
|
||||
const props = defineProps<{
|
||||
note: misskey.entities.Note;
|
||||
note: firefish.entities.Note;
|
||||
pinned?: boolean;
|
||||
canOpenServerInfo?: boolean;
|
||||
}>();
|
||||
|
|
|
@ -11,12 +11,12 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import XNoteHeader from "@/components/MkNoteHeader.vue";
|
||||
import MkSubNoteContent from "@/components/MkSubNoteContent.vue";
|
||||
|
||||
const props = defineProps<{
|
||||
note: misskey.entities.Note;
|
||||
note: firefish.entities.Note;
|
||||
pinned?: boolean;
|
||||
}>();
|
||||
</script>
|
||||
|
|
|
@ -191,7 +191,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { computed, inject, ref } from "vue";
|
||||
import type { Ref } from "vue";
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import * as mfm from "mfm-js";
|
||||
import { detect as detectLanguage_ } from "tinyld";
|
||||
import XNoteHeader from "@/components/MkNoteHeader.vue";
|
||||
|
@ -221,8 +221,8 @@ const router = useRouter();
|
|||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
note: misskey.entities.Note;
|
||||
conversation?: misskey.entities.Note[];
|
||||
note: firefish.entities.Note;
|
||||
conversation?: firefish.entities.Note[];
|
||||
parentId?;
|
||||
detailedView?;
|
||||
|
||||
|
@ -262,7 +262,7 @@ const starButton = ref<InstanceType<typeof XStarButton>>();
|
|||
const renoteButton = ref<InstanceType<typeof XRenoteButton>>();
|
||||
const reactButton = ref<HTMLElement>();
|
||||
const appearNote = computed(() =>
|
||||
isRenote ? (note.value.renote as misskey.entities.Note) : note.value,
|
||||
isRenote ? (note.value.renote as firefish.entities.Note) : note.value,
|
||||
);
|
||||
const isDeleted = ref(false);
|
||||
const muted = ref(
|
||||
|
@ -275,7 +275,7 @@ const muted = ref(
|
|||
);
|
||||
const translation = ref(null);
|
||||
const translating = ref(false);
|
||||
const replies: misskey.entities.Note[] =
|
||||
const replies: firefish.entities.Note[] =
|
||||
props.conversation
|
||||
?.filter(
|
||||
(item) =>
|
||||
|
@ -378,7 +378,7 @@ function undoReact(note): void {
|
|||
});
|
||||
}
|
||||
|
||||
const currentClipPage = inject<Ref<misskey.entities.Clip> | null>(
|
||||
const currentClipPage = inject<Ref<firefish.entities.Clip> | null>(
|
||||
"currentClipPage",
|
||||
null,
|
||||
);
|
||||
|
|
|
@ -274,7 +274,7 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, onUnmounted, ref, watch } from "vue";
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import XReactionIcon from "@/components/MkReactionIcon.vue";
|
||||
import MkFollowButton from "@/components/MkFollowButton.vue";
|
||||
import XReactionTooltip from "@/components/MkReactionTooltip.vue";
|
||||
|
@ -290,7 +290,7 @@ import { instance } from "@/instance";
|
|||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
notification: misskey.entities.Notification;
|
||||
notification: firefish.entities.Notification;
|
||||
withTime?: boolean;
|
||||
full?: boolean;
|
||||
}>(),
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
<script lang="ts" setup>
|
||||
import type { ComputedRef } from "vue";
|
||||
import { computed, isRef, onActivated, onDeactivated, ref, watch } from "vue";
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import * as os from "@/os";
|
||||
import {
|
||||
getScrollContainer,
|
||||
|
@ -77,13 +77,13 @@ import MkButton from "@/components/MkButton.vue";
|
|||
import { i18n } from "@/i18n";
|
||||
|
||||
export interface Paging<
|
||||
E extends keyof misskey.Endpoints = keyof misskey.Endpoints,
|
||||
E extends keyof firefish.Endpoints = keyof firefish.Endpoints,
|
||||
> {
|
||||
endpoint: E;
|
||||
limit: number;
|
||||
params?:
|
||||
| misskey.Endpoints[E]["req"]
|
||||
| ComputedRef<misskey.Endpoints[E]["req"]>;
|
||||
| firefish.Endpoints[E]["req"]
|
||||
| ComputedRef<firefish.Endpoints[E]["req"]>;
|
||||
|
||||
/**
|
||||
* 検索APIのような、ページング不可なエンドポイントを利用する場合
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref } from "vue";
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import { sum } from "@/scripts/array";
|
||||
import { pleaseLogin } from "@/scripts/please-login";
|
||||
import * as os from "@/os";
|
||||
|
@ -61,7 +61,7 @@ import { i18n } from "@/i18n";
|
|||
import { useInterval } from "@/scripts/use-interval";
|
||||
|
||||
const props = defineProps<{
|
||||
note: misskey.entities.Note;
|
||||
note: firefish.entities.Note;
|
||||
readOnly?: boolean;
|
||||
}>();
|
||||
|
||||
|
|
|
@ -243,7 +243,7 @@ import {
|
|||
watch,
|
||||
} from "vue";
|
||||
import * as mfm from "mfm-js";
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import autosize from "autosize";
|
||||
import insertTextAtCursor from "insert-text-at-cursor";
|
||||
import { length } from "stringz";
|
||||
|
@ -281,22 +281,22 @@ const modal = inject("modal");
|
|||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
reply?: misskey.entities.Note;
|
||||
renote?: misskey.entities.Note;
|
||||
reply?: firefish.entities.Note;
|
||||
renote?: firefish.entities.Note;
|
||||
channel?: any; // TODO
|
||||
mention?: misskey.entities.User;
|
||||
specified?: misskey.entities.User;
|
||||
mention?: firefish.entities.User;
|
||||
specified?: firefish.entities.User;
|
||||
initialText?: string;
|
||||
initialVisibility?: typeof misskey.noteVisibilities;
|
||||
initialFiles?: misskey.entities.DriveFile[];
|
||||
initialVisibility?: typeof firefish.noteVisibilities;
|
||||
initialFiles?: firefish.entities.DriveFile[];
|
||||
initialLocalOnly?: boolean;
|
||||
initialVisibleUsers?: misskey.entities.User[];
|
||||
initialNote?: misskey.entities.Note;
|
||||
initialVisibleUsers?: firefish.entities.User[];
|
||||
initialNote?: firefish.entities.Note;
|
||||
instant?: boolean;
|
||||
fixed?: boolean;
|
||||
autofocus?: boolean;
|
||||
showMfmCheatSheet?: boolean;
|
||||
editId?: misskey.entities.Note["id"];
|
||||
editId?: firefish.entities.Note["id"];
|
||||
}>(),
|
||||
{
|
||||
initialVisibleUsers: () => [],
|
||||
|
@ -338,7 +338,7 @@ const visibility = ref(
|
|||
((defaultStore.state.rememberNoteVisibility
|
||||
? defaultStore.state.visibility
|
||||
: defaultStore.state
|
||||
.defaultNoteVisibility) as (typeof misskey.noteVisibilities)[number]),
|
||||
.defaultNoteVisibility) as (typeof firefish.noteVisibilities)[number]),
|
||||
);
|
||||
const visibleUsers = ref([]);
|
||||
if (props.initialVisibleUsers) {
|
||||
|
@ -980,7 +980,7 @@ function showActions(ev) {
|
|||
);
|
||||
}
|
||||
|
||||
const postAccount = ref<misskey.entities.UserDetailed | null>(null);
|
||||
const postAccount = ref<firefish.entities.UserDetailed | null>(null);
|
||||
|
||||
function openAccountMenu(ev: MouseEvent) {
|
||||
openAccountMenu_(
|
||||
|
|
|
@ -21,26 +21,26 @@
|
|||
<script lang="ts" setup>
|
||||
import { shallowRef } from "vue";
|
||||
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import MkModal from "@/components/MkModal.vue";
|
||||
import MkPostForm from "@/components/MkPostForm.vue";
|
||||
|
||||
const props = defineProps<{
|
||||
reply?: misskey.entities.Note;
|
||||
renote?: misskey.entities.Note;
|
||||
reply?: firefish.entities.Note;
|
||||
renote?: firefish.entities.Note;
|
||||
channel?: any; // TODO
|
||||
mention?: misskey.entities.User;
|
||||
specified?: misskey.entities.User;
|
||||
mention?: firefish.entities.User;
|
||||
specified?: firefish.entities.User;
|
||||
initialText?: string;
|
||||
initialVisibility?: typeof misskey.noteVisibilities;
|
||||
initialFiles?: misskey.entities.DriveFile[];
|
||||
initialVisibility?: typeof firefish.noteVisibilities;
|
||||
initialFiles?: firefish.entities.DriveFile[];
|
||||
initialLocalOnly?: boolean;
|
||||
initialVisibleUsers?: misskey.entities.User[];
|
||||
initialNote?: misskey.entities.Note;
|
||||
initialVisibleUsers?: firefish.entities.User[];
|
||||
initialNote?: firefish.entities.Note;
|
||||
instant?: boolean;
|
||||
fixed?: boolean;
|
||||
autofocus?: boolean;
|
||||
editId?: misskey.entities.Note["id"];
|
||||
editId?: firefish.entities.Note["id"];
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
|
|
|
@ -37,16 +37,16 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, ref, watch } from "vue";
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import MkReactionIcon from "@/components/MkReactionIcon.vue";
|
||||
import MkUserCardMini from "@/components/MkUserCardMini.vue";
|
||||
import * as os from "@/os";
|
||||
|
||||
const props = defineProps<{
|
||||
noteId: misskey.entities.Note["id"];
|
||||
noteId: firefish.entities.Note["id"];
|
||||
}>();
|
||||
|
||||
const note = ref<misskey.entities.Note>();
|
||||
const note = ref<firefish.entities.Note>();
|
||||
const tab = ref<string>();
|
||||
const reactions = ref<string[]>();
|
||||
const users = ref();
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref } from "vue";
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import XDetails from "@/components/MkReactionsViewer.details.vue";
|
||||
import XReactionIcon from "@/components/MkReactionIcon.vue";
|
||||
import * as os from "@/os";
|
||||
|
@ -34,7 +34,7 @@ const props = defineProps<{
|
|||
reaction: string;
|
||||
count: number;
|
||||
isInitial: boolean;
|
||||
note: misskey.entities.Note;
|
||||
note: firefish.entities.Note;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
|
|
|
@ -18,12 +18,12 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref } from "vue";
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import { $i } from "@/account";
|
||||
import XReaction from "@/components/MkReactionsViewer.reaction.vue";
|
||||
|
||||
const props = defineProps<{
|
||||
note: misskey.entities.Note;
|
||||
note: firefish.entities.Note;
|
||||
}>();
|
||||
|
||||
const reactionsEl = ref<HTMLElement>();
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref } from "vue";
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import Ripple from "@/components/MkRipple.vue";
|
||||
import XDetails from "@/components/MkUsersTooltip.vue";
|
||||
import { pleaseLogin } from "@/scripts/please-login";
|
||||
|
@ -35,7 +35,7 @@ import type { MenuItem } from "@/types/menu";
|
|||
import { vibrate } from "@/scripts/vibrate";
|
||||
|
||||
const props = defineProps<{
|
||||
note: misskey.entities.Note;
|
||||
note: firefish.entities.Note;
|
||||
count: number;
|
||||
detailedView?;
|
||||
}>();
|
||||
|
|
|
@ -177,7 +177,7 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from "vue";
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import * as mfm from "mfm-js";
|
||||
import * as os from "@/os";
|
||||
import XNoteSimple from "@/components/MkNoteSimple.vue";
|
||||
|
@ -194,7 +194,7 @@ import { i18n } from "@/i18n";
|
|||
import { defaultStore } from "@/store";
|
||||
|
||||
const props = defineProps<{
|
||||
note: misskey.entities.Note;
|
||||
note: firefish.entities.Note;
|
||||
parentId?;
|
||||
conversation?;
|
||||
detailed?: boolean;
|
||||
|
|
|
@ -26,14 +26,14 @@
|
|||
<script lang="ts" setup>
|
||||
import { ref } from "vue";
|
||||
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import MkMiniChart from "@/components/MkMiniChart.vue";
|
||||
import * as os from "@/os";
|
||||
import { acct, userPage } from "@/filters/user";
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
user: misskey.entities.User;
|
||||
user: firefish.entities.User;
|
||||
withChart?: boolean;
|
||||
showAboutPage?: boolean;
|
||||
}>(),
|
||||
|
|
|
@ -88,7 +88,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { ref } from "vue";
|
||||
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import MkFollowButton from "@/components/MkFollowButton.vue";
|
||||
import XShowMoreButton from "@/components/MkShowMoreButton.vue";
|
||||
import MkNumber from "@/components/MkNumber.vue";
|
||||
|
@ -96,7 +96,7 @@ import { userPage } from "@/filters/user";
|
|||
import { i18n } from "@/i18n";
|
||||
|
||||
const props = defineProps<{
|
||||
user: misskey.entities.UserDetailed;
|
||||
user: firefish.entities.UserDetailed;
|
||||
detailed?: boolean;
|
||||
}>();
|
||||
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
<script lang="ts" setup>
|
||||
import { computed } from "vue";
|
||||
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import { i18n } from "@/i18n";
|
||||
|
||||
const props = defineProps<{
|
||||
user: misskey.entities.User;
|
||||
user: firefish.entities.User;
|
||||
}>();
|
||||
|
||||
const text = computed(() => {
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { onMounted, ref } from "vue";
|
||||
import * as Acct from "firefish-js/built/acct";
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import MkUserInfo from "@/components/MkUserInfo.vue";
|
||||
import * as os from "@/os";
|
||||
|
||||
|
@ -47,7 +47,7 @@ const emit = defineEmits<{
|
|||
}>();
|
||||
|
||||
const zIndex = os.claimZIndex("middle");
|
||||
const user = ref<misskey.entities.UserDetailed | null>(null);
|
||||
const user = ref<firefish.entities.UserDetailed | null>(null);
|
||||
const top = ref(0);
|
||||
const left = ref(0);
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, ref } from "vue";
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import MkInput from "@/components/form/input.vue";
|
||||
import FormSplit from "@/components/form/split.vue";
|
||||
import XModalWindow from "@/components/MkModalWindow.vue";
|
||||
|
@ -98,16 +98,16 @@ import { defaultStore } from "@/store";
|
|||
import { i18n } from "@/i18n";
|
||||
|
||||
const emit = defineEmits<{
|
||||
(ev: "ok", selected: misskey.entities.UserDetailed): void;
|
||||
(ev: "ok", selected: firefish.entities.UserDetailed): void;
|
||||
(ev: "cancel"): void;
|
||||
(ev: "closed"): void;
|
||||
}>();
|
||||
|
||||
const username = ref("");
|
||||
const host = ref("");
|
||||
const users: misskey.entities.UserDetailed[] = ref([]);
|
||||
const recentUsers: misskey.entities.UserDetailed[] = ref([]);
|
||||
const selected: misskey.entities.UserDetailed | null = ref(null);
|
||||
const users: firefish.entities.UserDetailed[] = ref([]);
|
||||
const recentUsers: firefish.entities.UserDetailed[] = ref([]);
|
||||
const selected: firefish.entities.UserDetailed | null = ref(null);
|
||||
const dialogEl = ref();
|
||||
|
||||
const search = () => {
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, ref } from "vue";
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import MkInput from "@/components/form/input.vue";
|
||||
import FormSplit from "@/components/form/split.vue";
|
||||
import XModalWindow from "@/components/MkModalWindow.vue";
|
||||
|
@ -94,15 +94,15 @@ import { defaultStore } from "@/store";
|
|||
import { i18n } from "@/i18n";
|
||||
|
||||
const emit = defineEmits<{
|
||||
(ev: "ok", selected: misskey.entities.UserDetailed): void;
|
||||
(ev: "ok", selected: firefish.entities.UserDetailed): void;
|
||||
(ev: "cancel"): void;
|
||||
(ev: "closed"): void;
|
||||
}>();
|
||||
|
||||
const username = ref("");
|
||||
const users: misskey.entities.UserDetailed[] = ref([]);
|
||||
const recentUsers: misskey.entities.UserDetailed[] = ref([]);
|
||||
const selected: misskey.entities.UserDetailed | null = ref(null);
|
||||
const users: firefish.entities.UserDetailed[] = ref([]);
|
||||
const recentUsers: firefish.entities.UserDetailed[] = ref([]);
|
||||
const selected: firefish.entities.UserDetailed | null = ref(null);
|
||||
const dialogEl = ref();
|
||||
|
||||
const search = () => {
|
||||
|
|
|
@ -123,7 +123,7 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { nextTick, ref, shallowRef, watch } from "vue";
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import MkModal from "@/components/MkModal.vue";
|
||||
import { i18n } from "@/i18n";
|
||||
|
||||
|
@ -131,7 +131,7 @@ const modal = shallowRef<InstanceType<typeof MkModal>>();
|
|||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
currentVisibility: (typeof misskey.noteVisibilities)[number];
|
||||
currentVisibility: (typeof firefish.noteVisibilities)[number];
|
||||
currentLocalOnly: boolean;
|
||||
src?: HTMLElement;
|
||||
}>(),
|
||||
|
@ -141,7 +141,7 @@ const props = withDefaults(
|
|||
const emit = defineEmits<{
|
||||
(
|
||||
ev: "changeVisibility",
|
||||
v: (typeof misskey.noteVisibilities)[number],
|
||||
v: (typeof firefish.noteVisibilities)[number],
|
||||
): void;
|
||||
(ev: "changeLocalOnly", v: boolean): void;
|
||||
(ev: "closed"): void;
|
||||
|
@ -154,7 +154,7 @@ watch(localOnly, () => {
|
|||
emit("changeLocalOnly", localOnly.value);
|
||||
});
|
||||
|
||||
function choose(visibility: (typeof misskey.noteVisibilities)[number]): void {
|
||||
function choose(visibility: (typeof firefish.noteVisibilities)[number]): void {
|
||||
v.value = visibility;
|
||||
emit("changeVisibility", visibility);
|
||||
nextTick(() => {
|
||||
|
|
|
@ -10,12 +10,12 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import { toUnicode } from "punycode/";
|
||||
import { host as hostRaw } from "@/config";
|
||||
|
||||
defineProps<{
|
||||
user: misskey.entities.UserDetailed;
|
||||
user: firefish.entities.UserDetailed;
|
||||
detail?: boolean;
|
||||
}>();
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref, watch } from "vue";
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import { getStaticImageUrl } from "@/scripts/get-static-image-url";
|
||||
import { extractAvgColorFromBlurhash } from "@/scripts/extract-avg-color-from-blurhash";
|
||||
import { acct, userPage } from "@/filters/user";
|
||||
|
@ -46,7 +46,7 @@ import { defaultStore } from "@/store";
|
|||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
user: misskey.entities.User;
|
||||
user: firefish.entities.User;
|
||||
target?: string | null;
|
||||
disableLink?: boolean;
|
||||
disablePreview?: boolean;
|
||||
|
|
|
@ -9,11 +9,11 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
user: misskey.entities.User;
|
||||
user: firefish.entities.User;
|
||||
nowrap?: boolean;
|
||||
}>(),
|
||||
{
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import * as Acct from "firefish-js/built/acct";
|
||||
import { url } from "@/config";
|
||||
|
||||
export const acct = (user: misskey.Acct) => {
|
||||
export const acct = (user: firefish.Acct) => {
|
||||
return Acct.toString(user);
|
||||
};
|
||||
|
||||
export const userName = (user: misskey.entities.User) => {
|
||||
export const userName = (user: firefish.entities.User) => {
|
||||
return user.name || user.username;
|
||||
};
|
||||
|
||||
export const userPage = (user: misskey.Acct, path?, absolute = false) => {
|
||||
export const userPage = (user: firefish.Acct, path?, absolute = false) => {
|
||||
return `${absolute ? url : ""}/@${acct(user)}${path ? `/${path}` : ""}`;
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { computed, reactive } from "vue";
|
||||
import type * as Misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import { api } from "./os";
|
||||
|
||||
// TODO: 他のタブと永続化されたstateを同期
|
||||
|
@ -7,7 +7,7 @@ import { api } from "./os";
|
|||
const instanceData = localStorage.getItem("instance");
|
||||
// TODO: instanceをリアクティブにするかは再考の余地あり
|
||||
|
||||
export const instance: Misskey.entities.DetailedInstanceMetadata = reactive(
|
||||
export const instance: firefish.entities.DetailedInstanceMetadata = reactive(
|
||||
instanceData
|
||||
? JSON.parse(instanceData)
|
||||
: {
|
||||
|
|
|
@ -4,7 +4,7 @@ import type { Component, Ref } from "vue";
|
|||
import { defineAsyncComponent, markRaw, ref } from "vue";
|
||||
import { EventEmitter } from "eventemitter3";
|
||||
import insertTextAtCursor from "insert-text-at-cursor";
|
||||
import * as Misskey from "firefish-js";
|
||||
import * as firefish from "firefish-js";
|
||||
import { i18n } from "./i18n";
|
||||
import { apiUrl, url } from "@/config";
|
||||
import MkPostFormDialog from "@/components/MkPostFormDialog.vue";
|
||||
|
@ -16,7 +16,7 @@ import { $i } from "@/account";
|
|||
|
||||
export const pendingApiRequestsCount = ref(0);
|
||||
|
||||
const apiClient = new Misskey.api.APIClient({
|
||||
const apiClient = new firefish.api.APIClient({
|
||||
origin: url,
|
||||
});
|
||||
|
||||
|
@ -651,7 +651,7 @@ export async function selectLocalUser() {
|
|||
});
|
||||
}
|
||||
|
||||
export async function selectInstance(): Promise<Misskey.entities.Instance> {
|
||||
export async function selectInstance(): Promise<firefish.entities.Instance> {
|
||||
return new Promise((resolve, reject) => {
|
||||
popup(
|
||||
defineAsyncComponent({
|
||||
|
@ -741,11 +741,11 @@ export async function pickEmoji(src: HTMLElement | null, opts) {
|
|||
}
|
||||
|
||||
export async function cropImage(
|
||||
image: Misskey.entities.DriveFile,
|
||||
image: firefish.entities.DriveFile,
|
||||
options: {
|
||||
aspectRatio: number;
|
||||
},
|
||||
): Promise<Misskey.entities.DriveFile> {
|
||||
): Promise<firefish.entities.DriveFile> {
|
||||
return new Promise((resolve, reject) => {
|
||||
popup(
|
||||
defineAsyncComponent({
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { ref } from "vue";
|
||||
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import MkButton from "@/components/MkButton.vue";
|
||||
import { version } from "@/config";
|
||||
import * as os from "@/os";
|
||||
|
@ -54,7 +54,7 @@ const props = withDefaults(
|
|||
|
||||
const loaded = ref(false);
|
||||
const serverIsDead = ref(false);
|
||||
const meta = ref<misskey.entities.LiteInstanceMetadata | null>(null);
|
||||
const meta = ref<firefish.entities.LiteInstanceMetadata | null>(null);
|
||||
|
||||
os.api("meta", {
|
||||
detail: false,
|
||||
|
|
|
@ -19,13 +19,13 @@
|
|||
<script lang="ts" setup>
|
||||
import { ref } from "vue";
|
||||
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import MkMiniChart from "@/components/MkMiniChart.vue";
|
||||
import * as os from "@/os";
|
||||
import { acct } from "@/filters/user";
|
||||
|
||||
const props = defineProps<{
|
||||
user: misskey.entities.User;
|
||||
user: firefish.entities.User;
|
||||
}>();
|
||||
|
||||
const chart = ref(null);
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed, provide, ref, watch } from "vue";
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import XNotes from "@/components/MkNotes.vue";
|
||||
import { $i } from "@/account";
|
||||
import { i18n } from "@/i18n";
|
||||
|
@ -40,7 +40,7 @@ const props = defineProps<{
|
|||
clipId: string;
|
||||
}>();
|
||||
|
||||
const clip = ref<misskey.entities.Clip>();
|
||||
const clip = ref<firefish.entities.Clip>();
|
||||
const pagination = {
|
||||
endpoint: "clips/notes" as const,
|
||||
limit: 10,
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed, onMounted, ref, watch } from "vue";
|
||||
import type * as Misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import autosize from "autosize";
|
||||
// import insertTextAtCursor from 'insert-text-at-cursor';
|
||||
import { throttle } from "throttle-debounce";
|
||||
|
@ -70,15 +70,15 @@ import { i18n } from "@/i18n";
|
|||
import { uploadFile } from "@/scripts/upload";
|
||||
|
||||
const props = defineProps<{
|
||||
user?: Misskey.entities.UserDetailed | null;
|
||||
group?: Misskey.entities.UserGroup | null;
|
||||
user?: firefish.entities.UserDetailed | null;
|
||||
group?: firefish.entities.UserGroup | null;
|
||||
}>();
|
||||
|
||||
const textEl = ref<HTMLTextAreaElement>();
|
||||
const fileEl = ref<HTMLInputElement>();
|
||||
|
||||
const text = ref<string>("");
|
||||
const file = ref<Misskey.entities.DriveFile | null>(null);
|
||||
const file = ref<firefish.entities.DriveFile | null>(null);
|
||||
const sending = ref(false);
|
||||
const typing = throttle(3000, () => {
|
||||
stream.send(
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
import { computed } from "vue";
|
||||
|
||||
import * as mfm from "mfm-js";
|
||||
import type * as Misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import XMediaList from "@/components/MkMediaList.vue";
|
||||
import { extractUrlFromMfm } from "@/scripts/extract-url-from-mfm";
|
||||
import MkUrlPreview from "@/components/MkUrlPreview.vue";
|
||||
|
@ -94,7 +94,7 @@ import { $i } from "@/account";
|
|||
import { i18n } from "@/i18n";
|
||||
|
||||
const props = defineProps<{
|
||||
message: Misskey.entities.MessagingMessage;
|
||||
message: firefish.entities.MessagingMessage;
|
||||
isGroup?: boolean;
|
||||
}>();
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ import {
|
|||
ref,
|
||||
watch,
|
||||
} from "vue";
|
||||
import type * as Misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import * as Acct from "firefish-js/built/acct";
|
||||
import XMessage from "./messaging-room.message.vue";
|
||||
import XForm from "./messaging-room.form.vue";
|
||||
|
@ -136,11 +136,11 @@ const formEl = ref<InstanceType<typeof XForm>>();
|
|||
const pagingComponent = ref<InstanceType<typeof MkPagination>>();
|
||||
|
||||
const fetching = ref(true);
|
||||
const user = ref<Misskey.entities.UserDetailed | null>(null);
|
||||
const group = ref<Misskey.entities.UserGroup | null>(null);
|
||||
const typers = ref<Misskey.entities.User[]>([]);
|
||||
const connection: Misskey.ChannelConnection<
|
||||
Misskey.Channels["messaging"]
|
||||
const user = ref<firefish.entities.UserDetailed | null>(null);
|
||||
const group = ref<firefish.entities.UserGroup | null>(null);
|
||||
const typers = ref<firefish.entities.User[]>([]);
|
||||
const connection: firefish.ChannelConnection<
|
||||
firefish.Channels["messaging"]
|
||||
> | null = ref(null);
|
||||
const showIndicator = ref(false);
|
||||
const { animation } = defaultStore.reactiveState;
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref, watch } from "vue";
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import XNoteDetailed from "@/components/MkNoteDetailed.vue";
|
||||
import XNotes from "@/components/MkNotes.vue";
|
||||
import MkRemoteCaution from "@/components/MkRemoteCaution.vue";
|
||||
|
@ -83,14 +83,14 @@ const props = defineProps<{
|
|||
noteId: string;
|
||||
}>();
|
||||
|
||||
const note = ref<null | misskey.entities.Note>();
|
||||
const note = ref<null | firefish.entities.Note>();
|
||||
const hasPrev = ref(false);
|
||||
const hasNext = ref(false);
|
||||
const showPrev = ref(false);
|
||||
const showNext = ref(false);
|
||||
const error = ref();
|
||||
const isRenote = ref(false);
|
||||
const appearNote = ref<null | misskey.entities.Note>();
|
||||
const appearNote = ref<null | firefish.entities.Note>();
|
||||
|
||||
const prevPagination = {
|
||||
endpoint: "users/notes" as const,
|
||||
|
@ -136,7 +136,7 @@ function fetchNote() {
|
|||
note.value.fileIds.length === 0 &&
|
||||
note.value.poll == null;
|
||||
appearNote.value = isRenote.value
|
||||
? (note.value.renote as misskey.entities.Note)
|
||||
? (note.value.renote as firefish.entities.Note)
|
||||
: note.value;
|
||||
|
||||
Promise.all([
|
||||
|
|
|
@ -114,7 +114,7 @@
|
|||
>{{ i18n.ts._theme.manage
|
||||
}}<template #suffix>{{ themesCount }}</template></FormLink
|
||||
>
|
||||
<FormLink to="https://assets.misskey.io/theme/list" external
|
||||
<FormLink to="https://assets.firefish.io/theme/list" external
|
||||
><template #icon
|
||||
><i class="ph-planet ph-bold ph-lg"></i></template
|
||||
>{{ i18n.ts._theme.explore }}</FormLink
|
||||
|
|
|
@ -35,7 +35,7 @@ import { computed, ref } from "vue";
|
|||
// SPECIFICATION: https://misskey-hub.net/docs/features/share-form.html
|
||||
import { noteVisibilities } from "firefish-js";
|
||||
import * as Acct from "firefish-js/built/acct";
|
||||
import type * as Misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import MkButton from "@/components/MkButton.vue";
|
||||
import XPostForm from "@/components/MkPostForm.vue";
|
||||
import * as os from "@/os";
|
||||
|
@ -52,16 +52,16 @@ const title = ref(urlParams.get("title"));
|
|||
const text = urlParams.get("text");
|
||||
const url = urlParams.get("url");
|
||||
const initialText = ref(null as string | null);
|
||||
const reply = ref(null as Misskey.entities.Note | null);
|
||||
const renote = ref(null as Misskey.entities.Note | null);
|
||||
const reply = ref(null as firefish.entities.Note | null);
|
||||
const renote = ref(null as firefish.entities.Note | null);
|
||||
const visibility = ref(
|
||||
noteVisibilities.includes(visibilityQuery) ? visibilityQuery : null,
|
||||
);
|
||||
const localOnly = ref(
|
||||
localOnlyQuery === "0" ? false : localOnlyQuery === "1" ? true : null,
|
||||
);
|
||||
const files = ref([] as Misskey.entities.DriveFile[]);
|
||||
const visibleUsers = ref([] as Misskey.entities.User[]);
|
||||
const files = ref([] as firefish.entities.DriveFile[]);
|
||||
const visibleUsers = ref([] as firefish.entities.User[]);
|
||||
|
||||
async function init() {
|
||||
let noteText = "";
|
||||
|
|
|
@ -358,7 +358,7 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref, watch } from "vue";
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import MkChart from "@/components/MkChart.vue";
|
||||
import MkObjectView from "@/components/MkObjectView.vue";
|
||||
import FormTextarea from "@/components/form/textarea.vue";
|
||||
|
@ -387,7 +387,7 @@ const props = defineProps<{
|
|||
|
||||
const tab = ref("overview");
|
||||
const chartSrc = ref("per-user-notes");
|
||||
const user = ref<null | misskey.entities.UserDetailed>();
|
||||
const user = ref<null | firefish.entities.UserDetailed>();
|
||||
const init = ref<ReturnType<typeof createFetcher>>();
|
||||
const info = ref();
|
||||
const ips = ref(null);
|
||||
|
|
|
@ -25,11 +25,11 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed } from "vue";
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import MkPagination from "@/components/MkPagination.vue";
|
||||
|
||||
const props = defineProps<{
|
||||
user: misskey.entities.User;
|
||||
user: firefish.entities.User;
|
||||
}>();
|
||||
|
||||
const pagination = {
|
||||
|
|
|
@ -24,12 +24,12 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed } from "vue";
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import MkUserInfo from "@/components/MkUserInfo.vue";
|
||||
import MkPagination from "@/components/MkPagination.vue";
|
||||
|
||||
const props = defineProps<{
|
||||
user: misskey.entities.User;
|
||||
user: firefish.entities.User;
|
||||
type: "following" | "followers";
|
||||
}>();
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { computed, ref, watch } from "vue";
|
||||
import * as Acct from "firefish-js/built/acct";
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import XFollowList from "./follow-list.vue";
|
||||
import * as os from "@/os";
|
||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||
|
@ -31,7 +31,7 @@ const props = withDefaults(
|
|||
{},
|
||||
);
|
||||
|
||||
const user = ref<null | misskey.entities.UserDetailed>(null);
|
||||
const user = ref<null | firefish.entities.UserDetailed>(null);
|
||||
const error = ref(null);
|
||||
|
||||
function fetchUser(): void {
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { computed, ref, watch } from "vue";
|
||||
import * as Acct from "firefish-js/built/acct";
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import XFollowList from "./follow-list.vue";
|
||||
import * as os from "@/os";
|
||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||
|
@ -31,7 +31,7 @@ const props = withDefaults(
|
|||
{},
|
||||
);
|
||||
|
||||
const user = ref<null | misskey.entities.UserDetailed>(null);
|
||||
const user = ref<null | firefish.entities.UserDetailed>(null);
|
||||
const error = ref(null);
|
||||
|
||||
function fetchUser(): void {
|
||||
|
|
|
@ -15,13 +15,13 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed } from "vue";
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import MkGalleryPostPreview from "@/components/MkGalleryPostPreview.vue";
|
||||
import MkPagination from "@/components/MkPagination.vue";
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
user: misskey.entities.User;
|
||||
user: firefish.entities.User;
|
||||
}>(),
|
||||
{},
|
||||
);
|
||||
|
|
|
@ -388,7 +388,7 @@ import {
|
|||
} from "vue";
|
||||
import calcAge from "s-age";
|
||||
import cityTimezones from "city-timezones";
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import XUserTimeline from "./index.timeline.vue";
|
||||
import XNote from "@/components/MkNote.vue";
|
||||
import MkFollowButton from "@/components/MkFollowButton.vue";
|
||||
|
@ -411,7 +411,7 @@ const XActivity = defineAsyncComponent(() => import("./index.activity.vue"));
|
|||
const emit = defineEmits(["refresh"]);
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
user: misskey.entities.UserDetailed;
|
||||
user: firefish.entities.UserDetailed;
|
||||
}>(),
|
||||
{},
|
||||
);
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { ref } from "vue";
|
||||
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import MkContainer from "@/components/MkContainer.vue";
|
||||
import MkChart from "@/components/MkChart.vue";
|
||||
import * as os from "@/os";
|
||||
|
@ -39,7 +39,7 @@ import { i18n } from "@/i18n";
|
|||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
user: misskey.entities.User;
|
||||
user: firefish.entities.User;
|
||||
limit?: number;
|
||||
}>(),
|
||||
{
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, ref } from "vue";
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import { getStaticImageUrl } from "@/scripts/get-static-image-url";
|
||||
import { notePage } from "@/filters/note";
|
||||
import * as os from "@/os";
|
||||
|
@ -39,18 +39,18 @@ import { defaultStore } from "@/store";
|
|||
import { i18n } from "@/i18n";
|
||||
|
||||
const props = defineProps<{
|
||||
user: misskey.entities.UserDetailed;
|
||||
user: firefish.entities.UserDetailed;
|
||||
}>();
|
||||
|
||||
const fetching = ref(true);
|
||||
const images = ref<
|
||||
{
|
||||
note: misskey.entities.Note;
|
||||
file: misskey.entities.DriveFile;
|
||||
note: firefish.entities.Note;
|
||||
file: firefish.entities.DriveFile;
|
||||
}[]
|
||||
>([]);
|
||||
|
||||
function thumbnail(image: misskey.entities.DriveFile): string {
|
||||
function thumbnail(image: firefish.entities.DriveFile): string {
|
||||
return defaultStore.state.disableShowingAnimatedImages
|
||||
? getStaticImageUrl(image.thumbnailUrl)
|
||||
: image.thumbnailUrl;
|
||||
|
|
|
@ -13,13 +13,13 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref } from "vue";
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import XNotes from "@/components/MkNotes.vue";
|
||||
import MkTab from "@/components/MkTab.vue";
|
||||
import { i18n } from "@/i18n";
|
||||
|
||||
const props = defineProps<{
|
||||
user: misskey.entities.UserDetailed;
|
||||
user: firefish.entities.UserDetailed;
|
||||
}>();
|
||||
|
||||
const include = ref<string | null>(null);
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { computed, defineAsyncComponent, ref, watch } from "vue";
|
||||
import * as Acct from "firefish-js/built/acct";
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import { acct as getAcct } from "@/filters/user";
|
||||
import * as os from "@/os";
|
||||
import { useRouter } from "@/router";
|
||||
|
@ -58,7 +58,7 @@ const props = withDefaults(
|
|||
useRouter();
|
||||
|
||||
const tab = ref(props.page);
|
||||
const user = ref<null | misskey.entities.UserDetailed>(null);
|
||||
const user = ref<null | firefish.entities.UserDetailed>(null);
|
||||
const error = ref(null);
|
||||
|
||||
function fetchUser(): void {
|
||||
|
|
|
@ -13,12 +13,12 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed } from "vue";
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import MkPagePreview from "@/components/MkPagePreview.vue";
|
||||
import MkPagination from "@/components/MkPagination.vue";
|
||||
|
||||
const props = defineProps<{
|
||||
user: misskey.entities.User;
|
||||
user: firefish.entities.User;
|
||||
}>();
|
||||
|
||||
const pagination = {
|
||||
|
|
|
@ -25,13 +25,13 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed } from "vue";
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import MkPagination from "@/components/MkPagination.vue";
|
||||
import MkNote from "@/components/MkNote.vue";
|
||||
import MkReactionIcon from "@/components/MkReactionIcon.vue";
|
||||
|
||||
const props = defineProps<{
|
||||
user: misskey.entities.User;
|
||||
user: firefish.entities.User;
|
||||
}>();
|
||||
|
||||
const pagination = {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import type { Ref } from "vue";
|
||||
import { defineAsyncComponent, inject } from "vue";
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import { $i } from "@/account";
|
||||
import { i18n } from "@/i18n";
|
||||
import { instance } from "@/instance";
|
||||
|
@ -12,12 +12,12 @@ import { shareAvailable } from "@/scripts/share-available";
|
|||
import { getUserMenu } from "@/scripts/get-user-menu";
|
||||
|
||||
export function getNoteMenu(props: {
|
||||
note: misskey.entities.Note;
|
||||
note: firefish.entities.Note;
|
||||
menuButton: Ref<HTMLElement | undefined>;
|
||||
translation: Ref<any>;
|
||||
translating: Ref<boolean>;
|
||||
isDeleted: Ref<boolean>;
|
||||
currentClipPage?: Ref<misskey.entities.Clip>;
|
||||
currentClipPage?: Ref<firefish.entities.Clip>;
|
||||
}) {
|
||||
const isRenote =
|
||||
props.note.renote != null &&
|
||||
|
@ -26,7 +26,7 @@ export function getNoteMenu(props: {
|
|||
props.note.poll == null;
|
||||
|
||||
const appearNote = isRenote
|
||||
? (props.note.renote as misskey.entities.Note)
|
||||
? (props.note.renote as firefish.entities.Note)
|
||||
: props.note;
|
||||
|
||||
function del(): void {
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import { i18n } from "@/i18n";
|
||||
|
||||
/**
|
||||
* 投稿を表す文字列を取得します。
|
||||
* @param {*} note (packされた)投稿
|
||||
*/
|
||||
export const getNoteSummary = (note: misskey.entities.Note): string => {
|
||||
export const getNoteSummary = (note: firefish.entities.Note): string => {
|
||||
/*
|
||||
if (note.deletedAt) {
|
||||
return `(${i18n.ts.deletedNote})`;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import type { ComputedRef, Ref } from "vue";
|
||||
import { inject, isRef, onActivated, onMounted, provide, ref } from "vue";
|
||||
|
||||
|
@ -9,8 +9,8 @@ export interface PageMetadata {
|
|||
title: string;
|
||||
subtitle?: string;
|
||||
icon?: string | null;
|
||||
avatar?: misskey.entities.User | null;
|
||||
userName?: misskey.entities.User | null;
|
||||
avatar?: firefish.entities.User | null;
|
||||
userName?: firefish.entities.User | null;
|
||||
bg?: string;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { reactive, ref } from "vue";
|
||||
import type * as Misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import { readAndCompressImage } from "browser-image-resizer";
|
||||
import { defaultStore } from "@/store";
|
||||
import { apiUrl } from "@/config";
|
||||
|
@ -34,7 +34,7 @@ export function uploadFile(
|
|||
folder?: any,
|
||||
name?: string,
|
||||
keepOriginal: boolean = defaultStore.state.keepOriginalUploading,
|
||||
): Promise<Misskey.entities.DriveFile> {
|
||||
): Promise<firefish.entities.DriveFile> {
|
||||
if (folder && typeof folder === "object") folder = folder.id;
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import type { Ref } from "vue";
|
||||
import { onUnmounted } from "vue";
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import { stream } from "@/stream";
|
||||
import { $i } from "@/account";
|
||||
import * as os from "@/os";
|
||||
|
||||
export function useNoteCapture(props: {
|
||||
rootEl: Ref<HTMLElement>;
|
||||
note: Ref<misskey.entities.Note>;
|
||||
note: Ref<firefish.entities.Note>;
|
||||
isDeletedRef: Ref<boolean>;
|
||||
}) {
|
||||
const note = props.note;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import * as Misskey from "firefish-js";
|
||||
import * as firefish from "firefish-js";
|
||||
import { markRaw } from "vue";
|
||||
import { $i } from "@/account";
|
||||
import { url } from "@/config";
|
||||
|
||||
export const stream = markRaw(
|
||||
new Misskey.Stream(
|
||||
new firefish.Stream(
|
||||
url,
|
||||
$i
|
||||
? {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import type * as Misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import type { Ref } from "vue";
|
||||
|
||||
export type MenuAction = (ev: MouseEvent) => void;
|
||||
|
@ -17,7 +17,7 @@ export interface MenuLink {
|
|||
textStyle?: string;
|
||||
icon?: string;
|
||||
indicate?: boolean;
|
||||
avatar?: Misskey.entities.User;
|
||||
avatar?: firefish.entities.User;
|
||||
}
|
||||
export interface MenuA {
|
||||
type: "a";
|
||||
|
@ -31,7 +31,7 @@ export interface MenuA {
|
|||
}
|
||||
export interface MenuUser {
|
||||
type: "user";
|
||||
user: Misskey.entities.User;
|
||||
user: firefish.entities.User;
|
||||
active?: boolean;
|
||||
indicate?: boolean;
|
||||
hidden?: boolean;
|
||||
|
@ -54,7 +54,7 @@ export interface MenuButton {
|
|||
accent?: boolean;
|
||||
active?: boolean;
|
||||
hidden?: boolean;
|
||||
avatar?: Misskey.entities.User;
|
||||
avatar?: firefish.entities.User;
|
||||
action: MenuAction;
|
||||
}
|
||||
export interface MenuParent {
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed, defineAsyncComponent, ref, toRef, watch } from "vue";
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import MarqueeText from "@/components/MkMarquee.vue";
|
||||
import * as os from "@/os";
|
||||
import { useInterval } from "@/scripts/use-interval";
|
||||
|
@ -57,7 +57,7 @@ const props = defineProps<{
|
|||
refreshIntervalSec?: number;
|
||||
}>();
|
||||
|
||||
const instances = ref<misskey.entities.Instance[]>([]);
|
||||
const instances = ref<firefish.entities.Instance[]>([]);
|
||||
const fetching = ref(true);
|
||||
const key = ref(0);
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed, defineAsyncComponent, ref, toRef, watch } from "vue";
|
||||
import type * as misskey from "firefish-js";
|
||||
import type * as firefish from "firefish-js";
|
||||
import MarqueeText from "@/components/MkMarquee.vue";
|
||||
import * as os from "@/os";
|
||||
import { useInterval } from "@/scripts/use-interval";
|
||||
|
@ -51,7 +51,7 @@ const props = defineProps<{
|
|||
refreshIntervalSec?: number;
|
||||
}>();
|
||||
|
||||
const notes = ref<misskey.entities.Note[]>([]);
|
||||
const notes = ref<firefish.entities.Note[]>([]);
|
||||
const fetching = ref(true);
|
||||
const key = ref(0);
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Firefish.js
|
||||
|
||||
Fork of Misskey.js for Firefish
|
||||
Fork of firefish.js for Firefish
|
||||
|
||||
https://www.npmjs.com/package/firefish-js
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,48 +1,48 @@
|
|||
import { expectType } from "tsd";
|
||||
import * as Misskey from "../src";
|
||||
import * as firefish from "../src";
|
||||
|
||||
describe("API", () => {
|
||||
test("success", async () => {
|
||||
const cli = new Misskey.api.APIClient({
|
||||
const cli = new firefish.api.APIClient({
|
||||
origin: "https://firefish.test",
|
||||
credential: "TOKEN",
|
||||
});
|
||||
const res = await cli.request("meta", { detail: true });
|
||||
expectType<Misskey.entities.DetailedInstanceMetadata>(res);
|
||||
expectType<firefish.entities.DetailedInstanceMetadata>(res);
|
||||
});
|
||||
|
||||
test("conditional respose type (meta)", async () => {
|
||||
const cli = new Misskey.api.APIClient({
|
||||
const cli = new firefish.api.APIClient({
|
||||
origin: "https://firefish.test",
|
||||
credential: "TOKEN",
|
||||
});
|
||||
|
||||
const res = await cli.request("meta", { detail: true });
|
||||
expectType<Misskey.entities.DetailedInstanceMetadata>(res);
|
||||
expectType<firefish.entities.DetailedInstanceMetadata>(res);
|
||||
|
||||
const res2 = await cli.request("meta", { detail: false });
|
||||
expectType<Misskey.entities.LiteInstanceMetadata>(res2);
|
||||
expectType<firefish.entities.LiteInstanceMetadata>(res2);
|
||||
|
||||
const res3 = await cli.request("meta", {});
|
||||
expectType<Misskey.entities.LiteInstanceMetadata>(res3);
|
||||
expectType<firefish.entities.LiteInstanceMetadata>(res3);
|
||||
|
||||
const res4 = await cli.request("meta", { detail: true as boolean });
|
||||
expectType<
|
||||
| Misskey.entities.LiteInstanceMetadata
|
||||
| Misskey.entities.DetailedInstanceMetadata
|
||||
| firefish.entities.LiteInstanceMetadata
|
||||
| firefish.entities.DetailedInstanceMetadata
|
||||
>(res4);
|
||||
});
|
||||
|
||||
test("conditional respose type (users/show)", async () => {
|
||||
const cli = new Misskey.api.APIClient({
|
||||
const cli = new firefish.api.APIClient({
|
||||
origin: "https://firefish.test",
|
||||
credential: "TOKEN",
|
||||
});
|
||||
|
||||
const res = await cli.request("users/show", { userId: "xxxxxxxx" });
|
||||
expectType<Misskey.entities.UserDetailed>(res);
|
||||
expectType<firefish.entities.UserDetailed>(res);
|
||||
|
||||
const res2 = await cli.request("users/show", { userIds: ["xxxxxxxx"] });
|
||||
expectType<Misskey.entities.UserDetailed[]>(res2);
|
||||
expectType<firefish.entities.UserDetailed[]>(res2);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
import { expectType } from "tsd";
|
||||
import * as Misskey from "../src";
|
||||
import * as firefish from "../src";
|
||||
|
||||
describe("Streaming", () => {
|
||||
test("emit type", async () => {
|
||||
const stream = new Misskey.Stream("https://firefish.test", {
|
||||
const stream = new firefish.Stream("https://firefish.test", {
|
||||
token: "TOKEN",
|
||||
});
|
||||
const mainChannel = stream.useChannel("main");
|
||||
mainChannel.on("notification", (notification) => {
|
||||
expectType<Misskey.entities.Notification>(notification);
|
||||
expectType<firefish.entities.Notification>(notification);
|
||||
});
|
||||
});
|
||||
|
||||
test("params type", async () => {
|
||||
const stream = new Misskey.Stream("https://firefish.test", {
|
||||
const stream = new firefish.Stream("https://firefish.test", {
|
||||
token: "TOKEN",
|
||||
});
|
||||
// TODO: 「stream.useChannel の第二引数として受け入れる型が
|
||||
|
@ -26,7 +26,7 @@ describe("Streaming", () => {
|
|||
otherparty: "aaa",
|
||||
});
|
||||
messagingChannel.on("message", (message) => {
|
||||
expectType<Misskey.entities.MessagingMessage>(message);
|
||||
expectType<firefish.entities.MessagingMessage>(message);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -40,7 +40,7 @@ export default class WebSocket
|
|||
private _pongWaiting = false;
|
||||
|
||||
/**
|
||||
* @param url Full url of websocket: e.g. wss://misskey.io/streaming
|
||||
* @param url Full url of websocket: e.g. wss://firefish.io/streaming
|
||||
* @param channel Channel name is user, localTimeline, hybridTimeline, globalTimeline, conversation or list.
|
||||
* @param accessToken The access token.
|
||||
* @param listId This parameter is required when you specify list as channel.
|
||||
|
|
|
@ -2,19 +2,19 @@
|
|||
* Operations
|
||||
* 各種操作
|
||||
*/
|
||||
import * as Misskey from "firefish-js";
|
||||
import * as firefish from "firefish-js";
|
||||
import type { SwMessage, SwMessageOrderType } from "@/types";
|
||||
import { getAccountFromId } from "@/scripts/get-account-from-id";
|
||||
import { getUrlWithLoginId } from "@/scripts/login-id";
|
||||
|
||||
export const cli = new Misskey.api.APIClient({
|
||||
export const cli = new firefish.api.APIClient({
|
||||
origin,
|
||||
fetch: (...args): Promise<Response> => fetch(...args),
|
||||
});
|
||||
|
||||
export async function api<
|
||||
E extends keyof Misskey.Endpoints,
|
||||
O extends Misskey.Endpoints[E]["req"],
|
||||
E extends keyof firefish.Endpoints,
|
||||
O extends firefish.Endpoints[E]["req"],
|
||||
>(
|
||||
endpoint: E,
|
||||
userId?: string,
|
||||
|
@ -75,8 +75,8 @@ export function openAntenna(
|
|||
export async function openPost(
|
||||
options: {
|
||||
initialText?: string;
|
||||
reply?: Misskey.entities.Note;
|
||||
renote?: Misskey.entities.Note;
|
||||
reply?: firefish.entities.Note;
|
||||
renote?: firefish.entities.Note;
|
||||
},
|
||||
loginId?: string,
|
||||
): ReturnType<typeof openClient> {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import * as Misskey from "firefish-js";
|
||||
import * as firefish from "firefish-js";
|
||||
|
||||
export type SwMessageOrderType = "post" | "push";
|
||||
|
||||
|
@ -12,10 +12,10 @@ export type SwMessage = {
|
|||
|
||||
// Defined also @/services/push-notification.ts#L7-L14
|
||||
type PushNotificationDataSourceMap = {
|
||||
notification: Misskey.entities.Notification;
|
||||
notification: firefish.entities.Notification;
|
||||
unreadAntennaNote: {
|
||||
antenna: { id: string; name: string };
|
||||
note: Misskey.entities.Note;
|
||||
note: firefish.entities.Note;
|
||||
};
|
||||
readAllNotifications: undefined;
|
||||
readAllMessagingMessages: undefined;
|
||||
|
|
Loading…
Reference in a new issue