diff options
author | marty hiatt <martianhiatus@riseup.net> | 2024-10-07 20:27:18 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus@riseup.net> | 2024-10-07 20:27:18 +0200 |
commit | f557e030fc65b88f135987fac3ef950f8e6c52be (patch) | |
tree | 1313535090cb0bd539f146237d43a979251eb92c /lisp/mastodon-transient.el | |
parent | 2bfd601b88d5fc5a53bce104ba8fda938da45382 (diff) |
start on masto fields transient
Diffstat (limited to 'lisp/mastodon-transient.el')
-rw-r--r-- | lisp/mastodon-transient.el | 30 |
1 files changed, 8 insertions, 22 deletions
diff --git a/lisp/mastodon-transient.el b/lisp/mastodon-transient.el index 1c5890f..060e9ad 100644 --- a/lisp/mastodon-transient.el +++ b/lisp/mastodon-transient.el @@ -171,15 +171,15 @@ the inner key part." [:description "Fields" ["Name" - ("1 n" "" "fields.1.name=" :class mastodon-transient-field) - ("2 n" "" "fields.2.name=" :class mastodon-transient-field) - ("3 n" "" "fields.3.name=" :class mastodon-transient-field) - ("4 n" "" "fields.4.name=" :class mastodon-transient-field)] + ("1 n" "" "fields.1.name" :alist-key fields.1.name :class mastodon-transient-field) + ("2 n" "" "fields.2.name" :alist-key fields.2.name :class mastodon-transient-field) + ("3 n" "" "fields.3.name" :alist-key fields.3.name :class mastodon-transient-field) + ("4 n" "" "fields.4.name" :alist-key fields.4.name :class mastodon-transient-field)] ["Value" - ("1 v" "" "fields.1.value=" :class mastodon-transient-field) - ("2 v" "" "fields.2.value=" :class mastodon-transient-field) - ("3 v" "" "fields.3.value=" :class mastodon-transient-field) - ("4 v" "" "fields.4.value=" :class mastodon-transient-field)]] + ("1 v" "" "fields.1.value" :alist-key fields.1.value :class mastodon-transient-field) + ("2 v" "" "fields.2.value" :alist-key fields.2.value :class mastodon-transient-field) + ("3 v" "" "fields.3.value" :alist-key fields.3.value :class mastodon-transient-field) + ("4 v" "" "fields.4.value" :alist-key fields.4.value :class mastodon-transient-field)]] ["Update" ("C-c C-c" "Save settings" mastodon-profile-fields-update) ("C-c C-k" :info "Revert all changes")] @@ -206,19 +206,5 @@ PAIR is a transient arg of the form \"fields.1.name=val\"." (value (when pair (cadr pair-split)))) (not (equal value (alist-get server-key server-elt))))) -(cl-defmethod transient-format-value ((obj mastodon-transient-field)) - "Format the value of OBJ. -Format should just be a string, highlighted green if it has been -changed from the server value." - (let* ((pair (transient-infix-value obj)) - (value (when pair (cadr (split-string pair "="))))) - (if (not pair) - "" - (propertize - value - 'face (if (tp-arg-changed-p obj pair) - 'transient-value - 'transient-inactive-value))))) - (provide 'mastodon-transient) ;;; mastodon-transient.el ends here |