mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
Disable bulk images from the UI
This commit is contained in:
@@ -81,45 +81,32 @@ public enum VSubmenuDownloaders implements IVSubmenu<CSubmenuDownloaders> {
|
||||
|
||||
pnlContent.setOpaque(false);
|
||||
|
||||
if (javaRecentEnough()) {
|
||||
pnlContent.add(_makeLabel("Bulk downloaders have been disabled. Please use auto-downloader for now."), constraintsLBL);
|
||||
|
||||
// Github actions now uploading the latest version predictably. So we should be able to use this again.
|
||||
pnlContent.add(btnCheckForUpdates, constraintsBTN);
|
||||
pnlContent.add(_makeLabel(localizer.getMessage("lblCheckForUpdates")), constraintsLBL);
|
||||
|
||||
pnlContent.add(btnDownloadPics, constraintsBTN);
|
||||
pnlContent.add(_makeLabel(localizer.getMessage("lblDownloadPics")), constraintsLBL);
|
||||
|
||||
pnlContent.add(btnDownloadPicsHQ, constraintsBTN);
|
||||
pnlContent.add(_makeLabel(localizer.getMessage("lblDownloadPicsHQ")), constraintsLBL);
|
||||
|
||||
pnlContent.add(btnDownloadSetPics, constraintsBTN);
|
||||
pnlContent.add(_makeLabel(localizer.getMessage("lblDownloadSetPics")), constraintsLBL);
|
||||
|
||||
pnlContent.add(btnDownloadQuestImages, constraintsBTN);
|
||||
pnlContent.add(_makeLabel(localizer.getMessage("lblDownloadQuestImages")), constraintsLBL);
|
||||
|
||||
pnlContent.add(btnDownloadAchievementImages, constraintsBTN);
|
||||
pnlContent.add(_makeLabel(localizer.getMessage("lblDownloadAchievementImages")), constraintsLBL);
|
||||
// pnlContent.add(btnDownloadPics, constraintsBTN);
|
||||
// pnlContent.add(_makeLabel(localizer.getMessage("lblDownloadPics")), constraintsLBL);
|
||||
//
|
||||
// pnlContent.add(btnDownloadPicsHQ, constraintsBTN);
|
||||
// pnlContent.add(_makeLabel(localizer.getMessage("lblDownloadPicsHQ")), constraintsLBL);
|
||||
//
|
||||
// pnlContent.add(btnDownloadSetPics, constraintsBTN);
|
||||
// pnlContent.add(_makeLabel(localizer.getMessage("lblDownloadSetPics")), constraintsLBL);
|
||||
//
|
||||
// pnlContent.add(btnDownloadQuestImages, constraintsBTN);
|
||||
// pnlContent.add(_makeLabel(localizer.getMessage("lblDownloadQuestImages")), constraintsLBL);
|
||||
//
|
||||
// pnlContent.add(btnDownloadAchievementImages, constraintsBTN);
|
||||
// pnlContent.add(_makeLabel(localizer.getMessage("lblDownloadAchievementImages")), constraintsLBL);
|
||||
|
||||
pnlContent.add(btnDownloadPrices, constraintsBTN);
|
||||
pnlContent.add(_makeLabel(localizer.getMessage("lblDownloadPrices")), constraintsLBL);
|
||||
|
||||
pnlContent.add(btnDownloadSkins, constraintsBTN);
|
||||
pnlContent.add(_makeLabel(localizer.getMessage("lblDownloadSkins")), constraintsLBL);
|
||||
} else {
|
||||
String text = localizer.getMessage("lblYourVersionOfJavaIsTooOld");
|
||||
FLabel label = new FLabel.Builder().fontAlign(SwingConstants.CENTER).text(text).fontStyle(Font.BOLD).fontSize(18).build();
|
||||
pnlContent.add(label, "w 90%!, h 25px!, center, gap 0 0 30px 3px");
|
||||
|
||||
text = localizer.getMessage("lblPleaseUpdateToTheLatestVersionOfJava");
|
||||
label = new FLabel.Builder().fontAlign(SwingConstants.CENTER).text(text).fontStyle(Font.BOLD).fontSize(18).build();
|
||||
pnlContent.add(label, "w 90%!, h 25px!, center, gap 0 0 0 36px");
|
||||
|
||||
text = localizer.getMessage("lblYoureRunning") + " " + System.getProperty("java.version");
|
||||
text = text + " . " + localizer.getMessage("lblYouNeedAtLeastJavaVersion") ;
|
||||
label = new FLabel.Builder().fontAlign(SwingConstants.CENTER).text(text).fontStyle(Font.BOLD).fontSize(18).build();
|
||||
pnlContent.add(label, "w 90%!, h 25px!, center, gap 0 0 0 36px");
|
||||
}
|
||||
// pnlContent.add(btnDownloadSkins, constraintsBTN);
|
||||
// pnlContent.add(_makeLabel(localizer.getMessage("lblDownloadSkins")), constraintsLBL);
|
||||
|
||||
pnlContent.add(btnListImageData, constraintsBTN);
|
||||
pnlContent.add(_makeLabel(localizer.getMessage("lblListImageData")), constraintsLBL);
|
||||
@@ -137,12 +124,6 @@ public enum VSubmenuDownloaders implements IVSubmenu<CSubmenuDownloaders> {
|
||||
pnlContent.add(_makeLabel(localizer.getMessage("lblLicensing")), constraintsLBL);
|
||||
}
|
||||
|
||||
private boolean javaRecentEnough() {
|
||||
RuntimeVersion javaVersion = RuntimeVersion.of(System.getProperty("java.version"));
|
||||
|
||||
return javaVersion.getMajor() >= 9 || (javaVersion.getMajor() >= 1 && (javaVersion.getMinor() > 8 || (javaVersion.getMinor() == 8 && javaVersion.getUpdate() >= 101)));
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see forge.view.home.IViewSubmenu#populate()
|
||||
*/
|
||||
|
||||
@@ -80,34 +80,34 @@ public class FilesPage extends TabPage<SettingsScreen> {
|
||||
}
|
||||
}, 0);
|
||||
//content downloaders
|
||||
lstItems.addItem(new ContentDownloader(Forge.getLocalizer().getMessage("btnDownloadPics"),
|
||||
Forge.getLocalizer().getMessage("lblDownloadPics")) {
|
||||
@Override
|
||||
protected GuiDownloadService createService() {
|
||||
return new GuiDownloadPicturesLQ();
|
||||
}
|
||||
}, 1);
|
||||
lstItems.addItem(new ContentDownloader(Forge.getLocalizer().getMessage("btnDownloadSetPics"),
|
||||
Forge.getLocalizer().getMessage("lblDownloadSetPics")) {
|
||||
@Override
|
||||
protected GuiDownloadService createService() {
|
||||
return new GuiDownloadSetPicturesLQ();
|
||||
}
|
||||
}, 1);
|
||||
lstItems.addItem(new ContentDownloader(Forge.getLocalizer().getMessage("btnDownloadQuestImages"),
|
||||
Forge.getLocalizer().getMessage("lblDownloadQuestImages")) {
|
||||
@Override
|
||||
protected GuiDownloadService createService() {
|
||||
return new GuiDownloadQuestImages();
|
||||
}
|
||||
}, 1);
|
||||
lstItems.addItem(new ContentDownloader(Forge.getLocalizer().getMessage("btnDownloadAchievementImages"),
|
||||
Forge.getLocalizer().getMessage("lblDownloadAchievementImages")) {
|
||||
@Override
|
||||
protected GuiDownloadService createService() {
|
||||
return new GuiDownloadAchievementImages();
|
||||
}
|
||||
}, 1);
|
||||
// lstItems.addItem(new ContentDownloader(Forge.getLocalizer().getMessage("btnDownloadPics"),
|
||||
// Forge.getLocalizer().getMessage("lblDownloadPics")) {
|
||||
// @Override
|
||||
// protected GuiDownloadService createService() {
|
||||
// return new GuiDownloadPicturesLQ();
|
||||
// }
|
||||
// }, 1);
|
||||
// lstItems.addItem(new ContentDownloader(Forge.getLocalizer().getMessage("btnDownloadSetPics"),
|
||||
// Forge.getLocalizer().getMessage("lblDownloadSetPics")) {
|
||||
// @Override
|
||||
// protected GuiDownloadService createService() {
|
||||
// return new GuiDownloadSetPicturesLQ();
|
||||
// }
|
||||
// }, 1);
|
||||
// lstItems.addItem(new ContentDownloader(Forge.getLocalizer().getMessage("btnDownloadQuestImages"),
|
||||
// Forge.getLocalizer().getMessage("lblDownloadQuestImages")) {
|
||||
// @Override
|
||||
// protected GuiDownloadService createService() {
|
||||
// return new GuiDownloadQuestImages();
|
||||
// }
|
||||
// }, 1);
|
||||
// lstItems.addItem(new ContentDownloader(Forge.getLocalizer().getMessage("btnDownloadAchievementImages"),
|
||||
// Forge.getLocalizer().getMessage("lblDownloadAchievementImages")) {
|
||||
// @Override
|
||||
// protected GuiDownloadService createService() {
|
||||
// return new GuiDownloadAchievementImages();
|
||||
// }
|
||||
// }, 1);
|
||||
lstItems.addItem(new ContentDownloader(Forge.getLocalizer().getMessage("btnDownloadPrices"),
|
||||
Forge.getLocalizer().getMessage("lblDownloadPrices")) {
|
||||
@Override
|
||||
|
||||
@@ -329,9 +329,11 @@ public final class ForgeConstants {
|
||||
|
||||
// URLs
|
||||
private static final String URL_CARDFORGE = "https://downloads.cardforge.org";
|
||||
private static final String GITHUB_ASSETS_BASE = "https://raw.githubusercontent.com/Card-Forge/forge-extras/refs/heads/main/";
|
||||
|
||||
public static final String URL_PIC_DOWNLOAD = URL_CARDFORGE + "/images/cards/";
|
||||
public static final String URL_TOKEN_DOWNLOAD = URL_CARDFORGE + "/images/tokens/";
|
||||
public static final String URL_PRICE_DOWNLOAD = URL_CARDFORGE + "/all-prices.txt";
|
||||
public static final String URL_PRICE_DOWNLOAD = GITHUB_ASSETS_BASE + "all-prices.txt";
|
||||
private static final String URL_SCRYFALL = "https://api.scryfall.com";
|
||||
public static final String URL_PIC_SCRYFALL_DOWNLOAD = URL_SCRYFALL + "/cards/";
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ public class ForgePreferences extends PreferencesStore<ForgePreferences.FPref> {
|
||||
UI_OVERLAY_CARD_ID ("true"),
|
||||
UI_OVERLAY_ABILITY_ICONS("true"),
|
||||
UI_OVERLAY_DRAFT_RANKING("true"),
|
||||
UI_ENABLE_ONLINE_IMAGE_FETCHER ("false"),
|
||||
UI_ENABLE_ONLINE_IMAGE_FETCHER ("true"),
|
||||
UI_PREFERRED_ART("LATEST_ART_ALL_EDITIONS"),
|
||||
UI_SMART_CARD_ART("false"),
|
||||
UI_AUTO_AIDECK_SELECTION("true"),
|
||||
|
||||
Reference in New Issue
Block a user