Upload via GUI (202 Dateien)
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
<div class="titelleiste">
|
||||
<img src="assets/logo.png" alt="" class="titel-logo" />
|
||||
<span class="titel-text">AeroMC</span>
|
||||
<span id="titel-beta" class="titel-beta hidden"></span>
|
||||
</div>
|
||||
|
||||
<!-- Obere Werkzeugleiste (MultiMC-Stil: Icon + Text) -->
|
||||
@@ -283,6 +284,10 @@
|
||||
<div class="s-text"><b>Bedrock-Bereich anzeigen</b><small id="s-bedrock-hint">Wird automatisch ausgeblendet, wenn Bedrock nicht installiert ist.</small></div>
|
||||
<label class="schalter"><input id="s-bedrock" type="checkbox" /><i></i></label>
|
||||
</div>
|
||||
<div class="s-zeile">
|
||||
<div class="s-text"><b>An der Beta teilnehmen</b><small>Du bekommst neue Versionen früher zum Ausprobieren. Betas können noch Fehler enthalten. Wieder ausgeschaltet, bekommst du ab der nächsten fertigen Version nur noch fertige Versionen.</small></div>
|
||||
<label class="schalter"><input id="s-beta" type="checkbox" /><i></i></label>
|
||||
</div>
|
||||
</section>
|
||||
<section class="settings-card">
|
||||
<h5>Instanzen</h5>
|
||||
|
||||
+19
-1
@@ -212,6 +212,7 @@ const POPOUT_SPEC = {
|
||||
stats: { title: 'AeroMC – Spielzeit-Statistik', width: 640, height: 560, minWidth: 520, minHeight: 420 },
|
||||
};
|
||||
const POPOUT_DEFAULT = { title: 'AeroMC', width: 860, height: 680, minWidth: 640, minHeight: 480 };
|
||||
let betaStand = false; // zuletzt bekannter Stand von "An der Beta teilnehmen"
|
||||
let pendingUpdateInfo = null; // letztes Ergebnis von update:check/checkForUpdate, für Update-Popup
|
||||
// Ergebnis der letzten Update-Suche (auch "läuft gerade" oder Fehler) – Fenster, die
|
||||
// erst später aufgehen (z. B. Einstellungen → Info), holen es sich hierüber ab
|
||||
@@ -223,7 +224,7 @@ async function pruefeAufUpdates() {
|
||||
letzterUpdateCheck = { checking: true };
|
||||
broadcast('update:checked', letzterUpdateCheck);
|
||||
try {
|
||||
const info = await updater.checkForUpdate(app.getVersion());
|
||||
const info = await updater.checkForUpdate(app.getVersion(), { beta: store.getSettings().betaTeilnahme === true });
|
||||
pendingUpdateInfo = info;
|
||||
letzterUpdateCheck = info;
|
||||
} catch (err) {
|
||||
@@ -1073,6 +1074,18 @@ app.whenReady().then(() => {
|
||||
decrypt: (b) => safeStorage.decryptString(Buffer.from(b, 'base64')),
|
||||
};
|
||||
auth.init(app.getPath('userData'), tresor);
|
||||
// Beta-Teilnahme: Wer eine Vorabfassung von Hand installiert, nimmt ab da teil
|
||||
// (einmalig beim Wechsel von einer fertigen auf eine Vorabfassung – danach
|
||||
// gilt allein der Schalter in den Optionen, auch wenn er wieder aus ist).
|
||||
{
|
||||
const vorab = updater.istVorabVersion(app.getVersion());
|
||||
const e = store.getSettings();
|
||||
const neu = {};
|
||||
if (vorab && !e.letzteVersionVorab && e.betaTeilnahme !== true) neu.betaTeilnahme = true;
|
||||
if (!!e.letzteVersionVorab !== vorab) neu.letzteVersionVorab = vorab;
|
||||
if (Object.keys(neu).length) store.saveSettings(neu);
|
||||
betaStand = store.getSettings().betaTeilnahme === true;
|
||||
}
|
||||
try { integritaet.init(app.getPath('userData'), tresor, store); } catch (err) { console.warn('Manipulationsschutz:', err.message); }
|
||||
setTimeout(() => { pruefeAlleInstanzen().catch(() => {}); }, 8000);
|
||||
// Proxy-Passwort und API-Schlüssel ebenso (siehe store.setzeTresor)
|
||||
@@ -1195,6 +1208,11 @@ ipcMain.handle('settings:save', (_e, patch) => {
|
||||
applyProxy(s);
|
||||
if (patch && Object.prototype.hasOwnProperty.call(patch, 'autostart')) applyAutostart(s.autostart);
|
||||
if (patch && Object.prototype.hasOwnProperty.call(patch, 'discordClientId')) discordpresence.configure(s);
|
||||
// Beta-Teilnahme umgeschaltet -> gleich neu nach Updates suchen
|
||||
if (patch && Object.prototype.hasOwnProperty.call(patch, 'betaTeilnahme') && !!patch.betaTeilnahme !== betaStand) {
|
||||
betaStand = !!patch.betaTeilnahme;
|
||||
pruefeAufUpdates().then((info) => { if (info.available) broadcast('update:available', info); }).catch(() => {});
|
||||
}
|
||||
if (patch && Object.prototype.hasOwnProperty.call(patch, 'friendsEnabled')) {
|
||||
aktualisiereFreundeTastenkuerzel();
|
||||
aktualisiereAnfragenZahl().catch(() => {});
|
||||
|
||||
@@ -6134,6 +6134,7 @@ async function openSettings(pane) {
|
||||
el('s-start-animation').checked = s.startAnimation !== false;
|
||||
el('s-ui-animationen').checked = s.uiAnimationen !== false;
|
||||
el('s-bedrock').checked = s.bedrockEnabled !== false;
|
||||
el('s-beta').checked = s.betaTeilnahme === true;
|
||||
el('s-notify').checked = s.desktopNotifications !== false;
|
||||
el('s-friends').checked = s.friendsEnabled !== false;
|
||||
el('s-friends-server').checked = s.friendsShareServer !== false;
|
||||
@@ -6272,6 +6273,7 @@ async function saveSettings() {
|
||||
startAnimation: el('s-start-animation').checked,
|
||||
uiAnimationen: el('s-ui-animationen').checked,
|
||||
bedrockEnabled: el('s-bedrock').checked,
|
||||
betaTeilnahme: el('s-beta').checked,
|
||||
desktopNotifications: el('s-notify').checked,
|
||||
friendsEnabled: el('s-friends').checked,
|
||||
friendsShareServer: el('s-friends-server').checked,
|
||||
@@ -7879,3 +7881,18 @@ window.addEventListener('DOMContentLoaded', async () => {
|
||||
popoutBoot(Object.fromEntries(new URLSearchParams(location.search)));
|
||||
}
|
||||
});
|
||||
|
||||
// Vorabfassung in der Titelleiste kenntlich machen: aus "1.2.4-beta.1" wird
|
||||
// "Beta 1", aus "1.3.0-rc.2" wird "RC 2". Fertige Versionen zeigen nichts.
|
||||
(async () => {
|
||||
try {
|
||||
const info = await window.api.appInfo();
|
||||
const m = String((info && info.version) || '').match(/^\d+(?:\.\d+){0,2}-([a-z]+)[.-]?(\d+)?/i);
|
||||
const marke = document.getElementById('titel-beta');
|
||||
if (!m || !marke) return;
|
||||
const art = /^rc$/i.test(m[1]) ? 'RC' : m[1].charAt(0).toUpperCase() + m[1].slice(1).toLowerCase();
|
||||
marke.textContent = art + (m[2] ? ' ' + m[2] : '');
|
||||
marke.title = `Vorabfassung ${info.version} – zum Testen, kann noch Fehler enthalten`;
|
||||
marke.classList.remove('hidden');
|
||||
} catch { /* nur Anzeige */ }
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user