Skip to content

Commit d4bcb48

Browse files
committed
fix: lint
1 parent 77fd62a commit d4bcb48

File tree

12 files changed

+31
-67
lines changed

12 files changed

+31
-67
lines changed

apps/app-frontend/src/App.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,14 @@ import UpdateAvailableToast from '@/components/ui/UpdateAvailableToast.vue'
7777
import UpdateToast from '@/components/ui/UpdateToast.vue'
7878
import URLConfirmModal from '@/components/ui/URLConfirmModal.vue'
7979
import { useCheckDisableMouseover } from '@/composables/macCssFix.js'
80-
import { setupProviders } from '@/providers/setup'
8180
import { hide_ads_window, init_ads_window, show_ads_window } from '@/helpers/ads.js'
8281
import { debugAnalytics, initAnalytics, optOutAnalytics, trackEvent } from '@/helpers/analytics'
8382
import { check_reachable } from '@/helpers/auth.js'
8483
import { get_user } from '@/helpers/cache.js'
8584
import { command_listener, warning_listener } from '@/helpers/events.js'
8685
import { useFetch } from '@/helpers/fetch.js'
8786
import { cancelLogin, get as getCreds, login, logout } from '@/helpers/mr_auth.ts'
87+
import { create_profile_and_install_from_file } from '@/helpers/pack'
8888
import { list } from '@/helpers/profile.js'
8989
import { get as getSettings, set as setSettings } from '@/helpers/settings.ts'
9090
import { get_opening_command, initialize_state } from '@/helpers/state'
@@ -101,11 +101,11 @@ import {
101101
provideAppUpdateDownloadProgress,
102102
subscribeToDownloadProgress,
103103
} from '@/providers/download-progress.ts'
104+
import { setupProviders } from '@/providers/setup'
104105
import { useError } from '@/store/error.js'
105106
import { useInstall } from '@/store/install.js'
106107
import { useLoading, useTheming } from '@/store/state'
107108
108-
import { create_profile_and_install_from_file } from '@/helpers/pack'
109109
import { generateSkinPreviews } from './helpers/rendering/batch-skin-renderer'
110110
import { get_available_capes, get_available_skins } from './helpers/skins'
111111
import { AppNotificationManager } from './providers/app-notifications'
@@ -136,7 +136,8 @@ provideModalBehavior({
136136
onHide: () => show_ads_window(),
137137
})
138138
139-
const { installationModal, handleCreate, handleBrowseModpacks } = setupProviders(notificationManager)
139+
const { installationModal, handleCreate, handleBrowseModpacks } =
140+
setupProviders(notificationManager)
140141
141142
const news = ref([])
142143
const availableSurvey = ref(false)

apps/app-frontend/src/providers/setup/creation-modal.ts

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,10 @@ export function setupCreationModal(notificationManager: AbstractWebNotificationM
2222
for (const [launcherName, instanceSet] of Object.entries(
2323
config.importSelectedInstances.value,
2424
)) {
25-
const launcher = config.importLaunchers.value.find(
26-
(l) => l.name === launcherName,
27-
)
25+
const launcher = config.importLaunchers.value.find((l) => l.name === launcherName)
2826
if (!launcher || instanceSet.size === 0) continue
2927
for (const name of instanceSet) {
30-
await import_instance(launcher.name, launcher.path, name).catch(
31-
handleError,
32-
)
28+
await import_instance(launcher.name, launcher.path, name).catch(handleError)
3329
}
3430
}
3531
trackEvent('InstanceCreate', { source: 'CreationModalImport' })
@@ -38,17 +34,13 @@ export function setupCreationModal(notificationManager: AbstractWebNotificationM
3834

3935
if (config.modpackSelection.value) {
4036
const { projectId, versionId, name, iconUrl } = config.modpackSelection.value
41-
await create_profile_and_install(projectId, versionId, name, iconUrl).catch(
42-
handleError,
43-
)
37+
await create_profile_and_install(projectId, versionId, name, iconUrl).catch(handleError)
4438
trackEvent('InstanceCreate', { source: 'CreationModalModpack' })
4539
return
4640
}
4741

4842
if (config.modpackFilePath.value) {
49-
await create_profile_and_install_from_file(config.modpackFilePath.value).catch(
50-
handleError,
51-
)
43+
await create_profile_and_install_from_file(config.modpackFilePath.value).catch(handleError)
5244
trackEvent('InstanceCreate', { source: 'CreationModalModpackFile' })
5345
return
5446
}

apps/app-frontend/src/providers/setup/file-picker.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ export function setupFilePickerProvider() {
77
async pickImage() {
88
const result = await open({
99
multiple: false,
10-
filters: [
11-
{ name: 'Image', extensions: ['png', 'jpeg', 'jpg', 'svg', 'webp', 'gif'] },
12-
],
10+
filters: [{ name: 'Image', extensions: ['png', 'jpeg', 'jpg', 'svg', 'webp', 'gif'] }],
1311
})
1412
if (!result) return null
1513
const path = result.path ?? result

apps/app-frontend/src/providers/setup/instance-import.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,7 @@ export function setupInstanceImportProvider(notificationManager: AbstractWebNoti
1313

1414
provideInstanceImport({
1515
async getDetectedLaunchers() {
16-
const launcherNames = [
17-
'MultiMC',
18-
'GDLauncher',
19-
'ATLauncher',
20-
'Curseforge',
21-
'PrismLauncher',
22-
]
16+
const launcherNames = ['MultiMC', 'GDLauncher', 'ATLauncher', 'Curseforge', 'PrismLauncher']
2317
const launchers = []
2418
for (const name of launcherNames) {
2519
try {

apps/frontend/src/pages/hosting/manage/[id]/options/loader.vue

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,17 @@
2525
<Avatar :src="(debugProject as any).icon_url" size="3rem" />
2626
<div class="flex flex-1 flex-col">
2727
<div class="flex items-center gap-1.5">
28-
<span class="font-medium text-contrast line-clamp-1">
28+
<span class="line-clamp-1 font-medium text-contrast">
2929
{{ (debugProject as any).title }}
3030
</span>
3131
<span class="text-sm text-secondary">
3232
by {{ (debugProject as any).team?.name ?? 'Unknown' }}
3333
</span>
3434
</div>
35-
<span class="text-sm text-secondary line-clamp-1">v1.6.1 for 1.21.1</span>
35+
<span class="line-clamp-1 text-sm text-secondary">v1.6.1 for 1.21.1</span>
3636
</div>
3737
<div class="flex shrink-0 items-center gap-2">
38-
<div
39-
class="rounded-full bg-bg-orange px-2 py-1 text-xs font-medium text-orange"
40-
>
38+
<div class="rounded-full bg-bg-orange px-2 py-1 text-xs font-medium text-orange">
4139
Update available
4240
</div>
4341
<ButtonStyled color="brand">

packages/ui/src/components/flows/creation-flow-modal/components/CustomSetupStage.vue

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,7 @@
1111
</button>
1212
</ButtonStyled>
1313
<ButtonStyled type="outlined">
14-
<button
15-
class="!border-surface-5"
16-
:disabled="!ctx.instanceIcon.value"
17-
@click="removeIcon"
18-
>
14+
<button class="!border-surface-5" :disabled="!ctx.instanceIcon.value" @click="removeIcon">
1915
<XIcon />
2016
Remove icon
2117
</button>
@@ -92,11 +88,7 @@
9288
</div>
9389

9490
<!-- Other flows: collapsible wrapper -->
95-
<Collapsible
96-
v-else
97-
:collapsed="!selectedLoader || !selectedGameVersion"
98-
overflow-visible
99-
>
91+
<Collapsible v-else :collapsed="!selectedLoader || !selectedGameVersion" overflow-visible>
10092
<div class="flex flex-col gap-2">
10193
<span class="font-semibold text-contrast"
10294
>{{ isPaperLike ? 'Build number' : 'Loader version'

packages/ui/src/components/flows/creation-flow-modal/components/ImportInstanceStage.vue

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -66,18 +66,12 @@
6666
</div>
6767

6868
<!-- Empty state -->
69-
<div
70-
v-else-if="!loading"
71-
class="flex items-center justify-center py-8 text-secondary text-sm"
72-
>
69+
<div v-else-if="!loading" class="flex items-center justify-center py-8 text-secondary text-sm">
7370
No launcher instances detected
7471
</div>
7572

7673
<!-- Loading state -->
77-
<div
78-
v-if="loading"
79-
class="flex items-center justify-center py-8 text-secondary text-sm"
80-
>
74+
<div v-if="loading" class="flex items-center justify-center py-8 text-secondary text-sm">
8175
Detecting launcher instances...
8276
</div>
8377

@@ -91,15 +85,9 @@
9185
</div>
9286
<div v-else class="flex items-center gap-2">
9387
<FolderOpenIcon class="size-5 shrink-0 text-secondary" />
94-
<StyledInput
95-
v-model="newLauncherPath"
96-
placeholder="Path to launcher..."
97-
class="flex-1"
98-
/>
88+
<StyledInput v-model="newLauncherPath" placeholder="Path to launcher..." class="flex-1" />
9989
<ButtonStyled>
100-
<button :disabled="!newLauncherPath.trim()" @click="addLauncherPath">
101-
Add
102-
</button>
90+
<button :disabled="!newLauncherPath.trim()" @click="addLauncherPath">Add</button>
10391
</ButtonStyled>
10492
</div>
10593
</div>

packages/ui/src/components/flows/creation-flow-modal/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import {
1111
createCreationFlowContext,
1212
type CreationFlowContextValue,
1313
type FlowType,
14-
type SetupType,
1514
provideCreationFlowContext,
15+
type SetupType,
1616
} from './creation-flow-context'
1717
1818
const props = withDefaults(

packages/ui/src/components/flows/creation-flow-modal/stages/custom-setup-stage.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ import { type CreationFlowContextValue, flowTypeHeadings } from '../creation-flo
77

88
function isForwardBlocked(ctx: CreationFlowContextValue): boolean {
99
const baseCheck =
10-
!ctx.selectedGameVersion.value ||
11-
(!ctx.hideLoaderChips.value && !ctx.selectedLoader.value)
10+
!ctx.selectedGameVersion.value || (!ctx.hideLoaderChips.value && !ctx.selectedLoader.value)
1211
if (ctx.flowType === 'instance') {
1312
return baseCheck || !ctx.instanceName.value.trim()
1413
}

packages/ui/src/components/servers/ServerSetupModal.vue

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,16 @@
2626
import type { ModrinthApiError } from '@modrinth/api-client'
2727
import { computed, nextTick, ref, useTemplateRef } from 'vue'
2828
29-
import type { CreationFlowContextValue, SetupType } from '../flows/creation-flow-modal/creation-flow-context'
30-
import { AppearingProgressBar } from '../base'
31-
import { NewModal } from '../modal'
32-
import CreationFlowModal from '../flows/creation-flow-modal/index.vue'
3329
import { injectModrinthClient } from '../../providers/api-client'
3430
import { injectModrinthServerContext } from '../../providers/server-context'
3531
import { injectNotificationManager } from '../../providers/web-notifications'
32+
import { AppearingProgressBar } from '../base'
33+
import type {
34+
CreationFlowContextValue,
35+
SetupType,
36+
} from '../flows/creation-flow-modal/creation-flow-context'
37+
import CreationFlowModal from '../flows/creation-flow-modal/index.vue'
38+
import { NewModal } from '../modal'
3639
3740
const client = injectModrinthClient()
3841
const serverContext = injectModrinthServerContext()
@@ -55,7 +58,7 @@ const props = defineProps<{
5558
}>()
5659
5760
const emit = defineEmits<{
58-
reinstall: [any?]
61+
reinstall: [args?: { loader: string; lVersion: string; mVersion: string | null }]
5962
hide: []
6063
'browse-modpacks': []
6164
}>()

0 commit comments

Comments
 (0)