mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 21:15:32 +09:00
refactor(imports): replace relative imports with path aliases (#2741)
This commit is contained in:
1 parent
a59b80ce11
commit
84dcf6b8a8
1834 files changed
+11601
-10725
No files matched your search
+1
-1
@@ -9,6 +9,7 @@ import {Button} from '@app/features/ui/button/Button';
|
||||
import {Switch} from '@app/features/ui/components/form/FormSwitch';
|
||||
import {Tooltip} from '@app/features/ui/tooltip/Tooltip';
|
||||
import styles from '@app/features/user/components/modals/tabs/appearance_tab/ThemeTab.module.css';
|
||||
import {ThemeButton} from '@app/features/user/components/modals/tabs/appearance_tab/theme/ThemeButton';
|
||||
import type {ThemeType} from '@fluxer/constants/src/UserConstants';
|
||||
import {ThemeTypes} from '@fluxer/constants/src/UserConstants';
|
||||
import {msg} from '@lingui/core/macro';
|
||||
@@ -17,7 +18,6 @@ import {ArrowsCounterClockwiseIcon, PaintBrushBroadIcon} from '@phosphor-icons/r
|
||||
import {observer} from 'mobx-react-lite';
|
||||
import type React from 'react';
|
||||
import {useCallback, useEffect, useMemo, useRef} from 'react';
|
||||
import {ThemeButton} from './ThemeButton';
|
||||
|
||||
const DARK_THEME_DESCRIPTOR = msg({
|
||||
message: 'Dark theme',
|
||||
|
||||
+6
-1
@@ -1,7 +1,12 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
import {
|
||||
cssColorStringToHex,
|
||||
cssColorStringToNumber,
|
||||
numberToHex,
|
||||
updateCssForVariable,
|
||||
} from '@app/features/user/components/modals/tabs/appearance_tab/theme/ThemeUtils';
|
||||
import {describe, expect, it} from 'vitest';
|
||||
import {cssColorStringToHex, cssColorStringToNumber, numberToHex, updateCssForVariable} from './ThemeUtils';
|
||||
|
||||
describe('updateCssForVariable', () => {
|
||||
it('adds a token override when the CSS is empty', () => {
|
||||
|
||||
+4
-1
@@ -1,9 +1,12 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
import Theme from '@app/features/theme/state/Theme';
|
||||
import {
|
||||
THEME_STUDIO_DARK_DEFAULT_VARIABLE_VALUES,
|
||||
THEME_STUDIO_LIGHT_DEFAULT_VARIABLE_VALUES,
|
||||
} from '@app/features/user/components/modals/tabs/appearance_tab/theme/ThemeConstants';
|
||||
import type {ThemeType} from '@fluxer/constants/src/UserConstants';
|
||||
import {ThemeTypes} from '@fluxer/constants/src/UserConstants';
|
||||
import {THEME_STUDIO_DARK_DEFAULT_VARIABLE_VALUES, THEME_STUDIO_LIGHT_DEFAULT_VARIABLE_VALUES} from './ThemeConstants';
|
||||
|
||||
export interface ThemeHydrationResult {
|
||||
systemPrefersDark: boolean;
|
||||
|
||||
+2
-2
@@ -1,6 +1,5 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
import {describe, expect, it} from 'vitest';
|
||||
import {
|
||||
assignProfileAssetUploadPatch,
|
||||
createGlobalProfileAssetRemoteState,
|
||||
@@ -13,7 +12,8 @@ import {
|
||||
type ProfileAssetRemoteState,
|
||||
selectProfileAssetCustomizationState,
|
||||
transitionProfileAssetCustomizationSnapshot,
|
||||
} from './ProfileAssetCustomizationStateMachine';
|
||||
} from '@app/features/user/components/modals/tabs/my_profile_tab/ProfileAssetCustomizationStateMachine';
|
||||
import {describe, expect, it} from 'vitest';
|
||||
|
||||
const IDENTITY = 'user-1:guild-1';
|
||||
const OTHER_IDENTITY = 'user-1:guild-2';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
import {isSettingsItemNew} from '@app/features/user/components/settings_utils/SettingsMetadata';
|
||||
import {describe, expect, it} from 'vitest';
|
||||
import {isSettingsItemNew} from './SettingsMetadata';
|
||||
|
||||
const NOW = new Date('2026-06-04T12:00:00.000Z');
|
||||
|
||||
|
||||
+4
-4
@@ -1,9 +1,7 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
import {STICKERS_DESCRIPTOR} from '@app/features/i18n/utils/CommonMessageDescriptors';
|
||||
import {VOICE_CALL_DESCRIPTOR} from '@app/features/voice/utils/VoiceMessageDescriptors';
|
||||
import {msg} from '@lingui/core/macro';
|
||||
import type {SectionDefinition} from './SectionRegistryTypes';
|
||||
import type {SectionDefinition} from '@app/features/user/components/settings_utils/section_registry/SectionRegistryTypes';
|
||||
import {
|
||||
ACCESSIBILITY_DESCRIPTOR,
|
||||
CALL_DESCRIPTOR,
|
||||
@@ -26,7 +24,9 @@ import {
|
||||
STRIKETHROUGH_DESCRIPTOR,
|
||||
TEXT_TO_SPEECH_3_DESCRIPTOR,
|
||||
TTS_DESCRIPTOR,
|
||||
} from './SharedDescriptors';
|
||||
} from '@app/features/user/components/settings_utils/section_registry/SharedDescriptors';
|
||||
import {VOICE_CALL_DESCRIPTOR} from '@app/features/voice/utils/VoiceMessageDescriptors';
|
||||
import {msg} from '@lingui/core/macro';
|
||||
|
||||
const CONTRAST_DESCRIPTOR = msg({
|
||||
message: 'Contrast',
|
||||
|
||||
+6
-3
@@ -1,10 +1,13 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
import {EMAIL_DESCRIPTOR, PASSWORD_DESCRIPTOR} from '@app/features/i18n/utils/CommonMessageDescriptors';
|
||||
import {shouldShowClaimedAccountSections} from '@app/features/user/components/settings_utils/section_registry/SectionRegistryHelpers';
|
||||
import type {SectionDefinition} from '@app/features/user/components/settings_utils/section_registry/SectionRegistryTypes';
|
||||
import {
|
||||
DELETE_DESCRIPTOR,
|
||||
REMOVE_DESCRIPTOR,
|
||||
} from '@app/features/user/components/settings_utils/section_registry/SharedDescriptors';
|
||||
import {msg} from '@lingui/core/macro';
|
||||
import {shouldShowClaimedAccountSections} from './SectionRegistryHelpers';
|
||||
import type {SectionDefinition} from './SectionRegistryTypes';
|
||||
import {DELETE_DESCRIPTOR, REMOVE_DESCRIPTOR} from './SharedDescriptors';
|
||||
|
||||
const MAIL_DESCRIPTOR = msg({
|
||||
message: 'Mail',
|
||||
|
||||
+3
-3
@@ -7,8 +7,7 @@ import {
|
||||
} from '@app/features/i18n/utils/CommonMessageDescriptors';
|
||||
import {shouldShowHdrSettings} from '@app/features/user/components/modals/tabs/appearance_tab/AppearanceTabHdrTab';
|
||||
import {shouldShowAppZoomLevel} from '@app/features/user/components/settings_utils/AppZoomLevelUtils';
|
||||
import {msg} from '@lingui/core/macro';
|
||||
import type {SectionDefinition} from './SectionRegistryTypes';
|
||||
import type {SectionDefinition} from '@app/features/user/components/settings_utils/section_registry/SectionRegistryTypes';
|
||||
import {
|
||||
CHANNEL_LIST_DESCRIPTOR,
|
||||
CHAT_INPUT_DESCRIPTOR,
|
||||
@@ -29,7 +28,8 @@ import {
|
||||
TYPING_DESCRIPTOR,
|
||||
UNREAD_DESCRIPTOR,
|
||||
VOICE_DESCRIPTOR,
|
||||
} from './SharedDescriptors';
|
||||
} from '@app/features/user/components/settings_utils/section_registry/SharedDescriptors';
|
||||
import {msg} from '@lingui/core/macro';
|
||||
|
||||
const CHOOSE_A_BASE_APPEARANCE_MANAGE_QUICK_CSS_ORGANIZE_DESCRIPTOR = msg({
|
||||
message: 'Choose a base appearance, manage quick CSS, organize saved theme files, and tune theme tokens.',
|
||||
|
||||
+5
-2
@@ -2,10 +2,13 @@
|
||||
|
||||
import {STICKERS_DESCRIPTOR} from '@app/features/i18n/utils/CommonMessageDescriptors';
|
||||
import {getPermissionTitleDescriptor} from '@app/features/permissions/utils/PermissionLabelDescriptors';
|
||||
import type {SectionDefinition} from '@app/features/user/components/settings_utils/section_registry/SectionRegistryTypes';
|
||||
import {
|
||||
EMOJI_DESCRIPTOR,
|
||||
MENTIONS_DESCRIPTOR,
|
||||
} from '@app/features/user/components/settings_utils/section_registry/SharedDescriptors';
|
||||
import {Permissions} from '@fluxer/constants/src/ChannelConstants';
|
||||
import {msg} from '@lingui/core/macro';
|
||||
import type {SectionDefinition} from './SectionRegistryTypes';
|
||||
import {EMOJI_DESCRIPTOR, MENTIONS_DESCRIPTOR} from './SharedDescriptors';
|
||||
|
||||
const REACTIONS_DESCRIPTOR = msg({
|
||||
message: 'Reactions',
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
import type {SectionDefinition} from '@app/features/user/components/settings_utils/section_registry/SectionRegistryTypes';
|
||||
import {msg} from '@lingui/core/macro';
|
||||
import type {SectionDefinition} from './SectionRegistryTypes';
|
||||
|
||||
const PROFILE_CUSTOMIZATION_DESCRIPTOR = msg({
|
||||
message: 'Profile customization',
|
||||
|
||||
+7
-7
@@ -1,12 +1,7 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
import {GENERAL_DESCRIPTOR} from '@app/features/i18n/utils/CommonMessageDescriptors';
|
||||
import {
|
||||
VOICE_DEAFEN_DESCRIPTOR,
|
||||
VOICE_DEAFEN_SOUND_DESCRIPTOR,
|
||||
} from '@app/features/voice/utils/VoiceMessageDescriptors';
|
||||
import {msg} from '@lingui/core/macro';
|
||||
import type {SectionDefinition} from './SectionRegistryTypes';
|
||||
import type {SectionDefinition} from '@app/features/user/components/settings_utils/section_registry/SectionRegistryTypes';
|
||||
import {
|
||||
ACCESSIBILITY_DESCRIPTOR,
|
||||
AUDIO_2_DESCRIPTOR,
|
||||
@@ -25,7 +20,12 @@ import {
|
||||
TTS_DESCRIPTOR,
|
||||
UNREAD_DESCRIPTOR,
|
||||
VOLUME_DESCRIPTOR,
|
||||
} from './SharedDescriptors';
|
||||
} from '@app/features/user/components/settings_utils/section_registry/SharedDescriptors';
|
||||
import {
|
||||
VOICE_DEAFEN_DESCRIPTOR,
|
||||
VOICE_DEAFEN_SOUND_DESCRIPTOR,
|
||||
} from '@app/features/voice/utils/VoiceMessageDescriptors';
|
||||
import {msg} from '@lingui/core/macro';
|
||||
|
||||
const NOTIFICATIONS_2_DESCRIPTOR = msg({
|
||||
message: 'Notifications',
|
||||
|
||||
+3
-3
@@ -6,8 +6,7 @@ import {
|
||||
FRIENDS_OF_FRIENDS_DESCRIPTOR,
|
||||
} from '@app/features/i18n/utils/CommonMessageDescriptors';
|
||||
import {ADD_FRIEND_DESCRIPTOR} from '@app/features/relationship/utils/RelationshipMessageDescriptors';
|
||||
import {msg} from '@lingui/core/macro';
|
||||
import type {SectionDefinition} from './SectionRegistryTypes';
|
||||
import type {SectionDefinition} from '@app/features/user/components/settings_utils/section_registry/SectionRegistryTypes';
|
||||
import {
|
||||
DELETE_DESCRIPTOR,
|
||||
DIRECT_MESSAGE_DESCRIPTOR,
|
||||
@@ -15,7 +14,8 @@ import {
|
||||
FRIENDS_DESCRIPTOR,
|
||||
REMOVE_DESCRIPTOR,
|
||||
VOICE_DESCRIPTOR,
|
||||
} from './SharedDescriptors';
|
||||
} from '@app/features/user/components/settings_utils/section_registry/SharedDescriptors';
|
||||
import {msg} from '@lingui/core/macro';
|
||||
|
||||
const FRIEND_REQUESTS_DESCRIPTOR = msg({
|
||||
message: 'Friend requests',
|
||||
|
||||
+7
-2
@@ -1,5 +1,12 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
import type {SectionDefinition} from '@app/features/user/components/settings_utils/section_registry/SectionRegistryTypes';
|
||||
import {
|
||||
AUDIO_2_DESCRIPTOR,
|
||||
PLUTONIUM_DESCRIPTOR,
|
||||
VOICE_DESCRIPTOR,
|
||||
VOLUME_DESCRIPTOR,
|
||||
} from '@app/features/user/components/settings_utils/section_registry/SharedDescriptors';
|
||||
import {
|
||||
VOICE_DIRECT_INPUT_PROFILE_DESCRIPTOR,
|
||||
VOICE_ECHO_CANCELLATION_DESCRIPTOR,
|
||||
@@ -11,8 +18,6 @@ import {
|
||||
VOICE_OUTPUT_VOLUME_DESCRIPTOR,
|
||||
} from '@app/features/voice/utils/VoiceMessageDescriptors';
|
||||
import {msg} from '@lingui/core/macro';
|
||||
import type {SectionDefinition} from './SectionRegistryTypes';
|
||||
import {AUDIO_2_DESCRIPTOR, PLUTONIUM_DESCRIPTOR, VOICE_DESCRIPTOR, VOLUME_DESCRIPTOR} from './SharedDescriptors';
|
||||
|
||||
const CONFIGURE_YOUR_MICROPHONE_SPEAKERS_INPUT_MODE_PROCESSING_AND_DESCRIPTOR = msg({
|
||||
message: 'Configure your microphone, speakers, input mode, processing, and voice sounds.',
|
||||
|
||||
Reference in new issue
Block a user