ChenyuRabbitLove commited on
Commit
9dae054
1 Parent(s): 8309961

feat: add corresponded flow to renfer user info

Browse files
Files changed (1) hide show
  1. app.py +11 -5
app.py CHANGED
@@ -7,7 +7,10 @@ from utils.utils import (
7
  get_content,
8
  get_player_partners,
9
  get_player_badges,
10
- get_player_achievement_logs_html,
 
 
 
11
  )
12
 
13
  seafoam = Seafoam()
@@ -60,7 +63,7 @@ with gr.Blocks(theme=seafoam, css=get_content("css/style.css")) as demo:
60
  with gr.Column(scale=1):
61
  with gr.Column(elem_id="adventure_container"):
62
  adventure_description = gr.Markdown("# 冒險階段", elem_id="adventure_description")
63
- adverture = gr.Slider(
64
  value=0,
65
  show_label=False,
66
  interactive=False,
@@ -81,7 +84,7 @@ with gr.Blocks(theme=seafoam, css=get_content("css/style.css")) as demo:
81
 
82
  with gr.Row():
83
  html = get_content("htmls/adventure_blank.html")
84
- adverture_log = gr.HTML(html, label="Adventure Log", elem_id="adventure_log")
85
 
86
  # handling player info
87
  with gr.Row():
@@ -94,7 +97,10 @@ with gr.Blocks(theme=seafoam, css=get_content("css/style.css")) as demo:
94
  player_info_query_btn.click(get_player_info, player_backend_id, player_info).then(
95
  player_info_query_btn.click(get_player_partners, player_info, pet_gallery)).then(
96
  player_info_query_btn.click(get_player_badges, player_info, badge_gallery)).then(
97
- player_info_query_btn.click(get_player_achievement_logs_html, player_info, adverture_log))
98
-
 
 
 
99
  if __name__ == "__main__":
100
  demo.launch()
 
7
  get_content,
8
  get_player_partners,
9
  get_player_badges,
10
+ get_player_adventure_logs_html,
11
+ get_player_achievements,
12
+ get_current_story,
13
+ get_player_nickname,
14
  )
15
 
16
  seafoam = Seafoam()
 
63
  with gr.Column(scale=1):
64
  with gr.Column(elem_id="adventure_container"):
65
  adventure_description = gr.Markdown("# 冒險階段", elem_id="adventure_description")
66
+ adventure = gr.Slider(
67
  value=0,
68
  show_label=False,
69
  interactive=False,
 
84
 
85
  with gr.Row():
86
  html = get_content("htmls/adventure_blank.html")
87
+ adventure_log = gr.HTML(html, label="Adventure Log", elem_id="adventure_log")
88
 
89
  # handling player info
90
  with gr.Row():
 
97
  player_info_query_btn.click(get_player_info, player_backend_id, player_info).then(
98
  player_info_query_btn.click(get_player_partners, player_info, pet_gallery)).then(
99
  player_info_query_btn.click(get_player_badges, player_info, badge_gallery)).then(
100
+ player_info_query_btn.click(get_player_adventure_logs_html, player_info, adventure_log)).then(
101
+ player_info_query_btn.click(get_player_achievements, player_info, achievements)).then(
102
+ player_info_query_btn.click(get_player_nickname, player_info, avatar_description)).then(
103
+ player_info_query_btn.click(get_current_story, None, adventure))
104
+
105
  if __name__ == "__main__":
106
  demo.launch()