Skip to content

Commit b80a2d7

Browse files
committed
修复临时授权码登录预览图片的bug,releaseNotes国际化
1 parent baaa39b commit b80a2d7

File tree

13 files changed

+50
-26
lines changed

13 files changed

+50
-26
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
VERSION=1.5.1
2+
VERSION=1.5.2
33
NAME=oss-browser
44
CUSTOM=./custom
55

Readme.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ OSS Browser 提供类似windows资源管理器功能。用户可以很方便的
1010

1111
## 1. 客户端下载:
1212

13-
最新版本`1.5.1`,下载地址如下,解压即可使用。
13+
最新版本`1.5.2`,下载地址如下,解压即可使用。
1414

15-
> [<h4>Window x32版下载</h4>](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.5.1/oss-browser-win32-ia32.zip)
15+
> [<h4>Window x32版下载</h4>](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.5.2/oss-browser-win32-ia32.zip)
1616
1717

18-
> [<h4>Window x64版下载</h4>](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.5.1/oss-browser-win32-x64.zip)
18+
> [<h4>Window x64版下载</h4>](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.5.2/oss-browser-win32-x64.zip)
1919
2020

21-
> [<h4>Mac zip版下载</h4>](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.5.1/oss-browser-darwin-x64.zip)
21+
> [<h4>Mac zip版下载</h4>](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.5.2/oss-browser-darwin-x64.zip)
2222
2323

24-
> [<h4>Ubuntu x64版</h4>](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.5.1/oss-browser-linux-x64.zip)
24+
> [<h4>Ubuntu x64版</h4>](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.5.2/oss-browser-linux-x64.zip)
2525
26-
> [<h4>Ubuntu x32版</h4>](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.5.1/oss-browser-linux-ia32.zip)
26+
> [<h4>Ubuntu x32版</h4>](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.5.2/oss-browser-linux-ia32.zip)
2727
2828

2929
其他版本暂不提供,可以自行build。

all-releases.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,23 @@
44

55
||Windows ia32|Windows x64| Mac(zip) |Linux ia32|Linux x64|Release note|
66
|-----|-----|-----|-----|--------|--------|---|
7+
|1.5.2|[Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.5.2/oss-browser-win32-ia32.zip) |[Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.5.2/oss-browser-win32-x64.zip) | [Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.5.2/oss-browser-darwin-x64.zip) | [Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.5.2/oss-browser-linux-ia32.zip) | [Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.5.2/oss-browser-linux-x64.zip)|[1.5.2.md](release-notes/1.5.2.en-US.md)|
78
|1.5.1|[Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.5.1/oss-browser-win32-ia32.zip) |[Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.5.1/oss-browser-win32-x64.zip) | [Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.5.1/oss-browser-darwin-x64.zip) | [Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.5.1/oss-browser-linux-ia32.zip) | [Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.5.1/oss-browser-linux-x64.zip)|[1.5.1.md](release-notes/1.5.1.md)|
89
|1.5.0|[Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.5.0/oss-browser-win32-ia32.zip) |[Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.5.0/oss-browser-win32-x64.zip) | [Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.5.0/oss-browser-darwin-x64.zip) | [Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.5.0/oss-browser-linux-ia32.zip) | [Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.5.0/oss-browser-linux-x64.zip)|[1.5.0.md](release-notes/1.5.0.md)|
910

1011
## Download from Hongkong
1112

1213
||Windows ia32|Windows x64| Mac(zip) |Linux ia32|Linux x64|Release note|
1314
|-----|-----|-----|-----|--------|--------|---|
15+
|1.5.2|[Download](https://client-publish-hongkong.oss-cn-hongkong.aliyuncs.com/oss-browser-publish/1.5.2/oss-browser-win32-ia32.zip) |[Download](https://client-publish-hongkong.oss-cn-hongkong.aliyuncs.com/oss-browser-publish/1.5.2/oss-browser-win32-x64.zip) | [Download](https://client-publish-hongkong.oss-cn-hongkong.aliyuncs.com/oss-browser-publish/1.5.2/oss-browser-darwin-x64.zip) | [Download](https://client-publish-hongkong.oss-cn-hongkong.aliyuncs.com/oss-browser-publish/1.5.2/oss-browser-linux-ia32.zip) | [Download](https://client-publish-hongkong.oss-cn-hongkong.aliyuncs.com/oss-browser-publish/1.5.2/oss-browser-linux-x64.zip)|[1.5.2.md](release-notes/1.5.2.en-US.md)|
1416
|1.5.1|[Download](https://client-publish-hongkong.oss-cn-hongkong.aliyuncs.com/oss-browser-publish/1.5.1/oss-browser-win32-ia32.zip) |[Download](https://client-publish-hongkong.oss-cn-hongkong.aliyuncs.com/oss-browser-publish/1.5.1/oss-browser-win32-x64.zip) | [Download](https://client-publish-hongkong.oss-cn-hongkong.aliyuncs.com/oss-browser-publish/1.5.1/oss-browser-darwin-x64.zip) | [Download](https://client-publish-hongkong.oss-cn-hongkong.aliyuncs.com/oss-browser-publish/1.5.1/oss-browser-linux-ia32.zip) | [Download](https://client-publish-hongkong.oss-cn-hongkong.aliyuncs.com/oss-browser-publish/1.5.1/oss-browser-linux-x64.zip)|[1.5.1.md](release-notes/1.5.1.md)|
1517
|1.5.0|[Download](https://client-publish-hongkong.oss-cn-hongkong.aliyuncs.com/oss-browser-publish/1.5.0/oss-browser-win32-ia32.zip) |[Download](https://client-publish-hongkong.oss-cn-hongkong.aliyuncs.com/oss-browser-publish/1.5.0/oss-browser-win32-x64.zip) | [Download](https://client-publish-hongkong.oss-cn-hongkong.aliyuncs.com/oss-browser-publish/1.5.0/oss-browser-darwin-x64.zip) | [Download](https://client-publish-hongkong.oss-cn-hongkong.aliyuncs.com/oss-browser-publish/1.5.0/oss-browser-linux-ia32.zip) | [Download](https://client-publish-hongkong.oss-cn-hongkong.aliyuncs.com/oss-browser-publish/1.5.0/oss-browser-linux-x64.zip)|[1.5.0.md](release-notes/1.5.0.md)|
1618

1719
## Download from Eastern US
1820

1921
||Windows ia32|Windows x64| Mac(zip) |Linux ia32|Linux x64|Release note|
2022
|-----|-----|-----|-----|--------|--------|---|
23+
|1.5.2|[Download](https://client-publish-useast1.oss-us-east-1.aliyuncs.com/oss-browser-publish/1.5.2/oss-browser-win32-ia32.zip) |[Download](https://client-publish-useast1.oss-us-east-1.aliyuncs.com/oss-browser-publish/1.5.2/oss-browser-win32-x64.zip) | [Download](https://client-publish-useast1.oss-us-east-1.aliyuncs.com/oss-browser-publish/1.5.2/oss-browser-darwin-x64.zip) | [Download](https://client-publish-useast1.oss-us-east-1.aliyuncs.com/oss-browser-publish/1.5.2/oss-browser-linux-ia32.zip) | [Download](https://client-publish-useast1.oss-us-east-1.aliyuncs.com/oss-browser-publish/1.5.2/oss-browser-linux-x64.zip)|[1.5.2.md](release-notes/1.5.2.en-US.md)|
2124
|1.5.1|[Download](https://client-publish-useast1.oss-us-east-1.aliyuncs.com/oss-browser-publish/1.5.1/oss-browser-win32-ia32.zip) |[Download](https://client-publish-useast1.oss-us-east-1.aliyuncs.com/oss-browser-publish/1.5.1/oss-browser-win32-x64.zip) | [Download](https://client-publish-useast1.oss-us-east-1.aliyuncs.com/oss-browser-publish/1.5.1/oss-browser-darwin-x64.zip) | [Download](https://client-publish-useast1.oss-us-east-1.aliyuncs.com/oss-browser-publish/1.5.1/oss-browser-linux-ia32.zip) | [Download](https://client-publish-useast1.oss-us-east-1.aliyuncs.com/oss-browser-publish/1.5.1/oss-browser-linux-x64.zip)|[1.5.1.md](release-notes/1.5.1.md)|
2225
|1.5.0|[Download](https://client-publish-useast1.oss-us-east-1.aliyuncs.com/oss-browser-publish/1.5.0/oss-browser-win32-ia32.zip) |[Download](https://client-publish-useast1.oss-us-east-1.aliyuncs.com/oss-browser-publish/1.5.0/oss-browser-win32-x64.zip) | [Download](https://client-publish-useast1.oss-us-east-1.aliyuncs.com/oss-browser-publish/1.5.0/oss-browser-darwin-x64.zip) | [Download](https://client-publish-useast1.oss-us-east-1.aliyuncs.com/oss-browser-publish/1.5.0/oss-browser-linux-ia32.zip) | [Download](https://client-publish-useast1.oss-us-east-1.aliyuncs.com/oss-browser-publish/1.5.0/oss-browser-linux-x64.zip)|[1.5.0.md](release-notes/1.5.0.md)|
2326

app/components/services/auto-upgrade.js

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
angular.module('web')
2-
.factory('autoUpgradeSvs', [function() {
2+
.factory('autoUpgradeSvs', ['settingsSvs',function(settingsSvs) {
33

44
var util = require('./node/ossstore/lib/util')
55
var NAME = 'oss-browser';
@@ -43,13 +43,19 @@ angular.module('web')
4343

4444

4545

46-
function getReleaseNote(version, fn) {
47-
$.get('release-notes/' + version + '.md', fn);
46+
function getReleaseNote(version, lang, fn) {
47+
if(compareVersion(version, '1.5.1')<=0)
48+
$.get('../release-notes/' + version + '.md', fn);
49+
else
50+
$.get('../release-notes/' + version +'.'+lang+ '.md', fn);
4851
}
4952

5053
//获取最新releaseNote
51-
function getLastestReleaseNote(version, fn) {
52-
$.get(release_notes_url + version + '.md', fn);
54+
function getLastestReleaseNote(version, lang, fn) {
55+
if(compareVersion(version, '1.5.1')<=0)
56+
$.get(release_notes_url + version + '.md', fn);
57+
else
58+
$.get(release_notes_url + version +'.'+lang+ '.md', fn);
5359
}
5460

5561

app/main/_/top.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,12 @@ angular.module('web')
8080

8181
function showReleaseNote(){
8282
var converter = new showdown.Converter();
83-
fs.readFile(path.join(__dirname, 'release-notes', Global.app.version+'.md'), function(err, text){
83+
84+
var url = autoUpgradeSvs.compareVersion(Global.app.version,'1.5.1')<=0
85+
? path.join(__dirname, 'release-notes', Global.app.version+'.md')
86+
:path.join(__dirname, 'release-notes', Global.app.version+'.'+$scope.langSettings.lang+'.md');
87+
88+
fs.readFile(url, function(err, text){
8489
if(err){
8590
console.error(err);
8691
return;

app/main/files/files.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -461,12 +461,14 @@ angular.module('web')
461461
var authInfo = AuthInfo.get();
462462
if(authInfo.id.indexOf('STS.')==0){
463463
angular.forEach(result, function (n) {
464-
ossSvs2.getImageBase64Url(info.region, info.bucket, n.path).then(function(data){
465-
if(data.ContentType.indexOf('image/')==0){
466-
var base64str = new Buffer(data.Body).toString('base64');
467-
n.pic_url = 'data:'+data.ContentType+';base64,'+base64str;
468-
}
469-
})
464+
if (!n.isFolder && fileSvs.getFileType(n).type == 'picture') {
465+
ossSvs2.getImageBase64Url(info.region, info.bucket, n.path).then(function(data){
466+
if(data.ContentType.indexOf('image/')==0){
467+
var base64str = new Buffer(data.Body).toString('base64');
468+
n.pic_url = 'data:'+data.ContentType+';base64,'+base64str;
469+
}
470+
})
471+
}
470472
});
471473
}
472474
else{

app/main/modals/about.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ angular.module('web')
3232

3333
if(!$scope.info.isLastVersion){
3434
var converter = new showdown.Converter();
35-
autoUpgradeSvs.getLastestReleaseNote($scope.info.lastVersion, function(text) {
35+
autoUpgradeSvs.getLastestReleaseNote($scope.info.lastVersion, langSettings.lang, function(text) {
3636
text = text + '';
3737
var html = converter.makeHtml(text);
3838
$scope.info.lastReleaseNote = html;

gen.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const fs = require('fs');
22
const path = require('path');
33

44
var start_version = '1.5.0';
5-
5+
var start_i18n_version = '1.5.2';
66
const PRES = [
77
{title: 'China(Hangzhou)', url: 'https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/'},
88
{title: 'Hongkong', url: 'https://client-publish-hongkong.oss-cn-hongkong.aliyuncs.com/oss-browser-publish/'},
@@ -16,8 +16,8 @@ var vs = [];
1616
var arr = fs.readdirSync('./release-notes');
1717
arr.forEach(n => {
1818
var version = n.substring(0, n.length - path.extname(n).length);
19-
if(compareVersion(version, start_version)<=0)
20-
vs.push(version);
19+
try{ version = version.match(/^(\d+\.\d+\.\d+)/)[0] }catch(e){}
20+
if(vs.indexOf(version)==-1 && compareVersion(version, start_version)<=0) vs.push(version);
2121
});
2222

2323
//sort by version
@@ -30,7 +30,9 @@ PRES.forEach(n=>{
3030
|-----|-----|-----|-----|--------|--------|---|`)
3131
vs.forEach(version => {
3232
var str = `|${version}|[Download](${n.url}${version}/oss-browser-win32-ia32.zip) |[Download](${n.url}${version}/oss-browser-win32-x64.zip) | [Download](${n.url}${version}/oss-browser-darwin-x64.zip) | [Download](${n.url}${version}/oss-browser-linux-ia32.zip) | [Download](${n.url}${version}/oss-browser-linux-x64.zip)|`;
33-
str += '[' + version + '.md](release-notes/' + version + '.md)|'
33+
if(compareVersion(version, start_i18n_version)>=0)
34+
str += '[' + version + '.md](release-notes/' + version + '.md)|'
35+
else str += '[' + version + '.md](release-notes/' + version+'.en-US.md)|'
3436
t.push(str);
3537
});
3638
t.push('')

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "oss-browser",
3-
"version": "1.5.1",
3+
"version": "1.5.2",
44
"main": "dist/main.js",
55
"scripts": {
66
"test": "ava test",

release-notes/1.5.2.en-US.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
1. Fix the bug of the preview picture when the temporary authorization code is used for login.
2+
2. Release Notes internationalization.

0 commit comments

Comments
 (0)