Skip to content

Commit

Permalink
Merge pull request #29 from G4brym/add-basic-auth
Browse files Browse the repository at this point in the history
Fix basic auth issues
  • Loading branch information
G4brym authored Sep 8, 2023
2 parents e8b6c40 + 8012a33 commit 825732d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
1 change: 0 additions & 1 deletion packages/dashboard/scss/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ $variable-prefix: 'ct-';
@import './custom-variables';
@import '../node_modules/bootstrap/scss/bootstrap';
@import '../node_modules/bootstrap-icons/font/bootstrap-icons.css';
//@import url('https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css');

//Components
@import './custom/components/accordions';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default {
this.$watch(
() => this.$route.params.bucket,
(bucket, previousBucket) => {
if (bucket !== previousBucket) {
if (bucket && bucket !== previousBucket) {
this.$store.commit('changeBucket', bucket)
this.$store.dispatch('refreshObjects')
this.$store.commit('toggleMobileSidebar', false)
Expand Down
2 changes: 1 addition & 1 deletion packages/dashboard/src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default createStore({
loadUserDisks(state, data) {
state.buckets = data.buckets;

if (state.activeBucket === null && data.buckets.length > 0) {
if ((state.activeBucket === null && data.buckets.length > 0) || router.currentRoute.value.href.startsWith('/auth')) {
const targetView = (location.pathname.startsWith('/email')) ? 'email-home' : 'storage-home'

router.push({ name: targetView, params: { bucket: data.buckets[0].name } });
Expand Down
10 changes: 8 additions & 2 deletions worker/dev/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ export default R2Explorer({
readonly: false,
cors: true,
dashboardUrl: "https://dev.r2-explorer-dashboard.pages.dev/",
basicAuth: {
basicAuth: [{
username: 'teste',
password: 'abc'
}
},{
username: 'teste33',
password: 'abcdd'
},{
username: 'teste55',
password: 'abchh'
}]
});

0 comments on commit 825732d

Please sign in to comment.