diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..7e3649ac --- /dev/null +++ b/.editorconfig @@ -0,0 +1,16 @@ +# http://editorconfig.org +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false + +[Makefile] +indent_style = tab diff --git a/.eslintrc.json b/.eslintrc.json index b99546e3..730d1bb1 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,12 +1,36 @@ { - "parserOptions": { - "ecmaVersion": 6, - "sourceType": "module", - "ecmaFeatures": { - "jsx": true - } - }, - "rules": { - "semi": 2 + "parser": "babel-eslint", + "parserOptions": { + "ecmaVersion": 6, + "sourceType": "module", + "ecmaFeatures": { + "jsx": false } + }, + "rules": { + "semi": 2 + }, + "extends": ["eslint:recommended", "plugin:prettier/recommended"], + "ignorePatterns": ["static/", "vendor/", "dist/", "node_modules/", "test/"], + "env": { + "es6": true, + "browser": true, + "node": true + }, + "globals": { + "angular": "readonly", + "moment": "readonly", + "CodeMirror": "readonly", + "Global": "readonly", + "openExternal": "readonly", + "$": "writable", + "Clipboard": "readonly", + "fs": "readonly", + "path": "readonly", + "os": "readonly", + "request": "readonly", + "custom": "writable", + "OSS": "readonly", + "ALY": "readonly" + } } diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..444e8b96 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/.gitignore b/.gitignore index f064fddf..c1d5c9c7 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,13 @@ build .DS_Store releases _up.sh +_up0.sh +ossutil* +*-app.asar +.ossutil_checkpoint +ossutil_output +app.asar + + +#tool +.vscode/ diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..1fa63681 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,5 @@ +static/ +vendor/ +dist/ +node_modules/ +.github/ diff --git a/Makefile b/Makefile index 51b39ff9..ba8b7b55 100644 --- a/Makefile +++ b/Makefile @@ -1,54 +1,77 @@ -ELECTRON_MIRROR=http://npm.taobao.org/mirrors/electron/ -ELECTRON_VERSION=1.7.5 -BUILD=ELECTRON_MIRROR=$(ELECTRON_MIRROR) electron-packager ./dist --asar --overwrite --out=build --version $(ELECTRON_VERSION) -VERSION=1.2.5 + +VERSION=1.11.0 NAME=oss-browser +CUSTOM=./custom + +GULP=node ./node_modules/gulp/bin/gulp.js +PKGER=node node_modules/electron-packager/cli.js +ZIP=node ../zip.js + +ELECTRON_MIRROR=http://npm.taobao.org/mirrors/electron/ +ELECTRON_VERSION=1.8.4 +BUILD=ELECTRON_MIRROR=$(ELECTRON_MIRROR) $(PKGER) ./dist $(NAME) --asar --overwrite --out=build --version $(ELECTRON_VERSION) --app-version $(VERSION) +ELECTON=./node_modules/.bin/electron i: cnpm i clean: - npm run clean - find . -name .DS_Store | xargs rm -rf - + rm -rf dist node_modules build releases node/crc64/cpp-addon/node_modules node/crc64/electron-crc64-prebuild/node_modules node/ossstore/node_modules dev: - NODE_ENV=development electron . + NODE_ENV=development ${ELECTON} . --inspect=5858 +debug: + NODE_ENV=development ${ELECTON} . --inspect-brk=5858 run: - npm run dev + custom=$(CUSTOM) npm run dev prod: npm run prod watch: - npm run watch + $(GULP) watch --custom=$(CUSTOM) build: - npm run build + $(GULP) build --custom=$(CUSTOM) + node gen.js win64: - $(BUILD) --platform=win32 --arch=x64 + $(BUILD) --platform=win32 --arch=x64 --icon=$(CUSTOM)/icon.ico + cp -rf $(CUSTOM) build/$(NAME)-win32-x64/resources rm -rf releases/$(VERSION)/$(NAME)-win32-x64.zip && mkdir -p releases/$(VERSION) - cd build && zip ../releases/$(VERSION)/$(NAME)-win32-x64.zip -r $(NAME)-win32-x64 + cd build && $(ZIP) ../releases/$(VERSION)/$(NAME)-win32-x64.zip $(NAME)-win32-x64/ win32: - $(BUILD) --platform=win32 --arch=ia32 + $(BUILD) --platform=win32 --arch=ia32 --icon=$(CUSTOM)/icon.ico + cp -rf $(CUSTOM) build/$(NAME)-win32-ia32/resources rm -rf releases/$(VERSION)/$(NAME)-win32-ia32.zip && mkdir -p releases/$(VERSION) - cd build && zip ../releases/$(VERSION)/$(NAME)-win32-ia32.zip -r $(NAME)-win32-ia32 + cd build && $(ZIP) ../releases/$(VERSION)/$(NAME)-win32-ia32.zip $(NAME)-win32-ia32/ linux64: $(BUILD) --platform=linux --arch=x64 + cp -rf $(CUSTOM) build/$(NAME)-linux-x64/resources rm -rf releases/$(VERSION)/$(NAME)-linux-x64.zip && mkdir -p releases/$(VERSION) - cd build && zip ../releases/$(VERSION)/$(NAME)-linux-x64.zip -r $(NAME)-linux-x64 -mac_build: - $(BUILD) --platform=darwin --arch=x64 --icon=./app/icons/icon.icns + cd build && $(ZIP) ../releases/$(VERSION)/$(NAME)-linux-x64.zip $(NAME)-linux-x64/ +linux32: + $(BUILD) --platform=linux --arch=ia32 + cp -rf $(CUSTOM) build/$(NAME)-linux-ia32/resources + rm -rf releases/$(VERSION)/$(NAME)-linux-ia32.zip && mkdir -p releases/$(VERSION) + cd build && $(ZIP) ../releases/$(VERSION)/$(NAME)-linux-ia32.zip $(NAME)-linux-ia32/ +mac: + $(BUILD) --platform=darwin --arch=x64 --icon=$(CUSTOM)/icon.icns + cp -rf $(CUSTOM) build/$(NAME)-darwin-x64/$(NAME).app/Contents/Resources rm -rf releases/$(VERSION)/$(NAME)-darwin-x64.zip && mkdir -p releases/$(VERSION) - #cd build && zip ../releases/$(VERSION)/$(NAME)-darwin-x64.zip -r $(NAME)-darwin-x64 -mac:mac_build - rm build/$(NAME)-darwin-x64/LICENSE* build/$(NAME)-darwin-x64/version - ln -s /Applications/ build/$(NAME)-darwin-x64/Applications + cd build && $(ZIP) ../releases/$(VERSION)/$(NAME)-darwin-x64.zip $(NAME)-darwin-x64/ +dmg: + rm build/$(NAME)-darwin-x64/LICENSE* build/$(NAME)-darwin-x64/version || continue + ln -s /Applications/ build/$(NAME)-darwin-x64/Applications || continue #cp dist/icons/icon.icns build/$(NAME)-darwin-x64/.VolumeIcon.icns #mkdir -p build/$(NAME)-darwin-x64/.background #cp dist/icons/background.tiff build/$(NAME)-darwin-x64/.background - rm -f releases/$(VERSION)/$(NAME).dmg - hdiutil create -size 250M -format UDZO -srcfolder build/$(NAME)-darwin-x64 releases/$(VERSION)/$(NAME).dmg - -all:win32 win64 linux64 mac - + rm -f releases/$(VERSION)/$(NAME).dmg || continue + hdiutil create -size 250M -format UDZO -srcfolder build/$(NAME)-darwin-x64 -o releases/$(VERSION)/$(NAME).dmg +all:win32 win64 linux32 linux64 mac asar + @echo 'Done' +asar: + mkdir -p releases/$(VERSION)/darwin-x64 && cp build/$(NAME)-darwin-x64/$(NAME).app/Contents/Resources/app.asar releases/$(VERSION)/darwin-x64 + mkdir -p releases/$(VERSION)/win32-x64 && cp build/$(NAME)-win32-x64/resources/app.asar releases/$(VERSION)/win32-x64 + mkdir -p releases/$(VERSION)/win32-ia32 && cp build/$(NAME)-win32-ia32/resources/app.asar releases/$(VERSION)/win32-ia32 + mkdir -p releases/$(VERSION)/linux-x64 && cp build/$(NAME)-linux-x64/resources/app.asar releases/$(VERSION)/linux-x64 + mkdir -p releases/$(VERSION)/linux-ia32 && cp build/$(NAME)-linux-ia32/resources/app.asar releases/$(VERSION)/linux-ia32 .PHONY:build diff --git a/README-CN.md b/README-CN.md new file mode 100644 index 00000000..4bb3d40f --- /dev/null +++ b/README-CN.md @@ -0,0 +1,187 @@ +# OSS Browser + +OSS Browser 鎻愪緵绫讳技 windows 璧勬簮绠$悊鍣ㄥ姛鑳姐傜敤鎴峰彲浠ュ緢鏂逛究鐨勬祻瑙堟枃浠讹紝涓婁紶涓嬭浇鏂囦欢锛屾敮鎸佹柇鐐圭画浼犵瓑銆 + +鏈伐鍏蜂娇鐢ㄥ紑婧愭鏋 Angular 1.x + [Electron](http://electron.atom.io/)鍒朵綔銆 + +> Electron 妗嗘灦鍙互璁╀綘浣跨敤 JavaScript锛孒TML 鍜 CSS 鏋勫缓璺ㄥ钩鍙扮殑妗岄潰搴旂敤绋嬪簭銆傚畠鏄熀浜 node.js 鍜 Chromium 寮婧愰」鐩侲lectron 鍙互鎵撳寘鍑鸿法骞冲彴鐨勭▼搴忥紝杩愯鍦 Mac锛學indows 鍜 Linux 涓娿 + +## 1. 鏀寔骞冲彴 + +Windows7 above, Linux and Mac,涓嶅缓璁娇鐢 windows XP 骞冲彴鍜 windows Server 骞冲彴 + +## 2. 瀹㈡埛绔笅杞斤細 + +鏈鏂扮増鏈琡1.9.5`锛屼笅杞藉湴鍧濡備笅锛岃В鍘嬪嵆鍙娇鐢ㄣ + +> [

Window x32 鐗堜笅杞

](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.9.5/oss-browser-win32-ia32.zip) + +> [

Window x64 鐗堜笅杞

](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.9.5/oss-browser-win32-x64.zip) + +> [

Mac zip 鐗堜笅杞

](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.9.5/oss-browser-darwin-x64.zip) + +> [

Ubuntu x64 鐗

](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.9.5/oss-browser-linux-x64.zip) + +> [

Ubuntu x32 鐗

](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.9.5/oss-browser-linux-ia32.zip) + +鍏朵粬鐗堟湰鏆備笉鎻愪緵锛屽彲浠ヨ嚜琛 build銆 + +> [鎵鏈夌増鏈笅杞絔(all-releases.md) + +## 3. 鍔熻兘浠嬬粛: + +``` +鍔熻兘Map + |-- 鐧诲綍锛氭敮鎸丄K鐧诲綍鍜屾巿鏉冪爜鐧诲綍銆 + |-- Bucket绠$悊锛屾柊寤篵ucket锛屽垹闄ucket锛宐ucket鏉冮檺淇敼锛岀鐗囩鐞嗐 + |-- 鏂囦欢绠$悊锛氱洰褰曪紙鍖呮嫭bucket锛夊拰鏂囦欢鐨勫鍒犳敼鏌ワ紝 澶嶅埗, 鏂囦欢棰勮绛夈 + |-- 鏂囦欢浼犺緭浠诲姟绠$悊锛 涓婁紶涓嬭浇锛屾柇鐐圭画浼犮 + |-- 鍦板潃鏍忓姛鑳斤紙鏀寔oss://鍗忚URL锛屾祻瑙堝巻鍙插墠杩涘悗閫锛屼繚瀛樹功绛撅級 + |-- 鎺堟潈鍔熻兘锛 绠鍖朢AM Policy鎺堟潈銆 + |-- 鐢熸垚鎺堟潈鐮侊細 STS涓存椂鎺堟潈銆 +``` + +### (1) [AK 鐧诲綍](docs/aklogin.md) + +![AK鐧诲綍](preview/login.png) + +- 瀛愮敤鎴风櫥褰曞彲浠ユ寚瀹氶璁 OSS 璺緞锛岄厤鍚堝瓙鐢ㄦ埛鎺堟潈浣跨敤銆 + +### (2) Bucket 鍒楄〃 + +![Bucket鍒楄〃](preview/bucket-list.png) + +### (3) 鏂囦欢鍒楄〃 (鏀寔鎷栨嫿涓婁紶) + +![鏂囦欢鍒楄〃](preview/file-list.png) + +### (4) [鎺堟潈缁欏瓙鐢ㄦ埛 & 瀛愮敤鎴风櫥褰昡(docs/aklogin.md) + +![鎺堟潈缁欏瓙鐢ㄦ埛](preview/subuser-grant.png) + +![瀛愮敤鎴风櫥褰昡(preview/login-subak1.png) + +### (5) [涓存椂鎺堟潈 & 鎺堟潈鐮佺櫥褰昡(docs/authToken.md) + +![涓存椂鎺堟潈](preview/genToken2.png) + +![涓存椂鎺堟潈2](preview/genToken3.png) + +![鎺堟潈鐮佺櫥褰昡(preview/token-login.png) + +### (6) 褰掓。 bucket 鏀寔 + +![鏂板缓褰掓。bucket](preview/create-archive-bucket.png) + +![restore](preview/need-restore.png) + +- 褰掓。 bucket 涓嬫墍鏈夋枃浠跺潎涓 Archive 瀛樺偍绫诲瀷, 闇瑕佽В鍐绘墠鑳借闂 + +### (7) 鏀寔鑷畾涔夊煙鍚嶏紙cname 鏂瑰紡锛夎闂紙1.9.0 鐗堟湰寮濮嬫敮鎸侊級 + +![cname妯″紡](preview/cname.png) + +- cname 妯″紡闇瑕佺敤鎴峰湪 oss 鎺у埗鍙颁笂杩涜鍩熷悕鍜 bucket 鐨勭粦瀹氾紝浣跨敤 cname 妯″紡 ossbrowser 涓婃墍鏈 object 鐨勬搷浣滈兘浼氳蛋鑷畾涔夊煙鍚嶆柟寮 + +### (7) 鏀寔璇锋眰浠樿垂鑰呮ā寮忚闂紙1.9.0 鐗堟湰寮濮嬫敮鎸侊級 + +![requestPay](preview/requestpay.png) + +## 4. 寮鍙戠幆澧冩惌寤 + +> 濡傛灉浣犺鍦ㄦ鍩虹涓婂紑鍙戯紝璇锋寜鐓т互涓嬫楠よ繘琛屻 + +### (1) 瀹夎 node.js 鏈鏂扮増鏈 + +瀹樼綉: https://nodejs.org/ + +### (2) 瀹夎 cnpm + +瀹樼綉: https://cnpmjs.org/ + +cnpm 鏄 npm锛坣ode 鍖呯鐞嗗伐鍏凤級鐨勪腑鍥介暅鍍忥紝鍙互鎻愰珮涓嬭浇渚濊禆鍖呯殑鏁堢巼銆 + +### (3) 濡傛灉浣跨敤 windows 绯荤粺锛岄渶瑕佸畨瑁呬笅鍒楄蒋浠讹細 + +- 闇瑕佸畨瑁 gitbash: + +璇疯嚜琛屼笅杞藉畨瑁呫 + +- 闇瑕佸畨瑁 windows-build-tools: + +``` +cnpm i -g windows-build-tools +``` + +- 杩橀渶瑕佷笅杞 make.exe锛屾斁鍒 `C:\windows\` 鐩綍涓 + +[make.exe(64 浣嶇増鏈)](http://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/windows-tools/64/make.exe) + +[make.exe(32 浣嶇増鏈)](http://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/windows-tools/32/make.exe) + +### (4) 涓嬭浇浠g爜 + +``` +git clone git@github.com:aliyun/oss-browser.git +``` + +瀹夎渚濊禆: + +``` +make i +``` + +### (5) 杩愯 + +``` +make run # 寮鍙戞ā寮忚繍琛, command+option+i 鍙敤鎵撳紑璋冭瘯鐣岄潰, win鎴杔inux鎸 F12. +``` + +寮鍙戞ā寮忎笅锛屼細鑷姩鐩戝惉婧愮爜,濡傛湁淇敼,浼氳嚜鍔 build 鍓嶇浠g爜鍒 dist 鐩綍銆 + +### (6) 鎵撳寘 + +``` +make build # build鍓嶇浠g爜鍒癲ist鐩綍 +``` + +``` +make win64 # 鎵撳寘win64绋嬪簭锛 鍙: mac, linux64,linux32,win32,win64,all. +``` + +## 5. 浠g爜缁撴瀯 + +``` +oss-browser/ + |-- app/ # 鍓嶇浠g爜, 閲囩敤angular1.x + bootstrap3.x + |-- custom/ # 鑷畾涔夊浘鏍囷紝鍚嶇О绛夈傝鐪媍ustom/Readme.md + |-- node/ # 鍓嶇璋冪敤鐨 node 妯″潡 + |-- crc64/ # crc鏍¢獙妯″潡锛岀敤鏉ユ牎楠屾枃浠跺畬鏁存 + |-- ossstore/ # 涓婁紶涓嬭浇job绫 + |-- i18n/ # 鍥介檯鍖 + |-- vendor/ # 鍓嶇 aliyun-sdk 渚濊禆 + |-- node_modules # node绔緷璧栫殑妯″潡 + |-- dist # 鍓嶇涓存椂build鍑虹殑浠g爜 + |-- build # electron build 鍑虹殑搴旂敤 + |-- gulpfile.js # 椤圭洰绠$悊鏂囦欢 + |-- package.json # 椤圭洰鎻忚堪鏂囦欢 + |-- main.js # 绋嬪簭鍏ュ彛 +``` + +## 6. 鑷畾涔 build + +璇风湅杩欓噷: [鑷畾涔 build](custom/) + +## 7. 鍏充簬璐$尞 + +- 濡傛湁寤鸿鎴栧彂鐜 bug锛岃鐩存帴寮 issue 鎴栬呮彁 PR锛孭R 蹇呴』 merge 璇锋眰鍒 dev 鍒嗘敮,鎴戜滑浼氱粺涓鎶 dev 鍒嗘敮鍚堝苟鍒 master 骞跺彂甯冿紝鎰熻阿骞垮ぇ寮鍙戣呭弬涓庛 + +## 8. 娉ㄦ剰浜嬮」 + +- OSS Browser 浣跨敤杩囩▼涓紝濡傛灉閬囧埌闂鍙墦寮璋冭瘯闈㈡澘杩涜闂鍒濇鎺掓煡锛屽彲閫氳繃鍗曞嚮 OSS Browser 宸ュ叿宸︿笂瑙掑浘鏍囪繛缁 10 娆″脊鍑鸿皟璇曢潰鏉,閽堝姣忎釜鎿嶄綔 OSS Browser 鍩嬬殑閮芥湁鍏抽敭鎿嶄綔淇℃伅锛屽悓鏃舵帶鍒跺彴浼氬疄鏃跺悓姝ラ敊璇俊鎭,濡傛灉鐢ㄦ埛鏃犳硶鐞嗚В閿欒鏃ュ織淇℃伅銆傝 issue 鎴浘鍙嶉@luozhang002 杩涜鎺掓煡 +- OSS Browser 宸ュ叿浣跨敤杩囩▼涓敖閲忎笉瑕佸紑鏈湴浠g悊鎴栬 VPN 鐩稿叧 +- 寮鍙戣呭鏋滄槸閫氳繃鏈湴缂栬瘧 github 浠撳簱鐢熶骇鐨 oss browser 宸ュ叿锛屾兂瑕佽繘琛屼富杩涚▼鍜屾覆鏌撹繘绋嬬浉鍏充唬鐮佺殑璋冭瘯鍙互鍙傝冩枃妗debug](debug.md) + +## 9. 寮婧 LICENSE + +[Apache License 2.0](LICENSE) diff --git a/README.md b/README.md new file mode 100644 index 00000000..da30af1d --- /dev/null +++ b/README.md @@ -0,0 +1,47 @@ +# Quick start + +ossbrowser is a graphical management tool developed by Alibaba Cloud. It provides features similar to those of Windows Explorer. Using ossbrowser, you can view, upload, download, and manage objects with ease. + +## [README of Chinese](https://github.com/aliyun/oss-browser/blob/master/README-CN.md) + +## Platform + +Windows7 above, Linux and Mac. We do not recommend using WindowsXP and WindowServer + +## Procedure + +1. Download and install ossbrowser. + + | Supported platform | Download link | + | :----------------- | :------------------------------------------------------------------------------ | + | Window x32 | [Window x32](https://github.com/aliyun/oss-browser/blob/master/all-releases.md) | + | Window x64 | [Window x64](https://github.com/aliyun/oss-browser/blob/master/all-releases.md) | + | MAC | [MAC](https://github.com/aliyun/oss-browser/blob/master/all-releases.md) | + | Linux x64 | [Linux x64](https://github.com/aliyun/oss-browser/blob/master/all-releases.md) | + +2. Start and log on to ossbrowser. +3. Manage buckets. You can create a bucket, delete a bucket, modify the ACL for a bucket, and manage the fragments in a bucket. +4. Manage objects. You can upload \(resumable\), download \(resumable\), delete, copy, move, rename, search for, and preview an object, and modify the ACL or set an HTTP header for an object. + +## Debug + +If you encounter any problems during using ossbrowser, you can open the debug mode and observe the console panel. How to open +the debug mode,you can click the left icon ten times ,after 1.8.0 version you also open debug mode in settings pages + +![left-icon](preview/left-icon.png) + +![setting-page](preview/setting-debug.png) + +## Qr code + +1. OssBrowser answering questions + +2. Group number:21985509 + +## Links + +[ossbrowser](https://www.alibabacloud.com/help/doc-detail/61872.htm) + +## LICENSE + +[Apache License 2.0](LICENSE) diff --git a/Readme.md b/Readme.md deleted file mode 100644 index 8827e187..00000000 --- a/Readme.md +++ /dev/null @@ -1,164 +0,0 @@ - -# OSS Browser - -OSS Browser 鎻愪緵绫讳技windows璧勬簮绠$悊鍣ㄥ姛鑳姐傜敤鎴峰彲浠ュ緢鏂逛究鐨勬祻瑙堟枃浠讹紝涓婁紶涓嬭浇鏂囦欢锛屾敮鎸佹柇鐐圭画浼犵瓑銆 - -鏈伐鍏蜂娇鐢ㄥ紑婧愭鏋 Angular 1.x + [Electron](http://electron.atom.io/)鍒朵綔銆 - -> Electron 妗嗘灦鍙互璁╀綘浣跨敤 JavaScript锛孒TML 鍜 CSS 鏋勫缓璺ㄥ钩鍙扮殑妗岄潰搴旂敤绋嬪簭銆傚畠鏄熀浜巒ode.js 鍜 Chromium 寮婧愰」鐩侲lectron 鍙互鎵撳寘鍑鸿法骞冲彴鐨勭▼搴忥紝杩愯鍦 Mac锛學indows 鍜 Linux 涓娿 - - -## 1. 瀹㈡埛绔笅杞斤細 - -鏈鏂扮増鏈琡1.2.5`锛屼笅杞藉湴鍧濡備笅锛岃В鍘嬪嵆鍙娇鐢ㄣ - -> [

Window x32鐗堜笅杞

](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.2.5/oss-browser-win32-ia32.zip) - - -> [

Window x64鐗堜笅杞

](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.2.5/oss-browser-win32-x64.zip) - -> [

Mac 鐗堜笅杞

](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.2.5/oss-browser.dmg) - -> [

Ubuntu x64鐗

](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.2.5/oss-browser-linux-x64.zip) - -鍏朵粬鐗堟湰鏆備笉鎻愪緵锛屽彲浠ヨ嚜琛宐uild銆 - - -> [鏃х増鏈笅杞絔(all-releases.md) - - -## 2. 鍔熻兘浠嬬粛: - -``` -鍔熻兘Map - |-- 鐧诲綍锛氭敮鎸丄K鐧诲綍鍜屾巿鏉冪爜鐧诲綍銆 - |-- Bucket绠$悊锛屾柊寤篵ucket锛屽垹闄ucket锛宐ucket鏉冮檺淇敼锛岀鐗囩鐞嗐 - |-- 鏂囦欢绠$悊锛氱洰褰曪紙鍖呮嫭bucket锛夊拰鏂囦欢鐨勫鍒犳敼鏌ワ紝 澶嶅埗, 鏂囦欢棰勮绛夈 - |-- 鏂囦欢浼犺緭浠诲姟绠$悊锛 涓婁紶涓嬭浇锛屾柇鐐圭画浼犮 - |-- 鍦板潃鏍忓姛鑳斤紙鏀寔oss://鍗忚URL锛屾祻瑙堝巻鍙插墠杩涘悗閫锛屼繚瀛樹功绛撅級 - |-- 鎺堟潈鍔熻兘锛 绠鍖朢AM Policy鎺堟潈銆 - |-- 鐢熸垚鎺堟潈鐮侊細 STS涓存椂鎺堟潈銆 -``` - - -### (1) [AK鐧诲綍](docs/aklogin.md) - -![AK鐧诲綍](preview/login.png) - -* 瀛愮敤鎴风櫥褰曞彲浠ユ寚瀹氶璁綩SS璺緞锛岄厤鍚堝瓙鐢ㄦ埛鎺堟潈浣跨敤銆 - - -### (2) Bucket鍒楄〃 - -![Bucket鍒楄〃](preview/bucket-list.png) - - -### (3) 鏂囦欢鍒楄〃 (鏀寔鎷栨嫿涓婁紶) - -![鏂囦欢鍒楄〃](preview/file-list.png) - -### (4) [鎺堟潈缁欏瓙鐢ㄦ埛 & 瀛愮敤鎴风櫥褰昡(docs/aklogin.md) - -![鎺堟潈缁欏瓙鐢ㄦ埛](preview/subuser-grant.png) - -![瀛愮敤鎴风櫥褰昡(preview/subuser.png) - -### (5) [涓存椂鎺堟潈 & 鎺堟潈鐮佺櫥褰昡(docs/autoToken.md) - -![涓存椂鎺堟潈](preview/genToken2.png) - -![涓存椂鎺堟潈2](preview/genToken3.png) - -![鎺堟潈鐮佺櫥褰昡(preview/token-login.png) - -### (6) 褰掓。bucket鏀寔 - -![鏂板缓褰掓。bucket](preview/create-archive-bucket.png) - -![restore](preview/need-restore.png) - -* 褰掓。bucket涓嬫墍鏈夋枃浠跺潎涓篈rchive瀛樺偍绫诲瀷, 闇瑕佹仮澶嶆墠鑳借闂 - - -## 3. 寮鍙戠幆澧冩惌寤 - -> 濡傛灉浣犺鍦ㄦ鍩虹涓婂紑鍙戯紝璇锋寜鐓т互涓嬫楠よ繘琛屻 - - -### (1) 瀹夎 node.js 鏈鏂扮増鏈 - -瀹樼綉: https://nodejs.org/ - -### (2) 瀹夎cnpm - -瀹樼綉: https://cnpmjs.org/ - -cnpm 鏄 npm锛坣ode 鍖呯鐞嗗伐鍏凤級鐨勪腑鍥介暅鍍忥紝鍙互鎻愰珮涓嬭浇渚濊禆鍖呯殑鏁堢巼銆 - -### (3) 鍦╳indows绯荤粺涓嬶紝闇瑕佸畨瑁 windows-build-tools - -``` -cnpm i -g windows-build-tools -``` - -### (4) 涓嬭浇浠g爜 - -``` -git clone git@github.com:aliyun/oss-browser.git -``` - -瀹夎渚濊禆(璇蜂娇鐢╟npm): - -``` -cnpm i -``` - - -### (5) 杩愯 - -``` -npm run dev # 寮鍙戞ā寮忚繍琛, command+option+i 鍙敤鎵撳紑璋冭瘯鐣岄潰, win鎴杔inux鎸 F12. -``` - -寮鍙戞ā寮忎笅锛屼細鑷姩鐩戝惉婧愮爜,濡傛湁淇敼,浼氳嚜鍔╞uild 鍓嶇浠g爜鍒癲ist鐩綍銆 - - -### (6) 鎵撳寘 - -``` -npm run build # build鍓嶇浠g爜鍒癲ist鐩綍 -``` - -``` -npm run win64 # 鎵撳寘win64绋嬪簭锛 鍙: mac, linux64 绛 -``` - - - -## 4. 浠g爜缁撴瀯 - - -``` -oss-browser/ - |-- app/ # 鍓嶇浠g爜, 閲囩敤angular1.x + bootstrap3.x - |-- node/ # 鍓嶇璋冪敤鐨 node 妯″潡 - |-- crc64/ # crc鏍¢獙妯″潡锛岀敤鏉ユ牎楠屾枃浠跺畬鏁存 - |-- ossstore/ # 涓婁紶涓嬭浇job绫 - |-- i18n/ # 鍥介檯鍖 - |-- vendor/ # 鍓嶇 aliyun-sdk 渚濊禆 - |-- node_modules # node绔緷璧栫殑妯″潡 - |-- dist # 鍓嶇涓存椂build鍑虹殑浠g爜 - |-- build # electron build 鍑虹殑搴旂敤 - |-- gulpfile.js # 椤圭洰绠$悊鏂囦欢 - |-- package.json # 椤圭洰鎻忚堪鏂囦欢 - |-- main.js # 绋嬪簭鍏ュ彛 -``` - - -## 5. 鍏充簬璐$尞 - -* 鏆備笉鎺ュ彈浠g爜璐$尞锛屽鏈夊缓璁垨鍙戠幇bug锛岃鐩存帴寮issue銆 - -## 6. 寮婧 LICENSE - -[Apache License 2.0](LICENSE) diff --git a/all-releases.md b/all-releases.md index 7793b309..f199fdaf 100644 --- a/all-releases.md +++ b/all-releases.md @@ -1,18 +1,24 @@ -All Releases for [ OSS Browser ] +# All Releases for [ OSS Browser ] - ||Windows ia32|Windows x64| Mac |Linux x64| - |-----|-----|-----|---------|--------| -|1.2.5|[Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.2.5/oss-browser-win32-ia32.zip) |[Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.2.5/oss-browser-win32-x64.zip) | [Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.2.5/oss-browser.dmg) | [Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.2.5/oss-browser-linux-x64.zip) | -|1.2.4||[Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.2.4/oss-browser-win32-x64.zip) | [Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.2.4/oss-browser.dmg) | [Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.2.4/oss-browser-linux-x64.zip) | -|1.2.3||[Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.2.3/oss-browser-win32-x64.zip) | [Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.2.3/oss-browser.dmg) | [Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.2.3/oss-browser-linux-x64.zip) | -|1.2.2||[Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.2.2/oss-browser-win32-x64.zip) | [Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.2.2/oss-browser.dmg) | [Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.2.2/oss-browser-linux-x64.zip) | -|1.2.1||[Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.2.1/oss-browser-win32-x64.zip) | [Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.2.1/oss-browser.dmg) | [Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.2.1/oss-browser-linux-x64.zip) | -|1.2.0||[Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.2.0/oss-browser-win32-x64.zip) | [Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.2.0/oss-browser.dmg) | [Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.2.0/oss-browser-linux-x64.zip) | -|1.1.0||[Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.1.0/oss-browser-win32-x64.zip) | [Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.1.0/oss-browser.dmg) | [Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.1.0/oss-browser-linux-x64.zip) | -|1.0.3||[Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.0.3/oss-browser-win32-x64.zip) | [Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.0.3/oss-browser.dmg) | [Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.0.3/oss-browser-linux-x64.zip) | -|1.0.2||[Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.0.2/oss-browser-win32-x64.zip) | [Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.0.2/oss-browser.dmg) | [Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.0.2/oss-browser-linux-x64.zip) | -|1.0.1||[Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.0.1/oss-browser-win32-x64.zip) | [Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.0.1/oss-browser.dmg) | [Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.0.1/oss-browser-linux-x64.zip) | -|1.0.0||[Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.0.0/oss-browser-win32-x64.zip) | [Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.0.0/oss-browser.dmg) | [Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/1.0.0/oss-browser-linux-x64.zip) | -|0.10.0||[Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/0.10.0/oss-browser-win32-x64.zip) | [Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/0.10.0/oss-browser.dmg) | [Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/0.10.0/oss-browser-linux-x64.zip) | -|0.9.1||[Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/0.9.1/oss-browser-win32-x64.zip) | [Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/0.9.1/oss-browser.dmg) | [Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/0.9.1/oss-browser-linux-x64.zip) | -|0.9.0||[Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/0.9.0/oss-browser-win32-x64.zip) | [Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/0.9.0/oss-browser.dmg) | [Download](https://luogc.oss-cn-hangzhou.aliyuncs.com/oss-browser-publish/0.9.0/oss-browser-linux-x64.zip) | \ No newline at end of file +## Download from download + +||Windows ia32|Windows x64| Mac(zip) |Linux ia32|Linux x64|Release note| + |-----|-----|-----|-----|--------|--------|---| +|1.11.0|[Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.11.0/oss-browser-win32-ia32.zip) |[Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.11.0/oss-browser-win32-x64.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.11.0/oss-browser-darwin-x64.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.11.0/oss-browser-linux-ia32.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.11.0/oss-browser-linux-x64.zip)|[1.11.0.md](release-notes/1.11.0.en-US.md)| +|1.10.0|[Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.10.0/oss-browser-win32-ia32.zip) |[Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.10.0/oss-browser-win32-x64.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.10.0/oss-browser-darwin-x64.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.10.0/oss-browser-linux-ia32.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.10.0/oss-browser-linux-x64.zip)|[1.10.0.md](release-notes/1.10.0.en-US.md)| +|1.9.5|[Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.9.5/oss-browser-win32-ia32.zip) |[Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.9.5/oss-browser-win32-x64.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.9.5/oss-browser-darwin-x64.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.9.5/oss-browser-linux-ia32.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.9.5/oss-browser-linux-x64.zip)|[1.9.5.md](release-notes/1.9.5.en-US.md)| +|1.9.4|[Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.9.4/oss-browser-win32-ia32.zip) |[Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.9.4/oss-browser-win32-x64.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.9.4/oss-browser-darwin-x64.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.9.4/oss-browser-linux-ia32.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.9.4/oss-browser-linux-x64.zip)|[1.9.4.md](release-notes/1.9.4.en-US.md)| +|1.9.3|[Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.9.3/oss-browser-win32-ia32.zip) |[Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.9.3/oss-browser-win32-x64.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.9.3/oss-browser-darwin-x64.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.9.3/oss-browser-linux-ia32.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.9.3/oss-browser-linux-x64.zip)|[1.9.3.md](release-notes/1.9.3.en-US.md)| +|1.9.2|[Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.9.2/oss-browser-win32-ia32.zip) |[Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.9.2/oss-browser-win32-x64.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.9.2/oss-browser-darwin-x64.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.9.2/oss-browser-linux-ia32.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.9.2/oss-browser-linux-x64.zip)|[1.9.2.md](release-notes/1.9.2.en-US.md)| +|1.9.1|[Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.9.1/oss-browser-win32-ia32.zip) |[Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.9.1/oss-browser-win32-x64.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.9.1/oss-browser-darwin-x64.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.9.1/oss-browser-linux-ia32.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.9.1/oss-browser-linux-x64.zip)|[1.9.1.md](release-notes/1.9.1.en-US.md)| +|1.9.0|[Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.9.0/oss-browser-win32-ia32.zip) |[Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.9.0/oss-browser-win32-x64.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.9.0/oss-browser-darwin-x64.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.9.0/oss-browser-linux-ia32.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.9.0/oss-browser-linux-x64.zip)|[1.9.0.md](release-notes/1.9.0.en-US.md)| +|1.8.1|[Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.8.1/oss-browser-win32-ia32.zip) |[Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.8.1/oss-browser-win32-x64.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.8.1/oss-browser-darwin-x64.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.8.1/oss-browser-linux-ia32.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.8.1/oss-browser-linux-x64.zip)|[1.8.1.md](release-notes/1.8.1.en-US.md)| +|1.8.0|[Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.8.0/oss-browser-win32-ia32.zip) |[Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.8.0/oss-browser-win32-x64.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.8.0/oss-browser-darwin-x64.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.8.0/oss-browser-linux-ia32.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.8.0/oss-browser-linux-x64.zip)|[1.8.0.md](release-notes/1.8.0.en-US.md)| +|1.7.4|[Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.7.4/oss-browser-win32-ia32.zip) |[Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.7.4/oss-browser-win32-x64.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.7.4/oss-browser-darwin-x64.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.7.4/oss-browser-linux-ia32.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.7.4/oss-browser-linux-x64.zip)|[1.7.4.md](release-notes/1.7.4.en-US.md)| +|1.7.3|[Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.7.3/oss-browser-win32-ia32.zip) |[Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.7.3/oss-browser-win32-x64.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.7.3/oss-browser-darwin-x64.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.7.3/oss-browser-linux-ia32.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.7.3/oss-browser-linux-x64.zip)|[1.7.3.md](release-notes/1.7.3.en-US.md)| +|1.7.2|[Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.7.2/oss-browser-win32-ia32.zip) |[Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.7.2/oss-browser-win32-x64.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.7.2/oss-browser-darwin-x64.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.7.2/oss-browser-linux-ia32.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.7.2/oss-browser-linux-x64.zip)|[1.7.2.md](release-notes/1.7.2.en-US.md)| +|1.7.1|[Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.7.1/oss-browser-win32-ia32.zip) |[Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.7.1/oss-browser-win32-x64.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.7.1/oss-browser-darwin-x64.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.7.1/oss-browser-linux-ia32.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.7.1/oss-browser-linux-x64.zip)|[1.7.1.md](release-notes/1.7.1.en-US.md)| +|1.7.0|[Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.7.0/oss-browser-win32-ia32.zip) |[Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.7.0/oss-browser-win32-x64.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.7.0/oss-browser-darwin-x64.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.7.0/oss-browser-linux-ia32.zip) | [Download](https://oss-attachment.cn-hangzhou.oss.aliyun-inc.com/oss-browser/1.7.0/oss-browser-linux-x64.zip)|[1.7.0.md](release-notes/1.7.0.en-US.md)| + + +[Earlier Releases](earlier-releases.md) \ No newline at end of file diff --git a/app/app.css b/app/app.css index 6f477a90..9afd32ed 100644 --- a/app/app.css +++ b/app/app.css @@ -1,65 +1,62 @@ -.red{ - color:red; +.red { + color: red; } .mg4 { - margin: 4px; + margin: 4px; } .mg0 { - margin: 0px; + margin: 0px; } -.mgb2{ - margin-bottom:2px; +.mgb2 { + margin-bottom: 2px; } -.mgb4{ - margin-bottom:4px; +.mgb4 { + margin-bottom: 4px; } -.mgb6{ - margin-bottom:6px; +.mgb6 { + margin-bottom: 6px; } -.mgl4{ +.mgl4 { margin-left: 4px; } -.pd0{ - padding:0px; +.pd0 { + padding: 0px; } -.pd2{ - padding:2px; +.pd2 { + padding: 2px; } -.pd4{ - padding:4px; +.pd4 { + padding: 4px; } -.pd10{ - padding:10px; +.pd10 { + padding: 10px; } -.pdt4{ - padding-top:4px; +.pdt4 { + padding-top: 4px; } -.break{ - word-break:break-all; +.break { + word-break: break-all; } button.btn.btn-sm { - outline: none; + outline: none; } -.f8{ - font-size:80%; +.f8 { + font-size: 80%; } -.f9{ - font-size:90%; +.f9 { + font-size: 90%; } - .input-group-sm .form-control, .input-group-sm .input-group-addon, -.input-group-sm .input-group-btn .btn { - height: 30px; - padding: 5px 10px; - font-size: 12px; - line-height: 1.5; - border-radius: 3px; - } - - +.input-group-sm .input-group-btn .btn { + height: 30px; + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} /*@media (min-width: 768px){ body .modal-dialog { @@ -72,34 +69,102 @@ button.btn.btn-sm { } }*/ - -.modal-header, .modal-footer { - padding: 4px 8px; - background: #F6F6F6; +.modal-header, +.modal-footer { + padding: 4px 8px; + background: #f6f6f6; } .modal-header { - border-top-left-radius: 5px; - border-top-right-radius: 5px; + border-top-left-radius: 5px; + border-top-right-radius: 5px; } .modal-footer { - border-bottom-left-radius: 5px; - border-bottom-right-radius: 5px; + border-bottom-left-radius: 5px; + border-bottom-right-radius: 5px; } -html, body { - +html, +body { +} +.shadow10 { + box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); +} + +.text-overflow { + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; +} +.text-orange { + color: orange; } -.shadow10{ - box-shadow: 0 0 10px rgba(0,0,0,0.5); + +.truncate { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } -.text-overflow{ - text-overflow:ellipsis; - white-space:nowrap; - overflow:hidden +.loadEffect { + width: 100px; + height: 100px; + margin: 0 auto; + margin-top: 100px; + position: relative; +} +.loadEffect div { + width: 100%; + height: 100%; + position: absolute; + -webkit-animation: load 2.08s linear infinite; +} +.loadEffect div span { + display: inline-block; + width: 20px; + height: 20px; + border-radius: 50%; + background: lightgreen; + position: absolute; + left: 50%; + margin-top: -10px; + margin-left: -10px; +} +@-webkit-keyframes load { + 0% { + -webkit-transform: rotate(0deg); + } + 10% { + -webkit-transform: rotate(45deg); + } + 50% { + opacity: 1; + -webkit-transform: rotate(160deg); + } + 62% { + opacity: 0; + } + 65% { + opacity: 0; + -webkit-transform: rotate(200deg); + } + 90% { + -webkit-transform: rotate(340deg); + } + 100% { + -webkit-transform: rotate(360deg); + } +} +.loadEffect div:nth-child(1) { + -webkit-animation-delay: 0.2s; +} +.loadEffect div:nth-child(2) { + -webkit-animation-delay: 0.4s; +} +.loadEffect div:nth-child(3) { + -webkit-animation-delay: 0.6s; } -.text-orange{ - color:orange; +.loadEffect div:nth-child(4) { + -webkit-animation-delay: 0.8s; } diff --git a/app/app.js b/app/app.js index 915d83b3..5735926c 100644 --- a/app/app.js +++ b/app/app.js @@ -1,66 +1,78 @@ -angular.module('web', ['ui.router', - 'ui.bootstrap', - 'ui.codemirror', - 'pascalprecht.translate', - 'ngSanitize', - 'templates' +angular + .module("web", [ + "ui.router", + "ui.bootstrap", + "ui.codemirror", + "pascalprecht.translate", + "ngSanitize", + "templates", + "ui.bootstrap.contextMenu", ]) - .config(['$stateProvider', '$urlRouterProvider', '$translateProvider', + .config([ + "$stateProvider", + "$urlRouterProvider", + "$translateProvider", function ($stateProvider, $urlRouterProvider, $translateProvider) { - - moment.locale('zh-CN'); + moment.locale("zh-CN"); $stateProvider - .state('files', { - url: '/', - templateUrl: 'main/files/files.html', - controller: 'filesCtrl' + .state("files", { + url: "/", + templateUrl: "main/files/files.html", + controller: "filesCtrl", }) - .state('login', { - url: '/login', - templateUrl: 'main/auth/login.html', - controller: 'loginCtrl' + .state("login", { + url: "/login", + templateUrl: "main/auth/login.html", + controller: "loginCtrl", }); - $urlRouterProvider.otherwise('/'); + $urlRouterProvider.otherwise("/"); //i18n for (var k in Global.i18n) { $translateProvider.translations(k, Global.i18n[k].content); } - $translateProvider.preferredLanguage('zh-CN'); - } + $translateProvider.preferredLanguage("zh-CN"); + + $translateProvider.useSanitizeValueStrategy("escapeParameters"); + }, ]) - .run(['$rootScope', '$translate', 'Toast', function ($rootScope, $translate, Toast) { - $rootScope.openURL = function(url){ - openExternal(url); - } + .run([ + "$rootScope", + "$translate", + "Toast", + function ($rootScope, $translate, Toast) { + $rootScope.openURL = function (url) { + openExternal(url); + }; - // //i18n - var langMap = {}; - var langList = []; - angular.forEach(Global.i18n, function (v, k) { - langMap[k] = v; - langList.push({ - lang: k, - label: v.label + // //i18n + var langMap = {}; + var langList = []; + angular.forEach(Global.i18n, function (v, k) { + langMap[k] = v; + langList.push({ + lang: k, + label: v.label, + }); }); - }); - var lang = localStorage.getItem('lang') || langList[0].lang; + var lang = localStorage.getItem("lang") || langList[0].lang; - $rootScope.langSettings = { - langList: langList, - lang: lang, - changeLanguage: function (key) { - console.log('changeLanguage:', key) - key = langMap[key] ? key : langList[0].lang; - $translate.use(key); - localStorage.setItem('lang', key); - $rootScope.langSettings.lang = key; - Toast.success($translate.instant('setup.success')); //'宸茬粡璁剧疆鎴愬姛' - } - }; - $translate.use(lang); + $rootScope.langSettings = { + langList: langList, + lang: lang, + changeLanguage: function (key) { + console.log("changeLanguage:", key); + key = langMap[key] ? key : langList[0].lang; + $translate.use(key); + localStorage.setItem("lang", key); + $rootScope.langSettings.lang = key; + Toast.success($translate.instant("setup.success")); //'宸茬粡璁剧疆鎴愬姛' + }, + }; + $translate.use(lang); - console.log('ready'); - }]); + console.log("ready"); + }, + ]); diff --git a/app/components/directives/auto-height.js b/app/components/directives/auto-height.js index ccb5e0ca..8be45fee 100644 --- a/app/components/directives/auto-height.js +++ b/app/components/directives/auto-height.js @@ -1,24 +1,23 @@ -angular.module('web') - .directive('autoHeight', ['$timeout', function ($timeout) { - +angular.module("web").directive("autoHeight", [ + "$timeout", + function ($timeout) { return { link: linkFn, - restrict: 'EA', + restrict: "EA", transclude: false, scope: { - autoHeight: '=', + autoHeight: "=", //bottomLoader: '&' - } + }, }; function linkFn(scope, ele, attr) { - var h = parseInt(scope.autoHeight); ele.css({ //'border-bottom': '1px solid #ccc', - 'overflow': 'auto', - 'position': 'relative' + overflow: "auto", + position: "relative", }); var tid; @@ -52,7 +51,6 @@ angular.module('web') // $(window).resize(onScroll); // $(ele).scroll(onScroll); // } - } - - }]); + }, +]); diff --git a/app/components/directives/bottom-loader.js b/app/components/directives/bottom-loader.js index f8eed84e..efbf0289 100644 --- a/app/components/directives/bottom-loader.js +++ b/app/components/directives/bottom-loader.js @@ -1,35 +1,37 @@ -angular.module('web') - .directive('bottomLoader', ['$timeout', function ($timeout) { - +angular.module("web").directive("bottomLoader", [ + "$timeout", + function ($timeout) { return { link: linkFn, - restrict: 'EA', + restrict: "EA", transclude: false, scope: { - bottomLoader: '&' - } + bottomLoader: "&", + }, }; function linkFn(scope, ele, attr) { ele.css({ //'border-bottom': '1px solid red', - 'overflow': 'auto', - 'position': 'relative' + overflow: "auto", + position: "relative", }); - var tid2; - function onScroll() { - $timeout.cancel(tid2); - tid2 = $timeout(function () { - - if($(ele)[0].scrollHeight>0 - && ($(ele).parent().height() + $(ele).scrollTop() +10 >= $(ele)[0].scrollHeight) ){ - scope.bottomLoader(); - } - },500); - } - onScroll(); - $(window).resize(onScroll); - $(ele).scroll(onScroll); + var tid2; + function onScroll() { + $timeout.cancel(tid2); + tid2 = $timeout(function () { + if ( + $(ele)[0].scrollHeight > 0 && + $(ele).parent().height() + $(ele).scrollTop() + 10 >= + $(ele)[0].scrollHeight + ) { + scope.bottomLoader(); + } + }, 500); } - - }]); + onScroll(); + $(window).resize(onScroll); + $(ele).scroll(onScroll); + } + }, +]); diff --git a/app/components/directives/cleanable-input.js b/app/components/directives/cleanable-input.js index 0b022dde..42a58ef5 100644 --- a/app/components/directives/cleanable-input.js +++ b/app/components/directives/cleanable-input.js @@ -1,76 +1,79 @@ - /* */ -angular.module('web') - .directive('cleanableInput', ['$timeout', function($timeout) { - +angular.module("web").directive("cleanableInput", [ + "$timeout", + function ($timeout) { return { - restrict: 'EA', - require: 'ngModel', + restrict: "EA", + require: "ngModel", scope: { - model: '=ngModel', - ngChange: '&', - x: '=', - y: '=' + model: "=ngModel", + ngChange: "&", + x: "=", + y: "=", }, link: function link(scope, element) { - - var id = 'cleanable_inp-'+((Math.random()+'').substring(2)); - - element.wrap('
'); - var btn = $('' + - '').appendTo($('#'+id)); - - btn.css({ - display:'none', - position:'absolute', - 'z-index': 10 - }).click(function(e){ - - scope.model = ''; - if(!scope.$root.$$phase){ - scope.$apply(); - } - - if(scope.ngChange){ - scope.$eval(scope.ngChange); - } - - return false; - }); - - var y = isNaN(scope.y)?0:parseInt(scope.y); - var x = isNaN(scope.x)?0:parseInt(scope.x); - - - function onchange(v){ - if(v && v !== ''){ - - btn.css({ - 'top': 6 + y, - 'right': 6 - x - }).show(); - - }else{ + var id = "cleanable_inp-" + (Math.random() + "").substring(2); + + element.wrap( + '
' + ); + var btn = $( + '' + + '' + ).appendTo($("#" + id)); + + btn + .css({ + display: "none", + position: "absolute", + "z-index": 10, + }) + .click(function (e) { + scope.model = ""; + if (!scope.$root.$$phase) { + scope.$apply(); + } + + if (scope.ngChange) { + scope.$eval(scope.ngChange); + } + + return false; + }); + + var y = isNaN(scope.y) ? 0 : parseInt(scope.y); + var x = isNaN(scope.x) ? 0 : parseInt(scope.x); + + function onchange(v) { + if (v && v !== "") { + btn + .css({ + top: 6 + y, + right: 6 - x, + }) + .show(); + } else { btn.hide(); } } - // Listen for any changes to the original model. var tid; - scope.$watch('model', function alteredValues(newValue, oldValue) { - $timeout.cancel(tid); - tid=$timeout(function(){ - onchange(newValue); - },300); - }, true); - - } - + scope.$watch( + "model", + function alteredValues(newValue, oldValue) { + $timeout.cancel(tid); + tid = $timeout(function () { + onchange(newValue); + }, 300); + }, + true + ); + }, }; - - }]); + }, +]); diff --git a/app/components/directives/clipboard-button.js b/app/components/directives/clipboard-button.js index 8431f8cf..b4b9e745 100644 --- a/app/components/directives/clipboard-button.js +++ b/app/components/directives/clipboard-button.js @@ -1,33 +1,31 @@ - /* */ -angular.module('web') - .directive('clipboardButton', ['Toast', function(Toast) { - +angular.module("web").directive("clipboardButton", [ + "$translate", + "Toast", + function ($translate, Toast) { + var T = $translate.instant; return { - restrict: 'EA', + restrict: "EA", scope: { - action: '=', - target: '=', - success: '&' + action: "=", + target: "=", + success: "&", }, link: function link(scope, ele) { - var d = new Clipboard(ele[0], { - text: function(){ - return $(scope.target).val(); - }, - action: scope.action || 'copy' + text: function () { + return $(scope.target).val(); + }, + action: scope.action || "copy", }); - d.on('success',function(){ - Toast.success('澶嶅埗鎴愬姛'); + d.on("success", function () { + Toast.success(T("copy.successfully")); //'澶嶅埗鎴愬姛' }); - - } - + }, }; - - }]); + }, +]); diff --git a/app/components/directives/drop-zone.js b/app/components/directives/drop-zone.js index 533e40e7..bbccae60 100644 --- a/app/components/directives/drop-zone.js +++ b/app/components/directives/drop-zone.js @@ -1,52 +1,47 @@ -angular.module('web') - .directive('dropZone', function () { - - return { - link: linkFn, - restrict: 'EA', - transclude: false, - scope: { - dropZone: '=' - } - }; - - function linkFn(scope, ele, attr) { - - $(document).on('dragenter', stopPrev); - $(document).on('dragover', stopPrev); - $(document).on('dragleave', stopPrev); - $(document).on('drop', stopPrev); - function stopPrev(e){ - e.originalEvent.stopPropagation(); - e.originalEvent.preventDefault(); - } - - var shadow; - $(ele) - .on('dragenter', function () { - shadow = $('
').css({ - position: 'absolute', - height: $(ele).height(), - width: $(ele).width(), - opacity: 0.5, - top: $(ele).offset().top, - left: $(ele).offset().left, - background: 'yellow', - zIndex: 20, - boxShadow: 'inset yellow 0 0 10px' - }).appendTo('body'); - - shadow.on('dragleave', function () { - shadow.remove(); - }) - .on('drop', function (e) { - shadow.remove(); - scope.dropZone(e); - }); - }); - - +angular.module("web").directive("dropZone", function () { + return { + link: linkFn, + restrict: "EA", + transclude: false, + scope: { + dropZone: "=", + }, + }; + + function linkFn(scope, ele, attr) { + $(document).on("dragenter", stopPrev); + $(document).on("dragover", stopPrev); + $(document).on("dragleave", stopPrev); + $(document).on("drop", stopPrev); + function stopPrev(e) { + e.originalEvent.stopPropagation(); + e.originalEvent.preventDefault(); } - - }); + var shadow; + $(ele).on("dragenter", function () { + shadow = $("
") + .css({ + position: "absolute", + height: $(ele).height(), + width: $(ele).width(), + opacity: 0.5, + top: $(ele).offset().top, + left: $(ele).offset().left, + background: "yellow", + zIndex: 20, + boxShadow: "inset yellow 0 0 10px", + }) + .appendTo("body"); + + shadow + .on("dragleave", function () { + shadow.remove(); + }) + .on("drop", function (e) { + shadow.remove(); + scope.dropZone(e); + }); + }); + } +}); diff --git a/app/components/directives/file-dialog-button.css b/app/components/directives/file-dialog-button.css index fd087437..943d0698 100644 --- a/app/components/directives/file-dialog-button.css +++ b/app/components/directives/file-dialog-button.css @@ -1,9 +1,9 @@ -.file-dialog-button{ - position: absolute; - opacity:0.01; - width:100%; - height:100%; - top:0px; - left:0px; - z-index:1; +.file-dialog-button { + position: absolute; + opacity: 0.01; + width: 100%; + height: 100%; + top: 0px; + left: 0px; + z-index: 1; } diff --git a/app/components/directives/file-dialog-button.js b/app/components/directives/file-dialog-button.js index 02d7b56e..6b407e6f 100644 --- a/app/components/directives/file-dialog-button.js +++ b/app/components/directives/file-dialog-button.js @@ -1,18 +1,16 @@ -angular.module('web') - .directive('fileDialogButton', function(){ +angular.module("web").directive("fileDialogButton", function () { + return { + link: linkFn, + restrict: "EA", + transclude: false, + scope: { + fileChange: "=", + }, + }; - return { - link: linkFn, - restrict: 'EA', - transclude: false, - scope: { - fileChange: '=' - } - }; - - function linkFn(scope, ele, attr){ - $(ele).on('change',function(e){ - scope.fileChange.call({}, e.target.files); - }); - } - }); \ No newline at end of file + function linkFn(scope, ele, attr) { + $(ele).on("change", function (e) { + scope.fileChange.call({}, e.target.files); + }); + } +}); diff --git a/app/components/directives/flv-player.js b/app/components/directives/flv-player.js index ab85fd1f..2900b04c 100644 --- a/app/components/directives/flv-player.js +++ b/app/components/directives/flv-player.js @@ -1,25 +1,34 @@ -angular.module('web') - .directive('flvPlayer', ['$timeout', function ($timeout) { - +angular.module("web").directive("flvPlayer", [ + "$timeout", + function ($timeout) { return { link: linkFn, - restrict: 'EA', + restrict: "EA", transclude: false, scope: { - src: '=', - autoplay: '=' //autoplay - } + src: "=", + autoplay: "=", //autoplay + }, }; function linkFn(scope, ele, attr) { - scope.$watch('src', init); + scope.$watch("src", init); - function init(){ - if(!scope.src)return; - var src= 'http://localhost:'+Global.staticServerPort+'/flv-player.html?src='+encodeURIComponent(scope.src) - +'&autoplay='+(scope.autoplay||''); - ele.html(' + --> +
+ {{'cannot.preview.this.file'|translate}} + +
- - +
+
+ + +
+ +
 
+
+ + + diff --git a/app/main/files/modals/preview/doc-modal.js b/app/main/files/modals/preview/doc-modal.js index 035a4636..af008cd1 100644 --- a/app/main/files/modals/preview/doc-modal.js +++ b/app/main/files/modals/preview/doc-modal.js @@ -1,19 +1,93 @@ -angular.module('web') - .controller('docModalCtrl', ['$scope','$uibModalInstance','bucketInfo','objectInfo','fileType', - function ($scope, $modalInstance, bucketInfo, objectInfo, fileType) { +angular.module("web").controller("docModalCtrl", [ + "$scope", + "$uibModalInstance", + "Const", + "bucketInfo", + "objectInfo", + "showFn", + "ossSvs2", + "fileType", + function ( + $scope, + $modalInstance, + Const, + bucketInfo, + objectInfo, + showFn, + ossSvs2, + fileType + ) { + angular.extend($scope, { + bucketInfo: bucketInfo, + objectInfo: objectInfo, + fileType: fileType, + afterCheckSuccess: afterCheckSuccess, + afterRestoreSubmit: afterRestoreSubmit, - angular.extend($scope, { - bucketInfo: bucketInfo, - objectInfo: objectInfo, - fileType: fileType, + openURL: openURL, - cancel: cancel - }); + previewBarVisible: false, + showFn: showFn, + cancel: cancel, - function cancel() { - $modalInstance.dismiss('close'); - } + MAX_SIZE: 50 * 1024 * 1024, //50MB + }); + + function afterRestoreSubmit() { + showFn.callback(true); + } + + function afterCheckSuccess() { + $scope.previewBarVisible = true; + getContent(); + } + function cancel() { + $modalInstance.dismiss("close"); + } - }]) -; + function openURL(v) { + openExternal(v); + } + + function getContent() { + if (fileType.ext[0] == "pdf") { + $scope.prevUrl = ossSvs2.signatureUrl2( + bucketInfo.region, + bucketInfo.bucket, + objectInfo.path, + 3600 + ); + return; + } + + var process = "imm/previewdoc,copy_1"; + var prevUrl = ossSvs2.signatureUrl2( + bucketInfo.region, + bucketInfo.bucket, + objectInfo.path, + 3600, + process + ); + //console.log(prevUrl) + $.ajax({ + url: prevUrl, + success: function (data) { + $scope.prevUrl = prevUrl; + }, + error: function (err) { + if (err.responseJSON) { + if (err.responseJSON.code == "InvalidProject.NotFound") { + $scope.error = err.responseText; + $scope.doc_link = Const.IMM_DOC_PREVIEW_LINK; + } else { + $scope.error = err.responseText; + } + } else { + $scope.error = err.responseText; + } + }, + }); + } + }, +]); diff --git a/app/main/files/modals/preview/media-modal.html b/app/main/files/modals/preview/media-modal.html index 2e3d8b52..5db0dca8 100644 --- a/app/main/files/modals/preview/media-modal.html +++ b/app/main/files/modals/preview/media-modal.html @@ -6,42 +6,68 @@
 
-
{{'userMetaData'|translate}} - - {{'add'|translate}} +
+ {{'userMetaData'|translate}} + + {{'add'|translate}}
@@ -85,20 +118,25 @@
{{'userMetaData'|translate}}
x-oss-meta- - +
- + - {{'delete'|translate}} + {{'delete'|translate}}
-
diff --git a/app/main/modals/about.js b/app/main/modals/about.js index 0a5cab99..40b86e67 100644 --- a/app/main/modals/about.js +++ b/app/main/modals/about.js @@ -1,50 +1,73 @@ -'use strict'; - -angular.module('web') - .controller('aboutCtrl', ['$scope','$state','$uibModalInstance','upgradeSvs','safeApply','Toast', - function($scope,$state,$modalInstance,upgradeSvs,safeApply, Toast){ +"use strict"; +angular.module("web").controller("aboutCtrl", [ + "$scope", + "$state", + "$uibModalInstance", + "$interval", + "autoUpgradeSvs", + "safeApply", + "Toast", + "pscope", + function ( + $scope, + $state, + $modalInstance, + $interval, + autoUpgradeSvs, + safeApply, + Toast, + pscope + ) { angular.extend($scope, { cancel: cancel, + startUpgrade: startUpgrade, + installAndRestart: installAndRestart, open: open, app_logo: Global.app.logo, info: { - currentVersion: pkg.version - } + currentVersion: Global.app.version, + }, + custom_about_html: Global.about_html, }); - init(); - function init(){ - $scope.isLoading=true; - upgradeSvs.load(function(info){ - $scope.isLoading=false; + $interval(function () { + Object.assign($scope.info, pscope.upgradeInfo); + }, 1000); - angular.extend($scope.info, info); - - safeApply($scope); + function installAndRestart() { + gInstallAndRestart($scope.info.lastVersion); + } - //涓嶆槸鏈鏂扮増鏈紝鑾峰彇鏈鏂扮増鏈殑releaseNote - if(!$scope.info.isLastVersion){ - var converter = new showdown.Converter(); - upgradeSvs.getLastestReleaseNote($scope.info.lastVersion, function(text){ + init(); + function init() { + $scope.info = pscope.upgradeInfo; - text = text + ''; - var html = converter.makeHtml(text); - $scope.info.lastReleaseNote = html; + if (!$scope.info.isLastVersion) { + var converter = new showdown.Converter(); + autoUpgradeSvs.getLastestReleaseNote( + $scope.info.lastVersion, + $scope.langSettings.lang, + function (text) { + text = text + ""; + var html = converter.makeHtml(text); + $scope.info.lastReleaseNote = html; + //safeApply($scope); + } + ); + } + } - safeApply($scope); - }) - } - }); + function startUpgrade() { + autoUpgradeSvs.start(); } - function open(a){ + function open(a) { openExternal(a); } - function cancel(){ - $modalInstance.dismiss('close'); + function cancel() { + $modalInstance.dismiss("close"); } - - }]) -; + }, +]); diff --git a/app/main/modals/fav-list.html b/app/main/modals/fav-list.html index 11333356..7d61cb1f 100644 --- a/app/main/modals/fav-list.html +++ b/app/main/modals/fav-list.html @@ -1,37 +1,39 @@ - - - - + + + diff --git a/app/main/modals/fav-list.js b/app/main/modals/fav-list.js index 0af88974..9eac2617 100644 --- a/app/main/modals/fav-list.js +++ b/app/main/modals/fav-list.js @@ -1,38 +1,49 @@ -'use strict'; - -angular.module('web') - .controller('favListCtrl', ['$scope','$rootScope', '$translate','$state','$uibModalInstance','Fav','Toast', - function($scope,$rootScope, $translate, $state,$modalInstance,Fav,Toast){ +"use strict"; + +angular.module("web").controller("favListCtrl", [ + "$scope", + "$rootScope", + "$translate", + "$state", + "$uibModalInstance", + "Fav", + "Toast", + function ( + $scope, + $rootScope, + $translate, + $state, + $modalInstance, + Fav, + Toast + ) { var T = $translate.instant; angular.extend($scope, { - cancel: cancel, refresh: refresh, removeFav: removeFav, - goTo: goTo + goTo: goTo, }); refresh(); - function refresh(){ - var arr = Fav.list(); + function refresh() { + var arr = Fav.list(); $scope.items = arr; } - function goTo(url){ - $rootScope.$broadcast('goToOssAddress', url); + function goTo(url) { + $rootScope.$broadcast("goToOssAddress", url); cancel(); } - - function cancel(){ - $modalInstance.dismiss('close'); + function cancel() { + $modalInstance.dismiss("close"); } - function removeFav(item){ + function removeFav(item) { Fav.remove(item.url); - Toast.warning(T('bookmarks.delete.success')); //鍒犻櫎涔︾鎴愬姛 + Toast.warning(T("bookmarks.delete.success")); //鍒犻櫎涔︾鎴愬姛 refresh(); } - - }]) -; + }, +]); diff --git a/app/main/modals/settings.html b/app/main/modals/settings.html index 3b5a8908..d20695f6 100644 --- a/app/main/modals/settings.html +++ b/app/main/modals/settings.html @@ -10,29 +10,121 @@ - - {{item.CreateDate|timeFormat}} + + + {{'refresh'|translate}} + + + - - {{(item.Status=='Active'?'disable':'enable')|translate}} - | - {{'delete'|translate}} - - - +
+
+ + + + + - - + + + + + - - + + +
AccessKeyId/{{'status'|translate}}{{'accessKeySecret'|translate}}{{'createTime'|translate}} {{'actions'|translate}}
+ {{item.AccessKeyId}} + {{item.AccessKeyId}} + ({{('status.'+item.Status)|translate}}) + +
+ {{item.AccessKeySecret|hideSecret}} + {{item.AccessKeySecret}} + {{'show'|translate}} +
+
+ + {{'can.not.get.accessKeySecret'|translate}} +
+
{{item.CreateDate|timeFormat}} + {{(item.Status=='Active'?'disable':'enable')|translate}} + | + {{'delete'|translate}} +
+ + diff --git a/app/main/modals/user-ak.js b/app/main/modals/user-ak.js index a52f42fb..e73dd907 100644 --- a/app/main/modals/user-ak.js +++ b/app/main/modals/user-ak.js @@ -1,104 +1,139 @@ -'use strict'; - -angular.module('web') - .controller('userAKCtrl', ['$scope','$rootScope', '$translate','$state','$uibModalInstance','user','ramSvs','subUserAKSvs','Toast','Dialog','Const', - function($scope,$rootScope, $translate, $state,$modalInstance, user, ramSvs,subUserAKSvs, Toast,Dialog, Const){ +"use strict"; + +angular.module("web").controller("userAKCtrl", [ + "$scope", + "$rootScope", + "$translate", + "$state", + "$uibModalInstance", + "user", + "ramSvs", + "subUserAKSvs", + "Toast", + "Dialog", + "Const", + function ( + $scope, + $rootScope, + $translate, + $state, + $modalInstance, + user, + ramSvs, + subUserAKSvs, + Toast, + Dialog, + Const + ) { var T = $translate.instant; angular.extend($scope, { - user: user||{}, + user: user || {}, items: [], isLoading: false, cancel: cancel, - refresh :refresh, + refresh: refresh, updateStatus: updateStatus, showRemove: showRemove, showAdd: showAdd, }); refresh(); - function refresh(){ - - $scope.isLoading= true; - subUserAKSvs.list().then(function(arr){ - var akMap={}; - angular.forEach(arr, function(n){ - akMap[n.AccessKeyId]=n.AccessKeySecret; + function refresh() { + $scope.isLoading = true; + subUserAKSvs.list().then(function (arr) { + var akMap = {}; + angular.forEach(arr, function (n) { + akMap[n.AccessKeyId] = n.AccessKeySecret; }); - ramSvs.listAccessKeys(user.UserName).then(function(result){ - $scope.isLoading=false; - var items = result.AccessKeys.AccessKey; - angular.forEach(items, function(n){ - n.AccessKeySecret = akMap[n.AccessKeyId]||''; - }); - items.sort(function(a,b){ - return a.UpdateDate < b.UpdateDate ? 1: -1; - }); - $scope.items = items; - - }, function(){ - $scope.isLoading=false; - }); - }) - + ramSvs.listAccessKeys(user.UserName).then( + function (result) { + $scope.isLoading = false; + var items = result.AccessKeys.AccessKey; + angular.forEach(items, function (n) { + n.AccessKeySecret = akMap[n.AccessKeyId] || ""; + }); + items.sort(function (a, b) { + return a.UpdateDate < b.UpdateDate ? 1 : -1; + }); + $scope.items = items; + }, + function () { + $scope.isLoading = false; + } + ); + }); } - function showRemove(item){ - Dialog.confirm(title, message, function(b){ - if(!b)return; - ramSvs.deleteAccessKey(user.UserName, item.AccessKeyId).then(function(){ - refresh(); - }); + function showRemove(item) { + Dialog.confirm(title, message, function (b) { + if (!b) return; + ramSvs + .deleteAccessKey(user.UserName, item.AccessKeyId) + .then(function () { + refresh(); + }); }); } - function updateStatus(item){ - var title= T('ak.status.update.title.'+item.Status); - var message = T('ak.status.update.message.'+item.Status); - - var status = item.Status=='Active'?'Inactive': 'Active'; - - Dialog.confirm(title, message, function(b){ - if(!b)return; - ramSvs.updateAccessKey(user.UserName, item.AccessKeyId, status).then(function(){ - refresh(); - }); - },item.Status=='Active'?1:0); + function updateStatus(item) { + var title = T("ak.status.update.title." + item.Status); + var message = T("ak.status.update.message." + item.Status); + + var status = item.Status == "Active" ? "Inactive" : "Active"; + + Dialog.confirm( + title, + message, + function (b) { + if (!b) return; + ramSvs + .updateAccessKey(user.UserName, item.AccessKeyId, status) + .then(function () { + refresh(); + }); + }, + item.Status == "Active" ? 1 : 0 + ); } - - function showRemove(item){ - var title= T('ak.delete.title'); - var message = T('ak.delete.message'); - - Dialog.confirm(title, message, function(b){ - if(!b)return; - ramSvs.deleteAccessKey(user.UserName, item.AccessKeyId).then(function(){ - refresh(); - }); - },1); + function showRemove(item) { + var title = T("ak.delete.title"); + var message = T("ak.delete.message"); + + Dialog.confirm( + title, + message, + function (b) { + if (!b) return; + ramSvs + .deleteAccessKey(user.UserName, item.AccessKeyId) + .then(function () { + refresh(); + }); + }, + 1 + ); } - function showAdd(){ - ramSvs.createAccessKey(user.UserName).then(function(result){ + function showAdd() { + ramSvs.createAccessKey(user.UserName).then(function (result) { //result.AccessKey.AccessKeyId, - subUserAKSvs.save({ - AccessKeyId: result.AccessKey.AccessKeyId, - AccessKeySecret: result.AccessKey.AccessKeySecret, - UserName: user.UserName - }).then(function(){ - refresh(); - }); - + subUserAKSvs + .save({ + AccessKeyId: result.AccessKey.AccessKeyId, + AccessKeySecret: result.AccessKey.AccessKeySecret, + UserName: user.UserName, + }) + .then(function () { + refresh(); + }); }); } - - - function cancel(){ - $modalInstance.dismiss('close'); + function cancel() { + $modalInstance.dismiss("close"); } - - }]) -; + }, +]); diff --git a/app/main/modals/user-update.html b/app/main/modals/user-update.html index 465ebf6a..571dc7bb 100644 --- a/app/main/modals/user-update.html +++ b/app/main/modals/user-update.html @@ -1,67 +1,103 @@
- -
diff --git a/app/main/modals/user-update.js b/app/main/modals/user-update.js index 2fa144cf..ca2ca012 100644 --- a/app/main/modals/user-update.js +++ b/app/main/modals/user-update.js @@ -1,40 +1,60 @@ -'use strict'; +"use strict"; -angular.module('web') - .controller('userUpdateCtrl', ['$scope','$rootScope', '$translate','$state','$uibModalInstance','item','callback','ramSvs','Toast','Const', - function($scope,$rootScope, $translate, $state,$modalInstance, item, callback, ramSvs, Toast, Const){ +angular.module("web").controller("userUpdateCtrl", [ + "$scope", + "$rootScope", + "$translate", + "$state", + "$uibModalInstance", + "item", + "callback", + "ramSvs", + "Toast", + "Const", + function ( + $scope, + $rootScope, + $translate, + $state, + $modalInstance, + item, + callback, + ramSvs, + Toast, + Const + ) { var T = $translate.instant; var countryNum = angular.copy(Const.countryNum); var countryNumMap = {}; - angular.forEach(countryNum, function(n){ - countryNumMap[n.value]=n; + angular.forEach(countryNum, function (n) { + countryNumMap[n.value] = n; }); angular.extend($scope, { reg: { - email: Const.REG.EMAIL + email: Const.REG.EMAIL, }, item: initNewItem(item), cancel: cancel, countryNum: countryNum, countryNumMap: countryNumMap, - onSubmit: onSubmit + onSubmit: onSubmit, }); init(); - function init(){ + function init() { var numkv = angular.copy(countryNum[0]); $scope.item._MobilePhonePre = numkv.value; - $scope.item._MobilePhoneNum = ''; + $scope.item._MobilePhoneNum = ""; - if(item.UserId){ - ramSvs.getUser(item.UserName).then(function(result){ + if (item.UserId) { + ramSvs.getUser(item.UserName).then(function (result) { angular.extend($scope.item, initNewItem(result.User)); }); } } - function initNewItem(item){ + function initNewItem(item) { var info = { UserName: item.UserName, NewUserName: item.UserName, @@ -42,38 +62,36 @@ angular.module('web') NewMobilePhone: item.MobilePhone, NewEmail: item.Email, NewComments: item.Comments, - } - if(item.MobilePhone){ - var numkv = item.MobilePhone.split('-'); + }; + if (item.MobilePhone) { + var numkv = item.MobilePhone.split("-"); info._MobilePhonePre = numkv[0]; info._MobilePhoneNum = numkv[1]; } return info; } - function onSubmit(form1){ - if(!form1.$valid)return; + function onSubmit(form1) { + if (!form1.$valid) return; var item = angular.copy($scope.item); - if(item._MobilePhonePre && item._MobilePhoneNum){ - item.NewMobilePhone = item._MobilePhonePre+'-'+item._MobilePhoneNum; - }else{ - item.NewMobilePhone = ''; + if (item._MobilePhonePre && item._MobilePhoneNum) { + item.NewMobilePhone = item._MobilePhonePre + "-" + item._MobilePhoneNum; + } else { + item.NewMobilePhone = ""; } delete item._MobilePhonePre; delete item._MobilePhoneNum; //console.log(item); - ramSvs.updateUser(item).then(function(result){ + ramSvs.updateUser(item).then(function (result) { callback(); cancel(); }); } - - function cancel(){ - $modalInstance.dismiss('close'); + function cancel() { + $modalInstance.dismiss("close"); } - - }]) -; + }, +]); diff --git a/app/main/modals/users.html b/app/main/modals/users.html index 02c4c9b7..c71f0bff 100644 --- a/app/main/modals/users.html +++ b/app/main/modals/users.html @@ -1,79 +1,92 @@ - -