mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-12 08:47:40 -05:00
Add twitter link
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
// Init
|
||||
wavesurfer = WaveSurfer.create({
|
||||
container: document.querySelector("#waveform"),
|
||||
waveColor: "#BF675F",
|
||||
waveColor: "#BF938F",
|
||||
progressColor: "#BF1000",
|
||||
backend: "MediaElement",
|
||||
mediaControls: true,
|
||||
|
||||
@@ -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}]</List.Item>);
|
||||
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 (
|
||||
<Segment padded>
|
||||
<div>
|
||||
<Segment padded attached>
|
||||
<Header as='h1'>{this.props.header}</Header>
|
||||
<List bulleted horizontal link>
|
||||
{srcList}
|
||||
@@ -74,7 +81,12 @@ class CallInfo extends React.Component {
|
||||
</List.Item>
|
||||
</List>
|
||||
</Segment>
|
||||
|
||||
<Menu attached='bottom'>
|
||||
<a href={callTweet}><Menu.Item name="tweet" ><Icon name='twitter' />Tweet</Menu.Item></a>
|
||||
<a href={callDownload}><Menu.Item name="download"><Icon name="download" />Download</Menu.Item></a>
|
||||
<a href={this.props.link}><Menu.Item name="link"><Icon name="at" />Link</Menu.Item></a>
|
||||
</Menu>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -603,7 +603,7 @@ class CallPlayer extends React.Component {
|
||||
</Sidebar.Pushable>
|
||||
<Rail position='right' className="desktop-only" dimmed={sidebarOpened ? "true" : "false"} >
|
||||
<Sticky context={contextRef} offset={60}>
|
||||
<CallInfo call={currentCall} header={callInfoHeader} />
|
||||
<CallInfo call={currentCall} header={callInfoHeader} link={callLink}/>
|
||||
</Sticky>
|
||||
</Rail>
|
||||
</Container>
|
||||
|
||||
Reference in New Issue
Block a user