summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Barenblat <bbaren@mit.edu>2015-06-25 21:53:18 -0400
committerBenjamin Barenblat <bbaren@mit.edu>2015-06-25 21:53:18 -0400
commit8ff581de207f3c07d2e965d0307460db2f688c28 (patch)
tree143f31b6524941f94f6886cfb62b63fc284c760c
parent2c623139c9a1ab07241f3fec1da419054394f9bc (diff)
Add revert button in edit mode
-rw-r--r--main.ur6
1 files changed, 6 insertions, 0 deletions
diff --git a/main.ur b/main.ur
index 12fbb9d..02ad98b 100644
--- a/main.ur
+++ b/main.ur
@@ -105,6 +105,12 @@ fun wiki requested_article_title =
rpc (create_commit article.Title text);
rpc (Lock.release article.Title);
set page_mode View} />
+ <button
+ value="Revert"
+ onclick={fn _ =>
+ set article_body_source article.Body;
+ rpc (Lock.release article.Title);
+ set page_mode View} />
</div>
</div>
</div>