Simplify import paths again

This commit is contained in:
redphx
2024-05-01 22:14:28 +07:00
parent 0114108bdf
commit 06c6b8c5af
36 changed files with 190 additions and 186 deletions

View File

@@ -1,5 +1,5 @@
import { t } from "@/utils/translation";
import { CE, createButton, ButtonStyle, Icon } from "@/utils/html";
import { t } from "@utils/translation";
import { CE, createButton, ButtonStyle, Icon } from "@utils/html";
type DialogOptions = {
title?: string;

View File

@@ -1,8 +1,8 @@
import { CE } from "@/utils/html";
import { getPreferredServerRegion } from "@/utils/region";
import { PrefKey, getPref } from "@/utils/preferences";
import { t } from "@/utils/translation";
import { STATES } from "@/utils/global";
import { CE } from "@utils/html";
import { getPreferredServerRegion } from "@utils/region";
import { PrefKey, getPref } from "@utils/preferences";
import { t } from "@utils/translation";
import { STATES } from "@utils/global";
export class LoadingScreen {
static #$bgStyle: HTMLElement;

View File

@@ -1,17 +1,17 @@
import { MkbPreset } from "./mkb-preset";
import { GamepadKey, MkbPresetKey, GamepadStick, MouseMapTo } from "./definitions";
import { createButton, Icon, ButtonStyle, CE } from "@/utils/html";
import { BxEvent } from "@/utils/bx-event";
import { PrefKey, getPref } from "@/utils/preferences";
import { Toast } from "@/utils/toast";
import { t } from "@/utils/translation";
import { LocalDb } from "@/utils/local-db";
import { createButton, Icon, ButtonStyle, CE } from "@utils/html";
import { BxEvent } from "@utils/bx-event";
import { PrefKey, getPref } from "@utils/preferences";
import { Toast } from "@utils/toast";
import { t } from "@utils/translation";
import { LocalDb } from "@utils/local-db";
import { KeyHelper } from "./key-helper";
import type { MkbStoredPreset } from "@/types/mkb";
import { showStreamSettings } from "@/modules/stream/stream-ui";
import { STATES } from "@/utils/global";
import { UserAgent } from "@/utils/user-agent";
import { BxLogger } from "@/utils/bx-logger";
import { showStreamSettings } from "@modules/stream/stream-ui";
import { STATES } from "@utils/global";
import { UserAgent } from "@utils/user-agent";
import { BxLogger } from "@utils/bx-logger";
const LOG_TAG = 'MkbHandler';

View File

@@ -1,5 +1,5 @@
import { t } from "@/utils/translation";
import { SettingElementType } from "@/utils/settings";
import { t } from "@utils/translation";
import { SettingElementType } from "@utils/settings";
import { GamepadKey, MouseButtonCode, MouseMapTo, MkbPresetKey } from "./definitions";
import { MkbHandler } from "./mkb-handler";
import type { MkbPresetData, MkbConvertedPresetData } from "@/types/mkb";

View File

@@ -1,15 +1,15 @@
import { GamepadKey } from "./definitions";
import { CE, createButton, ButtonStyle } from "@/utils/html";
import { t } from "@/utils/translation";
import { Dialog } from "@/modules/dialog";
import { getPref, setPref, PrefKey } from "@/utils/preferences";
import { CE, createButton, ButtonStyle } from "@utils/html";
import { t } from "@utils/translation";
import { Dialog } from "@modules/dialog";
import { getPref, setPref, PrefKey } from "@utils/preferences";
import { MkbPresetKey, GamepadKeyName } from "./definitions";
import { KeyHelper } from "./key-helper";
import { MkbPreset } from "./mkb-preset";
import { MkbHandler } from "./mkb-handler";
import { LocalDb } from "@/utils/local-db";
import { Icon } from "@/utils/html";
import { SettingElement } from "@/utils/settings";
import { LocalDb } from "@utils/local-db";
import { Icon } from "@utils/html";
import { SettingElement } from "@utils/settings";
import type { MkbPresetData, MkbStoredPresets } from "@/types/mkb";

View File

@@ -1,8 +1,8 @@
import { STATES } from "@/utils/global";
import { BX_FLAGS } from "@/utils/bx-flags";
import { getPref, PrefKey } from "@/utils/preferences";
import { VibrationManager } from "@/modules/vibration-manager";
import { BxLogger } from "@/utils/bx-logger";
import { STATES } from "@utils/global";
import { BX_FLAGS } from "@utils/bx-flags";
import { getPref, PrefKey } from "@utils/preferences";
import { VibrationManager } from "@modules/vibration-manager";
import { BxLogger } from "@utils/bx-logger";
const LOG_TAG = 'Patcher';

View File

@@ -1,11 +1,11 @@
import { STATES, AppInterface } from "@/utils/global";
import { CE, createButton, ButtonStyle, Icon } from "@/utils/html";
import { Toast } from "@/utils/toast";
import { BxEvent } from "@/utils/bx-event";
import { getPref, PrefKey, setPref } from "@/utils/preferences";
import { t } from "@/utils/translation";
import { localRedirect } from "@/modules/ui/ui";
import { BxLogger } from "@/utils/bx-logger";
import { STATES, AppInterface } from "@utils/global";
import { CE, createButton, ButtonStyle, Icon } from "@utils/html";
import { Toast } from "@utils/toast";
import { BxEvent } from "@utils/bx-event";
import { getPref, PrefKey, setPref } from "@utils/preferences";
import { t } from "@utils/translation";
import { localRedirect } from "@modules/ui/ui";
import { BxLogger } from "@utils/bx-logger";
const LOG_TAG = 'RemotePlay';

View File

@@ -1,5 +1,5 @@
import { STATES, AppInterface } from "@/utils/global";
import { CE } from "@/utils/html";
import { STATES, AppInterface } from "@utils/global";
import { CE } from "@utils/html";
export function takeScreenshot(callback: any) {
const currentStream = STATES.currentStream!;

View File

@@ -1,7 +1,7 @@
import { t } from "@/utils/translation";
import { BxEvent } from "@/utils/bx-event";
import { CE } from "@/utils/html";
import { STATES } from "@/utils/global";
import { t } from "@utils/translation";
import { BxEvent } from "@utils/bx-event";
import { CE } from "@utils/html";
import { STATES } from "@utils/global";
enum StreamBadge {
PLAYTIME = 'playtime',

View File

@@ -1,11 +1,11 @@
import { PrefKey } from "@/utils/preferences"
import { BxEvent } from "@/utils/bx-event"
import { getPref } from "@/utils/preferences"
import { PrefKey } from "@utils/preferences"
import { BxEvent } from "@utils/bx-event"
import { getPref } from "@utils/preferences"
import { StreamBadges } from "./stream-badges"
import { CE } from "@/utils/html"
import { t } from "@/utils/translation"
import { STATES } from "@/utils/global"
import { BxLogger } from "@/utils/bx-logger"
import { CE } from "@utils/html"
import { t } from "@utils/translation"
import { STATES } from "@utils/global"
import { BxLogger } from "@utils/bx-logger"
export enum StreamStat {
PING = 'ping',

View File

@@ -1,8 +1,8 @@
import { STATES } from "@/utils/global.ts";
import { Icon, createSvgIcon } from "@/utils/html.ts";
import { BxEvent } from "@/utils/bx-event.ts";
import { PrefKey, getPref } from "@/utils/preferences.ts";
import { t } from "@/utils/translation.ts";
import { STATES } from "@utils/global.ts";
import { Icon, createSvgIcon } from "@utils/html.ts";
import { BxEvent } from "@utils/bx-event.ts";
import { PrefKey, getPref } from "@utils/preferences.ts";
import { t } from "@utils/translation.ts";
import { StreamBadges } from "./stream-badges.ts";
import { StreamStats } from "./stream-stats.ts";

View File

@@ -1,12 +1,12 @@
import { STATES } from "@/utils/global";
import { CE } from "@/utils/html";
import { Toast } from "@/utils/toast";
import { BxEvent } from "@/utils/bx-event";
import { BX_FLAGS } from "@/utils/bx-flags";
import { getPref, PrefKey } from "@/utils/preferences";
import { t } from "@/utils/translation";
import { NATIVE_FETCH } from "@/utils/network";
import { BxLogger } from "@/utils/bx-logger";
import { STATES } from "@utils/global";
import { CE } from "@utils/html";
import { Toast } from "@utils/toast";
import { BxEvent } from "@utils/bx-event";
import { BX_FLAGS } from "@utils/bx-flags";
import { getPref, PrefKey } from "@utils/preferences";
import { t } from "@utils/translation";
import { NATIVE_FETCH } from "@utils/network";
import { BxLogger } from "@utils/bx-logger";
const LOG_TAG = 'TouchController';

View File

@@ -1,9 +1,9 @@
import { STATES, AppInterface, SCRIPT_HOME, SCRIPT_VERSION } from "@/utils/global";
import { CE, createButton, Icon, ButtonStyle } from "@/utils/html";
import { getPreferredServerRegion } from "@/utils/region";
import { UserAgent, UserAgentProfile } from "@/utils/user-agent";
import { getPref, Preferences, PrefKey, setPref, toPrefElement } from "@/utils/preferences";
import { t, refreshCurrentLocale } from "@/utils/translation";
import { STATES, AppInterface, SCRIPT_HOME, SCRIPT_VERSION } from "@utils/global";
import { CE, createButton, Icon, ButtonStyle } from "@utils/html";
import { getPreferredServerRegion } from "@utils/region";
import { UserAgent, UserAgentProfile } from "@utils/user-agent";
import { getPref, Preferences, PrefKey, setPref, toPrefElement } from "@utils/preferences";
import { t, refreshCurrentLocale } from "@utils/translation";
const SETTINGS_UI = {
'Better xCloud': {

View File

@@ -1,9 +1,9 @@
import { SCRIPT_VERSION } from "@/utils/global";
import { createButton, Icon, ButtonStyle } from "@/utils/html";
import { getPreferredServerRegion } from "@/utils/region";
import { PrefKey, getPref } from "@/utils/preferences";
import { RemotePlay } from "@/modules/remote-play";
import { t } from "@/utils/translation";
import { SCRIPT_VERSION } from "@utils/global";
import { createButton, Icon, ButtonStyle } from "@utils/html";
import { getPreferredServerRegion } from "@utils/region";
import { PrefKey, getPref } from "@utils/preferences";
import { RemotePlay } from "@modules/remote-play";
import { t } from "@utils/translation";
import { setupSettingsUi } from "./global-settings";

View File

@@ -1,14 +1,14 @@
import { STATES } from "@/utils/global";
import { Icon, CE, createButton, ButtonStyle, createSvgIcon } from "@/utils/html";
import { UserAgent } from "@/utils/user-agent";
import { BxEvent } from "@/utils/bx-event";
import { MkbRemapper } from "@/modules/mkb/mkb-remapper";
import { getPref, PrefKey, toPrefElement } from "@/utils/preferences";
import { setupScreenshotButton } from "@/modules/screenshot";
import { StreamStats } from "@/modules/stream/stream-stats";
import { TouchController } from "@/modules/touch-controller";
import { t } from "@/utils/translation";
import { VibrationManager } from "@/modules/vibration-manager";
import { STATES } from "@utils/global";
import { Icon, CE, createButton, ButtonStyle, createSvgIcon } from "@utils/html";
import { UserAgent } from "@utils/user-agent";
import { BxEvent } from "@utils/bx-event";
import { MkbRemapper } from "@modules/mkb/mkb-remapper";
import { getPref, PrefKey, toPrefElement } from "@utils/preferences";
import { setupScreenshotButton } from "@modules/screenshot";
import { StreamStats } from "@modules/stream/stream-stats";
import { TouchController } from "@modules/touch-controller";
import { t } from "@utils/translation";
import { VibrationManager } from "@modules/vibration-manager";
export function localRedirect(path: string) {

View File

@@ -1,6 +1,6 @@
import { AppInterface } from "@/utils/global";
import { BxEvent } from "@/utils/bx-event";
import { PrefKey, getPref } from "@/utils/preferences";
import { AppInterface } from "@utils/global";
import { BxEvent } from "@utils/bx-event";
import { PrefKey, getPref } from "@utils/preferences";
const VIBRATION_DATA_MAP = {
'gamepadIndex': 8,