no message

This commit is contained in:
kuaifan 2022-04-18 11:40:14 +08:00
parent ea7d889d99
commit 7435fa69f2
12 changed files with 32 additions and 40 deletions

View File

@ -219,7 +219,7 @@ class DialogController extends AbstractController
*/
public function msg__sendtext()
{
Base::checkClientVersion('0.12.95');
Base::checkClientVersion('0.13.33');
$user = User::auth();
//
$chat_nickname = Base::settingFind('system', 'chat_nickname');

View File

@ -113,17 +113,20 @@ class IndexController extends InvokeController
$genericVersion = Request::header('generic-version');
// 上传
if (preg_match("/^\d+\.\d+\.\d+$/", $genericVersion)) {
$genericPath = "uploads/desktop/" . $genericVersion . "/";
$res = Base::upload([
"file" => Request::file('file'),
"type" => 'desktop',
"path" => $genericPath,
"fileName" => true
]);
if (Base::isSuccess($res)) {
file_put_contents($latestFile, $genericVersion);
$latestVersion = file_exists($latestFile) ? trim(file_get_contents($latestFile)) : "0.0.1";
if (version_compare($genericVersion, $latestVersion) > -1) { // 限制上传版本必须 ≥ 当前版本
$genericPath = "uploads/desktop/{$genericVersion}/";
$res = Base::upload([
"file" => Request::file('file'),
"type" => 'desktop',
"path" => $genericPath,
"fileName" => true
]);
if (Base::isSuccess($res)) {
file_put_contents($latestFile, $genericVersion);
}
return $res;
}
return $res;
}
// 列表
if (preg_match("/^\d+\.\d+\.\d+$/", $name)) {
@ -132,6 +135,9 @@ class IndexController extends InvokeController
$lists = Base::readDir($dirPath);
$files = [];
foreach ($lists as $file) {
if (str_ends_with($file, '.yml')) {
continue;
}
$fileName = Base::leftDelete($file, $dirPath);
$files[] = [
'name' => substr($fileName, 1),

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

5
electron/build.js vendored
View File

@ -68,8 +68,6 @@ function genericPublish(url, version) {
uploadOra.succeed(`${filename} upload successful`)
}).catch(_ => {
uploadOra.fail(`${filename} upload fail`)
}).finally(_ => {
fs.unlinkSync(localFile)
})
}
}
@ -79,6 +77,8 @@ function genericPublish(url, version) {
// 生成配置、编译应用
function startBuild(data, publish) {
// delete dist folder
fse.removeSync(path.resolve(__dirname, "dist"))
// information
console.log("Name: " + data.name);
console.log("AppId: " + data.id);
@ -111,7 +111,6 @@ function startBuild(data, publish) {
econfig.build.appId = data.id;
econfig.build.artifactName = utils.getDomain(data.url) + "-v${version}-${os}-${arch}.${ext}";
econfig.build.nsis.artifactName = utils.getDomain(data.url) + "-v${version}-${os}-${arch}.${ext}";
econfig.build.pkg.mustClose = [data.id];
if (!process.env.APPLEID || !process.env.APPLEIDPASS) {
delete econfig.build.afterSign;
}

View File

@ -2,7 +2,11 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
</dict>
</plist>

View File

@ -86,13 +86,6 @@
"arm64"
]
},
{
"target": "pkg",
"arch": [
"x64",
"arm64"
]
},
{
"target": "dmg",
"arch": [
@ -124,16 +117,6 @@
"oneClick": false,
"artifactName": "${productName}-v${version}-${os}-${arch}.${ext}",
"allowToChangeInstallationDirectory": true
},
"pkg": {
"installLocation": "/Applications",
"mustClose": [],
"allowAnywhere": true,
"allowCurrentUserHome": true,
"allowRootDirectory": true,
"isVersionChecked": true,
"isRelocatable": false,
"overwriteAction": "upgrade"
}
},
"config": {

View File

@ -166,7 +166,7 @@ export default {
"mode": "edit",
"lang": lang,
"user": {
"id": this.userInfo.userid,
"id": String(this.userInfo.userid),
"name": this.userInfo.nickname
},
"customization": {