5 Commits

Author SHA1 Message Date
034960b285 feat: slow mode 2024-10-18 19:23:57 +08:00
23209d06d9 Merge branch 'main' of https://github.com/StarCitizenToolBox/RSILauncherEnhanceData 2024-10-15 23:59:45 +08:00
18e29efc8a bump: RSI Launcher 2.0.6 2024-10-15 23:59:18 +08:00
c9847fdd18 bugfix 2024-10-09 10:16:43 +08:00
67549d4580 bump: RSI Launcher 2.0.5 2024-09-26 20:03:07 +08:00

181
main.js
View File

@ -1,4 +1,4 @@
/*! For license information please see main.ade910f7.js.LICENSE.txt */ /*! For license information please see main.d5394d7f.js.LICENSE.txt */
(() => { (() => {
const SC_TOOLBOX_ENABLED_LOCALIZATION = "en"; const SC_TOOLBOX_ENABLED_LOCALIZATION = "en";
const SC_TOOLBOX_ENABLE_DOWNLOADER_BOOST = false; const SC_TOOLBOX_ENABLE_DOWNLOADER_BOOST = false;
@ -9885,7 +9885,7 @@
error_not_authenticated: "你未通过身份验证", error_not_authenticated: "你未通过身份验证",
error_invalid_claims: "无效声明", error_invalid_claims: "无效声明",
error_authentication_mfa: "身份验证需要mfa", error_authentication_mfa: "身份验证需要mfa",
error_sign_in_failed: "登入失败。你可能输入了错误的凭证。", "error_sign-in_failed": "登入失败。你可能输入了错误的凭证。",
error_sign_in_not_authorized: "你没有权限访问此版本的 RSI 启动器。请从<0>该网页</0>下载公众版本。", error_sign_in_not_authorized: "你没有权限访问此版本的 RSI 启动器。请从<0>该网页</0>下载公众版本。",
error_captcha_invalid: "验证码无效", error_captcha_invalid: "验证码无效",
error_session_expired: "你的会话已过期。请再次确认你的密码。", error_session_expired: "你的会话已过期。请再次确认你的密码。",
@ -9929,6 +9929,7 @@
error_launch_game_content: "尝试重新启动游戏。如果问题依然存在,请验证你的安装文件。", error_launch_game_content: "尝试重新启动游戏。如果问题依然存在,请验证你的安装文件。",
error_launch_unknown_title: "启动器 - 未知错误", error_launch_unknown_title: "启动器 - 未知错误",
error_launch_unknown_content: "启动游戏时出现错误。请验证游戏文件完整性。", error_launch_unknown_content: "启动游戏时出现错误。请验证游戏文件完整性。",
error_launch_error_code: "启动游戏出错,错误代码: {{ code }}",
error_launch_no_game_files_title: "启动器 - 未找到游戏文件", error_launch_no_game_files_title: "启动器 - 未找到游戏文件",
error_launch_no_game_files_content: "启动游戏时出现错误。无法检索到游戏文件。请验证游戏文件完整性。", error_launch_no_game_files_content: "启动游戏时出现错误。无法检索到游戏文件。请验证游戏文件完整性。",
error_launch_EAC_title: "启动器 - EAC 错误", error_launch_EAC_title: "启动器 - EAC 错误",
@ -52142,7 +52143,7 @@
}), (0, _w.jsx)("hr", {}), (0, _w.jsxs)("p", { }), (0, _w.jsx)("hr", {}), (0, _w.jsxs)("p", {
children: [(0, _w.jsx)("strong", { children: [(0, _w.jsx)("strong", {
children: t("settings_about_launcher_version") children: t("settings_about_launcher_version")
}), " ", null !== (e = "2.0.4") ? e : "\u2013"] }), " ", null !== (e = "2.0.6") ? e : "\u2013"]
})] })]
}) })
}) })
@ -52745,7 +52746,7 @@
return new Promise((t => setTimeout(t, e))) return new Promise((t => setTimeout(t, e)))
} }
isUnsafeError(e) { isUnsafeError(e) {
return e instanceof VS || e instanceof zS || e instanceof BS return e instanceof VS || e instanceof zS || e instanceof BS || e instanceof WS
} }
} }
class ZS extends QS { class ZS extends QS {
@ -52882,14 +52883,8 @@
} }
} }
class cE extends QS { class cE extends QS {
set accountClaims(e) {
this._accountClaims = e
}
get accountClaims() {
return this._accountClaims
}
constructor(e, t) { constructor(e, t) {
super(), this.client = e, this.policy = t, this._accountClaims = null super(), this.client = e, this.policy = t
} }
async getCaptcha() { async getCaptcha() {
return `data:image/png;base64,${await this.client.callImage({endpoint:this.client.endpoints.SIGN_IN_CAPTCHA})}` return `data:image/png;base64,${await this.client.callImage({endpoint:this.client.endpoints.SIGN_IN_CAPTCHA})}`
@ -52975,26 +52970,19 @@
}) })
} }
async getSignInSession(e) { async getSignInSession(e) {
this.accountClaims || await this.getAccountClaims(); const t = await this.client.call({
const t = await this.operationWithBasicRetry((async () => await this.client.call({
platformId: e, platformId: e,
endpoint: this.client.endpoints.SIGN_IN_CLAIMS, endpoint: this.client.endpoints.SIGN_IN_CLAIMS,
payload: { payload: {
claims: this.accountClaims claims: await this.getAccountClaims()
} }
})), {
refreshClaims: async () => await this.getAccountClaims()
}); });
return rE(t.data) return rE(t.data)
} }
clearClaims() {
this.accountClaims = null
}
async getAccountClaims() { async getAccountClaims() {
const e = await this.client.call({ return (await this.client.call({
endpoint: this.client.endpoints.ACCOUNT_CLAIMS endpoint: this.client.endpoints.ACCOUNT_CLAIMS
}); })).data
this.accountClaims = e.data
} }
async verifyPolicy(e) { async verifyPolicy(e) {
const { const {
@ -54360,7 +54348,7 @@
i = pR.getState().user, i = pR.getState().user,
a = (null === (t = i.device) || void 0 === t ? void 0 : t.duration) === XS.SESSION || (null === e || void 0 === e ? void 0 : e.clearDevice); a = (null === (t = i.device) || void 0 === t ? void 0 : t.duration) === XS.SESSION || (null === e || void 0 === e ? void 0 : e.clearDevice);
try { try {
(i.sessions[n.platformMaster] && Object.keys(i.sessions[n.platformMaster] || {}).length > 0 ? i.sessions[n.platformMaster] : null) && (yE.games.clearClaims(), yE.authentication.clearClaims(), await yE.authentication.signOut({ (i.sessions[n.platformMaster] && Object.keys(i.sessions[n.platformMaster] || {}).length > 0 ? i.sessions[n.platformMaster] : null) && (yE.games.clearClaims(), await yE.authentication.signOut({
clearDevice: a clearDevice: a
})) }))
} catch (o) { } catch (o) {
@ -54707,9 +54695,9 @@
return n instanceof RS && e.agreements.actions.checkAgreementsFailure(n) return n instanceof RS && e.agreements.actions.checkAgreementsFailure(n)
} }
}, },
async checkAgreementsFailure(e) { checkAgreementsFailure: async e => {
var n; var n;
const r = null !== (n = e.payload.agreements) && void 0 !== n ? n : [], const r = null !== (n = e.payload.data.agreements) && void 0 !== n ? n : [],
i = t(); i = t();
try { try {
const e = [eE.EULA, eE.TOS, eE.DISCLAIMER].map((e => r.filter((t => t.type === e)))).reduce(((e, t) => e.concat(t)), []); const e = [eE.EULA, eE.TOS, eE.DISCLAIMER].map((e => r.filter((t => t.type === e)))).reduce(((e, t) => e.concat(t)), []);
@ -55707,7 +55695,8 @@
isConnectionPopoverOpened: c = !1, isConnectionPopoverOpened: c = !1,
nonOperationalStatus: u, nonOperationalStatus: u,
connection: d = { connection: d = {
mode: navigator.onLine ? yw.ConnectionMode.ONLINE : yw.ConnectionMode.NO_CONNECTION mode: navigator.onLine ? yw.ConnectionMode.ONLINE : yw.ConnectionMode.NO_CONNECTION,
needToBeCheck: !1
}, },
animations: p = { animations: p = {
appLayoutWipe: { appLayoutWipe: {
@ -55751,7 +55740,8 @@
isAppInitialized: !0, isAppInitialized: !0,
connection: { connection: {
mode: a ? yw.ConnectionMode.NO_CONNECTION : yw.ConnectionMode.ONLINE, mode: a ? yw.ConnectionMode.NO_CONNECTION : yw.ConnectionMode.ONLINE,
lastTimeOnline: a lastTimeOnline: a,
needToBeCheck: !0
} }
}); });
e((e => ({ e((e => ({
@ -55930,7 +55920,8 @@
...e.application, ...e.application,
connection: { connection: {
mode: yw.ConnectionMode.ONLINE, mode: yw.ConnectionMode.ONLINE,
lastTimeOnline: void 0 lastTimeOnline: void 0,
needToBeCheck: !1
} }
} }
}))), window.launcherAPI.store.setValueToStore("application.connection.lastTimeOnline", null), r.actions.add({ }))), window.launcherAPI.store.setValueToStore("application.connection.lastTimeOnline", null), r.actions.add({
@ -55941,60 +55932,68 @@
})) }))
}, },
setConnectionUnavailable: async () => { setConnectionUnavailable: async () => {
var n;
const { const {
application: { application: {
actions: n, actions: r,
connection: r connection: i
}, },
user: i, user: a
toasts: a
} = t(); } = t();
if (r.mode === yw.ConnectionMode.NO_CONNECTION) return; if (i.mode === yw.ConnectionMode.NO_CONNECTION && !i.needToBeCheck) return;
if (r.mode === yw.ConnectionMode.OFFLINE) return; if (i.mode === yw.ConnectionMode.OFFLINE) return;
const o = Date.now(); const o = null !== (n = i.lastTimeOnline) && void 0 !== n ? n : Date.now();
if (e((e => ({ e((e => ({
application: { application: {
...e.application, ...e.application,
connection: { connection: {
mode: yw.ConnectionMode.NO_CONNECTION, mode: yw.ConnectionMode.NO_CONNECTION,
lastTimeOnline: o lastTimeOnline: o,
needToBeCheck: !1
} }
} }
}))), window.launcherAPI.store.setValueToStore("application.connection.lastTimeOnline", o), i.actions.isLoggedIn()) { }))), window.launcherAPI.store.setValueToStore("application.connection.lastTimeOnline", o), a.actions.isLoggedIn() && (r.setCloseAllPopovers(), r.setLostConnectionToast(), r.setConnectionPopoverOpened(!0))
const e = n.getRemainingTimeOfOfflineSession(); },
n.setCloseAllPopovers(), a.actions.add({ setLostConnectionToast: () => {
type: "informative", const {
icon: mI, application: {
title: _e.t("connection_toast_warning_lost_connection_title", { actions: e
ns: "connection" },
}), toasts: n
children: (0, _w.jsxs)(cl, { } = t(), r = e.getRemainingTimeOfOfflineSession();
gap: "100", n.actions.add({
vertical: !0, duration: 6e3,
children: [(0, _w.jsx)(Ys, { type: "informative",
as: "span", icon: mI,
children: _e.t("connection_toast_warning_lost_connection_content", { title: _e.t("connection_toast_warning_lost_connection_title", {
ns: "connection" ns: "connection"
}) }),
}), e && (0, _w.jsxs)(Ys, { children: (0, _w.jsxs)(cl, {
as: "span", gap: "100",
children: [_e.t("connection_toast_warning_lost_connection_remaining", { vertical: !0,
ns: "connection" children: [(0, _w.jsx)(Ys, {
}), (0, _w.jsx)(Ys, { as: "span",
as: "span", children: _e.t("connection_toast_warning_lost_connection_content", {
variant: "body-m-bold",
children: " " + n.getRemainingTimeOfOfflineSession()
})]
})]
}),
actions: [{
close: !0,
label: _e.t("connection_toast_action_continue_offline", {
ns: "connection" ns: "connection"
}) })
}] }), r && (0, _w.jsxs)(Ys, {
}), n.setConnectionPopoverOpened(!0) as: "span",
} children: [_e.t("connection_toast_warning_lost_connection_remaining", {
ns: "connection"
}), (0, _w.jsx)(Ys, {
as: "span",
variant: "body-m-bold",
children: " " + e.getRemainingTimeOfOfflineSession()
})]
})]
}),
actions: [{
close: !0,
label: _e.t("connection_toast_action_continue_offline", {
ns: "connection"
})
}]
})
}, },
setConnection: n => { setConnection: n => {
const { const {
@ -56005,7 +56004,10 @@
r.mode !== n.mode && e((e => ({ r.mode !== n.mode && e((e => ({
application: { application: {
...e.application, ...e.application,
connection: n connection: {
...n,
needToBeCheck: !1
}
} }
}))) })))
} }
@ -58933,7 +58935,7 @@
reduceMotion: { reduceMotion: {
unessentialAnimationsDisabled: o unessentialAnimationsDisabled: o
} }
} = Ns(), s = i.systems && i.systems.length > 0, l = (0, Ee.useMemo)((() => { } = Ns(), s = i.systems && i.systems.length > 0, l = a.connection.mode === yw.ConnectionMode.NO_CONNECTION, c = (0, Ee.useMemo)((() => {
if (!t && !a.isStatusPopoverOpened && i.summaryStatus && i.summaryStatus !== yw.RSISystemStatus.OPERATIONAL) return "status-" + jw(i.summaryStatus) if (!t && !a.isStatusPopoverOpened && i.summaryStatus && i.summaryStatus !== yw.RSISystemStatus.OPERATIONAL) return "status-" + jw(i.summaryStatus)
}), [t, a.isStatusPopoverOpened, i.summaryStatus]); }), [t, a.isStatusPopoverOpened, i.summaryStatus]);
return (0, Ee.useEffect)((() => { return (0, Ee.useEffect)((() => {
@ -58947,8 +58949,8 @@
"data-test-id": "status", "data-test-id": "status",
"data-sol-discover": "status", "data-sol-discover": "status",
icon: (0, _w.jsx)(Ks, { icon: (0, _w.jsx)(Ks, {
color: l, color: c,
source: o ? mI : $C, source: o || l ? mI : $C,
isPlaying: !a.isStatusPopoverOpened && !t && i.summaryStatus !== yw.RSISystemStatus.OPERATIONAL isPlaying: !a.isStatusPopoverOpened && !t && i.summaryStatus !== yw.RSISystemStatus.OPERATIONAL
}), }),
label: e, label: e,
@ -59304,8 +59306,14 @@
gap: "100", gap: "100",
vertical: !0, vertical: !0,
children: [(0, _w.jsx)(Ys, { children: [(0, _w.jsx)(Ys, {
children: xt.t("error_launch_account_not_found_content", { children: (0, _w.jsx)(ft, {
ns: "errors" i18nKey: "error_launch_account_not_found_content",
t: xt.t,
ns: "errors",
components: [(0, _w.jsx)(zm, {
href: yw.configuration.copyPTUAccountSupportUrl,
external: !0
})]
}) })
}), (0, _w.jsx)(Ys, { }), (0, _w.jsx)(Ys, {
children: (0, _w.jsx)(ft, { children: (0, _w.jsx)(ft, {
@ -59322,7 +59330,7 @@
}) })
}), (0, _w.jsx)(Ys, { }), (0, _w.jsx)(Ys, {
children: xt.t("error_installer_error_code", { children: xt.t("error_installer_error_code", {
code: "8005", code: s.code,
ns: "errors" ns: "errors"
}) })
})] })]
@ -59361,7 +59369,9 @@
}) })
}); });
await pR.getState().dialog.actions.showAcknowledgeDialogErrorOccured({ await pR.getState().dialog.actions.showAcknowledgeDialogErrorOccured({
title: xt.t("error_launch_unknown_title"), title: xt.t("error_launch_unknown_title", {
ns: "errors"
}),
content: (0, _w.jsxs)(cl, { content: (0, _w.jsxs)(cl, {
gap: "100", gap: "100",
vertical: !0, vertical: !0,
@ -59373,7 +59383,7 @@
}) })
}), (0, _w.jsx)(Ys, { }), (0, _w.jsx)(Ys, {
children: xt.t("error_installer_error_code", { children: xt.t("error_installer_error_code", {
code: "6001", code: yw.LauncherSpecificLaunchErrorCodes.ERR_LAUNCH_UNKNOWN,
ns: "errors" ns: "errors"
}) })
})] })]
@ -63195,6 +63205,9 @@
}, { }, {
label: "5", label: "5",
value: 5 value: 5
},{
label: "1",
value: 1
}] : [{ }] : [{
label: "Max", label: "Max",
value: 25 value: 25
@ -66546,8 +66559,12 @@
}))), [n.actions, e]), (0, Ee.useEffect)((() => t((() => { }))), [n.actions, e]), (0, Ee.useEffect)((() => t((() => {
n.actions.setConnectionUnavailable() n.actions.setConnectionUnavailable()
}))), [n.actions, t]), (0, Ee.useEffect)((() => { }))), [n.actions, t]), (0, Ee.useEffect)((() => {
const e = () => n.actions.checkConnection(), const e = () => {
t = () => n.actions.checkConnection(); n.actions.checkConnection()
},
t = () => {
n.actions.checkConnection()
};
return window.addEventListener("offline", e), window.addEventListener("online", t), () => { return window.addEventListener("offline", e), window.addEventListener("online", t), () => {
window.removeEventListener("offline", e), window.removeEventListener("online", t) window.removeEventListener("offline", e), window.removeEventListener("online", t)
} }
@ -67228,4 +67245,4 @@
xD.createRoot(document.getElementById("root")).render((0, _w.jsx)(ID, {})), wD() xD.createRoot(document.getElementById("root")).render((0, _w.jsx)(ID, {})), wD()
})() })()
})(); })();
//# sourceMappingURL=main.ade910f7.js.map //# sourceMappingURL=main.d5394d7f.js.map