Merge remote-tracking branch 'misskey-original/develop' into develop
# Conflicts: # packages/frontend/src/components/MkChannelFollowButton.vue # packages/frontend/src/components/MkDrive.folder.vue # packages/frontend/src/components/MkDrive.navFolder.vue # packages/frontend/src/components/MkEmojiEditDialog.vue # packages/frontend/src/components/MkFollowButton.vue # packages/frontend/src/components/MkNote.vue # packages/frontend/src/components/MkPostForm.vue # packages/frontend/src/components/MkSignupDialog.form.vue # packages/frontend/src/pages/about.vue # packages/frontend/src/pages/admin/index.vue # packages/frontend/src/pages/admin/instance-block.vue # packages/frontend/src/pages/avatar-decorations.vue # packages/frontend/src/pages/custom-emojis-manager.vue # packages/frontend/src/pages/settings/mute-block.vue # packages/frontend/src/pages/settings/profile.vue # packages/frontend/src/pages/timeline.vue # packages/frontend/src/pages/user/home.vue
This commit is contained in:
commit
de3f4ce29c
216 changed files with 758 additions and 568 deletions
|
|
@ -110,7 +110,9 @@ import * as os from '@/os.js';
|
|||
import MkFolder from '@/components/MkFolder.vue';
|
||||
import MkInfo from '@/components/MkInfo.vue';
|
||||
import { confetti } from '@/scripts/confetti.js';
|
||||
import { $i } from '@/account.js';
|
||||
import { signinRequired } from '@/account.js';
|
||||
|
||||
const $i = signinRequired();
|
||||
|
||||
defineProps<{
|
||||
twoFactorData: {
|
||||
|
|
@ -151,7 +153,7 @@ function downloadBackupCodes() {
|
|||
const txtBlob = new Blob([backupCodes.value.join('\n')], { type: 'text/plain' });
|
||||
const dummya = document.createElement('a');
|
||||
dummya.href = URL.createObjectURL(txtBlob);
|
||||
dummya.download = `${$i?.username}-2fa-backup-codes.txt`;
|
||||
dummya.download = `${$i.username}-2fa-backup-codes.txt`;
|
||||
dummya.click();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,9 +80,11 @@ import MkSwitch from '@/components/MkSwitch.vue';
|
|||
import FormSection from '@/components/form/section.vue';
|
||||
import MkFolder from '@/components/MkFolder.vue';
|
||||
import * as os from '@/os.js';
|
||||
import { $i } from '@/account.js';
|
||||
import { signinRequired } from '@/account.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
|
||||
const $i = signinRequired();
|
||||
|
||||
// メモ: 各エンドポイントはmeUpdatedを発行するため、refreshAccountは不要
|
||||
|
||||
withDefaults(defineProps<{
|
||||
|
|
@ -91,7 +93,7 @@ withDefaults(defineProps<{
|
|||
first: false,
|
||||
});
|
||||
|
||||
const usePasswordLessLogin = computed(() => $i?.usePasswordLessLogin ?? false);
|
||||
const usePasswordLessLogin = computed(() => $i.usePasswordLessLogin ?? false);
|
||||
|
||||
async function registerTOTP(): Promise<void> {
|
||||
const auth = await os.authenticateDialog();
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ import type * as Misskey from 'misskey-js';
|
|||
import FormSuspense from '@/components/form/suspense.vue';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import * as os from '@/os.js';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import { getAccounts, addAccount as addAccounts, removeAccount as _removeAccount, login, $i } from '@/account.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||
|
|
@ -36,7 +37,7 @@ const init = async () => {
|
|||
getAccounts().then(accounts => {
|
||||
storedAccounts.value = accounts.filter(x => x.id !== $i!.id);
|
||||
|
||||
return os.api('users/show', {
|
||||
return misskeyApi('users/show', {
|
||||
userIds: storedAccounts.value.map(x => x.id),
|
||||
});
|
||||
}).then(response => {
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ import { defineAsyncComponent, ref, computed } from 'vue';
|
|||
import FormLink from '@/components/form/link.vue';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import * as os from '@/os.js';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||
|
||||
|
|
@ -25,7 +26,7 @@ function generateToken() {
|
|||
os.popup(defineAsyncComponent(() => import('@/components/MkTokenGenerateWindow.vue')), {}, {
|
||||
done: async result => {
|
||||
const { name, permissions } = result;
|
||||
const { token } = await os.api('miauth/gen-token', {
|
||||
const { token } = await misskeyApi('miauth/gen-token', {
|
||||
session: null,
|
||||
name: name,
|
||||
permission: permissions,
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<script lang="ts" setup>
|
||||
import { ref, computed } from 'vue';
|
||||
import FormPagination from '@/components/MkPagination.vue';
|
||||
import * as os from '@/os.js';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||
import MkKeyValue from '@/components/MkKeyValue.vue';
|
||||
|
|
@ -66,7 +66,7 @@ const pagination = {
|
|||
};
|
||||
|
||||
function revoke(token) {
|
||||
os.api('i/revoke-token', { tokenId: token.id }).then(() => {
|
||||
misskeyApi('i/revoke-token', { tokenId: token.id }).then(() => {
|
||||
list.value.reload();
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,9 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { } from 'vue';
|
||||
import { $i } from '@/account.js';
|
||||
import { signinRequired } from '@/account.js';
|
||||
|
||||
const $i = signinRequired();
|
||||
|
||||
const props = defineProps<{
|
||||
active?: boolean;
|
||||
|
|
|
|||
|
|
@ -53,7 +53,9 @@ import MkModalWindow from '@/components/MkModalWindow.vue';
|
|||
import MkSwitch from '@/components/MkSwitch.vue';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import MkRange from '@/components/MkRange.vue';
|
||||
import { $i } from '@/account.js';
|
||||
import { signinRequired } from '@/account.js';
|
||||
|
||||
const $i = signinRequired();
|
||||
|
||||
const props = defineProps<{
|
||||
usingIndex: number | null;
|
||||
|
|
|
|||
|
|
@ -56,16 +56,19 @@ import * as Misskey from 'misskey-js';
|
|||
import XDecoration from './avatar-decoration.decoration.vue';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import * as os from '@/os.js';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { $i } from '@/account.js';
|
||||
import { signinRequired } from '@/account.js';
|
||||
import MkInfo from '@/components/MkInfo.vue';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||
import MkFoldableSection from '@/components/MkFoldableSection.vue';
|
||||
|
||||
const $i = signinRequired();
|
||||
|
||||
const loading = ref(true);
|
||||
const avatarDecorations = ref<Misskey.entities.GetAvatarDecorationsResponse & { category:string }>([]);
|
||||
|
||||
os.api('get-avatar-decorations').then(_avatarDecorations => {
|
||||
misskeyApi('get-avatar-decorations').then(_avatarDecorations => {
|
||||
avatarDecorations.value = _avatarDecorations;
|
||||
loading.value = false;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
import { computed, ref, watch } from 'vue';
|
||||
import tinycolor from 'tinycolor2';
|
||||
import * as os from '@/os.js';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import MkPagination from '@/components/MkPagination.vue';
|
||||
import MkDriveFileThumbnail from '@/components/MkDriveFileThumbnail.vue';
|
||||
import { i18n } from '@/i18n.js';
|
||||
|
|
@ -94,7 +95,7 @@ watch(sortModeSelect, () => {
|
|||
|
||||
function fetchDriveInfo(): void {
|
||||
fetching.value = true;
|
||||
os.api('drive').then(info => {
|
||||
misskeyApi('drive').then(info => {
|
||||
capacity.value = info.capacity;
|
||||
usage.value = info.usage;
|
||||
fetching.value = false;
|
||||
|
|
|
|||
|
|
@ -66,12 +66,15 @@ import FormSection from '@/components/form/section.vue';
|
|||
import MkKeyValue from '@/components/MkKeyValue.vue';
|
||||
import FormSplit from '@/components/form/split.vue';
|
||||
import * as os from '@/os.js';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import bytes from '@/filters/bytes.js';
|
||||
import { defaultStore } from '@/store.js';
|
||||
import MkChart from '@/components/MkChart.vue';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||
import { $i } from '@/account.js';
|
||||
import { signinRequired } from '@/account.js';
|
||||
|
||||
const $i = signinRequired();
|
||||
|
||||
const fetching = ref(true);
|
||||
const usage = ref<number | null>(null);
|
||||
|
|
@ -81,6 +84,7 @@ const alwaysMarkNsfw = ref($i.alwaysMarkNsfw);
|
|||
const autoSensitive = ref($i.autoSensitive);
|
||||
|
||||
const meterStyle = computed(() => {
|
||||
if (!capacity.value || !usage.value) return {};
|
||||
return {
|
||||
width: `${usage.value / capacity.value * 100}%`,
|
||||
background: tinycolor({
|
||||
|
|
@ -93,14 +97,14 @@ const meterStyle = computed(() => {
|
|||
|
||||
const keepOriginalUploading = computed(defaultStore.makeGetterSetter('keepOriginalUploading'));
|
||||
|
||||
os.api('drive').then(info => {
|
||||
misskeyApi('drive').then(info => {
|
||||
capacity.value = info.capacity;
|
||||
usage.value = info.usage;
|
||||
fetching.value = false;
|
||||
});
|
||||
|
||||
if (defaultStore.state.uploadFolder) {
|
||||
os.api('drive/folders/show', {
|
||||
misskeyApi('drive/folders/show', {
|
||||
folderId: defaultStore.state.uploadFolder,
|
||||
}).then(response => {
|
||||
uploadFolder.value = response;
|
||||
|
|
@ -112,7 +116,7 @@ function chooseUploadFolder() {
|
|||
defaultStore.set('uploadFolder', folder ? folder.id : null);
|
||||
os.success();
|
||||
if (defaultStore.state.uploadFolder) {
|
||||
uploadFolder.value = await os.api('drive/folders/show', {
|
||||
uploadFolder.value = await misskeyApi('drive/folders/show', {
|
||||
folderId: defaultStore.state.uploadFolder,
|
||||
});
|
||||
} else {
|
||||
|
|
@ -122,7 +126,7 @@ function chooseUploadFolder() {
|
|||
}
|
||||
|
||||
function saveProfile() {
|
||||
os.api('i/update', {
|
||||
misskeyApi('i/update', {
|
||||
alwaysMarkNsfw: !!alwaysMarkNsfw.value,
|
||||
autoSensitive: !!autoSensitive.value,
|
||||
}).catch(err => {
|
||||
|
|
|
|||
|
|
@ -54,15 +54,18 @@ import MkInfo from '@/components/MkInfo.vue';
|
|||
import MkInput from '@/components/MkInput.vue';
|
||||
import MkSwitch from '@/components/MkSwitch.vue';
|
||||
import * as os from '@/os.js';
|
||||
import { $i } from '@/account.js';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import { signinRequired } from '@/account.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||
import { instance } from '@/instance.js';
|
||||
|
||||
const emailAddress = ref($i!.email);
|
||||
const $i = signinRequired();
|
||||
|
||||
const emailAddress = ref($i.email);
|
||||
|
||||
const onChangeReceiveAnnouncementEmail = (v) => {
|
||||
os.api('i/update', {
|
||||
misskeyApi('i/update', {
|
||||
receiveAnnouncementEmail: v,
|
||||
});
|
||||
};
|
||||
|
|
@ -78,14 +81,14 @@ async function saveEmailAddress() {
|
|||
});
|
||||
}
|
||||
|
||||
const emailNotification_mention = ref($i!.emailNotificationTypes.includes('mention'));
|
||||
const emailNotification_reply = ref($i!.emailNotificationTypes.includes('reply'));
|
||||
const emailNotification_quote = ref($i!.emailNotificationTypes.includes('quote'));
|
||||
const emailNotification_follow = ref($i!.emailNotificationTypes.includes('follow'));
|
||||
const emailNotification_receiveFollowRequest = ref($i!.emailNotificationTypes.includes('receiveFollowRequest'));
|
||||
const emailNotification_mention = ref($i.emailNotificationTypes.includes('mention'));
|
||||
const emailNotification_reply = ref($i.emailNotificationTypes.includes('reply'));
|
||||
const emailNotification_quote = ref($i.emailNotificationTypes.includes('quote'));
|
||||
const emailNotification_follow = ref($i.emailNotificationTypes.includes('follow'));
|
||||
const emailNotification_receiveFollowRequest = ref($i.emailNotificationTypes.includes('receiveFollowRequest'));
|
||||
|
||||
const saveNotificationSettings = () => {
|
||||
os.api('i/update', {
|
||||
misskeyApi('i/update', {
|
||||
emailNotificationTypes: [
|
||||
...[emailNotification_mention.value ? 'mention' : null],
|
||||
...[emailNotification_reply.value ? 'reply' : null],
|
||||
|
|
|
|||
|
|
@ -250,6 +250,7 @@ import MkInfo from '@/components/MkInfo.vue';
|
|||
import { langs } from '@/config.js';
|
||||
import { defaultStore } from '@/store.js';
|
||||
import * as os from '@/os.js';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import { unisonReload } from '@/scripts/unison-reload.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||
|
|
@ -426,7 +427,7 @@ function removeEmojiIndex(lang: string) {
|
|||
}
|
||||
|
||||
async function setPinnedList() {
|
||||
const lists = await os.api('users/lists/list');
|
||||
const lists = await misskeyApi('users/lists/list');
|
||||
const { canceled, result: list } = await os.select({
|
||||
title: i18n.ts.selectList,
|
||||
items: lists.map(x => ({
|
||||
|
|
|
|||
|
|
@ -117,11 +117,12 @@ import FormSection from '@/components/form/section.vue';
|
|||
import MkFolder from '@/components/MkFolder.vue';
|
||||
import MkSwitch from '@/components/MkSwitch.vue';
|
||||
import * as os from '@/os.js';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import { selectFile } from '@/scripts/select-file.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||
import { $i } from '@/account.js';
|
||||
import { defaultStore } from "@/store.js";
|
||||
import { defaultStore } from '@/store.js';
|
||||
|
||||
const excludeMutingUsers = ref(false);
|
||||
const excludeInactiveUsers = ref(false);
|
||||
|
|
@ -149,15 +150,15 @@ const onError = (ev) => {
|
|||
};
|
||||
|
||||
const exportNotes = () => {
|
||||
os.api('i/export-notes', {}).then(onExportSuccess).catch(onError);
|
||||
misskeyApi('i/export-notes', {}).then(onExportSuccess).catch(onError);
|
||||
};
|
||||
|
||||
const exportFavorites = () => {
|
||||
os.api('i/export-favorites', {}).then(onExportSuccess).catch(onError);
|
||||
misskeyApi('i/export-favorites', {}).then(onExportSuccess).catch(onError);
|
||||
};
|
||||
|
||||
const exportFollowing = () => {
|
||||
os.api('i/export-following', {
|
||||
misskeyApi('i/export-following', {
|
||||
excludeMuting: excludeMutingUsers.value,
|
||||
excludeInactive: excludeInactiveUsers.value,
|
||||
})
|
||||
|
|
@ -165,24 +166,24 @@ const exportFollowing = () => {
|
|||
};
|
||||
|
||||
const exportBlocking = () => {
|
||||
os.api('i/export-blocking', {}).then(onExportSuccess).catch(onError);
|
||||
misskeyApi('i/export-blocking', {}).then(onExportSuccess).catch(onError);
|
||||
};
|
||||
|
||||
const exportUserLists = () => {
|
||||
os.api('i/export-user-lists', {}).then(onExportSuccess).catch(onError);
|
||||
misskeyApi('i/export-user-lists', {}).then(onExportSuccess).catch(onError);
|
||||
};
|
||||
|
||||
const exportMuting = () => {
|
||||
os.api('i/export-mute', {}).then(onExportSuccess).catch(onError);
|
||||
misskeyApi('i/export-mute', {}).then(onExportSuccess).catch(onError);
|
||||
};
|
||||
|
||||
const exportAntennas = () => {
|
||||
os.api('i/export-antennas', {}).then(onExportSuccess).catch(onError);
|
||||
misskeyApi('i/export-antennas', {}).then(onExportSuccess).catch(onError);
|
||||
};
|
||||
|
||||
const importFollowing = async (ev) => {
|
||||
const file = await selectFile(ev.currentTarget ?? ev.target);
|
||||
os.api('i/import-following', {
|
||||
misskeyApi('i/import-following', {
|
||||
fileId: file.id,
|
||||
withReplies: withReplies.value,
|
||||
}).then(onImportSuccess).catch(onError);
|
||||
|
|
@ -190,22 +191,22 @@ const importFollowing = async (ev) => {
|
|||
|
||||
const importUserLists = async (ev) => {
|
||||
const file = await selectFile(ev.currentTarget ?? ev.target);
|
||||
os.api('i/import-user-lists', { fileId: file.id }).then(onImportSuccess).catch(onError);
|
||||
misskeyApi('i/import-user-lists', { fileId: file.id }).then(onImportSuccess).catch(onError);
|
||||
};
|
||||
|
||||
const importMuting = async (ev) => {
|
||||
const file = await selectFile(ev.currentTarget ?? ev.target);
|
||||
os.api('i/import-muting', { fileId: file.id }).then(onImportSuccess).catch(onError);
|
||||
misskeyApi('i/import-muting', { fileId: file.id }).then(onImportSuccess).catch(onError);
|
||||
};
|
||||
|
||||
const importBlocking = async (ev) => {
|
||||
const file = await selectFile(ev.currentTarget ?? ev.target);
|
||||
os.api('i/import-blocking', { fileId: file.id }).then(onImportSuccess).catch(onError);
|
||||
misskeyApi('i/import-blocking', { fileId: file.id }).then(onImportSuccess).catch(onError);
|
||||
};
|
||||
|
||||
const importAntennas = async (ev) => {
|
||||
const file = await selectFile(ev.currentTarget ?? ev.target);
|
||||
os.api('i/import-antennas', { fileId: file.id }).then(onImportSuccess).catch(onError);
|
||||
misskeyApi('i/import-antennas', { fileId: file.id }).then(onImportSuccess).catch(onError);
|
||||
};
|
||||
|
||||
const headerActions = computed(() => []);
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</div>
|
||||
</MkFolder>
|
||||
|
||||
<MkFolder :defaultOpen="!!$i?.movedTo">
|
||||
<MkFolder :defaultOpen="!!$i.movedTo">
|
||||
<template #icon><i class="ti ti-plane-departure"></i></template>
|
||||
<template #label>{{ i18n.ts._accountMigration.moveTo }}</template>
|
||||
|
||||
|
|
@ -66,24 +66,27 @@ import MkButton from '@/components/MkButton.vue';
|
|||
import MkFolder from '@/components/MkFolder.vue';
|
||||
import MkUserInfo from '@/components/MkUserInfo.vue';
|
||||
import * as os from '@/os.js';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||
import { $i } from '@/account.js';
|
||||
import { signinRequired } from '@/account.js';
|
||||
import { unisonReload } from '@/scripts/unison-reload.js';
|
||||
|
||||
const $i = signinRequired();
|
||||
|
||||
const moveToAccount = ref('');
|
||||
const movedTo = ref<Misskey.entities.UserDetailed>();
|
||||
const accountAliases = ref(['']);
|
||||
|
||||
async function init() {
|
||||
if ($i?.movedTo) {
|
||||
movedTo.value = await os.api('users/show', { userId: $i.movedTo });
|
||||
if ($i.movedTo) {
|
||||
movedTo.value = await misskeyApi('users/show', { userId: $i.movedTo });
|
||||
} else {
|
||||
moveToAccount.value = '';
|
||||
}
|
||||
|
||||
if ($i?.alsoKnownAs && $i.alsoKnownAs.length > 0) {
|
||||
const alsoKnownAs = await os.api('users/show', { userIds: $i.alsoKnownAs });
|
||||
if ($i.alsoKnownAs && $i.alsoKnownAs.length > 0) {
|
||||
const alsoKnownAs = await misskeyApi('users/show', { userIds: $i.alsoKnownAs });
|
||||
accountAliases.value = (alsoKnownAs && alsoKnownAs.length > 0) ? alsoKnownAs.map(user => `@${Misskey.acct.toString(user)}`) : [''];
|
||||
} else {
|
||||
accountAliases.value = [''];
|
||||
|
|
|
|||
|
|
@ -19,11 +19,13 @@ import { ref, watch } from 'vue';
|
|||
import MkTextarea from '@/components/MkTextarea.vue';
|
||||
import MkInfo from '@/components/MkInfo.vue';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import * as os from '@/os.js';
|
||||
import { $i } from '@/account.js';
|
||||
import { signinRequired } from '@/account.js';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
|
||||
const instanceMutes = ref($i!.mutedInstances.join('\n'));
|
||||
const $i = signinRequired();
|
||||
|
||||
const instanceMutes = ref($i.mutedInstances.join('\n'));
|
||||
const changed = ref(false);
|
||||
|
||||
async function save() {
|
||||
|
|
@ -32,7 +34,7 @@ async function save() {
|
|||
.map(el => el.trim())
|
||||
.filter(el => el);
|
||||
|
||||
await os.api('i/update', {
|
||||
await misskeyApi('i/update', {
|
||||
mutedInstances: mutes,
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -9,14 +9,14 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<template #icon><i class="ti ti-message-off"></i></template>
|
||||
<template #label>{{ i18n.ts.wordMute }}</template>
|
||||
|
||||
<XWordMute :muted="$i!.mutedWords" @save="saveMutedWords"/>
|
||||
<XWordMute :muted="$i.mutedWords" @save="saveMutedWords"/>
|
||||
</MkFolder>
|
||||
|
||||
<MkFolder>
|
||||
<template #icon><i class="ti ti-message-off"></i></template>
|
||||
<template #label>{{ i18n.ts.hardWordMute }}</template>
|
||||
|
||||
<XWordMute :muted="$i!.hardMutedWords" @save="saveHardMutedWords"/>
|
||||
<XWordMute :muted="$i.hardMutedWords" @save="saveHardMutedWords"/>
|
||||
</MkFolder>
|
||||
|
||||
<MkFolder>
|
||||
|
|
@ -135,10 +135,13 @@ import { i18n } from '@/i18n.js';
|
|||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||
import MkUserCardMini from '@/components/MkUserCardMini.vue';
|
||||
import * as os from '@/os.js';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import { infoImageUrl } from '@/instance.js';
|
||||
import { $i } from '@/account.js';
|
||||
import { signinRequired } from '@/account.js';
|
||||
import MkFolder from '@/components/MkFolder.vue';
|
||||
|
||||
const $i = signinRequired();
|
||||
|
||||
const renoteMutingPagination = {
|
||||
endpoint: 'renote-mute/list' as const,
|
||||
limit: 10,
|
||||
|
|
@ -216,11 +219,11 @@ async function toggleBlockItem(item) {
|
|||
}
|
||||
|
||||
async function saveMutedWords(mutedWords: (string | string[])[]) {
|
||||
await os.api('i/update', { mutedWords });
|
||||
await misskeyApi('i/update', { mutedWords });
|
||||
}
|
||||
|
||||
async function saveHardMutedWords(hardMutedWords: (string | string[])[]) {
|
||||
await os.api('i/update', { hardMutedWords });
|
||||
await misskeyApi('i/update', { hardMutedWords });
|
||||
}
|
||||
|
||||
const headerActions = computed(() => []);
|
||||
|
|
|
|||
|
|
@ -62,18 +62,21 @@ import FormSection from '@/components/form/section.vue';
|
|||
import MkFolder from '@/components/MkFolder.vue';
|
||||
import MkSwitch from '@/components/MkSwitch.vue';
|
||||
import * as os from '@/os.js';
|
||||
import { $i } from '@/account.js';
|
||||
import { signinRequired } from '@/account.js';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||
import MkPushNotificationAllowButton from '@/components/MkPushNotificationAllowButton.vue';
|
||||
import { notificationTypes } from '@/const.js';
|
||||
|
||||
const $i = signinRequired();
|
||||
|
||||
const nonConfigurableNotificationTypes = ['note', 'roleAssigned', 'followRequestAccepted', 'achievementEarned'];
|
||||
|
||||
const allowButton = shallowRef<InstanceType<typeof MkPushNotificationAllowButton>>();
|
||||
const pushRegistrationInServer = computed(() => allowButton.value?.pushRegistrationInServer);
|
||||
const sendReadMessage = computed(() => pushRegistrationInServer.value?.sendReadMessage || false);
|
||||
const userLists = await os.api('users/lists/list');
|
||||
const userLists = await misskeyApi('users/lists/list');
|
||||
|
||||
async function readAllUnreadNotes() {
|
||||
await os.api('i/read-all-unread-notes');
|
||||
|
|
@ -86,11 +89,11 @@ async function readAllNotifications() {
|
|||
async function updateReceiveConfig(type, value) {
|
||||
await os.apiWithDialog('i/update', {
|
||||
notificationRecieveConfig: {
|
||||
...$i!.notificationRecieveConfig,
|
||||
...$i.notificationRecieveConfig,
|
||||
[type]: value,
|
||||
},
|
||||
}).then(i => {
|
||||
$i!.notificationRecieveConfig = i.notificationRecieveConfig;
|
||||
$i.notificationRecieveConfig = i.notificationRecieveConfig;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -107,7 +110,7 @@ function onChangeSendReadMessage(v: boolean) {
|
|||
}
|
||||
|
||||
function testNotification(): void {
|
||||
os.api('notifications/test-notification');
|
||||
misskeyApi('notifications/test-notification');
|
||||
}
|
||||
|
||||
const headerActions = computed(() => []);
|
||||
|
|
|
|||
|
|
@ -94,26 +94,21 @@ import FormInfo from '@/components/MkInfo.vue';
|
|||
import MkKeyValue from '@/components/MkKeyValue.vue';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import * as os from '@/os.js';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import { defaultStore } from '@/store.js';
|
||||
import { signout, $i } from '@/account.js';
|
||||
import { signout, signinRequired } from '@/account.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||
import { unisonReload } from '@/scripts/unison-reload.js';
|
||||
import FormSection from '@/components/form/section.vue';
|
||||
|
||||
const $i = signinRequired();
|
||||
|
||||
const reportError = computed(defaultStore.makeGetterSetter('reportError'));
|
||||
const enableCondensedLineForAcct = computed(defaultStore.makeGetterSetter('enableCondensedLineForAcct'));
|
||||
const devMode = computed(defaultStore.makeGetterSetter('devMode'));
|
||||
const defaultWithReplies = computed(defaultStore.makeGetterSetter('defaultWithReplies'));
|
||||
|
||||
function onChangeInjectFeaturedNote(v) {
|
||||
os.api('i/update', {
|
||||
injectFeaturedNote: v,
|
||||
}).then((i) => {
|
||||
$i!.injectFeaturedNote = i.injectFeaturedNote;
|
||||
});
|
||||
}
|
||||
|
||||
async function deleteAccount() {
|
||||
{
|
||||
const { canceled } = await os.confirm({
|
||||
|
|
@ -155,7 +150,7 @@ async function updateRepliesAll(withReplies: boolean) {
|
|||
});
|
||||
if (canceled) return;
|
||||
|
||||
os.api('following/update-all', { withReplies });
|
||||
misskeyApi('following/update-all', { withReplies });
|
||||
}
|
||||
|
||||
watch([
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ import FormSection from '@/components/form/section.vue';
|
|||
import MkButton from '@/components/MkButton.vue';
|
||||
import MkInfo from '@/components/MkInfo.vue';
|
||||
import * as os from '@/os.js';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import { ColdDeviceStorage, defaultStore } from '@/store.js';
|
||||
import { unisonReload } from '@/scripts/unison-reload.js';
|
||||
import { useStream } from '@/stream.js';
|
||||
|
|
@ -144,7 +145,7 @@ const connection = $i && useStream().useChannel('main');
|
|||
|
||||
const profiles = ref<Record<string, Profile> | null>(null);
|
||||
|
||||
os.api('i/registry/get-all', { scope })
|
||||
misskeyApi('i/registry/get-all', { scope })
|
||||
.then(res => {
|
||||
profiles.value = res || {};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -77,12 +77,14 @@ import MkSwitch from '@/components/MkSwitch.vue';
|
|||
import MkSelect from '@/components/MkSelect.vue';
|
||||
import FormSection from '@/components/form/section.vue';
|
||||
import MkFolder from '@/components/MkFolder.vue';
|
||||
import * as os from '@/os.js';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import { defaultStore } from '@/store.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { $i } from '@/account.js';
|
||||
import { signinRequired } from '@/account.js';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||
|
||||
const $i = signinRequired();
|
||||
|
||||
const isLocked = ref($i.isLocked);
|
||||
const autoAcceptFollowed = ref($i.autoAcceptFollowed);
|
||||
const noCrawle = ref($i.noCrawle);
|
||||
|
|
@ -90,8 +92,8 @@ const preventAiLearning = ref($i.preventAiLearning);
|
|||
const isExplorable = ref($i.isExplorable);
|
||||
const hideOnlineStatus = ref($i.hideOnlineStatus);
|
||||
const publicReactions = ref($i.publicReactions);
|
||||
const followingVisibility = ref($i?.followingVisibility);
|
||||
const followersVisibility = ref($i?.followersVisibility);
|
||||
const followingVisibility = ref($i.followingVisibility);
|
||||
const followersVisibility = ref($i.followersVisibility);
|
||||
|
||||
const defaultNoteVisibility = computed(defaultStore.makeGetterSetter('defaultNoteVisibility'));
|
||||
const defaultNoteLocalOnly = computed(defaultStore.makeGetterSetter('defaultNoteLocalOnly'));
|
||||
|
|
@ -99,7 +101,7 @@ const rememberNoteVisibility = computed(defaultStore.makeGetterSetter('rememberN
|
|||
const keepCw = computed(defaultStore.makeGetterSetter('keepCw'));
|
||||
|
||||
function save() {
|
||||
os.api('i/update', {
|
||||
misskeyApi('i/update', {
|
||||
isLocked: !!isLocked.value,
|
||||
autoAcceptFollowed: !!autoAcceptFollowed.value,
|
||||
noCrawle: !!noCrawle.value,
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ import FormSlot from '@/components/form/slot.vue';
|
|||
import { selectFile } from '@/scripts/select-file.js';
|
||||
import * as os from '@/os.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { $i } from '@/account.js';
|
||||
import { signinRequired } from '@/account.js';
|
||||
import { langmap } from '@/scripts/langmap.js';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||
import { claimAchievement } from '@/scripts/achievements.js';
|
||||
|
|
@ -129,6 +129,8 @@ import { defaultStore } from '@/store.js';
|
|||
import MkInfo from '@/components/MkInfo.vue';
|
||||
import MkTextarea from '@/components/MkTextarea.vue';
|
||||
|
||||
const $i = signinRequired();
|
||||
|
||||
const Sortable = defineAsyncComponent(() => import('vuedraggable').then(x => x.default));
|
||||
|
||||
const reactionAcceptance = computed(defaultStore.makeGetterSetter('reactionAcceptance'));
|
||||
|
|
@ -139,8 +141,8 @@ const profile = reactive({
|
|||
location: $i.location,
|
||||
birthday: $i.birthday,
|
||||
lang: $i.lang,
|
||||
isBot: $i.isBot,
|
||||
isCat: $i.isCat,
|
||||
isBot: $i.isBot ?? false,
|
||||
isCat: $i.isCat ?? false,
|
||||
isGorilla: $i.isGorilla,
|
||||
});
|
||||
|
||||
|
|
@ -150,7 +152,7 @@ watch(() => profile, () => {
|
|||
deep: true,
|
||||
});
|
||||
|
||||
const fields = ref($i?.fields.map(field => ({ id: Math.random().toString(), name: field.name, value: field.value })) ?? []);
|
||||
const fields = ref($i.fields.map(field => ({ id: Math.random().toString(), name: field.name, value: field.value })) ?? []);
|
||||
const fieldEditMode = ref(false);
|
||||
|
||||
function addField() {
|
||||
|
|
|
|||
|
|
@ -27,15 +27,11 @@ import { computed } from 'vue';
|
|||
import FormSection from '@/components/form/section.vue';
|
||||
import * as os from '@/os.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { $i } from '@/account.js';
|
||||
import { signinRequired } from '@/account.js';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||
import MkRolePreview from '@/components/MkRolePreview.vue';
|
||||
|
||||
function save() {
|
||||
os.apiWithDialog('i/update', {
|
||||
|
||||
});
|
||||
}
|
||||
const $i = signinRequired();
|
||||
|
||||
const headerActions = computed(() => []);
|
||||
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ import FormSlot from '@/components/form/slot.vue';
|
|||
import MkButton from '@/components/MkButton.vue';
|
||||
import MkPagination from '@/components/MkPagination.vue';
|
||||
import * as os from '@/os.js';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||
|
||||
|
|
@ -92,7 +93,7 @@ async function regenerateToken() {
|
|||
const auth = await os.authenticateDialog();
|
||||
if (auth.canceled) return;
|
||||
|
||||
os.api('i/regenerate-token', {
|
||||
misskeyApi('i/regenerate-token', {
|
||||
password: auth.result.password,
|
||||
token: auth.result.token,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ import MkButton from '@/components/MkButton.vue';
|
|||
import MkRange from '@/components/MkRange.vue';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import * as os from '@/os.js';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import { playFile, soundsTypes, getSoundDuration } from '@/scripts/sound.js';
|
||||
import { selectFile } from '@/scripts/select-file.js';
|
||||
|
||||
|
|
@ -53,7 +54,7 @@ const fileName = ref<string>('');
|
|||
const volume = ref(props.volume);
|
||||
|
||||
if (type.value === '_driveFile_' && fileId.value) {
|
||||
const apiRes = await os.api('drive/files/show', {
|
||||
const apiRes = await misskeyApi('drive/files/show', {
|
||||
fileId: fileId.value,
|
||||
});
|
||||
fileName.value = apiRes.name;
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ import { v4 as uuid } from 'uuid';
|
|||
import XStatusbar from './statusbar.statusbar.vue';
|
||||
import MkFolder from '@/components/MkFolder.vue';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import * as os from '@/os.js';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import { defaultStore } from '@/store.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||
|
|
@ -31,7 +31,7 @@ const statusbars = defaultStore.reactiveState.statusbars;
|
|||
const userLists = ref<Misskey.entities.UserList[] | null>(null);
|
||||
|
||||
onMounted(() => {
|
||||
os.api('users/lists/list').then(res => {
|
||||
misskeyApi('users/lists/list').then(res => {
|
||||
userLists.value = res;
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ import FormSection from '@/components/form/section.vue';
|
|||
import MkSwitch from '@/components/MkSwitch.vue';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import * as os from '@/os.js';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||
import { useRouter } from '@/router.js';
|
||||
|
|
@ -58,7 +59,7 @@ const props = defineProps<{
|
|||
webhookId: string;
|
||||
}>();
|
||||
|
||||
const webhook = await os.api('i/webhooks/show', {
|
||||
const webhook = await misskeyApi('i/webhooks/show', {
|
||||
webhookId: props.webhookId,
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue