@@ -76,6 +76,10 @@ export default class ImportProfileModal extends mixins(ProfilesMixin) {
76
76
return {known , unknown };
77
77
}
78
78
79
+ get unknownProfileModNames(): string {
80
+ return this .profileMods .unknown .join (' , ' );
81
+ }
82
+
79
83
// Fired when user selects to import either from file or code.
80
84
async onFileOrCodeSelect(mode : ' FILE' | ' CODE' ) {
81
85
if (mode === ' FILE' ) {
@@ -309,17 +313,17 @@ export default class ImportProfileModal extends mixins(ProfilesMixin) {
309
313
</template >
310
314
<template v-slot :body >
311
315
<OnlineModList :paged-mod-list =" profileMods.known" :read-only =" true" />
312
- <div v-if =" ! profileMods.known.length || profileMods.unknown.length" class =" notification is-warning margin-top" >
313
- <p v-if =" ! profileMods.known.length" >
316
+ <div v-if =" profileMods.known.length === 0 || profileMods.unknown.length > 0 " class =" notification is-warning margin-top" >
317
+ <p v-if =" profileMods.known.length === 0 " >
314
318
None of the packages in the profile were found on Thunderstore:
315
319
</p >
316
320
<p v-else >
317
321
Some of the packages in the profile were not found on Thunderstore:
318
322
</p >
319
323
320
- <p class =" margin-top" >{{ profileMods.unknown.join(", ") }}</p >
324
+ <p class =" margin-top" >{{ unknownProfileModNames }}</p >
321
325
322
- <p v-if =" profileMods.known.length" class =" margin-top" >
326
+ <p v-if =" profileMods.known.length > 0 " class =" margin-top" >
323
327
These packages will not be installed.
324
328
</p >
325
329
<p v-else class =" margin-top" >
@@ -351,23 +355,14 @@ export default class ImportProfileModal extends mixins(ProfilesMixin) {
351
355
</div >
352
356
</template >
353
357
<template v-slot :footer >
354
- <div class =" container is-flex is-justify-content-space-between" >
355
- <button
356
- id =" modal-no-mods-to-import"
357
- class =" button is-danger"
358
- @click =" closeModal"
359
- >
360
- Cancel import
361
- </button >
362
- <button
363
- id =" modal-review-confirmed"
364
- class =" button is-info"
365
- :disabled =" !profileMods.known.length"
366
- @click =" onProfileReviewConfirmed"
367
- >
368
- Import
369
- </button >
370
- </div >
358
+ <button
359
+ id =" modal-review-confirmed"
360
+ class =" button is-info"
361
+ :disabled =" profileMods.known.length === 0"
362
+ @click =" onProfileReviewConfirmed"
363
+ >
364
+ Import
365
+ </button >
371
366
</template >
372
367
</ModalCard >
373
368
0 commit comments