From 4b3a5b3e8568e36043e24b2923bc6d0be58b12b8 Mon Sep 17 00:00:00 2001 From: csg01123119 Date: Tue, 9 Jan 2024 11:22:55 +0800 Subject: [PATCH] fix: not leaving empty after deleting bucket --- app/main/files/files.js | 1 + app/main/files/modals/add-bucket-modal.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/main/files/files.js b/app/main/files/files.js index 68e0e5a8..322d1b7c 100644 --- a/app/main/files/files.js +++ b/app/main/files/files.js @@ -836,6 +836,7 @@ angular if (b) { ossSvs2.deleteBucket(item.region, item.name).then(function() { Toast.success(T('bucket.delete.success')); // 删除Bucket成功 + $scope.bucket_sel.item = null; // 删除Bucket不是实时的,等待1秒后刷新 $timeout(function() { listBuckets(); diff --git a/app/main/files/modals/add-bucket-modal.js b/app/main/files/modals/add-bucket-modal.js index 46445ab9..4bc42c62 100644 --- a/app/main/files/modals/add-bucket-modal.js +++ b/app/main/files/modals/add-bucket-modal.js @@ -38,7 +38,7 @@ angular.module('web').controller('addBucketModalCtrl', [ region: regions[0].id, storageClass: 'Standard' }, - reg: /^[a-z0-9][a-z0-9\-]{1,61}[a-z0-9]$/, + reg: /^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/, onRegionChanged: onRegionChanged, onAclChanged: onAclChanged, openURL: function(v) {