Skip to content

Commit

Permalink
hide the setting tabe when current user is admin
Browse files Browse the repository at this point in the history
  • Loading branch information
xieyongliang committed Mar 30, 2023
1 parent ad53fd5 commit 3ca3a57
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions javascript/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,11 @@ function restart_reload(){

function login(username) {
var user=gradioApp().querySelector('#tabs').querySelectorAll('button')[5];
var setting=gradioApp().querySelector('#tabs').querySelectorAll('button')[6];

if(username=='admin'){
user.style.display='block'
setting.style.display='none'
user.click()
}
else
Expand Down

0 comments on commit 3ca3a57

Please sign in to comment.