Skip to content

Commit d1c10b8

Browse files
committed
紧急修复国服修改域名导致的扩展资源无法使用
修改配置文件名称以防止与迁移的 1.x 用户发生冲突 发布v2.0.0-beta.4
1 parent 625e656 commit d1c10b8

File tree

7 files changed

+8
-14
lines changed

7 files changed

+8
-14
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "majsoul-plus-client",
3-
"version": "2.0.0-beta.3",
3+
"version": "2.0.0-beta.4",
44
"productName": "Majsoul Plus",
55
"author": "MajsoulPlus Team",
66
"description": "Majsoul Plus",

src/bin/main/mainLoader.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { MajsoulPlus } from '../../majsoul_plus'
66
const userConfigs: MajsoulPlus.UserConfig = require(Global.UserConfigPath)
77

88
const remoteDomains = [
9-
{ id: 0, name: 'zh', domain: 'https://majsoul.union-game.com/0/' },
9+
{ id: 0, name: 'zh', domain: 'https://www.majsoul.com/1/' },
1010
{ id: 1, name: 'jp', domain: 'https://game.mahjongsoul.com/' },
1111
{ id: 2, name: 'en', domain: 'https://mahjongsoul.game.yo-star.com/' }
1212
]

src/extension/manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ export default class MajsoulPlusExtensionManager extends BaseManager {
136136
await Promise.all(this.useScriptPromises)
137137

138138
// 针对 code.js 进行特殊处理 注入扩展
139-
const originalUrl = ctx.request.originalUrl.replace(/^\/0\//g, '')
139+
const originalUrl = ctx.request.originalUrl.replace(/^\/\d\//g, '')
140140
let prefix = '',
141141
postfix = ''
142142
if (path.basename(originalUrl) === 'code.js') {

src/global.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export const GlobalPath: MajsoulPlus.GlobalPath = {
5151

5252
// tslint:disable-next-line
5353
export const RemoteDomains = [
54-
{ id: 0, name: 'zh', domain: 'https://majsoul.union-game.com/0/' },
54+
{ id: 0, name: 'zh', domain: 'https://www.majsoul.com/1/' },
5555
{ id: 1, name: 'jp', domain: 'https://game.mahjongsoul.com/' },
5656
{ id: 2, name: 'en', domain: 'https://mahjongsoul.game.yo-star.com/' }
5757
]
@@ -65,7 +65,7 @@ export const Global: MajsoulPlus.Global = {
6565
ResourcePackConfigPath: '',
6666
ExtensionConfigPath: '',
6767
ToolConfigPath: '',
68-
UserConfigPath: path.join(appDataDir, 'configs-user.json'),
68+
UserConfigPath: path.join(appDataDir, 'user-config.json'),
6969
LocalCachePath: path.join(appDataDir, GlobalPath.LocalDir),
7070
ResourceFolderPath: path.join(appDataDir, GlobalPath.ResourcePackDir),
7171
ExtensionFolderPath: path.join(appDataDir, GlobalPath.ExtensionDir),
@@ -77,11 +77,6 @@ export const Global: MajsoulPlus.Global = {
7777
frame: true,
7878
resizable: true,
7979
backgroundColor: '#000000',
80-
webPreferences: {
81-
// webSecurity: false
82-
// nodeIntegration: false
83-
// plugins: true
84-
},
8580
autoHideMenuBar: true,
8681
// useContentSize: true,
8782
icon: appIcon,
@@ -96,7 +91,6 @@ export const Global: MajsoulPlus.Global = {
9691
backgroundColor: '#FFFFFF',
9792
webPreferences: {
9893
webSecurity: false
99-
// allowRunningInsecureContent: true
10094
},
10195
title: '雀魂Plus',
10296
autoHideMenuBar: true,

src/manager/global.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
appDataDir: ipcRenderer.sendSync('sandbox-appdata-request'),
66
UserConfigPath: path.join(
77
ipcRenderer.sendSync('sandbox-appdata-request'),
8-
'configs-user.json'
8+
'user-config.json'
99
),
1010
ResourcePackDir: path.join(
1111
ipcRenderer.sendSync('sandbox-appdata-request'),

src/manager/utils/Ping.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as tcpPing from 'tcp-ping'
33
import i18n from '../../i18n'
44

55
export const remoteDomains = [
6-
{ id: 0, name: 'zh', domain: 'https://majsoul.union-game.com/0' },
6+
{ id: 0, name: 'zh', domain: 'https://www.majsoul.com/1' },
77
{ id: 1, name: 'jp', domain: 'https://game.mahjongsoul.com' },
88
{ id: 2, name: 'en', domain: 'https://mahjongsoul.game.yo-star.com' }
99
]

src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ export async function getRemoteOrCachedFile(
207207
encode = true,
208208
callback: (data: Buffer) => Buffer = data => data
209209
): Promise<{ code: number; data: Buffer | string }> {
210-
const originalUrl = url.replace(/^\/0\//g, '')
210+
const originalUrl = url.replace(/^\/\d\//g, '')
211211
const isEncrypted = isEncryptRes(originalUrl)
212212
const isRoutePath = isPath(originalUrl)
213213
const localPath = getLocalURI(originalUrl)

0 commit comments

Comments
 (0)