Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
kuaifan committed Oct 31, 2024
1 parent 698d03f commit df8fdd5
Show file tree
Hide file tree
Showing 82 changed files with 574 additions and 553 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@

All notable changes to this project will be documented in this file.

## [0.39.37]

### Bug Fixes

- 设置子任务时间主任务出现1970的情况
- 消息溢出的情况

### Features

- 消息翻译支持切换语言

### Performance

- 优化国际化语言
- 审批支持点击头像进入私聊
- 优化删除临时文件
- 优化缩略图

## [0.39.21]

### Bug Fixes
Expand Down
9 changes: 6 additions & 3 deletions app/Module/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -2381,10 +2381,11 @@ public static function upload($param)
// 转换视频格式
$output = Base::rightReplace($array['file'], ".{$array['ext']}", '.mp4');
if ($array['ext'] === 'webm') {
shell_exec("ffmpeg -y -i {$array['file']} -strict experimental {$output} 2>&1");
$command = sprintf("ffmpeg -y -i %s -strict experimental %s 2>&1", escapeshellarg($array['file']), escapeshellarg($output));
} else {
shell_exec("ffmpeg -y -i {$array['file']} -c:v copy -c:a copy {$output} 2>&1");
$command = sprintf("ffmpeg -y -i %s -c:v copy -c:a copy %s 2>&1", escapeshellarg($array['file']), escapeshellarg($output));
}
@shell_exec($command);
if (file_exists($output) && filesize($output) > 0) {
@unlink($array['file']);
$array = array_merge($array, [
Expand All @@ -2400,12 +2401,14 @@ public static function upload($param)
if (in_array($array['ext'], ['mov', 'webm', 'mp4'])) {
// 视频尺寸
$thumbFile = $array['file'] . '_thumb.jpg';
shell_exec("ffmpeg -y -i {$array['file']} -ss 1 -vframes 1 {$thumbFile} 2>&1");
$command = sprintf("ffmpeg -y -i %s -ss 1 -vframes 1 %s 2>&1", escapeshellarg($array['file']), escapeshellarg($thumbFile));
@shell_exec($command);
if (file_exists($thumbFile) && filesize($thumbFile) > 0) {
$paramet = getimagesize($thumbFile);
$array['width'] = $paramet[0];
$array['height'] = $paramet[1];
$array['thumb'] = $array['path'] . '_thumb.jpg';
Image::compressImage($thumbFile, null, 80);
}
}
if (in_array($array['ext'], ['jpg', 'jpeg', 'webp', 'gif', 'png'])) {
Expand Down
4 changes: 2 additions & 2 deletions app/Tasks/DeleteTmpTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ public function start()
}
$files = Base::recursiveFiles(public_path('uploads/tmp'));
foreach ($files as $file) {
$time = filemtime($file);
if ($time < time() - 3600 * 24 * $day) {
$time = @filemtime($file);
if ($time && $time < time() - 3600 * 24 * $day) {
unlink($file);
}
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "DooTask",
"version": "0.39.21",
"codeVerson": 147,
"version": "0.39.37",
"codeVerson": 148,
"description": "DooTask is task management system.",
"scripts": {
"start": "./cmd dev",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

6 changes: 0 additions & 6 deletions public/js/build/DialogWrapper.86de099a.js

This file was deleted.

6 changes: 6 additions & 0 deletions public/js/build/DialogWrapper.df01caa2.js

Large diffs are not rendered by default.

Loading

0 comments on commit df8fdd5

Please sign in to comment.