From 2509441121e8c41a4096c1b26abb7ab4f3ea3eba Mon Sep 17 00:00:00 2001 From: Luke Berndt Date: Tue, 23 Feb 2021 22:02:59 -0500 Subject: [PATCH] Add twitter link --- frontend/server/card.ejs | 2 +- frontend/src/Call/CallInfo.js | 18 +++++++++++++++--- frontend/src/Call/CallPlayer.js | 2 +- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/frontend/server/card.ejs b/frontend/server/card.ejs index ed679dc..a096284 100644 --- a/frontend/server/card.ejs +++ b/frontend/server/card.ejs @@ -21,7 +21,7 @@ // Init wavesurfer = WaveSurfer.create({ container: document.querySelector("#waveform"), - waveColor: "#BF675F", + waveColor: "#BF938F", progressColor: "#BF1000", backend: "MediaElement", mediaControls: true, diff --git a/frontend/src/Call/CallInfo.js b/frontend/src/Call/CallInfo.js index 86da1ad..107dab3 100644 --- a/frontend/src/Call/CallInfo.js +++ b/frontend/src/Call/CallInfo.js @@ -1,11 +1,13 @@ import React from "react"; import { Header, + Button, Divider, List, Segment, Statistic, - Icon + Icon, + Menu } from "semantic-ui-react"; // ---------------------------------------------------- @@ -19,6 +21,8 @@ class CallInfo extends React.Component { var callDate = "-"; var callTime = "-"; var talkgroupNum = "-"; + var callDownload = ""; + var callTweet = ""; if (this.props.call) { const currentCall = this.props.call; var time = new Date(currentCall.time); @@ -33,12 +37,15 @@ class CallInfo extends React.Component { [{source.pos}]); callLength = currentCall.len; talkgroupNum = currentCall.talkgroupNum; + callDownload = currentCall.url; + callTweet = "https://twitter.com/intent/tweet?url="+encodeURIComponent(document.location.origin+this.props.link)+"&via="+encodeURIComponent("OpenMHz"); } return ( - +
+
{this.props.header}
{srcList} @@ -74,7 +81,12 @@ class CallInfo extends React.Component {
- + + Tweet + Download + Link + +
); } } diff --git a/frontend/src/Call/CallPlayer.js b/frontend/src/Call/CallPlayer.js index e6ea86c..f36a13d 100644 --- a/frontend/src/Call/CallPlayer.js +++ b/frontend/src/Call/CallPlayer.js @@ -603,7 +603,7 @@ class CallPlayer extends React.Component { - +