mirror of
https://github.com/storytold/wordcraft.git
synced 2026-11-02 16:30:05 -06:00
fix(updates): give the update command a ui. id so the ribbon button is enabled
This commit is contained in:
@@ -1631,7 +1631,7 @@ impl WordApp {
|
||||
fn ui_command(&mut self, id: &str, p: &Value) -> Option<Result<Value, String>> {
|
||||
let s = |k: &str| p.get(k).and_then(Value::as_str);
|
||||
Some(Ok(match id {
|
||||
"app.checkForUpdates" | "help.checkForUpdates" => {
|
||||
"ui.checkForUpdates" | "help.checkForUpdates" => {
|
||||
crate::updates_ui::check(self);
|
||||
Value::Null
|
||||
}
|
||||
@@ -3027,7 +3027,7 @@ pub(crate) fn works_without_document(id: &str) -> bool {
|
||||
| "ui.discord"
|
||||
| "ui.caretAnimation"
|
||||
| "ui.startScreen"
|
||||
| "app.checkForUpdates"
|
||||
| "ui.checkForUpdates"
|
||||
) || id.starts_with("help.")
|
||||
}
|
||||
|
||||
|
||||
@@ -2431,7 +2431,7 @@ fn outlining(app: &mut WordApp, ui: &mut Ui) {
|
||||
fn help(app: &mut WordApp, ui: &mut Ui) {
|
||||
group(ui, "Help", None, app, |ui, app| {
|
||||
big(ui, app, "help", "Help", "ui.dialog", json!({"name": "about"}), false);
|
||||
big(ui, app, "checkForUpdates", "Check for\nUpdates…", "app.checkForUpdates", json!({}), false);
|
||||
big(ui, app, "checkForUpdates", "Check for\nUpdates…", "ui.checkForUpdates", json!({}), false);
|
||||
big(ui, app, "discord", "Community\nDiscord", "ui.discord", json!({}), false);
|
||||
});
|
||||
group(ui, "Agents", None, app, |ui, app| {
|
||||
|
||||
Reference in New Issue
Block a user