Skip to content

Commit

Permalink
feat: add notice
Browse files Browse the repository at this point in the history
  • Loading branch information
terminalsin committed Dec 28, 2024
1 parent 5ddd4be commit 101a090
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@
import picocli.CommandLine;

import javax.swing.*;
import java.awt.*;
import java.io.File;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeUnit;

public class SkidfuscatorMain {

Expand All @@ -33,7 +39,41 @@ public static void main(String[] args) {
} catch (Exception e) {
e.printStackTrace();
}
new MainFrame().setVisible(true);

final int option = JOptionPane.showOptionDialog(
null,
"You are running Skidfuscator Community! Whilst this project is free and open-source, " +
"we heavily encourage commercial usage to support the project by licensing via the enterprise" +
" edition available on our website",
"Notice!",
JOptionPane.DEFAULT_OPTION,
JOptionPane.INFORMATION_MESSAGE,
UIManager.getIcon("OptionPane.informationIcon"),
new Object[]{"OK", "Buy Enterprise", "Join the Discord"},
"OK"
);

if (option == 0) {
new MainFrame().setVisible(true);
return;
}

final String url = switch (option) {
case 1 -> "https://skidfuscator.dev/pricing";
case 2 -> "https://discord.gg/QJC9g8fBU9";
default -> throw new IllegalStateException("Impossible");
};

CompletableFuture.delayedExecutor(1, TimeUnit.SECONDS).execute(() -> {
try {
Desktop.getDesktop().browse(new URI(url));
} catch (IOException | URISyntaxException e) {
throw new RuntimeException(e);
}
});
main(args);
return;

});
return;
}
Expand Down
Binary file added docs/header.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/header.psd
Binary file not shown.

0 comments on commit 101a090

Please sign in to comment.