forked from Qortal/qortal
Remove code for unused "Open UI" function
This commit is contained in:
parent
687667c8fe
commit
8caf5bf8be
@ -5,7 +5,6 @@ import org.apache.logging.log4j.Logger;
|
|||||||
import org.qortal.controller.Controller;
|
import org.qortal.controller.Controller;
|
||||||
import org.qortal.globalization.Translator;
|
import org.qortal.globalization.Translator;
|
||||||
import org.qortal.settings.Settings;
|
import org.qortal.settings.Settings;
|
||||||
import org.qortal.utils.RandomizeList;
|
|
||||||
import org.qortal.utils.URLViewer;
|
import org.qortal.utils.URLViewer;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
@ -140,14 +139,6 @@ public class SysTray {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/* JMenuItem openUi = new JMenuItem(Translator.INSTANCE.translate("SysTray", "OPEN_UI"));
|
|
||||||
openUi.addActionListener(actionEvent -> {
|
|
||||||
destroyHiddenDialog();
|
|
||||||
|
|
||||||
new OpenUiWorker().execute();
|
|
||||||
});
|
|
||||||
menu.add(openUi); */
|
|
||||||
|
|
||||||
JMenuItem openTimeCheck = new JMenuItem(Translator.INSTANCE.translate("SysTray", "CHECK_TIME_ACCURACY"));
|
JMenuItem openTimeCheck = new JMenuItem(Translator.INSTANCE.translate("SysTray", "CHECK_TIME_ACCURACY"));
|
||||||
openTimeCheck.addActionListener(actionEvent -> {
|
openTimeCheck.addActionListener(actionEvent -> {
|
||||||
destroyHiddenDialog();
|
destroyHiddenDialog();
|
||||||
@ -190,48 +181,6 @@ public class SysTray {
|
|||||||
return menu;
|
return menu;
|
||||||
}
|
}
|
||||||
|
|
||||||
static class OpenUiWorker extends SwingWorker<Void, Void> {
|
|
||||||
@Override
|
|
||||||
protected Void doInBackground() {
|
|
||||||
List<String> uiServers = new ArrayList<>();
|
|
||||||
|
|
||||||
String[] remoteUiServers = Settings.getInstance().getRemoteUiServers();
|
|
||||||
uiServers.addAll(Arrays.asList(remoteUiServers));
|
|
||||||
// Randomize remote servers
|
|
||||||
uiServers = RandomizeList.randomize(uiServers);
|
|
||||||
|
|
||||||
// Prepend local servers
|
|
||||||
String[] localUiServers = Settings.getInstance().getLocalUiServers();
|
|
||||||
uiServers.addAll(0, Arrays.asList(localUiServers));
|
|
||||||
|
|
||||||
// Check each server in turn before opening browser tab
|
|
||||||
int uiPort = Settings.getInstance().getUiServerPort();
|
|
||||||
for (String uiServer : uiServers) {
|
|
||||||
InetSocketAddress socketAddress = new InetSocketAddress(uiServer, uiPort);
|
|
||||||
|
|
||||||
// If we couldn't resolve try next
|
|
||||||
if (socketAddress.isUnresolved())
|
|
||||||
continue;
|
|
||||||
|
|
||||||
try (SocketChannel socketChannel = SocketChannel.open()) {
|
|
||||||
socketChannel.socket().connect(socketAddress, 100);
|
|
||||||
|
|
||||||
// If we reach here, then socket connected to UI server!
|
|
||||||
URLViewer.openWebpage(new URL(String.format("http://%s:%d", uiServer, uiPort)));
|
|
||||||
|
|
||||||
return null;
|
|
||||||
} catch (IOException e) {
|
|
||||||
// try next server
|
|
||||||
} catch (Exception e) {
|
|
||||||
LOGGER.error("Unable to open UI website in browser");
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static class SynchronizeClockWorker extends SwingWorker<Void, Void> {
|
static class SynchronizeClockWorker extends SwingWorker<Void, Void> {
|
||||||
@Override
|
@Override
|
||||||
protected Void doInBackground() {
|
protected Void doInBackground() {
|
||||||
|
@ -62,15 +62,6 @@ public class Settings {
|
|||||||
private String bindAddress = "::"; // Use IPv6 wildcard to listen on all local addresses
|
private String bindAddress = "::"; // Use IPv6 wildcard to listen on all local addresses
|
||||||
private String bindAddressFallback = "0.0.0.0"; // Some systems are unable to bind using IPv6
|
private String bindAddressFallback = "0.0.0.0"; // Some systems are unable to bind using IPv6
|
||||||
|
|
||||||
// UI servers
|
|
||||||
private int uiPort = 12388;
|
|
||||||
private String[] uiLocalServers = new String[] {
|
|
||||||
"localhost", "127.0.0.1"
|
|
||||||
};
|
|
||||||
private String[] uiRemoteServers = new String[] {
|
|
||||||
// None exist anymore
|
|
||||||
};
|
|
||||||
|
|
||||||
// API-related
|
// API-related
|
||||||
private boolean apiEnabled = true;
|
private boolean apiEnabled = true;
|
||||||
private Integer apiPort;
|
private Integer apiPort;
|
||||||
@ -619,18 +610,6 @@ public class Settings {
|
|||||||
return this.localeLang;
|
return this.localeLang;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getUiServerPort() {
|
|
||||||
return this.uiPort;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String[] getLocalUiServers() {
|
|
||||||
return this.uiLocalServers;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String[] getRemoteUiServers() {
|
|
||||||
return this.uiRemoteServers;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isApiEnabled() {
|
public boolean isApiEnabled() {
|
||||||
return this.apiEnabled;
|
return this.apiEnabled;
|
||||||
}
|
}
|
||||||
|
@ -35,8 +35,6 @@ MINTING_DISABLED = Münzprägung inaktiv
|
|||||||
|
|
||||||
MINTING_ENABLED = \u2714 Münzprägung aktiv
|
MINTING_ENABLED = \u2714 Münzprägung aktiv
|
||||||
|
|
||||||
OPEN_UI = Öffne Benutzeroberfläche
|
|
||||||
|
|
||||||
PERFORMING_DB_CHECKPOINT = Speichere unerfasste Datenbankänderungen...
|
PERFORMING_DB_CHECKPOINT = Speichere unerfasste Datenbankänderungen...
|
||||||
|
|
||||||
PERFORMING_DB_MAINTENANCE = Planmäßige Wartung wird durchgeführt...
|
PERFORMING_DB_MAINTENANCE = Planmäßige Wartung wird durchgeführt...
|
||||||
|
@ -35,8 +35,6 @@ MINTING_DISABLED = NOT minting
|
|||||||
|
|
||||||
MINTING_ENABLED = \u2714 Minting
|
MINTING_ENABLED = \u2714 Minting
|
||||||
|
|
||||||
OPEN_UI = Open UI
|
|
||||||
|
|
||||||
PERFORMING_DB_CHECKPOINT = Saving uncommitted database changes...
|
PERFORMING_DB_CHECKPOINT = Saving uncommitted database changes...
|
||||||
|
|
||||||
PERFORMING_DB_MAINTENANCE = Performing scheduled maintenance...
|
PERFORMING_DB_MAINTENANCE = Performing scheduled maintenance...
|
||||||
|
@ -33,8 +33,6 @@ MINTING_DISABLED = Acuñación NO habilitada
|
|||||||
|
|
||||||
MINTING_ENABLED = \u2714 Acuñación habilitada
|
MINTING_ENABLED = \u2714 Acuñación habilitada
|
||||||
|
|
||||||
OPEN_UI = IU abierta
|
|
||||||
|
|
||||||
PERFORMING_DB_CHECKPOINT = Guardando cambios de base de datos no confirmados...
|
PERFORMING_DB_CHECKPOINT = Guardando cambios de base de datos no confirmados...
|
||||||
|
|
||||||
PERFORMING_DB_MAINTENANCE = Realizando mantenimiento programado...
|
PERFORMING_DB_MAINTENANCE = Realizando mantenimiento programado...
|
||||||
|
@ -35,8 +35,6 @@ MINTING_DISABLED = EI lyö rahaa
|
|||||||
|
|
||||||
MINTING_ENABLED = \u2714 Lyö rahaa
|
MINTING_ENABLED = \u2714 Lyö rahaa
|
||||||
|
|
||||||
OPEN_UI = Avaa UI
|
|
||||||
|
|
||||||
PERFORMING_DB_CHECKPOINT = Tallentaa kommittoidut tietokantamuutokset...
|
PERFORMING_DB_CHECKPOINT = Tallentaa kommittoidut tietokantamuutokset...
|
||||||
|
|
||||||
PERFORMING_DB_MAINTENANCE = Suoritetaan määräaikaishuoltoa...
|
PERFORMING_DB_MAINTENANCE = Suoritetaan määräaikaishuoltoa...
|
||||||
|
@ -35,8 +35,6 @@ MINTING_DISABLED = NE mint PAS
|
|||||||
|
|
||||||
MINTING_ENABLED = \u2714 Minting
|
MINTING_ENABLED = \u2714 Minting
|
||||||
|
|
||||||
OPEN_UI = Ouvrir l'interface
|
|
||||||
|
|
||||||
PERFORMING_DB_CHECKPOINT = Enregistrement des modifications de base de données non validées...
|
PERFORMING_DB_CHECKPOINT = Enregistrement des modifications de base de données non validées...
|
||||||
|
|
||||||
PERFORMING_DB_MAINTENANCE = Entrain d'effectuer la maintenance programmée...
|
PERFORMING_DB_MAINTENANCE = Entrain d'effectuer la maintenance programmée...
|
||||||
|
@ -35,8 +35,6 @@ MINTING_DISABLED = כרייה מבוטלת
|
|||||||
|
|
||||||
MINTING_ENABLED = \u2714 הטבעה
|
MINTING_ENABLED = \u2714 הטבעה
|
||||||
|
|
||||||
OPEN_UI = ממשק משתמש פתוח
|
|
||||||
|
|
||||||
PERFORMING_DB_CHECKPOINT = שומר שינויים לא מחויבים במסד הנתונים...
|
PERFORMING_DB_CHECKPOINT = שומר שינויים לא מחויבים במסד הנתונים...
|
||||||
|
|
||||||
PERFORMING_DB_MAINTENANCE = מבצע תחזוקה מתוזמנת...
|
PERFORMING_DB_MAINTENANCE = מבצע תחזוקה מתוזמנת...
|
||||||
|
@ -35,8 +35,6 @@ MINTING_DISABLED = QORT-érmeverés jelenleg nincs folyamatban
|
|||||||
|
|
||||||
MINTING_ENABLED = \u2714 QORT-érmeverés folyamatban
|
MINTING_ENABLED = \u2714 QORT-érmeverés folyamatban
|
||||||
|
|
||||||
OPEN_UI = Felhasználói felület megnyitása
|
|
||||||
|
|
||||||
PERFORMING_DB_CHECKPOINT = Mentetlen adatbázis-módosítások mentése...
|
PERFORMING_DB_CHECKPOINT = Mentetlen adatbázis-módosítások mentése...
|
||||||
|
|
||||||
PERFORMING_DB_MAINTENANCE = Ütemezett karbantartás...
|
PERFORMING_DB_MAINTENANCE = Ütemezett karbantartás...
|
||||||
|
@ -35,8 +35,6 @@ MINTING_DISABLED = Conio disabilitato
|
|||||||
|
|
||||||
MINTING_ENABLED = \u2714 Conio abilitato
|
MINTING_ENABLED = \u2714 Conio abilitato
|
||||||
|
|
||||||
OPEN_UI = Apri UI
|
|
||||||
|
|
||||||
PERFORMING_DB_CHECKPOINT = Salvataggio delle modifiche del database non salvate...
|
PERFORMING_DB_CHECKPOINT = Salvataggio delle modifiche del database non salvate...
|
||||||
|
|
||||||
PERFORMING_DB_MAINTENANCE = Manutenzione programmata dell'efficienza...
|
PERFORMING_DB_MAINTENANCE = Manutenzione programmata dell'efficienza...
|
||||||
|
@ -35,8 +35,6 @@ MINTING_DISABLED = ミント一時中止中
|
|||||||
|
|
||||||
MINTING_ENABLED = \u2714 ミント
|
MINTING_ENABLED = \u2714 ミント
|
||||||
|
|
||||||
OPEN_UI = UIを開く
|
|
||||||
|
|
||||||
PERFORMING_DB_CHECKPOINT = コミットされていないデータベースの変更を保存中...
|
PERFORMING_DB_CHECKPOINT = コミットされていないデータベースの変更を保存中...
|
||||||
|
|
||||||
PERFORMING_DB_MAINTENANCE = 定期メンテナンスを実行中...
|
PERFORMING_DB_MAINTENANCE = 定期メンテナンスを実行中...
|
||||||
|
@ -35,8 +35,6 @@ MINTING_DISABLED = 민팅중이 아님
|
|||||||
|
|
||||||
MINTING_ENABLED = \u2714 민팅
|
MINTING_ENABLED = \u2714 민팅
|
||||||
|
|
||||||
OPEN_UI = UI 열기
|
|
||||||
|
|
||||||
PERFORMING_DB_CHECKPOINT = 커밋되지 않은 데이터베이스 변경 내용을 저장하는 중...
|
PERFORMING_DB_CHECKPOINT = 커밋되지 않은 데이터베이스 변경 내용을 저장하는 중...
|
||||||
|
|
||||||
PERFORMING_DB_MAINTENANCE = 예약된 유지 관리 수행 중...
|
PERFORMING_DB_MAINTENANCE = 예약된 유지 관리 수행 중...
|
||||||
|
@ -35,8 +35,6 @@ MINTING_DISABLED = Minten is uitgeschakeld
|
|||||||
|
|
||||||
MINTING_ENABLED = \u2714 Minten is actief
|
MINTING_ENABLED = \u2714 Minten is actief
|
||||||
|
|
||||||
OPEN_UI = Open UI
|
|
||||||
|
|
||||||
PERFORMING_DB_CHECKPOINT = De database wordt bijgewerkt...
|
PERFORMING_DB_CHECKPOINT = De database wordt bijgewerkt...
|
||||||
|
|
||||||
PERFORMING_DB_MAINTENANCE = Bezig met gepland onderhoud...
|
PERFORMING_DB_MAINTENANCE = Bezig met gepland onderhoud...
|
||||||
|
@ -33,8 +33,6 @@ MINTING_DISABLED = Mennica zamknięta
|
|||||||
|
|
||||||
MINTING_ENABLED = \u2714 Mennica aktywna
|
MINTING_ENABLED = \u2714 Mennica aktywna
|
||||||
|
|
||||||
OPEN_UI = Otwórz interfejs użytkownika
|
|
||||||
|
|
||||||
PERFORMING_DB_CHECKPOINT = Zapisywanie niezaksięgowanych zmian w bazie danych...
|
PERFORMING_DB_CHECKPOINT = Zapisywanie niezaksięgowanych zmian w bazie danych...
|
||||||
|
|
||||||
PERFORMING_DB_MAINTENANCE = Performing scheduled maintenance...
|
PERFORMING_DB_MAINTENANCE = Performing scheduled maintenance...
|
||||||
|
@ -35,11 +35,9 @@ MINTING_DISABLED = nu produce moneda
|
|||||||
|
|
||||||
MINTING_ENABLED = \u2714 Minting
|
MINTING_ENABLED = \u2714 Minting
|
||||||
|
|
||||||
OPEN_UI = Deschidere interfata utilizator IU
|
|
||||||
|
|
||||||
PERFORMING_DB_CHECKPOINT = Salvarea modificarilor nerealizate ale bazei de date...
|
PERFORMING_DB_CHECKPOINT = Salvarea modificarilor nerealizate ale bazei de date...
|
||||||
|
|
||||||
PERFORMING_DB_MAINTENANCE = Efectuarea intretinerii programate…
|
PERFORMING_DB_MAINTENANCE = Efectuarea intretinerii programate<EFBFBD>
|
||||||
|
|
||||||
SYNCHRONIZE_CLOCK = Sincronizare ceas
|
SYNCHRONIZE_CLOCK = Sincronizare ceas
|
||||||
|
|
||||||
|
@ -35,8 +35,6 @@ MINTING_DISABLED = Чеканка отключена
|
|||||||
|
|
||||||
MINTING_ENABLED = \u2714 Чеканка активна
|
MINTING_ENABLED = \u2714 Чеканка активна
|
||||||
|
|
||||||
OPEN_UI = Открыть пользовательский интерфейс
|
|
||||||
|
|
||||||
PERFORMING_DB_CHECKPOINT = Сохранение незафиксированных изменений базы данных...
|
PERFORMING_DB_CHECKPOINT = Сохранение незафиксированных изменений базы данных...
|
||||||
|
|
||||||
PERFORMING_DB_MAINTENANCE = Выполнение планового технического обслуживания...
|
PERFORMING_DB_MAINTENANCE = Выполнение планового технического обслуживания...
|
||||||
|
@ -33,8 +33,6 @@ MINTING_DISABLED = Präglar INTE
|
|||||||
|
|
||||||
MINTING_ENABLED = \u2714 Präglar
|
MINTING_ENABLED = \u2714 Präglar
|
||||||
|
|
||||||
OPEN_UI = Öppna UI
|
|
||||||
|
|
||||||
PERFORMING_DB_CHECKPOINT = Sparar oengagerade databasändringar...
|
PERFORMING_DB_CHECKPOINT = Sparar oengagerade databasändringar...
|
||||||
|
|
||||||
PERFORMING_DB_MAINTENANCE = Utför schemalagt underhåll...
|
PERFORMING_DB_MAINTENANCE = Utför schemalagt underhåll...
|
||||||
|
@ -35,8 +35,6 @@ MINTING_DISABLED = 没有铸币
|
|||||||
|
|
||||||
MINTING_ENABLED = \u2714 铸币
|
MINTING_ENABLED = \u2714 铸币
|
||||||
|
|
||||||
OPEN_UI = 开启Qortal界面
|
|
||||||
|
|
||||||
PERFORMING_DB_CHECKPOINT = 正在保存未提交的数据库修订...
|
PERFORMING_DB_CHECKPOINT = 正在保存未提交的数据库修订...
|
||||||
|
|
||||||
PERFORMING_DB_MAINTENANCE = 正在执行定期数据库维护...
|
PERFORMING_DB_MAINTENANCE = 正在执行定期数据库维护...
|
||||||
|
@ -35,8 +35,6 @@ MINTING_DISABLED = 沒有鑄幣
|
|||||||
|
|
||||||
MINTING_ENABLED = \u2714 鑄幣
|
MINTING_ENABLED = \u2714 鑄幣
|
||||||
|
|
||||||
OPEN_UI = 開啓Qortal界面
|
|
||||||
|
|
||||||
PERFORMING_DB_CHECKPOINT = 正在保存未提交的數據庫修訂...
|
PERFORMING_DB_CHECKPOINT = 正在保存未提交的數據庫修訂...
|
||||||
|
|
||||||
PERFORMING_DB_MAINTENANCE = 正在執行數據庫定期維護...
|
PERFORMING_DB_MAINTENANCE = 正在執行數據庫定期維護...
|
||||||
|
@ -15,7 +15,7 @@ public class CheckTranslations {
|
|||||||
private static final String[] SUPPORTED_LANGS = new String[] { "en", "de", "zh", "ru" };
|
private static final String[] SUPPORTED_LANGS = new String[] { "en", "de", "zh", "ru" };
|
||||||
private static final Set<String> SYSTRAY_KEYS = Set.of("AUTO_UPDATE", "APPLYING_UPDATE_AND_RESTARTING", "BLOCK_HEIGHT",
|
private static final Set<String> SYSTRAY_KEYS = Set.of("AUTO_UPDATE", "APPLYING_UPDATE_AND_RESTARTING", "BLOCK_HEIGHT",
|
||||||
"BUILD_VERSION", "CHECK_TIME_ACCURACY", "CONNECTING", "CONNECTION", "CONNECTIONS", "CREATING_BACKUP_OF_DB_FILES",
|
"BUILD_VERSION", "CHECK_TIME_ACCURACY", "CONNECTING", "CONNECTION", "CONNECTIONS", "CREATING_BACKUP_OF_DB_FILES",
|
||||||
"DB_BACKUP", "DB_CHECKPOINT", "EXIT", "LITE_NODE", "MINTING_DISABLED", "MINTING_ENABLED", "OPEN_UI", "PERFORMING_DB_CHECKPOINT",
|
"DB_BACKUP", "DB_CHECKPOINT", "EXIT", "LITE_NODE", "MINTING_DISABLED", "MINTING_ENABLED", "PERFORMING_DB_CHECKPOINT",
|
||||||
"SYNCHRONIZE_CLOCK", "SYNCHRONIZING_BLOCKCHAIN", "SYNCHRONIZING_CLOCK");
|
"SYNCHRONIZE_CLOCK", "SYNCHRONIZING_BLOCKCHAIN", "SYNCHRONIZING_CLOCK");
|
||||||
|
|
||||||
private static String failurePrefix;
|
private static String failurePrefix;
|
||||||
|
Loading…
Reference in New Issue
Block a user