Skip to content

Commit

Permalink
Added privaterepo parameter to menu links when a private activity is …
Browse files Browse the repository at this point in the history
…loaded and also cleaned authentication state and code parameters from url following authentication.
  • Loading branch information
barnettwilliam committed Oct 13, 2023
1 parent a434889 commit 56f968f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions platform/src/ActivityManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ class ActivityManager {
a.href += "&activities=" + this.activitiesUrl;
}

if (urlParamPrivateRepo()){
a.href += "&privaterepo=true"
}

li.appendChild(a);

var icon = document.createElement("span");
Expand Down
4 changes: 4 additions & 0 deletions platform/src/Playground.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ if (urlParameters.has("code") && urlParameters.has("state") ){
} );
}

// Clean authentication parameters from url
urlParameters.delete("code");
urlParameters.delete("state");
window.history.replaceState({}, document.title, "/?" + urlParameters.toString());


function initialiseActivity(){
Expand Down

0 comments on commit 56f968f

Please sign in to comment.