Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/components/services/oss2.js
Original file line number Diff line number Diff line change
Expand Up @@ -1638,8 +1638,9 @@ angular.module('web').factory('ossSvs2', [
name: name === '/' ? name : name.replace(/\/$/, '')
};
});
//保证oss://10012/1/2/3/oss-browser-develop.zip也能加载成功
const objects = (resp.objects || [])
.filter((n) => n.name !== key)
.filter((n) => n.name !== key || (!key.endsWith('/') && n.name === key))
.map((n) => {
const arr = n.name.split('/').filter((k) => !!k);
const name = arr[arr.length - 1];
Expand Down
2 changes: 1 addition & 1 deletion app/main/auth/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ angular.module('web').controller('loginCtrl', [
$scope.item.osspath = $scope.item.osspath || '';

if (
$scope.item.osspath_isdir &&
// $scope.item.osspath_isdir && //默认用户登陆的输入都是目录,而不是文件路径
$scope.item.osspath &&
!$scope.item.osspath.endsWith('/')
) {
Expand Down
2 changes: 1 addition & 1 deletion app/main/files/_/sub-address-bar.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="pd4 address-bar" ng-controller="subAddressBarCtrl">
<form ng-submit="go()" name="form1">
<form ng-submit="subGo()" name="form1">
<div class="input-group input-group-sm">
<span class="input-group-btn">
<button
Expand Down
20 changes: 16 additions & 4 deletions app/main/files/_/sub-address-bar.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/* eslint-disable no-console */
/* eslint-disable object-curly-newline */
/* eslint-disable brace-style */
/* eslint-disable padding-line-between-statements */
angular.module('web').controller('subAddressBarCtrl', [
'$scope',
'$translate',
Expand All @@ -14,6 +18,7 @@ angular.module('web').controller('subAddressBarCtrl', [
subAddress: '/',
goUp: goUp,
go: go,
subGo: subGo,
goHome: goHome,
saveDefaultAddress: saveDefaultAddress,
getDefaultAddress: getDefaultAddress,
Expand Down Expand Up @@ -115,15 +120,15 @@ angular.module('web').controller('subAddressBarCtrl', [
function goBack() {
var addr = His.goBack();

// console.log('-->',addr);
// console.log('goBack-->',addr);
$scope.address = addr.url;
$scope.subAddress = getSubAddress();
$scope.$emit('ossAddressChange', addr.url);
}
function goAhead() {
var addr = His.goAhead();

// console.log('-->',addr);
// console.log('goAhead-->',addr);
$scope.address = addr.url;
$scope.subAddress = getSubAddress();
$scope.$emit('ossAddressChange', addr.url);
Expand Down Expand Up @@ -165,7 +170,7 @@ angular.module('web').controller('subAddressBarCtrl', [
if (!addr) {
$scope.address = DEF_ADDR;
$scope.subAddress = getSubAddress();
length;
// length;

return DEF_ADDR;
}
Expand Down Expand Up @@ -193,6 +198,11 @@ angular.module('web').controller('subAddressBarCtrl', [
console.log(addr);
$scope.$emit('ossAddressChange', addr, force);
}
// 地址栏改变后 刷新
function subGo() {
$scope.address = DEF_ADDR + $scope.subAddress.substring(1);
go();
}
// 向上
function goUp() {
var addr = getAddress();
Expand Down Expand Up @@ -222,8 +232,10 @@ angular.module('web').controller('subAddressBarCtrl', [
function getSubAddress(addr) {
addr = addr || $scope.address;
addr = addr.substring(DEF_ADDR.length);
if (addr == '/') { return addr; }
if (addr.indexOf('/') == 0) { return addr; }

return addr == '/' ? '/' : '/' + addr;
return '/' + addr;
}
}
]);
11 changes: 5 additions & 6 deletions app/main/files/files.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<div ng-include="'main/_/top.html'"></div>

<div>
<div
ng-if="currentAuthInfo.id.indexOf('STS.')!=0"
ng-include="'main/files/_/address-bar.html'"
></div>
<div
<!-- 改成:地址栏不区分 是否是 sts登陆,统一用户操作习惯 -->
<div ng-include="'main/files/_/address-bar.html'"></div>
<!--
<div
ng-if="currentAuthInfo.id.indexOf('STS.')==0"
ng-include="'main/files/_/sub-address-bar.html'"
></div>
></div> -->

<div ng-if="ref.isBucketList">
<div ng-include="'main/files/_/bucket-toolbar.html'"></div>
Expand Down
2 changes: 1 addition & 1 deletion node/i18n/en-US.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module.exports = {

"region.oss-us-west-1": "Western US 1(Silicon Valley)",
"region.oss-us-east-1": "Eastern US 1(Virginia)",
"region.oss-eu-central-1": "CGermany (Frankfurt)",
"region.oss-eu-central-1": "Germany (Frankfurt)",
"region.oss-me-east-1": "United Arab Emirates (Dubai)",
"region.oss-eu-west-1": "England (LonDon)",

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "oss-browser",
"version": "1.16.0",
"version": "1.16.1",
"main": "dist/main.js",
"scripts": {
"test": "ava test",
Expand Down