mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-08-02 11:26:46 +02:00
Simplify import paths again
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { AppInterface } from "./global";
|
||||
import { AppInterface } from "@utils/global";
|
||||
|
||||
export enum BxEvent {
|
||||
JUMP_BACK_IN_READY = 'bx-jump-back-in-ready',
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { BxEvent } from "./bx-event";
|
||||
import { STATES } from "./global";
|
||||
import { getPref, PrefKey } from "./preferences";
|
||||
import { UserAgent } from "./user-agent";
|
||||
import { BxEvent } from "@utils/bx-event";
|
||||
import { STATES } from "@utils/global";
|
||||
import { getPref, PrefKey } from "@utils/preferences";
|
||||
import { UserAgent } from "@utils/user-agent";
|
||||
|
||||
enum InputType {
|
||||
CONTROLLER = 'Controller',
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { CE } from "./html";
|
||||
import { PrefKey, getPref } from "./preferences";
|
||||
import { renderStylus } from "@/macros/build" with {type: "macro"};
|
||||
import { CE } from "@utils/html";
|
||||
import { PrefKey, getPref } from "@utils/preferences";
|
||||
import { renderStylus } from "@macros/build" with {type: "macro"};
|
||||
|
||||
|
||||
export function addCss() {
|
||||
|
@@ -1,8 +1,8 @@
|
||||
import { MkbHandler } from "@/modules/mkb/mkb-handler";
|
||||
import { PrefKey, getPref } from "./preferences";
|
||||
import { t } from "./translation";
|
||||
import { Toast } from "./toast";
|
||||
import { BxLogger } from "./bx-logger";
|
||||
import { MkbHandler } from "@modules/mkb/mkb-handler";
|
||||
import { PrefKey, getPref } from "@utils/preferences";
|
||||
import { t } from "@utils/translation";
|
||||
import { Toast } from "@utils/toast";
|
||||
import { BxLogger } from "@utils/bx-logger";
|
||||
|
||||
// Show a toast when connecting/disconecting controller
|
||||
export function showGamepadToast(gamepad: Gamepad) {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { BxEvent } from "./bx-event";
|
||||
import { LoadingScreen } from "@/modules/loading-screen";
|
||||
import { RemotePlay } from "@/modules/remote-play";
|
||||
import { checkHeader } from "@/modules/ui/header";
|
||||
import { BxEvent } from "@utils/bx-event";
|
||||
import { LoadingScreen } from "@modules/loading-screen";
|
||||
import { RemotePlay } from "@modules/remote-play";
|
||||
import { checkHeader } from "@modules/ui/header";
|
||||
|
||||
export function patchHistoryMethod(type: 'pushState' | 'replaceState') {
|
||||
const orig = window.history[type];
|
||||
|
@@ -1,27 +1,27 @@
|
||||
// @ts-ignore
|
||||
import iconController from "@/assets/svg/controller.svg" with { type: "text" };
|
||||
import iconController from "@assets/svg/controller.svg" with { type: "text" };
|
||||
// @ts-ignore
|
||||
import iconCopy from "@/assets/svg/copy.svg" with { type: "text" };
|
||||
import iconCopy from "@assets/svg/copy.svg" with { type: "text" };
|
||||
// @ts-ignore
|
||||
import iconCursorText from "@/assets/svg/cursor-text.svg" with { type: "text" };
|
||||
import iconCursorText from "@assets/svg/cursor-text.svg" with { type: "text" };
|
||||
// @ts-ignore
|
||||
import iconDisplay from "@/assets/svg/display.svg" with { type: "text" };
|
||||
import iconDisplay from "@assets/svg/display.svg" with { type: "text" };
|
||||
// @ts-ignore
|
||||
import iconMouseSettings from "@/assets/svg/mouse-settings.svg" with { type: "text" };
|
||||
import iconMouseSettings from "@assets/svg/mouse-settings.svg" with { type: "text" };
|
||||
// @ts-ignore
|
||||
import iconMouse from "@/assets/svg/mouse.svg" with { type: "text" };
|
||||
import iconMouse from "@assets/svg/mouse.svg" with { type: "text" };
|
||||
// @ts-ignore
|
||||
import iconNew from "@/assets/svg/new.svg" with { type: "text" };
|
||||
import iconNew from "@assets/svg/new.svg" with { type: "text" };
|
||||
// @ts-ignore
|
||||
import iconQuestion from "@/assets/svg/question.svg" with { type: "text" };
|
||||
import iconQuestion from "@assets/svg/question.svg" with { type: "text" };
|
||||
// @ts-ignore
|
||||
import iconRemotePlay from "@/assets/svg/remote-play.svg" with { type: "text" };
|
||||
import iconRemotePlay from "@assets/svg/remote-play.svg" with { type: "text" };
|
||||
// @ts-ignore
|
||||
import iconStreamSettings from "@/assets/svg/stream-settings.svg" with { type: "text" };
|
||||
import iconStreamSettings from "@assets/svg/stream-settings.svg" with { type: "text" };
|
||||
// @ts-ignore
|
||||
import iconStreamStats from "@/assets/svg/stream-stats.svg" with { type: "text" };
|
||||
import iconStreamStats from "@assets/svg/stream-stats.svg" with { type: "text" };
|
||||
// @ts-ignore
|
||||
import iconTrash from "@/assets/svg/trash.svg" with { type: "text" };
|
||||
import iconTrash from "@assets/svg/trash.svg" with { type: "text" };
|
||||
|
||||
|
||||
type BxButton = {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { MkbPreset } from "@/modules/mkb/mkb-preset";
|
||||
import { PrefKey, setPref } from "./preferences";
|
||||
import { t } from "./translation";
|
||||
import { MkbPreset } from "@modules/mkb/mkb-preset";
|
||||
import { PrefKey, setPref } from "@utils/preferences";
|
||||
import { t } from "@utils/translation";
|
||||
import type { MkbStoredPreset, MkbStoredPresets } from "@/types/mkb";
|
||||
|
||||
export class LocalDb {
|
||||
|
@@ -1,8 +1,8 @@
|
||||
import { BxEvent } from "./bx-event";
|
||||
import { getPref, PrefKey } from "./preferences";
|
||||
import { STATES } from "./global";
|
||||
import { UserAgent } from "./user-agent";
|
||||
import { BxLogger } from "./bx-logger";
|
||||
import { BxEvent } from "@utils/bx-event";
|
||||
import { getPref, PrefKey } from "@utils/preferences";
|
||||
import { STATES } from "@utils/global";
|
||||
import { UserAgent } from "@utils/user-agent";
|
||||
import { BxLogger } from "@utils/bx-logger";
|
||||
|
||||
export function patchVideoApi() {
|
||||
const PREF_SKIP_SPLASH_VIDEO = getPref(PrefKey.SKIP_SPLASH_VIDEO);
|
||||
|
@@ -1,12 +1,12 @@
|
||||
import { BxEvent } from "@/utils/bx-event";
|
||||
import { BX_FLAGS } from "@/utils/bx-flags";
|
||||
import { LoadingScreen } from "@/modules/loading-screen";
|
||||
import { PrefKey, getPref } from "@/utils/preferences";
|
||||
import { RemotePlay } from "@/modules/remote-play";
|
||||
import { StreamBadges } from "@/modules/stream/stream-badges";
|
||||
import { TouchController } from "@/modules/touch-controller";
|
||||
import { STATES } from "@/utils/global";
|
||||
import { getPreferredServerRegion } from "@/utils/region";
|
||||
import { BxEvent } from "@utils/bx-event";
|
||||
import { BX_FLAGS } from "@utils/bx-flags";
|
||||
import { LoadingScreen } from "@modules/loading-screen";
|
||||
import { PrefKey, getPref } from "@utils/preferences";
|
||||
import { RemotePlay } from "@modules/remote-play";
|
||||
import { StreamBadges } from "@modules/stream/stream-badges";
|
||||
import { TouchController } from "@modules/touch-controller";
|
||||
import { STATES } from "@utils/global";
|
||||
import { getPreferredServerRegion } from "@utils/region";
|
||||
|
||||
export const NATIVE_FETCH = window.fetch;
|
||||
|
||||
|
@@ -1,10 +1,10 @@
|
||||
import { CE } from "./html";
|
||||
import { SUPPORTED_LANGUAGES, t } from "./translation";
|
||||
import { SettingElement, SettingElementType } from "./settings";
|
||||
import { UserAgentProfile } from "./user-agent";
|
||||
import { StreamStat } from "@/modules/stream/stream-stats";
|
||||
import { CE } from "@utils/html";
|
||||
import { SUPPORTED_LANGUAGES, t } from "@utils/translation";
|
||||
import { SettingElement, SettingElementType } from "@utils/settings";
|
||||
import { UserAgentProfile } from "@utils/user-agent";
|
||||
import { StreamStat } from "@modules/stream/stream-stats";
|
||||
import type { PreferenceSettings } from "@/types/preferences";
|
||||
import { STATES } from "./global";
|
||||
import { STATES } from "@utils/global";
|
||||
|
||||
export enum PrefKey {
|
||||
LAST_UPDATE_CHECK = 'version_last_check',
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { getPref, PrefKey } from "./preferences";
|
||||
import { STATES } from "./global";
|
||||
import { getPref, PrefKey } from "@utils/preferences";
|
||||
import { STATES } from "@utils/global";
|
||||
|
||||
|
||||
export function getPreferredServerRegion(shortName = false) {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import type { PreferenceSetting } from "@/types/preferences";
|
||||
import { CE } from "./html";
|
||||
import { CE } from "@utils/html";
|
||||
|
||||
type MultipleOptionsParams = {
|
||||
size?: number;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { STATES } from "./global";
|
||||
import { UserAgent } from "./user-agent";
|
||||
import { STATES } from "@utils/global";
|
||||
import { UserAgent } from "@utils/user-agent";
|
||||
|
||||
|
||||
export class PreloadedState {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { CE } from "./html";
|
||||
import { CE } from "@utils/html";
|
||||
|
||||
type ToastOptions = {
|
||||
instant?: boolean;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { PrefKey, getPref } from "./preferences";
|
||||
import { PrefKey, getPref } from "@utils/preferences";
|
||||
|
||||
export enum UserAgentProfile {
|
||||
EDGE_WINDOWS = 'edge-windows',
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { PrefKey, getPref, setPref } from "./preferences";
|
||||
import { SCRIPT_VERSION } from "./global";
|
||||
import { UserAgent } from "./user-agent";
|
||||
import { PrefKey, getPref, setPref } from "@utils/preferences";
|
||||
import { SCRIPT_VERSION } from "@utils/global";
|
||||
import { UserAgent } from "@utils/user-agent";
|
||||
|
||||
export function checkForUpdate() {
|
||||
const CHECK_INTERVAL_SECONDS = 2 * 3600; // check every 2 hours
|
||||
|
Reference in New Issue
Block a user