File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -246,6 +246,9 @@ async function renderSidebarHTML() {
246246 // if navigating in repository
247247 if ( repo != '' ) {
248248
249+ // change header options
250+ header . classList . remove ( 'out-of-repo' ) ;
251+
249252 // render files
250253 resp . forEach ( item => {
251254
@@ -361,6 +364,9 @@ async function renderSidebarHTML() {
361364
362365 } else { // else, show all repositories
363366
367+ // change header options
368+ header . classList . add ( 'out-of-repo' ) ;
369+
364370 // hide branch button
365371 sidebarBranch . classList . remove ( 'visible' ) ;
366372
@@ -1232,7 +1238,7 @@ function checkBranchMenu(e) {
12321238addButton . addEventListener ( 'click' , ( ) => {
12331239
12341240 // if navigating in repository
1235- if ( treeLoc [ 1 ] != '' ) {
1241+ if ( ! header . classList . includes ( 'out-of-repo' ) ) {
12361242
12371243 // create new file
12381244 createNewFileInHTML ( ) ;
@@ -1361,7 +1367,7 @@ function createNewRepoInHTML() {
13611367 startLoading ( ) ;
13621368
13631369 // push repo asynchronously
1364- const newSha = await git . createRepo ( repoName ) ;
1370+ const newSha = await git . createRepo ( repoName , true ) ;
13651371
13661372 // stop loading
13671373 stopLoading ( ) ;
You can’t perform that action at this time.
0 commit comments