nicolium: use @ imports when they save a char

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
nicole mikołajczyk
2026-02-27 00:30:24 +01:00
parent cc2511cd0a
commit 0c5b15ec7b
21 changed files with 47 additions and 62 deletions

View File

@ -1,4 +1,4 @@
import { getClient } from '../api';
import { getClient } from '@/api';
import type { NormalizedStatus } from '@/reducers/statuses';
import type { AppDispatch, RootState } from '@/store';

View File

@ -1,12 +1,11 @@
import { importEntities } from '@/actions/importer';
import { getClient } from '@/api';
import { queryClient } from '@/queries/client';
import { queryKeys } from '@/queries/keys';
import { useComposeStore } from '@/stores/compose';
import { useModalsStore } from '@/stores/modals';
import { filterBadges, getTagDiff } from '@/utils/badges';
import { getClient } from '../api';
import { STATUS_FETCH_SOURCE_FAIL, type StatusesAction } from './statuses';
import { deleteFromTimelines } from './timelines';

View File

@ -22,6 +22,7 @@ import { createAccount } from '@/actions/accounts';
import { createApp } from '@/actions/apps';
import { fetchMeSuccess, fetchMeFail } from '@/actions/me';
import { obtainOAuthToken, revokeOAuthToken } from '@/actions/oauth';
import { type PlfeResponse, getClient } from '@/api';
import * as BuildConfig from '@/build-config';
import { selectAccount } from '@/queries/accounts/selectors';
import { queryClient } from '@/queries/client';
@ -35,8 +36,6 @@ import { normalizeUsername } from '@/utils/input';
import { getScopes } from '@/utils/scopes';
import { isStandalone } from '@/utils/state';
import { type PlfeResponse, getClient } from '../api';
import type { AppDispatch, RootState } from '@/store';
const SWITCH_ACCOUNT = 'SWITCH_ACCOUNT' as const;

View File

@ -1,12 +1,11 @@
import { defineMessages, type IntlShape } from 'react-intl';
import { getClient } from '@/api';
import { useSettingsStore } from '@/stores/settings';
import toast from '@/toast';
import { isLoggedIn } from '@/utils/auth';
import { supportsEmojiReacts } from '@/utils/check-instance-capability';
import { getClient } from '../api';
import { importEntities } from './importer';
import type { AppDispatch, RootState } from '@/store';

View File

@ -2,12 +2,11 @@ import { createSelector } from 'reselect';
import * as v from 'valibot';
import { getHost } from '@/actions/instance';
import { getClient, staticFetch } from '@/api';
import { frontendConfigSchema } from '@/schemas/frontend-config';
import KVStore from '@/storage/kv-store';
import { useSettingsStore } from '@/stores/settings';
import { getClient, staticFetch } from '../api';
import type { AppDispatch, RootState } from '@/store';
import type { APIEntity } from '@/types/entities';

View File

@ -1,8 +1,7 @@
import { getClient, staticFetch } from '@/api';
import { useComposeStore } from '@/stores/compose';
import { getAuthUserUrl, getMeUrl } from '@/utils/auth';
import { getClient, staticFetch } from '../api';
import type { AppDispatch, RootState } from '@/store';
import type { Instance } from 'pl-api';

View File

@ -1,3 +1,4 @@
import { getClient } from '@/api';
import { selectAccount } from '@/queries/accounts/selectors';
import { queryClient } from '@/queries/client';
import { queryKeys } from '@/queries/keys';
@ -7,8 +8,6 @@ import { useComposeStore } from '@/stores/compose';
import { useSettingsStore } from '@/stores/settings';
import { getAuthUserId, getAuthUserUrl } from '@/utils/auth';
import { getClient } from '../api';
import { loadCredentials } from './auth';
import { FE_NAME } from './settings';

View File

@ -1,13 +1,12 @@
import { defineMessages, type IntlShape } from 'react-intl';
import { getClient } from '@/api';
import { useSettingsStore } from '@/stores/settings';
import toast from '@/toast';
import { isLoggedIn } from '@/utils/auth';
import { formatBytes, getVideoDuration } from '@/utils/media';
import resizeImage from '@/utils/resize-image';
import { getClient } from '../api';
import type { AppDispatch, RootState } from '@/store';
import type { MediaAttachment, UpdateMediaParams, UploadMediaParams } from 'pl-api';

View File

@ -1,4 +1,4 @@
import { getClient } from '../api';
import { getClient } from '@/api';
import type { AppDispatch, RootState } from '@/store';
import type { CreatePushNotificationsSubscriptionParams } from 'pl-api';

View File

@ -1,7 +1,6 @@
import { getClient } from '@/api';
import { useModalsStore } from '@/stores/modals';
import { getClient } from '../api';
import type { NormalizedStatus as Status } from '@/reducers/statuses';
import type { AppDispatch, RootState } from '@/store';
import type { Account } from 'pl-api';

View File

@ -1,3 +1,4 @@
import { getClient } from '@/api';
import { queryClient } from '@/queries/client';
import { queryKeys } from '@/queries/keys';
import { scheduledStatusesQueryOptions } from '@/queries/statuses/scheduled-statuses';
@ -9,8 +10,6 @@ import { useSettingsStore } from '@/stores/settings';
import { isLoggedIn } from '@/utils/auth';
import { shouldHaveCard } from '@/utils/status';
import { getClient } from '../api';
import { importEntities } from './importer';
import { deleteFromTimelines } from './timelines';

View File

@ -1,12 +1,11 @@
import { getLocale } from '@/actions/settings';
import { getClient } from '@/api';
import { useComposeStore } from '@/stores/compose';
import { useContextStore } from '@/stores/contexts';
import { usePendingStatusesStore } from '@/stores/pending-statuses';
import { useSettingsStore } from '@/stores/settings';
import { shouldFilter } from '@/utils/timelines';
import { getClient } from '../api';
import { importEntities } from './importer';
import type { AppDispatch, RootState } from '@/store';

View File

@ -6,8 +6,7 @@ import { Sparklines, SparklinesCurve } from 'react-sparklines';
import HStack from '@/components/ui/hstack';
import Stack from '@/components/ui/stack';
import Text from '@/components/ui/text';
import { shortNumberFormat } from '../utils/numbers';
import { shortNumberFormat } from '@/utils/numbers';
import type { Tag } from 'pl-api';

View File

@ -3,12 +3,11 @@ import React from 'react';
import { HelmetProvider } from 'react-helmet-async';
import { Provider } from 'react-redux';
import { preload } from '@/actions/preload';
import { DefaultCurrentAccountProvider } from '@/contexts/current-account-context';
import { StatProvider } from '@/contexts/stat-context';
import { queryClient } from '@/queries/client';
import { preload } from '../actions/preload';
import { store } from '../store';
import { store } from '@/store';
import NicoliumHead from './nicolium-head';
import NicoliumLoad from './nicolium-load';

View File

@ -12,6 +12,17 @@ import {
} from 'pl-api';
import * as v from 'valibot';
import {
AUTH_APP_CREATED,
AUTH_LOGGED_IN,
AUTH_APP_AUTHORIZED,
AUTH_LOGGED_OUT,
SWITCH_ACCOUNT,
VERIFY_CREDENTIALS_SUCCESS,
VERIFY_CREDENTIALS_FAIL,
type AuthAction,
} from '@/actions/auth';
import { ME_FETCH_SKIP, type MeAction } from '@/actions/me';
import {
decodeFromMarkup,
MASTODON_PRELOAD_IMPORT,
@ -23,18 +34,6 @@ import { coerceObject } from '@/schemas/utils';
import KVStore from '@/storage/kv-store';
import { validId, isURL, parseBaseURL } from '@/utils/auth';
import {
AUTH_APP_CREATED,
AUTH_LOGGED_IN,
AUTH_APP_AUTHORIZED,
AUTH_LOGGED_OUT,
SWITCH_ACCOUNT,
VERIFY_CREDENTIALS_SUCCESS,
VERIFY_CREDENTIALS_FAIL,
type AuthAction,
} from '../actions/auth';
import { ME_FETCH_SKIP, type MeAction } from '../actions/me';
import type { PlfeResponse } from '@/api';
const instance = (() => {

View File

@ -1,4 +1,4 @@
import { FILTERS_FETCH_SUCCESS, type FiltersAction } from '../actions/filters';
import { FILTERS_FETCH_SUCCESS, type FiltersAction } from '@/actions/filters';
import type { Filter } from 'pl-api';

View File

@ -1,13 +1,12 @@
import { PLEROMA_PRELOAD_IMPORT } from '@/actions/preload';
import KVStore from '@/storage/kv-store';
import ConfigDB from '@/utils/config-db';
import { ADMIN_CONFIG_UPDATE_SUCCESS } from '../actions/admin';
import { ADMIN_CONFIG_UPDATE_SUCCESS } from '@/actions/admin';
import {
FRONTEND_CONFIG_REMEMBER_SUCCESS,
FRONTEND_CONFIG_REQUEST_SUCCESS,
FRONTEND_CONFIG_REQUEST_FAIL,
} from '../actions/frontend-config';
} from '@/actions/frontend-config';
import { PLEROMA_PRELOAD_IMPORT } from '@/actions/preload';
import KVStore from '@/storage/kv-store';
import ConfigDB from '@/utils/config-db';
import type { FrontendConfig } from '@/schemas/frontend-config';
import type { PleromaConfig } from 'pl-api';

View File

@ -3,14 +3,14 @@ import {
AUTH_ACCOUNT_REMEMBER_SUCCESS,
VERIFY_CREDENTIALS_SUCCESS,
type AuthAction,
} from '../actions/auth';
} from '@/actions/auth';
import {
ME_FETCH_SUCCESS,
ME_FETCH_FAIL,
ME_FETCH_SKIP,
ME_PATCH_SUCCESS,
type MeAction,
} from '../actions/me';
} from '@/actions/me';
import type { PlfeResponse } from '@/api';

View File

@ -4,7 +4,7 @@ import {
SET_BROWSER_SUPPORT,
SET_SUBSCRIPTION,
CLEAR_SUBSCRIPTION,
} from '../actions/push-notifications/setter';
} from '@/actions/push-notifications/setter';
import type { SetterAction } from '@/actions/push-notifications/setter';

View File

@ -8,23 +8,20 @@ import {
} from 'pl-api';
import * as v from 'valibot';
import { simulateEmojiReact, simulateUnEmojiReact } from '@/utils/emoji-reacts';
import { unescapeHTML } from '@/utils/html';
import {
EMOJI_REACT_FAIL,
EMOJI_REACT_REQUEST,
UNEMOJI_REACT_REQUEST,
type EmojiReactsAction,
} from '../actions/emoji-reacts';
} from '@/actions/emoji-reacts';
import {
EVENT_JOIN_REQUEST,
EVENT_JOIN_FAIL,
EVENT_LEAVE_REQUEST,
EVENT_LEAVE_FAIL,
type EventsAction,
} from '../actions/events';
import { STATUS_IMPORT, STATUSES_IMPORT, type ImporterAction } from '../actions/importer';
} from '@/actions/events';
import { STATUS_IMPORT, STATUSES_IMPORT, type ImporterAction } from '@/actions/importer';
import {
REBLOG_REQUEST,
REBLOG_FAIL,
@ -37,7 +34,7 @@ import {
UNDISLIKE_REQUEST,
DISLIKE_FAIL,
type InteractionsAction,
} from '../actions/interactions';
} from '@/actions/interactions';
import {
STATUS_CREATE_REQUEST,
STATUS_CREATE_FAIL,
@ -48,8 +45,10 @@ import {
STATUS_UNMUTE_SUCCESS,
type StatusesAction,
STATUS_DELETE_SUCCESS,
} from '../actions/statuses';
import { TIMELINE_DELETE, type TimelineAction } from '../actions/timelines';
} from '@/actions/statuses';
import { TIMELINE_DELETE, type TimelineAction } from '@/actions/timelines';
import { simulateEmojiReact, simulateUnEmojiReact } from '@/utils/emoji-reacts';
import { unescapeHTML } from '@/utils/html';
const domParser = new DOMParser();

View File

@ -4,13 +4,13 @@ import {
ACCOUNT_BLOCK_SUCCESS,
ACCOUNT_MUTE_SUCCESS,
type AccountsAction,
} from '../actions/accounts';
import { PIN_SUCCESS, UNPIN_SUCCESS, type InteractionsAction } from '../actions/interactions';
} from '@/actions/accounts';
import { PIN_SUCCESS, UNPIN_SUCCESS, type InteractionsAction } from '@/actions/interactions';
import {
STATUS_CREATE_REQUEST,
STATUS_CREATE_SUCCESS,
type StatusesAction,
} from '../actions/statuses';
} from '@/actions/statuses';
import {
TIMELINE_UPDATE,
TIMELINE_DELETE,
@ -23,7 +23,7 @@ import {
MAX_QUEUED_ITEMS,
TIMELINE_SCROLL_TOP,
type TimelineAction,
} from '../actions/timelines';
} from '@/actions/timelines';
import type { NormalizedStatus as Status } from '@/reducers/statuses';
import type {