Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: to #47864637 修复STS登陆后地址栏工作不正常的问题 #446

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
PeterRao merged 8 commits into aliyun:develop from shungang:csg/fix/develop/47864637
May 4, 2023
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
View file Open in desktop
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
View file Open in desktop
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
View file Open in desktop
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
View file Open in desktop
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
View file Open in desktop
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
View file Open in desktop
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
View file Open in desktop
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

AltStyle によって変換されたページ (->オリジナル) /