Skip to content

Commit 6cf7b07

Browse files
committed
feat: import sorting
1 parent abe88f0 commit 6cf7b07

File tree

95 files changed

+660
-1411
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+660
-1411
lines changed

apps/app-frontend/src/App.vue

Lines changed: 38 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<script setup>
2-
import { computed, onMounted, onUnmounted, ref, watch, provide } from 'vue'
3-
import { RouterView, useRoute, useRouter } from 'vue-router'
42
import {
53
ArrowBigUpDashIcon,
64
ChangeSkinIcon,
@@ -13,65 +11,69 @@ import {
1311
LogOutIcon,
1412
MaximizeIcon,
1513
MinimizeIcon,
14+
NewspaperIcon,
1615
PlusIcon,
1716
RestoreIcon,
1817
RightArrowIcon,
1918
SettingsIcon,
2019
WorldIcon,
2120
XIcon,
22-
NewspaperIcon,
2321
} from '@modrinth/assets'
2422
import {
2523
Avatar,
2624
Button,
2725
ButtonStyled,
26+
NewsArticleCard,
2827
Notifications,
2928
OverflowMenu,
30-
NewsArticleCard,
3129
} from '@modrinth/ui'
32-
import { useLoading, useTheming } from '@/store/state'
30+
import { renderString } from '@modrinth/utils'
31+
import { getVersion } from '@tauri-apps/api/app'
32+
import { invoke } from '@tauri-apps/api/core'
33+
import { getCurrentWindow } from '@tauri-apps/api/window'
34+
import { openUrl } from '@tauri-apps/plugin-opener'
35+
import { type } from '@tauri-apps/plugin-os'
36+
import { check } from '@tauri-apps/plugin-updater'
37+
import { saveWindowState, StateFlags } from '@tauri-apps/plugin-window-state'
38+
import { computed, onMounted, onUnmounted, provide,ref, watch } from 'vue'
39+
import { RouterView, useRoute, useRouter } from 'vue-router'
40+
3341
import ModrinthAppLogo from '@/assets/modrinth_app.svg?component'
42+
import ModrinthLoadingIndicator from '@/components/LoadingIndicatorBar.vue'
3443
import AccountsCard from '@/components/ui/AccountsCard.vue'
35-
import InstanceCreationModal from '@/components/ui/InstanceCreationModal.vue'
36-
import { get } from '@/helpers/settings.ts'
3744
import Breadcrumbs from '@/components/ui/Breadcrumbs.vue'
38-
import RunningAppBar from '@/components/ui/RunningAppBar.vue'
39-
import SplashScreen from '@/components/ui/SplashScreen.vue'
4045
import ErrorModal from '@/components/ui/ErrorModal.vue'
41-
import ModrinthLoadingIndicator from '@/components/LoadingIndicatorBar.vue'
42-
import { handleError, useNotifications } from '@/store/notifications.js'
43-
import { command_listener, warning_listener } from '@/helpers/events.js'
44-
import { type } from '@tauri-apps/plugin-os'
45-
import { getOS, isDev, restartApp } from '@/helpers/utils.js'
46-
import { debugAnalytics, initAnalytics, optOutAnalytics, trackEvent } from '@/helpers/analytics'
47-
import { getCurrentWindow } from '@tauri-apps/api/window'
48-
import { getVersion } from '@tauri-apps/api/app'
49-
import URLConfirmModal from '@/components/ui/URLConfirmModal.vue'
50-
import { create_profile_and_install_from_file } from './helpers/pack'
51-
import { useError } from '@/store/error.js'
52-
import { useCheckDisableMouseover } from '@/composables/macCssFix.js'
53-
import ModInstallModal from '@/components/ui/install_flow/ModInstallModal.vue'
46+
import FriendsList from '@/components/ui/friends/FriendsList.vue'
5447
import IncompatibilityWarningModal from '@/components/ui/install_flow/IncompatibilityWarningModal.vue'
5548
import InstallConfirmModal from '@/components/ui/install_flow/InstallConfirmModal.vue'
56-
import { useInstall } from '@/store/install.js'
57-
import { invoke } from '@tauri-apps/api/core'
58-
import { get_opening_command, initialize_state } from '@/helpers/state'
59-
import { saveWindowState, StateFlags } from '@tauri-apps/plugin-window-state'
60-
import { renderString } from '@modrinth/utils'
61-
import { useFetch } from '@/helpers/fetch.js'
62-
import { check } from '@tauri-apps/plugin-updater'
63-
import NavButton from '@/components/ui/NavButton.vue'
64-
import { cancelLogin, get as getCreds, login, logout } from '@/helpers/mr_auth.js'
65-
import { get_user } from '@/helpers/cache.js'
49+
import ModInstallModal from '@/components/ui/install_flow/ModInstallModal.vue'
50+
import InstanceCreationModal from '@/components/ui/InstanceCreationModal.vue'
6651
import AppSettingsModal from '@/components/ui/modal/AppSettingsModal.vue'
6752
import AuthGrantFlowWaitModal from '@/components/ui/modal/AuthGrantFlowWaitModal.vue'
53+
import NavButton from '@/components/ui/NavButton.vue'
6854
import PromotionWrapper from '@/components/ui/PromotionWrapper.vue'
69-
import { hide_ads_window, init_ads_window } from '@/helpers/ads.js'
70-
import FriendsList from '@/components/ui/friends/FriendsList.vue'
71-
import { openUrl } from '@tauri-apps/plugin-opener'
7255
import QuickInstanceSwitcher from '@/components/ui/QuickInstanceSwitcher.vue'
73-
import { get_available_capes, get_available_skins } from './helpers/skins'
56+
import RunningAppBar from '@/components/ui/RunningAppBar.vue'
57+
import SplashScreen from '@/components/ui/SplashScreen.vue'
58+
import URLConfirmModal from '@/components/ui/URLConfirmModal.vue'
59+
import { useCheckDisableMouseover } from '@/composables/macCssFix.js'
60+
import { hide_ads_window, init_ads_window } from '@/helpers/ads.js'
61+
import { debugAnalytics, initAnalytics, optOutAnalytics, trackEvent } from '@/helpers/analytics'
62+
import { get_user } from '@/helpers/cache.js'
63+
import { command_listener, warning_listener } from '@/helpers/events.js'
64+
import { useFetch } from '@/helpers/fetch.js'
65+
import { cancelLogin, get as getCreds, login, logout } from '@/helpers/mr_auth.js'
66+
import { get } from '@/helpers/settings.ts'
67+
import { get_opening_command, initialize_state } from '@/helpers/state'
68+
import { getOS, isDev, restartApp } from '@/helpers/utils.js'
69+
import { useError } from '@/store/error.js'
70+
import { useInstall } from '@/store/install.js'
71+
import { handleError, useNotifications } from '@/store/notifications.js'
72+
import { useLoading, useTheming } from '@/store/state'
73+
74+
import { create_profile_and_install_from_file } from './helpers/pack'
7475
import { generateSkinPreviews } from './helpers/rendering/batch-skin-renderer'
76+
import { get_available_capes, get_available_skins } from './helpers/skins'
7577
7678
const themeStore = useTheming()
7779
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1+
export { default as ATLauncherIcon } from './atlauncher.svg'
12
export { default as BuyMeACoffeeIcon } from './bmac.svg'
23
export { default as DiscordIcon } from './discord.svg'
3-
export { default as KoFiIcon } from './kofi.svg'
4-
export { default as PatreonIcon } from './patreon.svg'
5-
export { default as PaypalIcon } from './paypal.svg'
6-
export { default as OpenCollectiveIcon } from './opencollective.svg'
7-
export { default as TwitterIcon } from './twitter.svg'
4+
export { default as GDLauncherIcon } from './gdlauncher.png'
85
export { default as GithubIcon } from './github.svg'
9-
export { default as MastodonIcon } from './mastodon.svg'
10-
export { default as RedditIcon } from './reddit.svg'
6+
export { default as GitLabIcon } from './gitlab.svg'
117
export { default as GoogleIcon } from './google.svg'
8+
export { default as KoFiIcon } from './kofi.svg'
9+
export { default as MastodonIcon } from './mastodon.svg'
1210
export { default as MicrosoftIcon } from './microsoft.svg'
13-
export { default as SteamIcon } from './steam.svg'
14-
export { default as GitLabIcon } from './gitlab.svg'
15-
export { default as ATLauncherIcon } from './atlauncher.svg'
16-
export { default as GDLauncherIcon } from './gdlauncher.png'
1711
export { default as MultiMCIcon } from './multimc.webp'
12+
export { default as OpenCollectiveIcon } from './opencollective.svg'
13+
export { default as PatreonIcon } from './patreon.svg'
14+
export { default as PaypalIcon } from './paypal.svg'
1815
export { default as PrismIcon } from './prism.svg'
16+
export { default as RedditIcon } from './reddit.svg'
17+
export { default as SteamIcon } from './steam.svg'
18+
export { default as TwitterIcon } from './twitter.svg'
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
export { default as SwapIcon } from './arrow-left-right.svg'
2-
export { default as ToggleIcon } from './toggle.svg'
3-
export { default as PackageIcon } from './package.svg'
4-
export { default as VersionIcon } from './milestone.svg'
5-
export { default as TextInputIcon } from './text-cursor-input.svg'
61
export { default as AddProjectImage } from './add-project.svg'
7-
export { default as NewInstanceImage } from './new-instance.svg'
2+
export { default as SwapIcon } from './arrow-left-right.svg'
83
export { default as MenuIcon } from './menu.svg'
94
export { default as ChatIcon } from './messages-square.svg'
5+
export { default as VersionIcon } from './milestone.svg'
6+
export { default as NewInstanceImage } from './new-instance.svg'
7+
export { default as PackageIcon } from './package.svg'
8+
export { default as TextInputIcon } from './text-cursor-input.svg'
9+
export { default as ToggleIcon } from './toggle.svg'

apps/app-frontend/src/components/GridDisplay.vue

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
<script setup>
2-
import Instance from '@/components/ui/Instance.vue'
3-
import { computed, ref } from 'vue'
42
import {
53
ClipboardCopyIcon,
4+
EyeIcon,
65
FolderOpenIcon,
76
PlayIcon,
87
PlusIcon,
9-
TrashIcon,
10-
StopCircleIcon,
11-
EyeIcon,
128
SearchIcon,
9+
StopCircleIcon,
10+
TrashIcon,
1311
XIcon,
1412
} from '@modrinth/assets'
1513
import { Button, DropdownSelect } from '@modrinth/ui'
1614
import { formatCategoryHeader } from '@modrinth/utils'
17-
import ContextMenu from '@/components/ui/ContextMenu.vue'
1815
import dayjs from 'dayjs'
16+
import { computed, ref } from 'vue'
17+
18+
import ContextMenu from '@/components/ui/ContextMenu.vue'
19+
import Instance from '@/components/ui/Instance.vue'
20+
import ConfirmModalWrapper from '@/components/ui/modal/ConfirmModalWrapper.vue'
1921
import { duplicate, remove } from '@/helpers/profile.js'
2022
import { handleError } from '@/store/notifications.js'
21-
import ConfirmModalWrapper from '@/components/ui/modal/ConfirmModalWrapper.vue'
2223
2324
const props = defineProps({
2425
instances: {

apps/app-frontend/src/components/LoadingIndicatorBar.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<script setup>
22
import { computed, onBeforeUnmount, ref, watch } from 'vue'
3+
34
import { useLoading } from '@/store/state.js'
45
56
const props = defineProps({

apps/app-frontend/src/components/RowDisplay.vue

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,32 @@
11
<script setup>
22
import {
33
ClipboardCopyIcon,
4+
DownloadIcon,
5+
ExternalIcon,
6+
EyeIcon,
47
FolderOpenIcon,
8+
GlobeIcon,
59
PlayIcon,
610
PlusIcon,
7-
TrashIcon,
8-
DownloadIcon,
9-
GlobeIcon,
1011
StopCircleIcon,
11-
ExternalIcon,
12-
EyeIcon,
12+
TrashIcon,
1313
} from '@modrinth/assets'
14-
import ConfirmModalWrapper from '@/components/ui/modal/ConfirmModalWrapper.vue'
15-
import Instance from '@/components/ui/Instance.vue'
14+
import { HeadingLink } from '@modrinth/ui'
15+
import { openUrl } from '@tauri-apps/plugin-opener'
1616
import { computed, onMounted, onUnmounted, ref } from 'vue'
17+
import { useRouter } from 'vue-router'
18+
1719
import ContextMenu from '@/components/ui/ContextMenu.vue'
20+
import Instance from '@/components/ui/Instance.vue'
21+
import ConfirmModalWrapper from '@/components/ui/modal/ConfirmModalWrapper.vue'
1822
import ProjectCard from '@/components/ui/ProjectCard.vue'
23+
import { trackEvent } from '@/helpers/analytics'
1924
import { get_by_profile_path } from '@/helpers/process.js'
20-
import { handleError } from '@/store/notifications.js'
2125
import { duplicate, kill, remove, run } from '@/helpers/profile.js'
22-
import { useRouter } from 'vue-router'
2326
import { showProfileInFolder } from '@/helpers/utils.js'
24-
import { trackEvent } from '@/helpers/analytics'
2527
import { handleSevereError } from '@/store/error.js'
2628
import { install as installVersion } from '@/store/install.js'
27-
import { openUrl } from '@tauri-apps/plugin-opener'
28-
import { HeadingLink } from '@modrinth/ui'
29+
import { handleError } from '@/store/notifications.js'
2930
3031
const router = useRouter()
3132

apps/app-frontend/src/components/ui/AccountsCard.vue

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,22 +73,23 @@
7373
</template>
7474

7575
<script setup>
76-
import { DropdownIcon, PlusIcon, TrashIcon, LogInIcon, SpinnerIcon } from '@modrinth/assets'
76+
import { DropdownIcon, LogInIcon, PlusIcon, SpinnerIcon,TrashIcon } from '@modrinth/assets'
7777
import { Avatar, Button, Card } from '@modrinth/ui'
78-
import { ref, computed, onMounted, onBeforeUnmount, onUnmounted } from 'vue'
78+
import { computed, onBeforeUnmount, onMounted, onUnmounted,ref } from 'vue'
79+
80+
import { trackEvent } from '@/helpers/analytics'
7981
import {
80-
users,
82+
get_default_user,
83+
login as login_flow,
8184
remove_user,
8285
set_default_user,
83-
login as login_flow,
84-
get_default_user,
86+
users,
8587
} from '@/helpers/auth'
86-
import { handleError } from '@/store/state.js'
87-
import { trackEvent } from '@/helpers/analytics'
8888
import { process_listener } from '@/helpers/events'
89-
import { handleSevereError } from '@/store/error.js'
90-
import { get_available_skins } from '@/helpers/skins'
9189
import { getPlayerHeadUrl } from '@/helpers/rendering/batch-skin-renderer.ts'
90+
import { get_available_skins } from '@/helpers/skins'
91+
import { handleSevereError } from '@/store/error.js'
92+
import { handleError } from '@/store/state.js'
9293
9394
defineProps({
9495
mode: {

apps/app-frontend/src/components/ui/AddContentButton.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<script setup lang="ts">
2-
import { DropdownIcon, PlusIcon, FolderOpenIcon } from '@modrinth/assets'
2+
import { DropdownIcon, FolderOpenIcon,PlusIcon } from '@modrinth/assets'
33
import { ButtonStyled, OverflowMenu } from '@modrinth/ui'
44
import { open } from '@tauri-apps/plugin-dialog'
5+
import { useRouter } from 'vue-router'
6+
57
import { add_project_from_path } from '@/helpers/profile.js'
68
import { handleError } from '@/store/notifications.js'
7-
import { useRouter } from 'vue-router'
89
910
const props = defineProps({
1011
instance: {

apps/app-frontend/src/components/ui/Breadcrumbs.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,12 @@
4242
</template>
4343

4444
<script setup>
45-
import { ChevronRightIcon, ChevronLeftIcon } from '@modrinth/assets'
45+
import { ChevronLeftIcon,ChevronRightIcon } from '@modrinth/assets'
4646
import { Button } from '@modrinth/ui'
47-
import { useBreadcrumbs } from '@/store/breadcrumbs'
48-
import { useRoute } from 'vue-router'
4947
import { computed } from 'vue'
48+
import { useRoute } from 'vue-router'
49+
50+
import { useBreadcrumbs } from '@/store/breadcrumbs'
5051
5152
const route = useRoute()
5253

apps/app-frontend/src/components/ui/ErrorModal.vue

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
<script setup>
22
import {
33
CheckIcon,
4+
CopyIcon,
45
DropdownIcon,
5-
XIcon,
66
HammerIcon,
77
LogInIcon,
88
UpdatedIcon,
9-
CopyIcon,
9+
XIcon,
1010
} from '@modrinth/assets'
11-
import { ChatIcon } from '@/assets/icons'
1211
import { ButtonStyled, Collapsible } from '@modrinth/ui'
13-
import { ref, computed } from 'vue'
12+
import { computed,ref } from 'vue'
13+
14+
import { ChatIcon } from '@/assets/icons'
15+
import ModalWrapper from '@/components/ui/modal/ModalWrapper.vue'
16+
import { trackEvent } from '@/helpers/analytics'
1417
import { login as login_flow, set_default_user } from '@/helpers/auth.js'
15-
import { handleError } from '@/store/notifications.js'
16-
import { handleSevereError } from '@/store/error.js'
17-
import { cancel_directory_change } from '@/helpers/settings.ts'
1818
import { install } from '@/helpers/profile.js'
19-
import { trackEvent } from '@/helpers/analytics'
20-
import ModalWrapper from '@/components/ui/modal/ModalWrapper.vue'
19+
import { cancel_directory_change } from '@/helpers/settings.ts'
20+
import { handleSevereError } from '@/store/error.js'
21+
import { handleError } from '@/store/notifications.js'
2122
2223
const errorModal = ref()
2324
const error = ref()

0 commit comments

Comments
 (0)