rename foundkey-js imports to foundkey
This commit is contained in:
parent
fbe3972bc6
commit
677c1df597
73 changed files with 242 additions and 242 deletions
|
@ -6,7 +6,7 @@ import * as childProcess from 'child_process';
|
||||||
import * as http from 'node:http';
|
import * as http from 'node:http';
|
||||||
import { SIGKILL } from 'constants';
|
import { SIGKILL } from 'constants';
|
||||||
import WebSocket from 'ws';
|
import WebSocket from 'ws';
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import fetch from 'node-fetch';
|
import fetch from 'node-fetch';
|
||||||
import FormData from 'form-data';
|
import FormData from 'form-data';
|
||||||
import { DataSource } from 'typeorm';
|
import { DataSource } from 'typeorm';
|
||||||
|
@ -96,7 +96,7 @@ export const signup = async (params?: any): Promise<any> => {
|
||||||
return res.body;
|
return res.body;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const post = async (user: any, params?: misskey.Endpoints['notes/create']['req']): Promise<misskey.entities.Note> => {
|
export const post = async (user: any, params?: foundkey.Endpoints['notes/create']['req']): Promise<foundkey.entities.Note> => {
|
||||||
const q = Object.assign({
|
const q = Object.assign({
|
||||||
text: 'test',
|
text: 'test',
|
||||||
}, params);
|
}, params);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { defineAsyncComponent, reactive } from 'vue';
|
import { defineAsyncComponent, reactive } from 'vue';
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import { showSuspendedDialog } from './scripts/show-suspended-dialog';
|
import { showSuspendedDialog } from './scripts/show-suspended-dialog';
|
||||||
import { i18n } from './i18n';
|
import { i18n } from './i18n';
|
||||||
import { del, get, set } from '@/scripts/idb-proxy';
|
import { del, get, set } from '@/scripts/idb-proxy';
|
||||||
|
@ -9,7 +9,7 @@ import { unisonReload, reloadChannel } from '@/scripts/unison-reload';
|
||||||
|
|
||||||
// TODO: 他のタブと永続化されたstateを同期
|
// TODO: 他のタブと永続化されたstateを同期
|
||||||
|
|
||||||
type Account = misskey.entities.MeDetailed;
|
type Account = foundkey.entities.MeDetailed;
|
||||||
|
|
||||||
const accountData = localStorage.getItem('account');
|
const accountData = localStorage.getItem('account');
|
||||||
|
|
||||||
|
@ -141,8 +141,8 @@ export async function login(token: Account['token'], redirect?: string) {
|
||||||
export async function openAccountMenu(opts: {
|
export async function openAccountMenu(opts: {
|
||||||
includeCurrentAccount?: boolean;
|
includeCurrentAccount?: boolean;
|
||||||
withExtraOperation: boolean;
|
withExtraOperation: boolean;
|
||||||
active?: misskey.entities.UserDetailed['id'];
|
active?: foundkey.entities.UserDetailed['id'];
|
||||||
onChoose?: (account: misskey.entities.UserDetailed) => void;
|
onChoose?: (account: foundkey.entities.UserDetailed) => void;
|
||||||
}, ev: MouseEvent) {
|
}, ev: MouseEvent) {
|
||||||
function showSigninDialog() {
|
function showSigninDialog() {
|
||||||
popup(defineAsyncComponent(() => import('@/components/signin-dialog.vue')), {}, {
|
popup(defineAsyncComponent(() => import('@/components/signin-dialog.vue')), {}, {
|
||||||
|
@ -162,7 +162,7 @@ export async function openAccountMenu(opts: {
|
||||||
}, 'closed');
|
}, 'closed');
|
||||||
}
|
}
|
||||||
|
|
||||||
async function switchAccount(account: misskey.entities.UserDetailed) {
|
async function switchAccount(account: foundkey.entities.UserDetailed) {
|
||||||
const storedAccounts = await getAccounts();
|
const storedAccounts = await getAccounts();
|
||||||
const token = storedAccounts.find(x => x.id === account.id).token;
|
const token = storedAccounts.find(x => x.id === account.id).token;
|
||||||
switchAccountWithToken(token);
|
switchAccountWithToken(token);
|
||||||
|
@ -175,7 +175,7 @@ export async function openAccountMenu(opts: {
|
||||||
const storedAccounts = await getAccounts().then(accounts => accounts.filter(x => x.id !== $i.id));
|
const storedAccounts = await getAccounts().then(accounts => accounts.filter(x => x.id !== $i.id));
|
||||||
const accountsPromise = api('users/show', { userIds: storedAccounts.map(x => x.id) });
|
const accountsPromise = api('users/show', { userIds: storedAccounts.map(x => x.id) });
|
||||||
|
|
||||||
function createItem(account: misskey.entities.UserDetailed) {
|
function createItem(account: foundkey.entities.UserDetailed) {
|
||||||
return {
|
return {
|
||||||
type: 'user',
|
type: 'user',
|
||||||
user: account,
|
user: account,
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import XNoteHeader from './note-header.vue';
|
import XNoteHeader from './note-header.vue';
|
||||||
import MkNoteSubNoteContent from './sub-note-content.vue';
|
import MkNoteSubNoteContent from './sub-note-content.vue';
|
||||||
import XCwButton from './cw-button.vue';
|
import XCwButton from './cw-button.vue';
|
||||||
|
@ -35,8 +35,8 @@ import { notePage } from '@/filters/note';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
note: misskey.entities.Note;
|
note: foundkey.entities.Note;
|
||||||
conversation?: misskey.entities.Note[] | null;
|
conversation?: foundkey.entities.Note[] | null;
|
||||||
|
|
||||||
// how many notes are in between this one and the note being viewed in detail
|
// how many notes are in between this one and the note being viewed in detail
|
||||||
depth?: number;
|
depth?: number;
|
||||||
|
@ -46,7 +46,7 @@ const props = withDefaults(defineProps<{
|
||||||
});
|
});
|
||||||
|
|
||||||
let showContent = $ref(false);
|
let showContent = $ref(false);
|
||||||
const replies: misskey.entities.Note[] = props.conversation?.filter(item => item.replyId === props.note.id || item.renoteId === props.note.id) ?? [];
|
const replies: foundkey.entities.Note[] = props.conversation?.filter(item => item.replyId === props.note.id || item.renoteId === props.note.id) ?? [];
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import * as Misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import XWindow from '@/components/ui/window.vue';
|
import XWindow from '@/components/ui/window.vue';
|
||||||
import MkTextarea from '@/components/form/textarea.vue';
|
import MkTextarea from '@/components/form/textarea.vue';
|
||||||
import MkButton from '@/components/ui/button.vue';
|
import MkButton from '@/components/ui/button.vue';
|
||||||
|
@ -32,7 +32,7 @@ import * as os from '@/os';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
user: Misskey.entities.User;
|
user: foundkey.entities.User;
|
||||||
urls?: string[];
|
urls?: string[];
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted } from 'vue';
|
import { onMounted } from 'vue';
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import Cropper from 'cropperjs';
|
import Cropper from 'cropperjs';
|
||||||
import tinycolor from 'tinycolor2';
|
import tinycolor from 'tinycolor2';
|
||||||
import XModalWindow from '@/components/ui/modal-window.vue';
|
import XModalWindow from '@/components/ui/modal-window.vue';
|
||||||
|
@ -39,13 +39,13 @@ import { query } from '@/scripts/url';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(ev: 'ok', cropped: misskey.entities.DriveFile): void;
|
(ev: 'ok', cropped: foundkey.entities.DriveFile): void;
|
||||||
(ev: 'cancel'): void;
|
(ev: 'cancel'): void;
|
||||||
(ev: 'closed'): void;
|
(ev: 'closed'): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
file: misskey.entities.DriveFile;
|
file: foundkey.entities.DriveFile;
|
||||||
aspectRatio: number;
|
aspectRatio: number;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ let cropper: Cropper | null = null;
|
||||||
let loading = $ref(true);
|
let loading = $ref(true);
|
||||||
|
|
||||||
const ok = async () => {
|
const ok = async () => {
|
||||||
const promise = new Promise<misskey.entities.DriveFile>(async (res) => {
|
const promise = new Promise<foundkey.entities.DriveFile>(async (res) => {
|
||||||
const croppedCanvas = await cropper?.getCropperSelection()?.$toCanvas();
|
const croppedCanvas = await cropper?.getCropperSelection()?.$toCanvas();
|
||||||
croppedCanvas.toBlob(blob => {
|
croppedCanvas.toBlob(blob => {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
|
|
|
@ -8,13 +8,13 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import { length } from 'stringz';
|
import { length } from 'stringz';
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import { concat } from '@/scripts/array';
|
import { concat } from '@/scripts/array';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
modelValue: boolean;
|
modelValue: boolean;
|
||||||
note: misskey.entities.Note;
|
note: foundkey.entities.Note;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
|
|
@ -16,11 +16,11 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import * as Misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import ImgWithBlurhash from '@/components/img-with-blurhash.vue';
|
import ImgWithBlurhash from '@/components/img-with-blurhash.vue';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
file: Misskey.entities.DriveFile;
|
file: foundkey.entities.DriveFile;
|
||||||
fit: string;
|
fit: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import * as Misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import XDrive from './drive.vue';
|
import XDrive from './drive.vue';
|
||||||
import XModalWindow from '@/components/ui/modal-window.vue';
|
import XModalWindow from '@/components/ui/modal-window.vue';
|
||||||
import number from '@/filters/number';
|
import number from '@/filters/number';
|
||||||
|
@ -34,13 +34,13 @@ withDefaults(defineProps<{
|
||||||
});
|
});
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(ev: 'done', r?: Misskey.entities.DriveFile[]): void;
|
(ev: 'done', r?: foundkey.entities.DriveFile[]): void;
|
||||||
(ev: 'closed'): void;
|
(ev: 'closed'): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const dialog = ref<InstanceType<typeof XModalWindow>>();
|
const dialog = ref<InstanceType<typeof XModalWindow>>();
|
||||||
|
|
||||||
const selected = ref<Misskey.entities.DriveFile[]>([]);
|
const selected = ref<foundkey.entities.DriveFile[]>([]);
|
||||||
|
|
||||||
function ok() {
|
function ok() {
|
||||||
emit('done', selected.value);
|
emit('done', selected.value);
|
||||||
|
@ -52,7 +52,7 @@ function cancel() {
|
||||||
dialog.value?.close();
|
dialog.value?.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
function onChangeSelection(files: Misskey.entities.DriveFile[]) {
|
function onChangeSelection(files: foundkey.entities.DriveFile[]) {
|
||||||
selected.value = files;
|
selected.value = files;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -14,13 +14,13 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import * as Misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import XDrive from './drive.vue';
|
import XDrive from './drive.vue';
|
||||||
import XWindow from '@/components/ui/window.vue';
|
import XWindow from '@/components/ui/window.vue';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
initialFolder?: Misskey.entities.DriveFolder;
|
initialFolder?: foundkey.entities.DriveFolder;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, defineAsyncComponent, ref } from 'vue';
|
import { computed, defineAsyncComponent, ref } from 'vue';
|
||||||
import * as Misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import MkDriveFileThumbnail from './drive-file-thumbnail.vue';
|
import MkDriveFileThumbnail from './drive-file-thumbnail.vue';
|
||||||
import copyToClipboard from '@/scripts/copy-to-clipboard';
|
import copyToClipboard from '@/scripts/copy-to-clipboard';
|
||||||
import bytes from '@/filters/bytes';
|
import bytes from '@/filters/bytes';
|
||||||
|
@ -43,7 +43,7 @@ import { $i } from '@/account';
|
||||||
import { MenuItem } from '@/types/menu';
|
import { MenuItem } from '@/types/menu';
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
file: Misskey.entities.DriveFile;
|
file: foundkey.entities.DriveFile;
|
||||||
isSelected?: boolean;
|
isSelected?: boolean;
|
||||||
selectMode?: boolean;
|
selectMode?: boolean;
|
||||||
}>(), {
|
}>(), {
|
||||||
|
@ -52,7 +52,7 @@ const props = withDefaults(defineProps<{
|
||||||
});
|
});
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(ev: 'chosen', r: Misskey.entities.DriveFile): void;
|
(ev: 'chosen', r: foundkey.entities.DriveFile): void;
|
||||||
(ev: 'dragstart'): void;
|
(ev: 'dragstart'): void;
|
||||||
(ev: 'dragend'): void;
|
(ev: 'dragend'): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
|
@ -29,13 +29,13 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, defineAsyncComponent, ref } from 'vue';
|
import { computed, defineAsyncComponent, ref } from 'vue';
|
||||||
import * as Misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
import { defaultStore } from '@/store';
|
import { defaultStore } from '@/store';
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
folder: Misskey.entities.DriveFolder;
|
folder: foundkey.entities.DriveFolder;
|
||||||
isSelected?: boolean;
|
isSelected?: boolean;
|
||||||
selectMode?: boolean;
|
selectMode?: boolean;
|
||||||
}>(), {
|
}>(), {
|
||||||
|
@ -44,11 +44,11 @@ const props = withDefaults(defineProps<{
|
||||||
});
|
});
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(ev: 'chosen', v: Misskey.entities.DriveFolder): void;
|
(ev: 'chosen', v: foundkey.entities.DriveFolder): void;
|
||||||
(ev: 'move', v: Misskey.entities.DriveFolder): void;
|
(ev: 'move', v: foundkey.entities.DriveFolder): void;
|
||||||
(ev: 'upload', file: File, folder: Misskey.entities.DriveFolder);
|
(ev: 'upload', file: File, folder: foundkey.entities.DriveFolder);
|
||||||
(ev: 'removeFile', v: Misskey.entities.DriveFile['id']): void;
|
(ev: 'removeFile', v: foundkey.entities.DriveFile['id']): void;
|
||||||
(ev: 'removeFolder', v: Misskey.entities.DriveFolder['id']): void;
|
(ev: 'removeFolder', v: foundkey.entities.DriveFolder['id']): void;
|
||||||
(ev: 'dragstart'): void;
|
(ev: 'dragstart'): void;
|
||||||
(ev: 'dragend'): void;
|
(ev: 'dragend'): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
|
@ -15,20 +15,20 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import * as Misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
folder?: Misskey.entities.DriveFolder;
|
folder?: foundkey.entities.DriveFolder;
|
||||||
parentFolder: Misskey.entities.DriveFolder | null;
|
parentFolder: foundkey.entities.DriveFolder | null;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(ev: 'move', v?: Misskey.entities.DriveFolder): void;
|
(ev: 'move', v?: foundkey.entities.DriveFolder): void;
|
||||||
(ev: 'upload', file: File, folder?: Misskey.entities.DriveFolder | null): void;
|
(ev: 'upload', file: File, folder?: foundkey.entities.DriveFolder | null): void;
|
||||||
(ev: 'removeFile', v: Misskey.entities.DriveFile['id']): void;
|
(ev: 'removeFile', v: foundkey.entities.DriveFile['id']): void;
|
||||||
(ev: 'removeFolder', v: Misskey.entities.DriveFolder['id']): void;
|
(ev: 'removeFolder', v: foundkey.entities.DriveFolder['id']): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const hover = ref(false);
|
const hover = ref(false);
|
||||||
|
|
|
@ -89,7 +89,7 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { nextTick, onActivated, onBeforeUnmount, onMounted, ref, watch } from 'vue';
|
import { nextTick, onActivated, onBeforeUnmount, onMounted, ref, watch } from 'vue';
|
||||||
import * as Misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import XNavFolder from './drive.nav-folder.vue';
|
import XNavFolder from './drive.nav-folder.vue';
|
||||||
import XFolder from './drive.folder.vue';
|
import XFolder from './drive.folder.vue';
|
||||||
import XFile from './drive.file.vue';
|
import XFile from './drive.file.vue';
|
||||||
|
@ -101,7 +101,7 @@ import { i18n } from '@/i18n';
|
||||||
import { uploadFile, uploads } from '@/scripts/upload';
|
import { uploadFile, uploads } from '@/scripts/upload';
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
initialFolder?: Misskey.entities.DriveFolder;
|
initialFolder?: foundkey.entities.DriveFolder;
|
||||||
type?: string;
|
type?: string;
|
||||||
multiple?: boolean;
|
multiple?: boolean;
|
||||||
select?: 'file' | 'folder' | null;
|
select?: 'file' | 'folder' | null;
|
||||||
|
@ -111,24 +111,24 @@ const props = withDefaults(defineProps<{
|
||||||
});
|
});
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(ev: 'selected', v: Misskey.entities.DriveFile | Misskey.entities.DriveFolder): void;
|
(ev: 'selected', v: foundkey.entities.DriveFile | foundkey.entities.DriveFolder): void;
|
||||||
(ev: 'change-selection', v: Misskey.entities.DriveFile[] | Misskey.entities.DriveFolder[]): void;
|
(ev: 'change-selection', v: foundkey.entities.DriveFile[] | foundkey.entities.DriveFolder[]): void;
|
||||||
(ev: 'move-root'): void;
|
(ev: 'move-root'): void;
|
||||||
(ev: 'cd', v: Misskey.entities.DriveFolder | null): void;
|
(ev: 'cd', v: foundkey.entities.DriveFolder | null): void;
|
||||||
(ev: 'open-folder', v: Misskey.entities.DriveFolder): void;
|
(ev: 'open-folder', v: foundkey.entities.DriveFolder): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const loadMoreFiles = ref<InstanceType<typeof MkButton>>();
|
const loadMoreFiles = ref<InstanceType<typeof MkButton>>();
|
||||||
const fileInput = ref<HTMLInputElement>();
|
const fileInput = ref<HTMLInputElement>();
|
||||||
|
|
||||||
const folder = ref<Misskey.entities.DriveFolder | null>(null);
|
const folder = ref<foundkey.entities.DriveFolder | null>(null);
|
||||||
const files = ref<Misskey.entities.DriveFile[]>([]);
|
const files = ref<foundkey.entities.DriveFile[]>([]);
|
||||||
const folders = ref<Misskey.entities.DriveFolder[]>([]);
|
const folders = ref<foundkey.entities.DriveFolder[]>([]);
|
||||||
const moreFiles = ref(false);
|
const moreFiles = ref(false);
|
||||||
const moreFolders = ref(false);
|
const moreFolders = ref(false);
|
||||||
const hierarchyFolders = ref<Misskey.entities.DriveFolder[]>([]);
|
const hierarchyFolders = ref<foundkey.entities.DriveFolder[]>([]);
|
||||||
const selectedFiles = ref<Misskey.entities.DriveFile[]>([]);
|
const selectedFiles = ref<foundkey.entities.DriveFile[]>([]);
|
||||||
const selectedFolders = ref<Misskey.entities.DriveFolder[]>([]);
|
const selectedFolders = ref<foundkey.entities.DriveFolder[]>([]);
|
||||||
const uploadings = uploads;
|
const uploadings = uploads;
|
||||||
const connection = stream.useChannel('drive');
|
const connection = stream.useChannel('drive');
|
||||||
const keepOriginal = ref<boolean>(defaultStore.state.keepOriginalUploading); // 外部渡しが多いので$refは使わないほうがよい
|
const keepOriginal = ref<boolean>(defaultStore.state.keepOriginalUploading); // 外部渡しが多いので$refは使わないほうがよい
|
||||||
|
@ -148,11 +148,11 @@ const ilFilesObserver = new IntersectionObserver(
|
||||||
|
|
||||||
watch(folder, () => emit('cd', folder.value));
|
watch(folder, () => emit('cd', folder.value));
|
||||||
|
|
||||||
function onStreamDriveFileCreated(file: Misskey.entities.DriveFile) {
|
function onStreamDriveFileCreated(file: foundkey.entities.DriveFile) {
|
||||||
addFile(file, true);
|
addFile(file, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onStreamDriveFileUpdated(file: Misskey.entities.DriveFile) {
|
function onStreamDriveFileUpdated(file: foundkey.entities.DriveFile) {
|
||||||
const current = folder.value ? folder.value.id : null;
|
const current = folder.value ? folder.value.id : null;
|
||||||
if (current !== file.folderId) {
|
if (current !== file.folderId) {
|
||||||
removeFile(file);
|
removeFile(file);
|
||||||
|
@ -165,11 +165,11 @@ function onStreamDriveFileDeleted(fileId: string) {
|
||||||
removeFile(fileId);
|
removeFile(fileId);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onStreamDriveFolderCreated(createdFolder: Misskey.entities.DriveFolder) {
|
function onStreamDriveFolderCreated(createdFolder: foundkey.entities.DriveFolder) {
|
||||||
addFolder(createdFolder, true);
|
addFolder(createdFolder, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onStreamDriveFolderUpdated(updatedFolder: Misskey.entities.DriveFolder) {
|
function onStreamDriveFolderUpdated(updatedFolder: foundkey.entities.DriveFolder) {
|
||||||
const current = folder.value ? folder.value.id : null;
|
const current = folder.value ? folder.value.id : null;
|
||||||
if (current !== updatedFolder.parentId) {
|
if (current !== updatedFolder.parentId) {
|
||||||
removeFolder(updatedFolder);
|
removeFolder(updatedFolder);
|
||||||
|
@ -309,7 +309,7 @@ function createFolder() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function renameFolder(folderToRename: Misskey.entities.DriveFolder) {
|
function renameFolder(folderToRename: foundkey.entities.DriveFolder) {
|
||||||
os.inputText({
|
os.inputText({
|
||||||
title: i18n.ts.renameFolder,
|
title: i18n.ts.renameFolder,
|
||||||
placeholder: i18n.ts.inputNewFolderName,
|
placeholder: i18n.ts.inputNewFolderName,
|
||||||
|
@ -326,7 +326,7 @@ function renameFolder(folderToRename: Misskey.entities.DriveFolder) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteFolder(folderToDelete: Misskey.entities.DriveFolder) {
|
function deleteFolder(folderToDelete: foundkey.entities.DriveFolder) {
|
||||||
os.api('drive/folders/delete', {
|
os.api('drive/folders/delete', {
|
||||||
folderId: folderToDelete.id,
|
folderId: folderToDelete.id,
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
@ -357,13 +357,13 @@ function onChangeFileInput() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function upload(file: File, folderToUpload?: Misskey.entities.DriveFolder | null) {
|
function upload(file: File, folderToUpload?: foundkey.entities.DriveFolder | null) {
|
||||||
uploadFile(file, (folderToUpload && typeof folderToUpload === 'object') ? folderToUpload.id : null, undefined, keepOriginal.value).then(res => {
|
uploadFile(file, (folderToUpload && typeof folderToUpload === 'object') ? folderToUpload.id : null, undefined, keepOriginal.value).then(res => {
|
||||||
addFile(res, true);
|
addFile(res, true);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function chooseFile(file: Misskey.entities.DriveFile) {
|
function chooseFile(file: foundkey.entities.DriveFile) {
|
||||||
const isAlreadySelected = selectedFiles.value.some(f => f.id === file.id);
|
const isAlreadySelected = selectedFiles.value.some(f => f.id === file.id);
|
||||||
if (props.multiple) {
|
if (props.multiple) {
|
||||||
if (isAlreadySelected) {
|
if (isAlreadySelected) {
|
||||||
|
@ -382,7 +382,7 @@ function chooseFile(file: Misskey.entities.DriveFile) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function chooseFolder(folderToChoose: Misskey.entities.DriveFolder) {
|
function chooseFolder(folderToChoose: foundkey.entities.DriveFolder) {
|
||||||
const isAlreadySelected = selectedFolders.value.some(f => f.id === folderToChoose.id);
|
const isAlreadySelected = selectedFolders.value.some(f => f.id === folderToChoose.id);
|
||||||
if (props.multiple) {
|
if (props.multiple) {
|
||||||
if (isAlreadySelected) {
|
if (isAlreadySelected) {
|
||||||
|
@ -401,7 +401,7 @@ function chooseFolder(folderToChoose: Misskey.entities.DriveFolder) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function move(target?: string | Misskey.entities.DriveFolder) {
|
function move(target?: string | foundkey.entities.DriveFolder) {
|
||||||
if (!target) {
|
if (!target) {
|
||||||
goRoot();
|
goRoot();
|
||||||
return;
|
return;
|
||||||
|
@ -429,7 +429,7 @@ function move(target?: string | Misskey.entities.DriveFolder) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function addFolder(folderToAdd: Misskey.entities.DriveFolder, unshift = false) {
|
function addFolder(folderToAdd: foundkey.entities.DriveFolder, unshift = false) {
|
||||||
const current = folder.value ? folder.value.id : null;
|
const current = folder.value ? folder.value.id : null;
|
||||||
if (current !== folderToAdd.parentId) return;
|
if (current !== folderToAdd.parentId) return;
|
||||||
|
|
||||||
|
@ -446,7 +446,7 @@ function addFolder(folderToAdd: Misskey.entities.DriveFolder, unshift = false) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function addFile(fileToAdd: Misskey.entities.DriveFile, unshift = false) {
|
function addFile(fileToAdd: foundkey.entities.DriveFile, unshift = false) {
|
||||||
const current = folder.value ? folder.value.id : null;
|
const current = folder.value ? folder.value.id : null;
|
||||||
if (current !== fileToAdd.folderId) return;
|
if (current !== fileToAdd.folderId) return;
|
||||||
|
|
||||||
|
@ -463,29 +463,29 @@ function addFile(fileToAdd: Misskey.entities.DriveFile, unshift = false) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeFolder(folderToRemove: Misskey.entities.DriveFolder | string) {
|
function removeFolder(folderToRemove: foundkey.entities.DriveFolder | string) {
|
||||||
const folderIdToRemove = typeof folderToRemove === 'object' ? folderToRemove.id : folderToRemove;
|
const folderIdToRemove = typeof folderToRemove === 'object' ? folderToRemove.id : folderToRemove;
|
||||||
folders.value = folders.value.filter(f => f.id !== folderIdToRemove);
|
folders.value = folders.value.filter(f => f.id !== folderIdToRemove);
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeFile(file: Misskey.entities.DriveFile | string) {
|
function removeFile(file: foundkey.entities.DriveFile | string) {
|
||||||
const fileId = typeof file === 'object' ? file.id : file;
|
const fileId = typeof file === 'object' ? file.id : file;
|
||||||
files.value = files.value.filter(f => f.id !== fileId);
|
files.value = files.value.filter(f => f.id !== fileId);
|
||||||
}
|
}
|
||||||
|
|
||||||
function appendFile(file: Misskey.entities.DriveFile) {
|
function appendFile(file: foundkey.entities.DriveFile) {
|
||||||
addFile(file);
|
addFile(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
function appendFolder(folderToAppend: Misskey.entities.DriveFolder) {
|
function appendFolder(folderToAppend: foundkey.entities.DriveFolder) {
|
||||||
addFolder(folderToAppend);
|
addFolder(folderToAppend);
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
function prependFile(file: Misskey.entities.DriveFile) {
|
function prependFile(file: foundkey.entities.DriveFile) {
|
||||||
addFile(file, true);
|
addFile(file, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
function prependFolder(folderToPrepend: Misskey.entities.DriveFolder) {
|
function prependFolder(folderToPrepend: foundkey.entities.DriveFolder) {
|
||||||
addFolder(folderToPrepend, true);
|
addFolder(folderToPrepend, true);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
@ -589,7 +589,7 @@ function getMenu() {
|
||||||
} : undefined, folder.value ? {
|
} : undefined, folder.value ? {
|
||||||
text: i18n.ts.deleteFolder,
|
text: i18n.ts.deleteFolder,
|
||||||
icon: 'fas fa-trash-alt',
|
icon: 'fas fa-trash-alt',
|
||||||
action: () => { deleteFolder(folder.value as Misskey.entities.DriveFolder); },
|
action: () => { deleteFolder(folder.value as foundkey.entities.DriveFolder); },
|
||||||
} : undefined, {
|
} : undefined, {
|
||||||
text: i18n.ts.createFolder,
|
text: i18n.ts.createFolder,
|
||||||
icon: 'fas fa-folder-plus',
|
icon: 'fas fa-folder-plus',
|
||||||
|
|
|
@ -79,7 +79,7 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, computed, watch, onMounted } from 'vue';
|
import { ref, computed, watch, onMounted } from 'vue';
|
||||||
import * as Misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import XSection from './emoji-picker.section.vue';
|
import XSection from './emoji-picker.section.vue';
|
||||||
import { emojilist, UnicodeEmojiDef, unicodeEmojiCategories as categories } from '@/scripts/emojilist';
|
import { emojilist, UnicodeEmojiDef, unicodeEmojiCategories as categories } from '@/scripts/emojilist';
|
||||||
import { getStaticImageUrl } from '@/scripts/get-static-image-url';
|
import { getStaticImageUrl } from '@/scripts/get-static-image-url';
|
||||||
|
@ -124,7 +124,7 @@ const height = computed(() => props.asReactionPicker ? reactionPickerHeight.valu
|
||||||
const customEmojiCategories = emojiCategories;
|
const customEmojiCategories = emojiCategories;
|
||||||
const customEmojis = instance.emojis;
|
const customEmojis = instance.emojis;
|
||||||
const q = ref<string | null>(null);
|
const q = ref<string | null>(null);
|
||||||
const searchResultCustom = ref<Misskey.entities.CustomEmoji[]>([]);
|
const searchResultCustom = ref<foundkey.entities.CustomEmoji[]>([]);
|
||||||
const searchResultUnicode = ref<UnicodeEmojiDef[]>([]);
|
const searchResultUnicode = ref<UnicodeEmojiDef[]>([]);
|
||||||
const tab = ref<'index' | 'custom' | 'unicode' | 'tags'>('index');
|
const tab = ref<'index' | 'custom' | 'unicode' | 'tags'>('index');
|
||||||
|
|
||||||
|
@ -178,7 +178,7 @@ function reset() {
|
||||||
q.value = '';
|
q.value = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
function getKey(emoji: string | Misskey.entities.CustomEmoji | UnicodeEmojiDef): string {
|
function getKey(emoji: string | foundkey.entities.CustomEmoji | UnicodeEmojiDef): string {
|
||||||
return typeof emoji === 'string' ? emoji : (emoji.char || `:${emoji.name}:`);
|
return typeof emoji === 'string' ? emoji : (emoji.char || `:${emoji.name}:`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,10 +4,10 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import * as Misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
|
|
||||||
const meta = ref<Misskey.entities.DetailedInstanceMetadata>();
|
const meta = ref<foundkey.entities.DetailedInstanceMetadata>();
|
||||||
|
|
||||||
os.api('meta', { detail: true }).then(gotMeta => {
|
os.api('meta', { detail: true }).then(gotMeta => {
|
||||||
meta.value = gotMeta;
|
meta.value = gotMeta;
|
||||||
|
|
|
@ -31,13 +31,13 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onBeforeUnmount, onMounted } from 'vue';
|
import { onBeforeUnmount, onMounted } from 'vue';
|
||||||
import * as Misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { stream } from '@/stream';
|
import { stream } from '@/stream';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
user: Misskey.entities.UserDetailed,
|
user: foundkey.entities.UserDetailed,
|
||||||
full?: boolean,
|
full?: boolean,
|
||||||
large?: boolean,
|
large?: boolean,
|
||||||
}>(), {
|
}>(), {
|
||||||
|
@ -57,7 +57,7 @@ if (props.user.isFollowing == null) {
|
||||||
.then(onFollowChange);
|
.then(onFollowChange);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onFollowChange(user: Misskey.entities.UserDetailed) {
|
function onFollowChange(user: foundkey.entities.UserDetailed) {
|
||||||
if (user.id === props.user.id) {
|
if (user.id === props.user.id) {
|
||||||
isFollowing = user.isFollowing;
|
isFollowing = user.isFollowing;
|
||||||
hasPendingFollowRequestFromYou = user.hasPendingFollowRequestFromYou;
|
hasPendingFollowRequestFromYou = user.hasPendingFollowRequestFromYou;
|
||||||
|
|
|
@ -6,13 +6,13 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import { toUnicode } from 'punycode/';
|
import { toUnicode } from 'punycode/';
|
||||||
import { host as hostRaw } from '@/config';
|
import { host as hostRaw } from '@/config';
|
||||||
import { defaultStore } from '@/store';
|
import { defaultStore } from '@/store';
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
user: misskey.entities.UserDetailed;
|
user: foundkey.entities.UserDetailed;
|
||||||
detail?: boolean;
|
detail?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { watch } from 'vue';
|
import { watch } from 'vue';
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import { getStaticImageUrl } from '@/scripts/get-static-image-url';
|
import { getStaticImageUrl } from '@/scripts/get-static-image-url';
|
||||||
import { extractAvgColorFromBlurhash } from '@/scripts/extract-avg-color-from-blurhash';
|
import { extractAvgColorFromBlurhash } from '@/scripts/extract-avg-color-from-blurhash';
|
||||||
import { acct, userPage } from '@/filters/user';
|
import { acct, userPage } from '@/filters/user';
|
||||||
|
@ -19,7 +19,7 @@ import MkUserOnlineIndicator from '@/components/user-online-indicator.vue';
|
||||||
import { defaultStore } from '@/store';
|
import { defaultStore } from '@/store';
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
user: misskey.entities.User;
|
user: foundkey.entities.User;
|
||||||
target?: string | null;
|
target?: string | null;
|
||||||
disableLink?: boolean;
|
disableLink?: boolean;
|
||||||
disablePreview?: boolean;
|
disablePreview?: boolean;
|
||||||
|
|
|
@ -3,10 +3,10 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
|
|
||||||
withDefaults(defineProps<{
|
withDefaults(defineProps<{
|
||||||
user: misskey.entities.User;
|
user: foundkey.entities.User;
|
||||||
nowrap?: boolean;
|
nowrap?: boolean;
|
||||||
}>(), {
|
}>(), {
|
||||||
nowrap: true,
|
nowrap: true,
|
||||||
|
|
|
@ -10,12 +10,12 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import MkMiniChart from '@/components/mini-chart.vue';
|
import MkMiniChart from '@/components/mini-chart.vue';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
instance: misskey.entities.Instance;
|
instance: foundkey.entities.Instance;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let chartValues = $ref<number[] | null>(null);
|
let chartValues = $ref<number[] | null>(null);
|
||||||
|
|
|
@ -30,12 +30,12 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted } from 'vue';
|
import { onMounted } from 'vue';
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import { ColdDeviceStorage } from '@/store';
|
import { ColdDeviceStorage } from '@/store';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
media: misskey.entities.DriveFile;
|
media: foundkey.entities.DriveFile;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const audioEl = $ref<HTMLAudioElement | null>();
|
const audioEl = $ref<HTMLAudioElement | null>();
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onBeforeUnmount, onMounted, computed } from 'vue';
|
import { onBeforeUnmount, onMounted, computed } from 'vue';
|
||||||
import { length } from 'stringz';
|
import { length } from 'stringz';
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import MkModal from '@/components/ui/modal.vue';
|
import MkModal from '@/components/ui/modal.vue';
|
||||||
import MkButton from '@/components/ui/button.vue';
|
import MkButton from '@/components/ui/button.vue';
|
||||||
import bytes from '@/filters/bytes';
|
import bytes from '@/filters/bytes';
|
||||||
|
@ -50,7 +50,7 @@ type Input = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
file: misskey.entities.DriveFile;
|
file: foundkey.entities.DriveFile;
|
||||||
title?: string;
|
title?: string;
|
||||||
input: Input;
|
input: Input;
|
||||||
showOkButton: boolean;
|
showOkButton: boolean;
|
||||||
|
|
|
@ -22,13 +22,13 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { watch } from 'vue';
|
import { watch } from 'vue';
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import { getStaticImageUrl } from '@/scripts/get-static-image-url';
|
import { getStaticImageUrl } from '@/scripts/get-static-image-url';
|
||||||
import ImgWithBlurhash from '@/components/img-with-blurhash.vue';
|
import ImgWithBlurhash from '@/components/img-with-blurhash.vue';
|
||||||
import { defaultStore } from '@/store';
|
import { defaultStore } from '@/store';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
image: misskey.entities.DriveFile;
|
image: foundkey.entities.DriveFile;
|
||||||
raw?: boolean;
|
raw?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, ref } from 'vue';
|
import { onMounted, ref } from 'vue';
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import PhotoSwipeLightbox from 'photoswipe/lightbox';
|
import PhotoSwipeLightbox from 'photoswipe/lightbox';
|
||||||
import PhotoSwipe from 'photoswipe';
|
import PhotoSwipe from 'photoswipe';
|
||||||
import 'photoswipe/style.css';
|
import 'photoswipe/style.css';
|
||||||
|
@ -25,7 +25,7 @@ import * as os from '@/os';
|
||||||
import { FILE_TYPE_BROWSERSAFE } from '@/const';
|
import { FILE_TYPE_BROWSERSAFE } from '@/const';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
mediaList: misskey.entities.DriveFile[];
|
mediaList: foundkey.entities.DriveFile[];
|
||||||
raw?: boolean;
|
raw?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ onMounted(() => {
|
||||||
lightbox.init();
|
lightbox.init();
|
||||||
});
|
});
|
||||||
|
|
||||||
const previewable = (file: misskey.entities.DriveFile): boolean => {
|
const previewable = (file: foundkey.entities.DriveFile): boolean => {
|
||||||
if (file.type === 'image/svg+xml') return true; // svgのwebpublic/thumbnailはpngなのでtrue
|
if (file.type === 'image/svg+xml') return true; // svgのwebpublic/thumbnailはpngなのでtrue
|
||||||
// FILE_TYPE_BROWSERSAFEに適合しないものはブラウザで表示するのに不適切
|
// FILE_TYPE_BROWSERSAFEに適合しないものはブラウザで表示するのに不適切
|
||||||
return (file.type.startsWith('video') || file.type.startsWith('image')) && FILE_TYPE_BROWSERSAFE.includes(file.type);
|
return (file.type.startsWith('video') || file.type.startsWith('image')) && FILE_TYPE_BROWSERSAFE.includes(file.type);
|
||||||
|
|
|
@ -25,12 +25,12 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import { defaultStore } from '@/store';
|
import { defaultStore } from '@/store';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
video: misskey.entities.DriveFile;
|
video: foundkey.entities.DriveFile;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const hide = ref((defaultStore.state.nsfw === 'force') ? true : props.video.isSensitive && (defaultStore.state.nsfw !== 'ignore'));
|
const hide = ref((defaultStore.state.nsfw === 'force') ? true : props.video.isSensitive && (defaultStore.state.nsfw !== 'ignore'));
|
||||||
|
|
|
@ -115,7 +115,7 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { inject, onMounted, ref } from 'vue';
|
import { inject, onMounted, ref } from 'vue';
|
||||||
import * as mfm from 'mfm-js';
|
import * as mfm from 'mfm-js';
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import MkNoteSub from './MkNoteSub.vue';
|
import MkNoteSub from './MkNoteSub.vue';
|
||||||
import XNoteSimple from './note-simple.vue';
|
import XNoteSimple from './note-simple.vue';
|
||||||
import XReactionsViewer from './reactions-viewer.vue';
|
import XReactionsViewer from './reactions-viewer.vue';
|
||||||
|
@ -140,7 +140,7 @@ import { getNoteMenu } from '@/scripts/get-note-menu';
|
||||||
import { useNoteCapture } from '@/scripts/use-note-capture';
|
import { useNoteCapture } from '@/scripts/use-note-capture';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
note: misskey.entities.Note;
|
note: foundkey.entities.Note;
|
||||||
pinned?: boolean;
|
pinned?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
@ -171,7 +171,7 @@ const menuButton = ref<HTMLElement>();
|
||||||
const renoteButton = ref<InstanceType<typeof XRenoteButton>>();
|
const renoteButton = ref<InstanceType<typeof XRenoteButton>>();
|
||||||
const renoteTime = ref<HTMLElement>();
|
const renoteTime = ref<HTMLElement>();
|
||||||
const reactButton = ref<HTMLElement>();
|
const reactButton = ref<HTMLElement>();
|
||||||
let appearNote = $computed(() => isRenote ? note.renote as misskey.entities.Note : note);
|
let appearNote = $computed(() => isRenote ? note.renote as foundkey.entities.Note : note);
|
||||||
const isMyRenote = $i && ($i.id === note.userId);
|
const isMyRenote = $i && ($i.id === note.userId);
|
||||||
const showContent = ref(false);
|
const showContent = ref(false);
|
||||||
const isDeleted = ref(false);
|
const isDeleted = ref(false);
|
||||||
|
@ -180,9 +180,9 @@ const translation = ref(null);
|
||||||
const translating = ref(false);
|
const translating = ref(false);
|
||||||
const urls = appearNote.text ? extractUrlFromMfm(mfm.parse(appearNote.text)) : null;
|
const urls = appearNote.text ? extractUrlFromMfm(mfm.parse(appearNote.text)) : null;
|
||||||
const showTicker = (defaultStore.state.instanceTicker === 'always') || (defaultStore.state.instanceTicker === 'remote' && appearNote.user.instance);
|
const showTicker = (defaultStore.state.instanceTicker === 'always') || (defaultStore.state.instanceTicker === 'remote' && appearNote.user.instance);
|
||||||
const conversation = ref<misskey.entities.Note[]>([]);
|
const conversation = ref<foundkey.entities.Note[]>([]);
|
||||||
const replies = ref<misskey.entities.Note[]>([]);
|
const replies = ref<foundkey.entities.Note[]>([]);
|
||||||
const directReplies = ref<misskey.entities.Note[]>([]);
|
const directReplies = ref<foundkey.entities.Note[]>([]);
|
||||||
|
|
||||||
const keymap = {
|
const keymap = {
|
||||||
'r': () => reply(true),
|
'r': () => reply(true),
|
||||||
|
|
|
@ -15,13 +15,13 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import MkVisibility from '@/components/visibility.vue';
|
import MkVisibility from '@/components/visibility.vue';
|
||||||
import { notePage } from '@/filters/note';
|
import { notePage } from '@/filters/note';
|
||||||
import { userPage } from '@/filters/user';
|
import { userPage } from '@/filters/user';
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
note: misskey.entities.Note;
|
note: foundkey.entities.Note;
|
||||||
pinned?: boolean;
|
pinned?: boolean;
|
||||||
}>();
|
}>();
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -17,13 +17,13 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import XNoteHeader from './note-header.vue';
|
import XNoteHeader from './note-header.vue';
|
||||||
import MkNoteSubNoteContent from './sub-note-content.vue';
|
import MkNoteSubNoteContent from './sub-note-content.vue';
|
||||||
import XCwButton from './cw-button.vue';
|
import XCwButton from './cw-button.vue';
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
note: misskey.entities.Note;
|
note: foundkey.entities.Note;
|
||||||
pinned?: boolean;
|
pinned?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { inject, onMounted, ref, Ref } from 'vue';
|
import { inject, onMounted, ref, Ref } from 'vue';
|
||||||
import * as mfm from 'mfm-js';
|
import * as mfm from 'mfm-js';
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import MkNoteSub from './MkNoteSub.vue';
|
import MkNoteSub from './MkNoteSub.vue';
|
||||||
import XNoteHeader from './note-header.vue';
|
import XNoteHeader from './note-header.vue';
|
||||||
import XNoteSimple from './note-simple.vue';
|
import XNoteSimple from './note-simple.vue';
|
||||||
|
@ -129,7 +129,7 @@ import { getNoteMenu } from '@/scripts/get-note-menu';
|
||||||
import { useNoteCapture } from '@/scripts/use-note-capture';
|
import { useNoteCapture } from '@/scripts/use-note-capture';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
note: misskey.entities.Note;
|
note: foundkey.entities.Note;
|
||||||
pinned?: boolean;
|
pinned?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ const menuButton = ref<HTMLElement>();
|
||||||
const renoteButton = ref<InstanceType<typeof XRenoteButton>>();
|
const renoteButton = ref<InstanceType<typeof XRenoteButton>>();
|
||||||
const renoteTime = ref<HTMLElement>();
|
const renoteTime = ref<HTMLElement>();
|
||||||
const reactButton = ref<HTMLElement>();
|
const reactButton = ref<HTMLElement>();
|
||||||
let appearNote = $computed(() => isRenote ? note.renote as misskey.entities.Note : note);
|
let appearNote = $computed(() => isRenote ? note.renote as foundkey.entities.Note : note);
|
||||||
const isMyRenote = $i && ($i.id === note.userId);
|
const isMyRenote = $i && ($i.id === note.userId);
|
||||||
const showContent = ref(false);
|
const showContent = ref(false);
|
||||||
const isLong = (appearNote.cw == null && appearNote.text != null && (
|
const isLong = (appearNote.cw == null && appearNote.text != null && (
|
||||||
|
@ -222,7 +222,7 @@ function undoReact(): void {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const currentClipPage = inject<Ref<misskey.entities.Clip> | null>('currentClipPage', null);
|
const currentClipPage = inject<Ref<foundkey.entities.Clip> | null>('currentClipPage', null);
|
||||||
|
|
||||||
function onContextmenu(ev: MouseEvent): void {
|
function onContextmenu(ev: MouseEvent): void {
|
||||||
const isLink = (el: HTMLElement) => {
|
const isLink = (el: HTMLElement) => {
|
||||||
|
|
|
@ -76,7 +76,7 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, onMounted, onUnmounted, watch } from 'vue';
|
import { ref, onMounted, onUnmounted, watch } from 'vue';
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import MkFollowButton from './follow-button.vue';
|
import MkFollowButton from './follow-button.vue';
|
||||||
import XReactionTooltip from './reaction-tooltip.vue';
|
import XReactionTooltip from './reaction-tooltip.vue';
|
||||||
import { getNoteSummary } from '@/scripts/get-note-summary';
|
import { getNoteSummary } from '@/scripts/get-note-summary';
|
||||||
|
@ -88,7 +88,7 @@ import { stream } from '@/stream';
|
||||||
import { useTooltip } from '@/scripts/use-tooltip';
|
import { useTooltip } from '@/scripts/use-tooltip';
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
notification: misskey.entities.Notification;
|
notification: foundkey.entities.Notification;
|
||||||
withTime?: boolean;
|
withTime?: boolean;
|
||||||
full?: boolean;
|
full?: boolean;
|
||||||
}>(), {
|
}>(), {
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, ref } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import { sum } from '@/scripts/array';
|
import { sum } from '@/scripts/array';
|
||||||
import { pleaseLogin } from '@/scripts/please-login';
|
import { pleaseLogin } from '@/scripts/please-login';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
|
@ -31,7 +31,7 @@ import { i18n } from '@/i18n';
|
||||||
import { useInterval } from '@/scripts/use-interval';
|
import { useInterval } from '@/scripts/use-interval';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
note: misskey.entities.Note;
|
note: foundkey.entities.Note;
|
||||||
readOnly?: boolean;
|
readOnly?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { inject, watch, nextTick, onMounted, defineAsyncComponent } from 'vue';
|
import { inject, watch, nextTick, onMounted, defineAsyncComponent } from 'vue';
|
||||||
import * as mfm from 'mfm-js';
|
import * as mfm from 'mfm-js';
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import insertTextAtCursor from 'insert-text-at-cursor';
|
import insertTextAtCursor from 'insert-text-at-cursor';
|
||||||
import { length } from 'stringz';
|
import { length } from 'stringz';
|
||||||
import { toASCII } from 'punycode/';
|
import { toASCII } from 'punycode/';
|
||||||
|
@ -91,17 +91,17 @@ import { uploadFile } from '@/scripts/upload';
|
||||||
const modal = inject('modal');
|
const modal = inject('modal');
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
reply?: misskey.entities.Note;
|
reply?: foundkey.entities.Note;
|
||||||
renote?: misskey.entities.Note;
|
renote?: foundkey.entities.Note;
|
||||||
channel?: any; // TODO
|
channel?: any; // TODO
|
||||||
mention?: misskey.entities.User;
|
mention?: foundkey.entities.User;
|
||||||
specified?: misskey.entities.User;
|
specified?: foundkey.entities.User;
|
||||||
initialText?: string;
|
initialText?: string;
|
||||||
initialVisibility?: typeof misskey.noteVisibilities;
|
initialVisibility?: typeof foundkey.noteVisibilities;
|
||||||
initialFiles?: misskey.entities.DriveFile[];
|
initialFiles?: foundkey.entities.DriveFile[];
|
||||||
initialLocalOnly?: boolean;
|
initialLocalOnly?: boolean;
|
||||||
initialVisibleUsers?: misskey.entities.User[];
|
initialVisibleUsers?: foundkey.entities.User[];
|
||||||
initialNote?: misskey.entities.Note;
|
initialNote?: foundkey.entities.Note;
|
||||||
instant?: boolean;
|
instant?: boolean;
|
||||||
fixed?: boolean;
|
fixed?: boolean;
|
||||||
autofocus?: boolean;
|
autofocus?: boolean;
|
||||||
|
@ -134,7 +134,7 @@ let useCw = $ref(false);
|
||||||
let showPreview = $ref(false);
|
let showPreview = $ref(false);
|
||||||
let cw = $ref<string | null>(null);
|
let cw = $ref<string | null>(null);
|
||||||
let localOnly = $ref<boolean>(props.initialLocalOnly ?? defaultStore.state.rememberNoteVisibility ? defaultStore.state.localOnly : defaultStore.state.defaultNoteLocalOnly);
|
let localOnly = $ref<boolean>(props.initialLocalOnly ?? defaultStore.state.rememberNoteVisibility ? defaultStore.state.localOnly : defaultStore.state.defaultNoteLocalOnly);
|
||||||
let visibility = $ref(props.initialVisibility ?? (defaultStore.state.rememberNoteVisibility ? defaultStore.state.visibility : defaultStore.state.defaultNoteVisibility) as typeof misskey.noteVisibilities[number]);
|
let visibility = $ref(props.initialVisibility ?? (defaultStore.state.rememberNoteVisibility ? defaultStore.state.visibility : defaultStore.state.defaultNoteVisibility) as typeof foundkey.noteVisibilities[number]);
|
||||||
let visibleUsers = $ref([]);
|
let visibleUsers = $ref([]);
|
||||||
if (props.initialVisibleUsers) {
|
if (props.initialVisibleUsers) {
|
||||||
props.initialVisibleUsers.forEach(pushVisibleUser);
|
props.initialVisibleUsers.forEach(pushVisibleUser);
|
||||||
|
@ -602,7 +602,7 @@ function showActions(ev) {
|
||||||
})), ev.currentTarget ?? ev.target);
|
})), ev.currentTarget ?? ev.target);
|
||||||
}
|
}
|
||||||
|
|
||||||
let postAccount = $ref<misskey.entities.UserDetailed | null>(null);
|
let postAccount = $ref<foundkey.entities.UserDetailed | null>(null);
|
||||||
|
|
||||||
function openAccountMenu(ev: MouseEvent) {
|
function openAccountMenu(ev: MouseEvent) {
|
||||||
openAccountMenu_({
|
openAccountMenu_({
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, onMounted, ref, watch } from 'vue';
|
import { computed, onMounted, ref, watch } from 'vue';
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import XDetails from '@/components/reactions-viewer.details.vue';
|
import XDetails from '@/components/reactions-viewer.details.vue';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { useTooltip } from '@/scripts/use-tooltip';
|
import { useTooltip } from '@/scripts/use-tooltip';
|
||||||
|
@ -24,7 +24,7 @@ const props = defineProps<{
|
||||||
reaction: string;
|
reaction: string;
|
||||||
count: number;
|
count: number;
|
||||||
isInitial: boolean;
|
isInitial: boolean;
|
||||||
note: misskey.entities.Note;
|
note: foundkey.entities.Note;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const buttonRef = ref<HTMLElement>();
|
const buttonRef = ref<HTMLElement>();
|
||||||
|
|
|
@ -6,12 +6,12 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import XReaction from './reactions-viewer.reaction.vue';
|
import XReaction from './reactions-viewer.reaction.vue';
|
||||||
import { $i } from '@/account';
|
import { $i } from '@/account';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
note: misskey.entities.Note;
|
note: foundkey.entities.Note;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const initialReactions = new Set(Object.keys(props.note.reactions));
|
const initialReactions = new Set(Object.keys(props.note.reactions));
|
||||||
|
|
|
@ -24,13 +24,13 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import XPoll from './poll.vue';
|
import XPoll from './poll.vue';
|
||||||
import XMediaList from './media-list.vue';
|
import XMediaList from './media-list.vue';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
note: misskey.entities.Note;
|
note: foundkey.entities.Note;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const isLong = (
|
const isLong = (
|
||||||
|
|
|
@ -33,16 +33,16 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, ComputedRef, isRef, onActivated, onDeactivated, ref, watch } from 'vue';
|
import { computed, ComputedRef, isRef, onActivated, onDeactivated, ref, watch } from 'vue';
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { onScrollTop, isTopVisible, getScrollPosition, getScrollContainer } from '@/scripts/scroll';
|
import { onScrollTop, isTopVisible, getScrollPosition, getScrollContainer } from '@/scripts/scroll';
|
||||||
import MkButton from '@/components/ui/button.vue';
|
import MkButton from '@/components/ui/button.vue';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
export type Paging<E extends keyof misskey.Endpoints = keyof misskey.Endpoints> = {
|
export type Paging<E extends keyof foundkey.Endpoints = keyof foundkey.Endpoints> = {
|
||||||
endpoint: E;
|
endpoint: E;
|
||||||
limit: number;
|
limit: number;
|
||||||
params?: misskey.Endpoints[E]['req'] | ComputedRef<misskey.Endpoints[E]['req']>;
|
params?: foundkey.Endpoints[E]['req'] | ComputedRef<foundkey.Endpoints[E]['req']>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 検索APIのような、ページング不可なエンドポイントを利用する場合
|
* 検索APIのような、ページング不可なエンドポイントを利用する場合
|
||||||
|
|
|
@ -10,13 +10,13 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import MkMiniChart from '@/components/mini-chart.vue';
|
import MkMiniChart from '@/components/mini-chart.vue';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { acct } from '@/filters/user';
|
import { acct } from '@/filters/user';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
user: misskey.entities.User;
|
user: foundkey.entities.User;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let chartValues = $ref<number[] | null>(null);
|
let chartValues = $ref<number[] | null>(null);
|
||||||
|
|
|
@ -28,13 +28,13 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import MkFollowButton from './follow-button.vue';
|
import MkFollowButton from './follow-button.vue';
|
||||||
import { userPage } from '@/filters/user';
|
import { userPage } from '@/filters/user';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
user: misskey.entities.UserDetailed;
|
user: foundkey.entities.UserDetailed;
|
||||||
}>();
|
}>();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -3,11 +3,11 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
user: misskey.entities.User;
|
user: foundkey.entities.User;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const text = $computed(() => {
|
const text = $computed(() => {
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted } from 'vue';
|
import { onMounted } from 'vue';
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import MkInput from '@/components/form/input.vue';
|
import MkInput from '@/components/form/input.vue';
|
||||||
import FormSplit from '@/components/form/split.vue';
|
import FormSplit from '@/components/form/split.vue';
|
||||||
import XModalWindow from '@/components/ui/modal-window.vue';
|
import XModalWindow from '@/components/ui/modal-window.vue';
|
||||||
|
@ -62,16 +62,16 @@ import { defaultStore } from '@/store';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(ev: 'ok', selected: misskey.entities.UserDetailed): void;
|
(ev: 'ok', selected: foundkey.entities.UserDetailed): void;
|
||||||
(ev: 'cancel'): void;
|
(ev: 'cancel'): void;
|
||||||
(ev: 'closed'): void;
|
(ev: 'closed'): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let username = $ref('');
|
let username = $ref('');
|
||||||
let host = $ref('');
|
let host = $ref('');
|
||||||
let users: misskey.entities.UserDetailed[] = $ref([]);
|
let users: foundkey.entities.UserDetailed[] = $ref([]);
|
||||||
let recentUsers: misskey.entities.UserDetailed[] = $ref([]);
|
let recentUsers: foundkey.entities.UserDetailed[] = $ref([]);
|
||||||
let selected: misskey.entities.UserDetailed | null = $ref(null);
|
let selected: foundkey.entities.UserDetailed | null = $ref(null);
|
||||||
let dialogEl = $ref();
|
let dialogEl = $ref();
|
||||||
|
|
||||||
const search = () => {
|
const search = () => {
|
||||||
|
|
|
@ -44,21 +44,21 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { nextTick, watch } from 'vue';
|
import { nextTick, watch } from 'vue';
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import MkModal from '@/components/ui/modal.vue';
|
import MkModal from '@/components/ui/modal.vue';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const modal = $ref<InstanceType<typeof MkModal>>();
|
const modal = $ref<InstanceType<typeof MkModal>>();
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
currentVisibility: typeof misskey.noteVisibilities[number];
|
currentVisibility: typeof foundkey.noteVisibilities[number];
|
||||||
currentLocalOnly: boolean;
|
currentLocalOnly: boolean;
|
||||||
src?: HTMLElement;
|
src?: HTMLElement;
|
||||||
}>(), {
|
}>(), {
|
||||||
});
|
});
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(ev: 'changeVisibility', v: typeof misskey.noteVisibilities[number]): void;
|
(ev: 'changeVisibility', v: typeof foundkey.noteVisibilities[number]): void;
|
||||||
(ev: 'changeLocalOnly', v: boolean): void;
|
(ev: 'changeLocalOnly', v: boolean): void;
|
||||||
(ev: 'closed'): void;
|
(ev: 'closed'): void;
|
||||||
}>();
|
}>();
|
||||||
|
@ -70,7 +70,7 @@ watch($$(localOnly), () => {
|
||||||
emit('changeLocalOnly', localOnly);
|
emit('changeLocalOnly', localOnly);
|
||||||
});
|
});
|
||||||
|
|
||||||
function choose(visibility: typeof misskey.noteVisibilities[number]): void {
|
function choose(visibility: typeof foundkey.noteVisibilities[number]): void {
|
||||||
v = visibility;
|
v = visibility;
|
||||||
emit('changeVisibility', visibility);
|
emit('changeVisibility', visibility);
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import * as Acct from 'foundkey-js/built/acct';
|
import * as Acct from 'foundkey-js/built/acct';
|
||||||
import { url } from '@/config';
|
import { url } from '@/config';
|
||||||
|
|
||||||
export const acct = (user: misskey.Acct) => {
|
export const acct = (user: foundkey.Acct) => {
|
||||||
return Acct.toString(user);
|
return Acct.toString(user);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const userName = (user: misskey.entities.User) => {
|
export const userName = (user: foundkey.entities.User) => {
|
||||||
return user.name || user.username;
|
return user.name || user.username;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const userPage = (user: misskey.Acct, path?, absolute = false) => {
|
export const userPage = (user: foundkey.Acct, path?, absolute = false) => {
|
||||||
return `${absolute ? url : ''}/@${acct(user)}${(path ? `/${path}` : '')}`;
|
return `${absolute ? url : ''}/@${acct(user)}${(path ? `/${path}` : '')}`;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { computed, reactive } from 'vue';
|
import { computed, reactive } from 'vue';
|
||||||
import * as Misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import { api } from './os';
|
import { api } from './os';
|
||||||
|
|
||||||
// TODO: 他のタブと永続化されたstateを同期
|
// TODO: 他のタブと永続化されたstateを同期
|
||||||
|
@ -8,7 +8,7 @@ const instanceData = localStorage.getItem('instance');
|
||||||
|
|
||||||
// TODO: instanceをリアクティブにするかは再考の余地あり
|
// TODO: instanceをリアクティブにするかは再考の余地あり
|
||||||
|
|
||||||
export const instance: Misskey.entities.InstanceMetadata = reactive(instanceData ? JSON.parse(instanceData) : {
|
export const instance: foundkey.entities.InstanceMetadata = reactive(instanceData ? JSON.parse(instanceData) : {
|
||||||
// TODO: set default values
|
// TODO: set default values
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
import { Component, markRaw, Ref, ref, defineAsyncComponent } from 'vue';
|
import { Component, markRaw, Ref, ref, defineAsyncComponent } from 'vue';
|
||||||
import { EventEmitter } from 'eventemitter3';
|
import { EventEmitter } from 'eventemitter3';
|
||||||
import insertTextAtCursor from 'insert-text-at-cursor';
|
import insertTextAtCursor from 'insert-text-at-cursor';
|
||||||
import * as Misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import { apiUrl, url } from '@/config';
|
import { apiUrl, url } from '@/config';
|
||||||
import MkPostFormDialog from '@/components/post-form-dialog.vue';
|
import MkPostFormDialog from '@/components/post-form-dialog.vue';
|
||||||
import MkWaitingDialog from '@/components/waiting-dialog.vue';
|
import MkWaitingDialog from '@/components/waiting-dialog.vue';
|
||||||
|
@ -12,7 +12,7 @@ import { $i } from '@/account';
|
||||||
|
|
||||||
export const pendingApiRequestsCount = ref(0);
|
export const pendingApiRequestsCount = ref(0);
|
||||||
|
|
||||||
const apiClient = new Misskey.api.APIClient({
|
const apiClient = new foundkey.api.APIClient({
|
||||||
origin: url,
|
origin: url,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -434,9 +434,9 @@ export async function pickEmoji(src: HTMLElement | null, opts) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function cropImage(image: Misskey.entities.DriveFile, options: {
|
export async function cropImage(image: foundkey.entities.DriveFile, options: {
|
||||||
aspectRatio: number;
|
aspectRatio: number;
|
||||||
}): Promise<Misskey.entities.DriveFile> {
|
}): Promise<foundkey.entities.DriveFile> {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
popup(defineAsyncComponent(() => import('@/components/cropper-dialog.vue')), {
|
popup(defineAsyncComponent(() => import('@/components/cropper-dialog.vue')), {
|
||||||
file: image,
|
file: image,
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import MkButton from '@/components/ui/button.vue';
|
import MkButton from '@/components/ui/button.vue';
|
||||||
import { version } from '@/config';
|
import { version } from '@/config';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
|
@ -34,7 +34,7 @@ withDefaults(defineProps<{
|
||||||
|
|
||||||
let loaded = $ref(false);
|
let loaded = $ref(false);
|
||||||
let serverIsDead = $ref(false);
|
let serverIsDead = $ref(false);
|
||||||
let meta = $ref<misskey.entities.LiteInstanceMetadata | null>(null);
|
let meta = $ref<foundkey.entities.LiteInstanceMetadata | null>(null);
|
||||||
|
|
||||||
os.api('meta', {
|
os.api('meta', {
|
||||||
detail: false,
|
detail: false,
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, watch, provide } from 'vue';
|
import { computed, watch, provide } from 'vue';
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import XNotes from '@/components/notes.vue';
|
import XNotes from '@/components/notes.vue';
|
||||||
import { $i } from '@/account';
|
import { $i } from '@/account';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
|
@ -31,7 +31,7 @@ const props = defineProps<{
|
||||||
clipId: string,
|
clipId: string,
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let clip: misskey.entities.Clip = $ref<misskey.entities.Clip>();
|
let clip = $ref<foundkey.entities.Clip>();
|
||||||
const pagination = {
|
const pagination = {
|
||||||
endpoint: 'clips/notes' as const,
|
endpoint: 'clips/notes' as const,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
|
|
|
@ -111,7 +111,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import MkChart from '@/components/chart.vue';
|
import MkChart from '@/components/chart.vue';
|
||||||
import MkObjectView from '@/components/object-view.vue';
|
import MkObjectView from '@/components/object-view.vue';
|
||||||
import FormLink from '@/components/form/link.vue';
|
import FormLink from '@/components/form/link.vue';
|
||||||
|
@ -136,8 +136,8 @@ const props = defineProps<{
|
||||||
|
|
||||||
let tab = $ref('overview');
|
let tab = $ref('overview');
|
||||||
let chartSrc = $ref('instance-requests');
|
let chartSrc = $ref('instance-requests');
|
||||||
let meta = $ref<misskey.entities.DetailedInstanceMetadata | null>(null);
|
let meta = $ref<foundkey.entities.DetailedInstanceMetadata | null>(null);
|
||||||
let instance = $ref<misskey.entities.Instance | null>(null);
|
let instance = $ref<foundkey.entities.Instance | null>(null);
|
||||||
let suspended = $ref(false);
|
let suspended = $ref(false);
|
||||||
let isBlocked = $ref(false);
|
let isBlocked = $ref(false);
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, watch } from 'vue';
|
import { onMounted, watch } from 'vue';
|
||||||
import * as Misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import autosize from 'autosize';
|
import autosize from 'autosize';
|
||||||
//import insertTextAtCursor from 'insert-text-at-cursor';
|
//import insertTextAtCursor from 'insert-text-at-cursor';
|
||||||
import { throttle } from 'throttle-debounce';
|
import { throttle } from 'throttle-debounce';
|
||||||
|
@ -42,15 +42,15 @@ import { i18n } from '@/i18n';
|
||||||
import { uploadFile } from '@/scripts/upload';
|
import { uploadFile } from '@/scripts/upload';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
user?: Misskey.entities.UserDetailed | null;
|
user?: foundkey.entities.UserDetailed | null;
|
||||||
group?: Misskey.entities.UserGroup | null;
|
group?: foundkey.entities.UserGroup | null;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let textEl = $ref<HTMLTextAreaElement>();
|
let textEl = $ref<HTMLTextAreaElement>();
|
||||||
let fileEl = $ref<HTMLInputElement>();
|
let fileEl = $ref<HTMLInputElement>();
|
||||||
|
|
||||||
let text = $ref<string>('');
|
let text = $ref<string>('');
|
||||||
let file = $ref<Misskey.entities.DriveFile | null>(null);
|
let file = $ref<foundkey.entities.DriveFile | null>(null);
|
||||||
let sending = $ref(false);
|
let sending = $ref(false);
|
||||||
const typing = throttle(3000, () => {
|
const typing = throttle(3000, () => {
|
||||||
stream.send('typingOnMessaging', props.user ? { partner: props.user.id } : { group: props.group?.id });
|
stream.send('typingOnMessaging', props.user ? { partner: props.user.id } : { group: props.group?.id });
|
||||||
|
|
|
@ -37,14 +37,14 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import * as mfm from 'mfm-js';
|
import * as mfm from 'mfm-js';
|
||||||
import * as Misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import { extractUrlFromMfm } from '@/scripts/extract-url-from-mfm';
|
import { extractUrlFromMfm } from '@/scripts/extract-url-from-mfm';
|
||||||
import MkUrlPreview from '@/components/url-preview.vue';
|
import MkUrlPreview from '@/components/url-preview.vue';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { $i } from '@/account';
|
import { $i } from '@/account';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
message: Misskey.entities.MessagingMessage;
|
message: foundkey.entities.MessagingMessage;
|
||||||
isGroup?: boolean;
|
isGroup?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, watch, onMounted, nextTick, onBeforeUnmount } from 'vue';
|
import { computed, watch, onMounted, nextTick, onBeforeUnmount } from 'vue';
|
||||||
import * as Misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import * as Acct from 'foundkey-js/built/acct';
|
import * as Acct from 'foundkey-js/built/acct';
|
||||||
import XMessage from './messaging-room.message.vue';
|
import XMessage from './messaging-room.message.vue';
|
||||||
import XForm from './messaging-room.form.vue';
|
import XForm from './messaging-room.form.vue';
|
||||||
|
@ -76,10 +76,10 @@ let formEl = $ref<InstanceType<typeof XForm>>();
|
||||||
let pagingComponent = $ref<InstanceType<typeof MkPagination>>();
|
let pagingComponent = $ref<InstanceType<typeof MkPagination>>();
|
||||||
|
|
||||||
let fetching = $ref(true);
|
let fetching = $ref(true);
|
||||||
let user: Misskey.entities.UserDetailed | null = $ref(null);
|
let user: foundkey.entities.UserDetailed | null = $ref(null);
|
||||||
let group: Misskey.entities.UserGroup | null = $ref(null);
|
let group: foundkey.entities.UserGroup | null = $ref(null);
|
||||||
let typers: Misskey.entities.User[] = $ref([]);
|
let typers: foundkey.entities.User[] = $ref([]);
|
||||||
let connection: Misskey.ChannelConnection<Misskey.Channels['messaging']> | null = $ref(null);
|
let connection: foundkey.ChannelConnection<foundkey.Channels['messaging']> | null = $ref(null);
|
||||||
let showIndicator = $ref(false);
|
let showIndicator = $ref(false);
|
||||||
const {
|
const {
|
||||||
animation,
|
animation,
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, defineComponent, watch } from 'vue';
|
import { computed, defineComponent, watch } from 'vue';
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import XNote from '@/components/note.vue';
|
import XNote from '@/components/note.vue';
|
||||||
import XNoteDetailed from '@/components/note-detailed.vue';
|
import XNoteDetailed from '@/components/note-detailed.vue';
|
||||||
import XNotes from '@/components/notes.vue';
|
import XNotes from '@/components/notes.vue';
|
||||||
|
@ -56,7 +56,7 @@ const props = defineProps<{
|
||||||
noteId: string;
|
noteId: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let note = $ref<null | misskey.entities.Note>();
|
let note = $ref<null | foundkey.entities.Note>();
|
||||||
let clips = $ref();
|
let clips = $ref();
|
||||||
let hasPrev = $ref(false);
|
let hasPrev = $ref(false);
|
||||||
let hasNext = $ref(false);
|
let hasNext = $ref(false);
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
import { noteVisibilities } from 'foundkey-js';
|
import { noteVisibilities } from 'foundkey-js';
|
||||||
import * as Acct from 'foundkey-js/built/acct';
|
import * as Acct from 'foundkey-js/built/acct';
|
||||||
import * as Misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import MkButton from '@/components/ui/button.vue';
|
import MkButton from '@/components/ui/button.vue';
|
||||||
import XPostForm from '@/components/post-form.vue';
|
import XPostForm from '@/components/post-form.vue';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
|
@ -44,12 +44,12 @@ let title = $ref(urlParams.get('title'));
|
||||||
const text = urlParams.get('text');
|
const text = urlParams.get('text');
|
||||||
const url = urlParams.get('url');
|
const url = urlParams.get('url');
|
||||||
let initialText = $ref(null as string | null);
|
let initialText = $ref(null as string | null);
|
||||||
let reply = $ref(null as Misskey.entities.Note | null);
|
let reply = $ref(null as foundkey.entities.Note | null);
|
||||||
let renote = $ref(null as Misskey.entities.Note | null);
|
let renote = $ref(null as foundkey.entities.Note | null);
|
||||||
let visibility = $ref(noteVisibilities.includes(visibilityQuery) ? visibilityQuery : null);
|
let visibility = $ref(noteVisibilities.includes(visibilityQuery) ? visibilityQuery : null);
|
||||||
let localOnly = $ref(localOnlyQuery === '0' ? false : localOnlyQuery === '1' ? true : null);
|
let localOnly = $ref(localOnlyQuery === '0' ? false : localOnlyQuery === '1' ? true : null);
|
||||||
let files = $ref([] as Misskey.entities.DriveFile[]);
|
let files = $ref([] as foundkey.entities.DriveFile[]);
|
||||||
let visibleUsers = $ref([] as Misskey.entities.User[]);
|
let visibleUsers = $ref([] as foundkey.entities.User[]);
|
||||||
|
|
||||||
async function init() {
|
async function init() {
|
||||||
let noteText = '';
|
let noteText = '';
|
||||||
|
|
|
@ -102,7 +102,7 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, defineAsyncComponent, defineComponent, watch } from 'vue';
|
import { computed, defineAsyncComponent, defineComponent, watch } from 'vue';
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import MkChart from '@/components/chart.vue';
|
import MkChart from '@/components/chart.vue';
|
||||||
import MkObjectView from '@/components/object-view.vue';
|
import MkObjectView from '@/components/object-view.vue';
|
||||||
import FormTextarea from '@/components/form/textarea.vue';
|
import FormTextarea from '@/components/form/textarea.vue';
|
||||||
|
@ -129,7 +129,7 @@ const props = defineProps<{
|
||||||
|
|
||||||
let tab = $ref('overview');
|
let tab = $ref('overview');
|
||||||
let chartSrc = $ref('per-user-notes');
|
let chartSrc = $ref('per-user-notes');
|
||||||
let user = $ref<null | misskey.entities.UserDetailed>();
|
let user = $ref<null | foundkey.entities.UserDetailed>();
|
||||||
let init = $ref();
|
let init = $ref();
|
||||||
let info = $ref();
|
let info = $ref();
|
||||||
let ap = $ref(null);
|
let ap = $ref(null);
|
||||||
|
|
|
@ -10,12 +10,12 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import MkUserInfo from '@/components/user-info.vue';
|
import MkUserInfo from '@/components/user-info.vue';
|
||||||
import MkPagination from '@/components/ui/pagination.vue';
|
import MkPagination from '@/components/ui/pagination.vue';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
user: misskey.entities.User;
|
user: foundkey.entities.User;
|
||||||
type: 'following' | 'followers';
|
type: 'following' | 'followers';
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { defineAsyncComponent, computed, inject, onMounted, onUnmounted, watch } from 'vue';
|
import { defineAsyncComponent, computed, inject, onMounted, onUnmounted, watch } from 'vue';
|
||||||
import * as Acct from 'foundkey-js/built/acct';
|
import * as Acct from 'foundkey-js/built/acct';
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import XFollowList from './follow-list.vue';
|
import XFollowList from './follow-list.vue';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { definePageMetadata } from '@/scripts/page-metadata';
|
import { definePageMetadata } from '@/scripts/page-metadata';
|
||||||
|
@ -27,7 +27,7 @@ const props = withDefaults(defineProps<{
|
||||||
}>(), {
|
}>(), {
|
||||||
});
|
});
|
||||||
|
|
||||||
let user = $ref<null | misskey.entities.UserDetailed>(null);
|
let user = $ref<null | foundkey.entities.UserDetailed>(null);
|
||||||
let error = $ref(null);
|
let error = $ref(null);
|
||||||
|
|
||||||
function fetchUser(): void {
|
function fetchUser(): void {
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { defineAsyncComponent, computed, inject, onMounted, onUnmounted, watch } from 'vue';
|
import { defineAsyncComponent, computed, inject, onMounted, onUnmounted, watch } from 'vue';
|
||||||
import * as Acct from 'foundkey-js/built/acct';
|
import * as Acct from 'foundkey-js/built/acct';
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import XFollowList from './follow-list.vue';
|
import XFollowList from './follow-list.vue';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { definePageMetadata } from '@/scripts/page-metadata';
|
import { definePageMetadata } from '@/scripts/page-metadata';
|
||||||
|
@ -27,7 +27,7 @@ const props = withDefaults(defineProps<{
|
||||||
}>(), {
|
}>(), {
|
||||||
});
|
});
|
||||||
|
|
||||||
let user = $ref<null | misskey.entities.UserDetailed>(null);
|
let user = $ref<null | foundkey.entities.UserDetailed>(null);
|
||||||
let error = $ref(null);
|
let error = $ref(null);
|
||||||
|
|
||||||
function fetchUser(): void {
|
function fetchUser(): void {
|
||||||
|
|
|
@ -10,12 +10,12 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import MkGalleryPostPreview from '@/components/gallery-post-preview.vue';
|
import MkGalleryPostPreview from '@/components/gallery-post-preview.vue';
|
||||||
import MkPagination from '@/components/ui/pagination.vue';
|
import MkPagination from '@/components/ui/pagination.vue';
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
user: misskey.entities.User;
|
user: foundkey.entities.User;
|
||||||
}>(), {
|
}>(), {
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -109,7 +109,7 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { defineAsyncComponent, onMounted, onUnmounted } from 'vue';
|
import { defineAsyncComponent, onMounted, onUnmounted } from 'vue';
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import XUserTimeline from './index.timeline.vue';
|
import XUserTimeline from './index.timeline.vue';
|
||||||
import XNote from '@/components/note.vue';
|
import XNote from '@/components/note.vue';
|
||||||
import MkBirthdayDate from '@/components/birthday-date.vue';
|
import MkBirthdayDate from '@/components/birthday-date.vue';
|
||||||
|
@ -129,7 +129,7 @@ const XPhotos = defineAsyncComponent(() => import('./index.photos.vue'));
|
||||||
const XActivity = defineAsyncComponent(() => import('./index.activity.vue'));
|
const XActivity = defineAsyncComponent(() => import('./index.activity.vue'));
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
user: misskey.entities.UserDetailed;
|
user: foundkey.entities.UserDetailed;
|
||||||
}>(), {
|
}>(), {
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -14,14 +14,14 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import MkContainer from '@/components/ui/container.vue';
|
import MkContainer from '@/components/ui/container.vue';
|
||||||
import MkChart from '@/components/chart.vue';
|
import MkChart from '@/components/chart.vue';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
user: misskey.entities.User;
|
user: foundkey.entities.User;
|
||||||
limit?: number;
|
limit?: number;
|
||||||
}>(), {
|
}>(), {
|
||||||
limit: 50,
|
limit: 50,
|
||||||
|
|
|
@ -11,14 +11,14 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, computed } from 'vue';
|
import { ref, computed } from 'vue';
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import XNotes from '@/components/notes.vue';
|
import XNotes from '@/components/notes.vue';
|
||||||
import MkTab from '@/components/tab.vue';
|
import MkTab from '@/components/tab.vue';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
user: misskey.entities.UserDetailed;
|
user: foundkey.entities.UserDetailed;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const include = ref<string | null>(null);
|
const include = ref<string | null>(null);
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { defineAsyncComponent, computed, watch } from 'vue';
|
import { defineAsyncComponent, computed, watch } from 'vue';
|
||||||
import * as Acct from 'foundkey-js/built/acct';
|
import * as Acct from 'foundkey-js/built/acct';
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import { getUserMenu } from '@/scripts/get-user-menu';
|
import { getUserMenu } from '@/scripts/get-user-menu';
|
||||||
import { acct as getAcct } from '@/filters/user';
|
import { acct as getAcct } from '@/filters/user';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
|
@ -45,7 +45,7 @@ const props = withDefaults(defineProps<{
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
let tab = $ref(props.page);
|
let tab = $ref(props.page);
|
||||||
let user = $ref<null | misskey.entities.UserDetailed>(null);
|
let user = $ref<null | foundkey.entities.UserDetailed>(null);
|
||||||
let error = $ref(null);
|
let error = $ref(null);
|
||||||
|
|
||||||
function fetchUser(): void {
|
function fetchUser(): void {
|
||||||
|
|
|
@ -8,12 +8,12 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import MkPagePreview from '@/components/page-preview.vue';
|
import MkPagePreview from '@/components/page-preview.vue';
|
||||||
import MkPagination from '@/components/ui/pagination.vue';
|
import MkPagination from '@/components/ui/pagination.vue';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
user: misskey.entities.User;
|
user: foundkey.entities.User;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const pagination = {
|
const pagination = {
|
||||||
|
|
|
@ -15,12 +15,12 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import MkPagination from '@/components/ui/pagination.vue';
|
import MkPagination from '@/components/ui/pagination.vue';
|
||||||
import MkNote from '@/components/note.vue';
|
import MkNote from '@/components/note.vue';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
user: misskey.entities.User;
|
user: foundkey.entities.User;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const pagination = {
|
const pagination = {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { defineAsyncComponent, Ref } from 'vue';
|
import { defineAsyncComponent, Ref } from 'vue';
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import { $i } from '@/account';
|
import { $i } from '@/account';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
import { instance } from '@/instance';
|
import { instance } from '@/instance';
|
||||||
|
@ -9,12 +9,12 @@ import { url } from '@/config';
|
||||||
import { noteActions } from '@/store';
|
import { noteActions } from '@/store';
|
||||||
|
|
||||||
export function getNoteMenu(props: {
|
export function getNoteMenu(props: {
|
||||||
note: misskey.entities.Note;
|
note: foundkey.entities.Note;
|
||||||
menuButton: Ref<HTMLElement>;
|
menuButton: Ref<HTMLElement>;
|
||||||
translation: Ref<any>;
|
translation: Ref<any>;
|
||||||
translating: Ref<boolean>;
|
translating: Ref<boolean>;
|
||||||
isDeleted: Ref<boolean>;
|
isDeleted: Ref<boolean>;
|
||||||
currentClipPage?: Ref<misskey.entities.Clip>;
|
currentClipPage?: Ref<foundkey.entities.Clip>;
|
||||||
}) {
|
}) {
|
||||||
const isRenote = (
|
const isRenote = (
|
||||||
props.note.renote != null &&
|
props.note.renote != null &&
|
||||||
|
@ -23,7 +23,7 @@ export function getNoteMenu(props: {
|
||||||
props.note.poll == null
|
props.note.poll == null
|
||||||
);
|
);
|
||||||
|
|
||||||
const appearNote = isRenote ? props.note.renote as misskey.entities.Note : props.note;
|
const appearNote = isRenote ? props.note.renote as foundkey.entities.Note : props.note;
|
||||||
|
|
||||||
function del(): void {
|
function del(): void {
|
||||||
os.confirm({
|
os.confirm({
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 投稿を表す文字列を取得します。
|
* 投稿を表す文字列を取得します。
|
||||||
* @param {*} note (packされた)投稿
|
* @param {*} note (packされた)投稿
|
||||||
*/
|
*/
|
||||||
export const getNoteSummary = (note: misskey.entities.Note): string => {
|
export const getNoteSummary = (note: foundkey.entities.Note): string => {
|
||||||
if (note.deletedAt) {
|
if (note.deletedAt) {
|
||||||
return `(${i18n.ts.deletedNote})`;
|
return `(${i18n.ts.deletedNote})`;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import { ComputedRef, inject, isRef, onActivated, onMounted, provide, ref, Ref } from 'vue';
|
import { ComputedRef, inject, isRef, onActivated, onMounted, provide, ref, Ref } from 'vue';
|
||||||
|
|
||||||
export const setPageMetadata = Symbol('setPageMetadata');
|
export const setPageMetadata = Symbol('setPageMetadata');
|
||||||
|
@ -8,8 +8,8 @@ export type PageMetadata = {
|
||||||
title: string;
|
title: string;
|
||||||
subtitle?: string;
|
subtitle?: string;
|
||||||
icon?: string | null;
|
icon?: string | null;
|
||||||
avatar?: misskey.entities.User | null;
|
avatar?: foundkey.entities.User | null;
|
||||||
userName?: misskey.entities.User | null;
|
userName?: foundkey.entities.User | null;
|
||||||
bg?: string;
|
bg?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import * as Misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import { readAndCompressImage } from 'browser-image-resizer';
|
import { readAndCompressImage } from 'browser-image-resizer';
|
||||||
import { defaultStore } from '@/store';
|
import { defaultStore } from '@/store';
|
||||||
import { apiUrl } from '@/config';
|
import { apiUrl } from '@/config';
|
||||||
|
@ -32,7 +32,7 @@ export function uploadFile(
|
||||||
folder?: string | Record<string, any>,
|
folder?: string | Record<string, any>,
|
||||||
name?: string,
|
name?: string,
|
||||||
keepOriginal: boolean = defaultStore.state.keepOriginalUploading,
|
keepOriginal: boolean = defaultStore.state.keepOriginalUploading,
|
||||||
): Promise<Misskey.entities.DriveFile> {
|
): Promise<foundkey.entities.DriveFile> {
|
||||||
const folderId = typeof folder === 'string' ? folder : folder?.id;
|
const folderId = typeof folder === 'string' ? folder : folder?.id;
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import { onUnmounted, Ref } from 'vue';
|
import { onUnmounted, Ref } from 'vue';
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import { stream } from '@/stream';
|
import { stream } from '@/stream';
|
||||||
import { $i } from '@/account';
|
import { $i } from '@/account';
|
||||||
|
|
||||||
export function useNoteCapture(props: {
|
export function useNoteCapture(props: {
|
||||||
rootEl: Ref<HTMLElement>;
|
rootEl: Ref<HTMLElement>;
|
||||||
note: Ref<misskey.entities.Note>;
|
note: Ref<foundkey.entities.Note>;
|
||||||
isDeletedRef: Ref<boolean>;
|
isDeletedRef: Ref<boolean>;
|
||||||
}) {
|
}) {
|
||||||
const note = props.note;
|
const note = props.note;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import * as Misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import { markRaw } from 'vue';
|
import { markRaw } from 'vue';
|
||||||
import { $i } from '@/account';
|
import { $i } from '@/account';
|
||||||
import { url } from '@/config';
|
import { url } from '@/config';
|
||||||
|
|
||||||
export const stream = markRaw(new Misskey.Stream(url, $i ? {
|
export const stream = markRaw(new foundkey.Stream(url, $i ? {
|
||||||
token: $i.token,
|
token: $i.token,
|
||||||
} : null));
|
} : null));
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import * as Misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import { Ref } from 'vue';
|
import { Ref } from 'vue';
|
||||||
|
|
||||||
export type MenuAction = (ev: MouseEvent) => void;
|
export type MenuAction = (ev: MouseEvent) => void;
|
||||||
|
@ -6,11 +6,11 @@ export type MenuAction = (ev: MouseEvent) => void;
|
||||||
export type MenuDivider = null;
|
export type MenuDivider = null;
|
||||||
export type MenuNull = undefined;
|
export type MenuNull = undefined;
|
||||||
export type MenuLabel = { type: 'label', text: string };
|
export type MenuLabel = { type: 'label', text: string };
|
||||||
export type MenuLink = { type: 'link', to: string, text: string, icon?: string, indicate?: boolean, avatar?: Misskey.entities.User };
|
export type MenuLink = { type: 'link', to: string, text: string, icon?: string, indicate?: boolean, avatar?: foundkey.entities.User };
|
||||||
export type MenuA = { type: 'a', href: string, target?: string, download?: string, text: string, icon?: string, indicate?: boolean };
|
export type MenuA = { type: 'a', href: string, target?: string, download?: string, text: string, icon?: string, indicate?: boolean };
|
||||||
export type MenuUser = { type: 'user', user: Misskey.entities.User, active?: boolean, indicate?: boolean, action: MenuAction };
|
export type MenuUser = { type: 'user', user: foundkey.entities.User, active?: boolean, indicate?: boolean, action: MenuAction };
|
||||||
export type MenuSwitch = { type: 'switch', ref: Ref<boolean>, text: string, disabled?: boolean };
|
export type MenuSwitch = { type: 'switch', ref: Ref<boolean>, text: string, disabled?: boolean };
|
||||||
export type MenuButton = { type?: 'button', text: string, icon?: string, indicate?: boolean, danger?: boolean, active?: boolean, avatar?: Misskey.entities.User; action: MenuAction };
|
export type MenuButton = { type?: 'button', text: string, icon?: string, indicate?: boolean, danger?: boolean, active?: boolean, avatar?: foundkey.entities.User; action: MenuAction };
|
||||||
|
|
||||||
export type MenuPending = { type: 'pending' };
|
export type MenuPending = { type: 'pending' };
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import * as misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import * as Acct from 'foundkey-js/built/acct';
|
import * as Acct from 'foundkey-js/built/acct';
|
||||||
|
|
||||||
export const acct = (user: misskey.Acct) => {
|
export const acct = (user: foundkey.Acct) => {
|
||||||
return Acct.toString(user);
|
return Acct.toString(user);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const userName = (user: misskey.entities.User) => {
|
export const userName = (user: foundkey.entities.User) => {
|
||||||
return user.name || user.username;
|
return user.name || user.username;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const userPage = (user: misskey.Acct, path?, absolute = false) => {
|
export const userPage = (user: foundkey.Acct, path?, absolute = false) => {
|
||||||
return `${absolute ? origin : ''}/@${acct(user)}${(path ? `/${path}` : '')}`;
|
return `${absolute ? origin : ''}/@${acct(user)}${(path ? `/${path}` : '')}`;
|
||||||
};
|
};
|
||||||
|
|
|
@ -4,15 +4,15 @@
|
||||||
*/
|
*/
|
||||||
declare var self: ServiceWorkerGlobalScope;
|
declare var self: ServiceWorkerGlobalScope;
|
||||||
|
|
||||||
import * as Misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
import { SwMessage, swMessageOrderType } from '@/types';
|
import { SwMessage, swMessageOrderType } from '@/types';
|
||||||
import { acct as getAcct } from '@/filters/user';
|
import { acct as getAcct } from '@/filters/user';
|
||||||
import { getAccountFromId } from '@/scripts/get-account-from-id';
|
import { getAccountFromId } from '@/scripts/get-account-from-id';
|
||||||
import { getUrlWithLoginId } from '@/scripts/login-id';
|
import { getUrlWithLoginId } from '@/scripts/login-id';
|
||||||
|
|
||||||
export const cli = new Misskey.api.APIClient({ origin, fetch: (...args) => fetch(...args) });
|
export const cli = new foundkey.api.APIClient({ origin, fetch: (...args) => fetch(...args) });
|
||||||
|
|
||||||
export async function api<E extends keyof Misskey.Endpoints>(endpoint: E, userId: string, options?: Misskey.Endpoints[E]['req']) {
|
export async function api<E extends keyof foundkey.Endpoints>(endpoint: E, userId: string, options?: foundkey.Endpoints[E]['req']) {
|
||||||
const account = await getAccountFromId(userId);
|
const account = await getAccountFromId(userId);
|
||||||
if (!account) return;
|
if (!account) return;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import * as Misskey from 'foundkey-js';
|
import * as foundkey from 'foundkey-js';
|
||||||
|
|
||||||
export type swMessageOrderType = 'post' | 'push';
|
export type swMessageOrderType = 'post' | 'push';
|
||||||
|
|
||||||
|
@ -12,8 +12,8 @@ export type SwMessage = {
|
||||||
|
|
||||||
// Defined also @/services/push-notification.ts#L7-L14
|
// Defined also @/services/push-notification.ts#L7-L14
|
||||||
type pushNotificationDataSourceMap = {
|
type pushNotificationDataSourceMap = {
|
||||||
notification: Misskey.entities.Notification;
|
notification: foundkey.entities.Notification;
|
||||||
unreadMessagingMessage: Misskey.entities.MessagingMessage;
|
unreadMessagingMessage: foundkey.entities.MessagingMessage;
|
||||||
readNotifications: { notificationIds: string[] };
|
readNotifications: { notificationIds: string[] };
|
||||||
readAllNotifications: undefined;
|
readAllNotifications: undefined;
|
||||||
readAllMessagingMessages: undefined;
|
readAllMessagingMessages: undefined;
|
||||||
|
|
Loading…
Reference in a new issue