Skip to content

Commit

Permalink
修复无法显隐藏密钥问题
Browse files Browse the repository at this point in the history
  • Loading branch information
TC999 committed Mar 6, 2025
1 parent 7ae530b commit c418ee0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/tabs/ai_ui_tab.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,18 +152,17 @@ impl AIConfigurationUI {

ui.horizontal(|ui| {
ui.label("API密钥:");
let mut is_password_visible = false;
if ui
.add(
egui::TextEdit::singleline(&mut self.ai_config.model.api_key)
.password(!is_password_visible),
.password(!self.is_password_visible),
)
.changed()
{
changed = true;
}
if ui.button("显示/隐藏").clicked() {
is_password_visible = !is_password_visible;
self.is_password_visible = !self.is_password_visible;
}
});

Expand Down

0 comments on commit c418ee0

Please sign in to comment.