mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-16 10:47:32 -05:00
Add twitter link
This commit is contained in:
@@ -21,7 +21,7 @@
|
|||||||
// Init
|
// Init
|
||||||
wavesurfer = WaveSurfer.create({
|
wavesurfer = WaveSurfer.create({
|
||||||
container: document.querySelector("#waveform"),
|
container: document.querySelector("#waveform"),
|
||||||
waveColor: "#BF675F",
|
waveColor: "#BF938F",
|
||||||
progressColor: "#BF1000",
|
progressColor: "#BF1000",
|
||||||
backend: "MediaElement",
|
backend: "MediaElement",
|
||||||
mediaControls: true,
|
mediaControls: true,
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import {
|
import {
|
||||||
Header,
|
Header,
|
||||||
|
Button,
|
||||||
Divider,
|
Divider,
|
||||||
List,
|
List,
|
||||||
Segment,
|
Segment,
|
||||||
Statistic,
|
Statistic,
|
||||||
Icon
|
Icon,
|
||||||
|
Menu
|
||||||
} from "semantic-ui-react";
|
} from "semantic-ui-react";
|
||||||
|
|
||||||
// ----------------------------------------------------
|
// ----------------------------------------------------
|
||||||
@@ -19,6 +21,8 @@ class CallInfo extends React.Component {
|
|||||||
var callDate = "-";
|
var callDate = "-";
|
||||||
var callTime = "-";
|
var callTime = "-";
|
||||||
var talkgroupNum = "-";
|
var talkgroupNum = "-";
|
||||||
|
var callDownload = "";
|
||||||
|
var callTweet = "";
|
||||||
if (this.props.call) {
|
if (this.props.call) {
|
||||||
const currentCall = this.props.call;
|
const currentCall = this.props.call;
|
||||||
var time = new Date(currentCall.time);
|
var time = new Date(currentCall.time);
|
||||||
@@ -33,12 +37,15 @@ class CallInfo extends React.Component {
|
|||||||
[{source.pos}]</List.Item>);
|
[{source.pos}]</List.Item>);
|
||||||
callLength = currentCall.len;
|
callLength = currentCall.len;
|
||||||
talkgroupNum = currentCall.talkgroupNum;
|
talkgroupNum = currentCall.talkgroupNum;
|
||||||
|
callDownload = currentCall.url;
|
||||||
|
callTweet = "https://twitter.com/intent/tweet?url="+encodeURIComponent(document.location.origin+this.props.link)+"&via="+encodeURIComponent("OpenMHz");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Segment padded>
|
<div>
|
||||||
|
<Segment padded attached>
|
||||||
<Header as='h1'>{this.props.header}</Header>
|
<Header as='h1'>{this.props.header}</Header>
|
||||||
<List bulleted horizontal link>
|
<List bulleted horizontal link>
|
||||||
{srcList}
|
{srcList}
|
||||||
@@ -74,7 +81,12 @@ class CallInfo extends React.Component {
|
|||||||
</List.Item>
|
</List.Item>
|
||||||
</List>
|
</List>
|
||||||
</Segment>
|
</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>
|
</Sidebar.Pushable>
|
||||||
<Rail position='right' className="desktop-only" dimmed={sidebarOpened ? "true" : "false"} >
|
<Rail position='right' className="desktop-only" dimmed={sidebarOpened ? "true" : "false"} >
|
||||||
<Sticky context={contextRef} offset={60}>
|
<Sticky context={contextRef} offset={60}>
|
||||||
<CallInfo call={currentCall} header={callInfoHeader} />
|
<CallInfo call={currentCall} header={callInfoHeader} link={callLink}/>
|
||||||
</Sticky>
|
</Sticky>
|
||||||
</Rail>
|
</Rail>
|
||||||
</Container>
|
</Container>
|
||||||
|
|||||||
Reference in New Issue
Block a user