aboutsummaryrefslogtreecommitdiff
path: root/src/webex
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-12-12 15:38:03 +0100
committerFlorian Dold <florian.dold@gmail.com>2017-12-12 15:38:03 +0100
commit1bcc5022c27fff2c28c38b3db12ac353cc7d3481 (patch)
tree719c8f342a4cfd4c13fc3aec58a30cce6aac007c /src/webex
parentb4484c8af37b0c5912adce2dcf3a40d9455c7200 (diff)
show tip in history
Diffstat (limited to 'src/webex')
-rw-r--r--src/webex/pages/popup.tsx12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/webex/pages/popup.tsx b/src/webex/pages/popup.tsx
index 82f3eddaa..389be3b5c 100644
--- a/src/webex/pages/popup.tsx
+++ b/src/webex/pages/popup.tsx
@@ -401,6 +401,18 @@ function formatHistoryItem(historyItem: HistoryRecord) {
</i18n.Translate>
);
}
+ case "tip": {
+ const tipPageUrl = new URI(chrome.extension.getURL("/src/webex/pages/tip.html"));
+ const params = { tip_id: d.tipId, merchant_domain: d.merchantDomain };
+ const url = tipPageUrl.query(params).href();
+ return (
+ <i18n.Translate wrap="p">
+ Merchant <span>{d.merchantDomain}</span> gave a <a href={url} onClick={openTab(url)}> tip</a> of <span>{renderAmount(d.amount)}</span>.
+ <span> </span>
+ {d.accepted ? null : <span>You did not accepted the tip yet.</span> }
+ </i18n.Translate>
+ );
+ }
default:
return (<p>{i18n.str`Unknown event (${historyItem.type})`}</p>);
}