Merge remote-tracking branch 'misskey-dev/develop' into prismisskey
# Conflicts: # CHANGELOG.md # package.json # packages/frontend/src/components/MkInstanceTicker.vue # packages/frontend/src/components/global/MkMisskeyFlavoredMarkdown.ts # packages/frontend/src/pages/about.vue # packages/frontend/src/pages/settings/theme.vue # packages/frontend/src/pages/timeline.vue # packages/frontend/src/ui/_common_/navbar-for-mobile.vue # packages/frontend/src/ui/_common_/navbar.vue # packages/frontend/src/ui/universal.vue # packages/frontend/src/widgets/WidgetInstanceInfo.vue
This commit is contained in:
commit
d9db4449b4
699 changed files with 3682 additions and 3610 deletions
|
|
@ -3,8 +3,8 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import * as os from '@/os';
|
||||
import { $i } from '@/account';
|
||||
import * as os from '@/os.js';
|
||||
import { $i } from '@/account.js';
|
||||
|
||||
export const ACHIEVEMENT_TYPES = [
|
||||
'notes1',
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@
|
|||
*/
|
||||
|
||||
import { utils, values } from '@syuilo/aiscript';
|
||||
import * as os from '@/os';
|
||||
import { $i } from '@/account';
|
||||
import { miLocalStorage } from '@/local-storage';
|
||||
import { customEmojis } from '@/custom-emojis';
|
||||
import { lang } from '@/config';
|
||||
import * as os from '@/os.js';
|
||||
import { $i } from '@/account.js';
|
||||
import { miLocalStorage } from '@/local-storage.js';
|
||||
import { customEmojis } from '@/custom-emojis.js';
|
||||
import { lang } from '@/config.js';
|
||||
|
||||
export function createAiScriptEnv(opts) {
|
||||
return {
|
||||
|
|
@ -39,8 +39,11 @@ export function createAiScriptEnv(opts) {
|
|||
// バグがあればundefinedもあり得るため念のため
|
||||
if (typeof token.value !== 'string') throw new Error('invalid token');
|
||||
}
|
||||
const res = await os.api(ep.value, utils.valToJs(param), token ? token.value : (opts.token ?? null));
|
||||
return utils.jsToVal(res);
|
||||
return os.api(ep.value, utils.valToJs(param), token ? token.value : (opts.token ?? null)).then(res => {
|
||||
return utils.jsToVal(res);
|
||||
}, err => {
|
||||
return values.ERROR('request_failed', utils.jsToVal(err));
|
||||
});
|
||||
}),
|
||||
'Mk:save': values.FN_NATIVE(([key, value]) => {
|
||||
utils.assertString(key);
|
||||
|
|
|
|||
|
|
@ -551,55 +551,55 @@ export function registerAsUiLib(components: Ref<AsUiComponent>[], done: (root: R
|
|||
}),
|
||||
|
||||
'Ui:C:container': values.FN_NATIVE(([def, id], opts) => {
|
||||
return createComponentInstance('container', def, id, getContainerOptions, opts.call);
|
||||
return createComponentInstance('container', def, id, getContainerOptions, opts.topCall);
|
||||
}),
|
||||
|
||||
'Ui:C:text': values.FN_NATIVE(([def, id], opts) => {
|
||||
return createComponentInstance('text', def, id, getTextOptions, opts.call);
|
||||
return createComponentInstance('text', def, id, getTextOptions, opts.topCall);
|
||||
}),
|
||||
|
||||
'Ui:C:mfm': values.FN_NATIVE(([def, id], opts) => {
|
||||
return createComponentInstance('mfm', def, id, getMfmOptions, opts.call);
|
||||
return createComponentInstance('mfm', def, id, getMfmOptions, opts.topCall);
|
||||
}),
|
||||
|
||||
'Ui:C:textarea': values.FN_NATIVE(([def, id], opts) => {
|
||||
return createComponentInstance('textarea', def, id, getTextareaOptions, opts.call);
|
||||
return createComponentInstance('textarea', def, id, getTextareaOptions, opts.topCall);
|
||||
}),
|
||||
|
||||
'Ui:C:textInput': values.FN_NATIVE(([def, id], opts) => {
|
||||
return createComponentInstance('textInput', def, id, getTextInputOptions, opts.call);
|
||||
return createComponentInstance('textInput', def, id, getTextInputOptions, opts.topCall);
|
||||
}),
|
||||
|
||||
'Ui:C:numberInput': values.FN_NATIVE(([def, id], opts) => {
|
||||
return createComponentInstance('numberInput', def, id, getNumberInputOptions, opts.call);
|
||||
return createComponentInstance('numberInput', def, id, getNumberInputOptions, opts.topCall);
|
||||
}),
|
||||
|
||||
'Ui:C:button': values.FN_NATIVE(([def, id], opts) => {
|
||||
return createComponentInstance('button', def, id, getButtonOptions, opts.call);
|
||||
return createComponentInstance('button', def, id, getButtonOptions, opts.topCall);
|
||||
}),
|
||||
|
||||
'Ui:C:buttons': values.FN_NATIVE(([def, id], opts) => {
|
||||
return createComponentInstance('buttons', def, id, getButtonsOptions, opts.call);
|
||||
return createComponentInstance('buttons', def, id, getButtonsOptions, opts.topCall);
|
||||
}),
|
||||
|
||||
'Ui:C:switch': values.FN_NATIVE(([def, id], opts) => {
|
||||
return createComponentInstance('switch', def, id, getSwitchOptions, opts.call);
|
||||
return createComponentInstance('switch', def, id, getSwitchOptions, opts.topCall);
|
||||
}),
|
||||
|
||||
'Ui:C:select': values.FN_NATIVE(([def, id], opts) => {
|
||||
return createComponentInstance('select', def, id, getSelectOptions, opts.call);
|
||||
return createComponentInstance('select', def, id, getSelectOptions, opts.topCall);
|
||||
}),
|
||||
|
||||
'Ui:C:folder': values.FN_NATIVE(([def, id], opts) => {
|
||||
return createComponentInstance('folder', def, id, getFolderOptions, opts.call);
|
||||
return createComponentInstance('folder', def, id, getFolderOptions, opts.topCall);
|
||||
}),
|
||||
|
||||
'Ui:C:postFormButton': values.FN_NATIVE(([def, id], opts) => {
|
||||
return createComponentInstance('postFormButton', def, id, getPostFormButtonOptions, opts.call);
|
||||
return createComponentInstance('postFormButton', def, id, getPostFormButtonOptions, opts.topCall);
|
||||
}),
|
||||
|
||||
'Ui:C:postForm': values.FN_NATIVE(([def, id], opts) => {
|
||||
return createComponentInstance('postForm', def, id, getPostFormOptions, opts.call);
|
||||
return createComponentInstance('postForm', def, id, getPostFormOptions, opts.topCall);
|
||||
}),
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,21 +3,21 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { Endpoints } from 'misskey-js/built/api.types';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { ref } from 'vue';
|
||||
import { apiUrl } from '@/config';
|
||||
import { $i } from '@/account';
|
||||
import { apiUrl } from '@/config.js';
|
||||
import { $i } from '@/account.js';
|
||||
export const pendingApiRequestsCount = ref(0);
|
||||
|
||||
// Implements Misskey.api.ApiClient.request
|
||||
export function api<E extends keyof Endpoints, P extends Endpoints[E]['req']>(endpoint: E, data: P = {} as any, token?: string | null | undefined, signal?: AbortSignal): Promise<Endpoints[E]['res']> {
|
||||
export function api<E extends keyof Misskey.Endpoints, P extends Misskey.Endpoints[E]['req']>(endpoint: E, data: P = {} as any, token?: string | null | undefined, signal?: AbortSignal): Promise<Misskey.Endpoints[E]['res']> {
|
||||
pendingApiRequestsCount.value++;
|
||||
|
||||
const onFinally = () => {
|
||||
pendingApiRequestsCount.value--;
|
||||
};
|
||||
|
||||
const promise = new Promise<Endpoints[E]['res'] | void>((resolve, reject) => {
|
||||
const promise = new Promise<Misskey.Endpoints[E]['res'] | void>((resolve, reject) => {
|
||||
// Append a credential
|
||||
if ($i) (data as any).i = $i.token;
|
||||
if (token !== undefined) (data as any).i = token;
|
||||
|
|
@ -51,7 +51,7 @@ export function api<E extends keyof Endpoints, P extends Endpoints[E]['req']>(en
|
|||
}
|
||||
|
||||
// Implements Misskey.api.ApiClient.request
|
||||
export function apiGet <E extends keyof Endpoints, P extends Endpoints[E]['req']>(endpoint: E, data: P = {} as any): Promise<Endpoints[E]['res']> {
|
||||
export function apiGet <E extends keyof Misskey.Endpoints, P extends Misskey.Endpoints[E]['req']>(endpoint: E, data: P = {} as any): Promise<Misskey.Endpoints[E]['res']> {
|
||||
pendingApiRequestsCount.value++;
|
||||
|
||||
const onFinally = () => {
|
||||
|
|
@ -60,7 +60,7 @@ export function apiGet <E extends keyof Endpoints, P extends Endpoints[E]['req']
|
|||
|
||||
const query = new URLSearchParams(data as any);
|
||||
|
||||
const promise = new Promise<Endpoints[E]['res'] | void>((resolve, reject) => {
|
||||
const promise = new Promise<Misskey.Endpoints[E]['res'] | void>((resolve, reject) => {
|
||||
// Send request
|
||||
window.fetch(`${apiUrl}/${endpoint}?${query}`, {
|
||||
method: 'GET',
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { EndoRelation, Predicate } from './relation';
|
||||
type EndoRelation<T> = (a: T, b: T) => boolean;
|
||||
type Predicate<T> = (x: T) => boolean;
|
||||
|
||||
/**
|
||||
* Count the number of elements that satisfy the predicate
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
import { nextTick, Ref, ref, defineAsyncComponent } from 'vue';
|
||||
import getCaretCoordinates from 'textarea-caret';
|
||||
import { toASCII } from 'punycode/';
|
||||
import { popup } from '@/os';
|
||||
import { popup } from '@/os.js';
|
||||
|
||||
export class Autocomplete {
|
||||
private suggestion: {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
*/
|
||||
|
||||
import { ref, computed } from 'vue';
|
||||
import * as os from '@/os';
|
||||
import * as os from '@/os.js';
|
||||
|
||||
type SaveData = {
|
||||
gameVersion: number;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
import * as mfm from 'mfm-js';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { extractUrlFromMfm } from './extract-url-from-mfm';
|
||||
import { extractUrlFromMfm } from './extract-url-from-mfm.js';
|
||||
|
||||
export function shouldCollapsed(note: Misskey.entities.Note): boolean {
|
||||
const urls = note.text ? extractUrlFromMfm(mfm.parse(note.text)) : null;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
*/
|
||||
|
||||
import _confetti from 'canvas-confetti';
|
||||
import * as os from '@/os';
|
||||
import * as os from '@/os.js';
|
||||
|
||||
export function confetti(options: { duration?: number; } = {}) {
|
||||
const duration = options.duration ?? 1000 * 4;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { defaultStore } from '@/store';
|
||||
import { defaultStore } from '@/store.js';
|
||||
|
||||
await defaultStore.ready;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
*/
|
||||
|
||||
import * as mfm from 'mfm-js';
|
||||
import { unique } from '@/scripts/array';
|
||||
import { unique } from '@/scripts/array.js';
|
||||
|
||||
// unique without hash
|
||||
// [ http://a/#1, http://a/#2, http://b/#3 ] => [ http://a/#1, http://b/#3 ]
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
*/
|
||||
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { host as localHost } from '@/config';
|
||||
import { host as localHost } from '@/config.js';
|
||||
|
||||
export async function genSearchQuery(v: any, q: string) {
|
||||
let host: string;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { get } from '@/scripts/idb-proxy';
|
||||
import { get } from '@/scripts/idb-proxy.js';
|
||||
|
||||
export async function getAccountFromId(id: string) {
|
||||
const accounts = await get('accounts') as { token: string; id: string; }[];
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@
|
|||
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { defineAsyncComponent } from 'vue';
|
||||
import { i18n } from '@/i18n';
|
||||
import copyToClipboard from '@/scripts/copy-to-clipboard';
|
||||
import * as os from '@/os';
|
||||
import { MenuItem } from '@/types/menu';
|
||||
import { defaultStore } from '@/store';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import copyToClipboard from '@/scripts/copy-to-clipboard.js';
|
||||
import * as os from '@/os.js';
|
||||
import { MenuItem } from '@/types/menu.js';
|
||||
import { defaultStore } from '@/store.js';
|
||||
|
||||
function rename(file: Misskey.entities.DriveFile) {
|
||||
os.inputText({
|
||||
|
|
|
|||
|
|
@ -5,18 +5,18 @@
|
|||
|
||||
import { defineAsyncComponent, Ref } from 'vue';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { claimAchievement } from './achievements';
|
||||
import { $i } from '@/account';
|
||||
import { i18n } from '@/i18n';
|
||||
import { instance } from '@/instance';
|
||||
import * as os from '@/os';
|
||||
import copyToClipboard from '@/scripts/copy-to-clipboard';
|
||||
import { url } from '@/config';
|
||||
import { defaultStore, noteActions } from '@/store';
|
||||
import { miLocalStorage } from '@/local-storage';
|
||||
import { getUserMenu } from '@/scripts/get-user-menu';
|
||||
import { clipsCache } from '@/cache';
|
||||
import { MenuItem } from '@/types/menu';
|
||||
import { claimAchievement } from './achievements.js';
|
||||
import { $i } from '@/account.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { instance } from '@/instance.js';
|
||||
import * as os from '@/os.js';
|
||||
import copyToClipboard from '@/scripts/copy-to-clipboard.js';
|
||||
import { url } from '@/config.js';
|
||||
import { defaultStore, noteActions } from '@/store.js';
|
||||
import { miLocalStorage } from '@/local-storage.js';
|
||||
import { getUserMenu } from '@/scripts/get-user-menu.js';
|
||||
import { clipsCache } from '@/cache.js';
|
||||
import { MenuItem } from '@/types/menu.js';
|
||||
|
||||
export async function getNoteClipMenu(props: {
|
||||
note: Misskey.entities.Note;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
*/
|
||||
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { i18n } from '@/i18n';
|
||||
import { i18n } from '@/i18n.js';
|
||||
|
||||
/**
|
||||
* 投稿を表す文字列を取得します。
|
||||
|
|
|
|||
|
|
@ -6,15 +6,15 @@
|
|||
import { toUnicode } from 'punycode';
|
||||
import { defineAsyncComponent, ref, watch } from 'vue';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { i18n } from '@/i18n';
|
||||
import copyToClipboard from '@/scripts/copy-to-clipboard';
|
||||
import { host, url } from '@/config';
|
||||
import * as os from '@/os';
|
||||
import { defaultStore, userActions } from '@/store';
|
||||
import { $i, iAmModerator } from '@/account';
|
||||
import { mainRouter } from '@/router';
|
||||
import { Router } from '@/nirax';
|
||||
import { antennasCache, rolesCache, userListsCache } from '@/cache';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import copyToClipboard from '@/scripts/copy-to-clipboard.js';
|
||||
import { host, url } from '@/config.js';
|
||||
import * as os from '@/os.js';
|
||||
import { defaultStore, userActions } from '@/store.js';
|
||||
import { $i, iAmModerator } from '@/account.js';
|
||||
import { mainRouter } from '@/router.js';
|
||||
import { Router } from '@/nirax.js';
|
||||
import { antennasCache, rolesCache, userListsCache } from '@/cache.js';
|
||||
|
||||
export function getUserMenu(user: Misskey.entities.UserDetailed, router: Router = mainRouter) {
|
||||
const meId = $i ? $i.id : null;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import keyCode from './keycode';
|
||||
import keyCode from './keycode.js';
|
||||
|
||||
type Callback = (ev: KeyboardEvent) => void;
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import {
|
|||
import gradient from 'chartjs-plugin-gradient';
|
||||
import zoomPlugin from 'chartjs-plugin-zoom';
|
||||
import { MatrixController, MatrixElement } from 'chartjs-chart-matrix';
|
||||
import { defaultStore } from '@/store';
|
||||
import { defaultStore } from '@/store.js';
|
||||
import 'chartjs-adapter-date-fns';
|
||||
|
||||
export function initChart() {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { lang } from '@/config';
|
||||
import { lang } from '@/config.js';
|
||||
|
||||
export async function initializeSw() {
|
||||
if (!('serviceWorker' in navigator)) return;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { lang } from '@/config';
|
||||
import { lang } from '@/config.js';
|
||||
|
||||
export const versatileLang = (lang ?? 'ja-JP').replace('ja-KS', 'ja-JP');
|
||||
export const dateTimeFormat = new Intl.DateTimeFormat(versatileLang, {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
*/
|
||||
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { $i } from '@/account';
|
||||
import { $i } from '@/account.js';
|
||||
|
||||
export function isFfVisibleForMe(user: Misskey.entities.UserDetailed): boolean {
|
||||
if ($i && $i.id === user.id) return true;
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
*/
|
||||
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { i18n } from '@/i18n';
|
||||
import * as os from '@/os';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import * as os from '@/os.js';
|
||||
|
||||
export async function lookupUser() {
|
||||
const { canceled, result } = await os.inputText({
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import * as os from '@/os';
|
||||
import { i18n } from '@/i18n';
|
||||
import { mainRouter } from '@/router';
|
||||
import { Router } from '@/nirax';
|
||||
import * as os from '@/os.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { mainRouter } from '@/router.js';
|
||||
import { Router } from '@/nirax.js';
|
||||
|
||||
export async function lookup(router?: Router) {
|
||||
const _router = router ?? mainRouter;
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { query } from '@/scripts/url';
|
||||
import { url } from '@/config';
|
||||
import { instance } from '@/instance';
|
||||
import { query } from '@/scripts/url.js';
|
||||
import { url } from '@/config.js';
|
||||
import { instance } from '@/instance.js';
|
||||
|
||||
export function getProxiedImageUrl(imageUrl: string, type?: 'preview' | 'emoji' | 'avatar', mustOrigin = false, noFallback = false): string {
|
||||
const localProxy = `${url}/proxy`;
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@
|
|||
*/
|
||||
|
||||
import { defineAsyncComponent } from 'vue';
|
||||
import { $i } from '@/account';
|
||||
import { i18n } from '@/i18n';
|
||||
import { popup } from '@/os';
|
||||
import { $i } from '@/account.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { popup } from '@/os.js';
|
||||
|
||||
export function pleaseLogin(path?: string) {
|
||||
if ($i) return;
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { appendQuery } from './url';
|
||||
import * as config from '@/config';
|
||||
import { appendQuery } from './url.js';
|
||||
import * as config from '@/config.js';
|
||||
|
||||
export function popout(path: string, w?: HTMLElement) {
|
||||
let url = path.startsWith('http://') || path.startsWith('https://') ? path : config.url + path;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
*/
|
||||
|
||||
import { defineAsyncComponent, Ref, ref } from 'vue';
|
||||
import { popup } from '@/os';
|
||||
import { popup } from '@/os.js';
|
||||
|
||||
class ReactionPicker {
|
||||
private src: Ref<HTMLElement | null> = ref(null);
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@
|
|||
|
||||
import { ref } from 'vue';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import * as os from '@/os';
|
||||
import { useStream } from '@/stream';
|
||||
import { i18n } from '@/i18n';
|
||||
import { defaultStore } from '@/store';
|
||||
import { uploadFile } from '@/scripts/upload';
|
||||
import * as os from '@/os.js';
|
||||
import { useStream } from '@/stream.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { defaultStore } from '@/store.js';
|
||||
import { uploadFile } from '@/scripts/upload.js';
|
||||
|
||||
export function chooseFileFromPc(multiple: boolean, keepOriginal = false): Promise<Misskey.entities.DriveFile[]> {
|
||||
return new Promise((res, rej) => {
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import * as os from '@/os';
|
||||
import { $i } from '@/account';
|
||||
import { i18n } from '@/i18n';
|
||||
import * as os from '@/os.js';
|
||||
import { $i } from '@/account.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
|
||||
export function showMovedDialog() {
|
||||
if (!$i) return;
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import * as os from '@/os';
|
||||
import { i18n } from '@/i18n';
|
||||
import * as os from '@/os.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
|
||||
export function showSuspendedDialog() {
|
||||
return os.alert({
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
*/
|
||||
|
||||
import { markRaw } from 'vue';
|
||||
import { Storage } from '@/pizzax';
|
||||
import { Storage } from '@/pizzax.js';
|
||||
|
||||
export const soundConfigStore = markRaw(new Storage('sound', {
|
||||
mediaVolume: {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
import { v4 as uuid } from 'uuid';
|
||||
|
||||
import { themeProps, Theme } from './theme';
|
||||
import { themeProps, Theme } from './theme.js';
|
||||
|
||||
export type Default = null;
|
||||
export type Color = string;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ export type Theme = {
|
|||
import lightTheme from '@/themes/_light.json5';
|
||||
import darkTheme from '@/themes/_dark.json5';
|
||||
import { deepClone } from './clone';
|
||||
import { miLocalStorage } from '@/local-storage';
|
||||
import { miLocalStorage } from '@/local-storage.js';
|
||||
|
||||
export const themeProps = Object.keys(lightTheme.props).filter(key => !key.startsWith('X'));
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { deviceKind } from '@/scripts/device-kind';
|
||||
import { deviceKind } from '@/scripts/device-kind.js';
|
||||
|
||||
const isTouchSupported = 'maxTouchPoints' in navigator && navigator.maxTouchPoints > 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -6,12 +6,12 @@
|
|||
import { reactive, ref } from 'vue';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { readAndCompressImage } from 'browser-image-resizer';
|
||||
import { getCompressionConfig } from './upload/compress-config';
|
||||
import { defaultStore } from '@/store';
|
||||
import { apiUrl } from '@/config';
|
||||
import { $i } from '@/account';
|
||||
import { alert } from '@/os';
|
||||
import { i18n } from '@/i18n';
|
||||
import { getCompressionConfig } from './upload/compress-config.js';
|
||||
import { defaultStore } from '@/store.js';
|
||||
import { apiUrl } from '@/config.js';
|
||||
import { $i } from '@/account.js';
|
||||
import { alert } from '@/os.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
|
||||
type Uploading = {
|
||||
id: string;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
*/
|
||||
|
||||
import { onUnmounted, onDeactivated, ref } from 'vue';
|
||||
import * as os from '@/os';
|
||||
import * as os from '@/os.js';
|
||||
import MkChartTooltip from '@/components/MkChartTooltip.vue';
|
||||
|
||||
export function useChartTooltip(opts: { position: 'top' | 'middle' } = { position: 'top' }) {
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
|
||||
import { onUnmounted, Ref } from 'vue';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { useStream } from '@/stream';
|
||||
import { $i } from '@/account';
|
||||
import { useStream } from '@/stream.js';
|
||||
import { $i } from '@/account.js';
|
||||
|
||||
export function useNoteCapture(props: {
|
||||
rootEl: Ref<HTMLElement>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue