This repository has been archived by the owner on Jan 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #149 from friendsofagape/copyfix
added malfunction fix
- Loading branch information
Showing
3 changed files
with
25 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "autographa-lite", | ||
"description": "A Bible translation editor for everyone.", | ||
"version": "1.3.3", | ||
"version": "1.3.4", | ||
"main": "public/electron.js", | ||
"author": "Friends of Agape <[email protected]>", | ||
"license": "MIT", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,50 @@ | ||
import React from 'react'; | ||
import { observer } from "mobx-react" | ||
import AutographaStore from "./AutographaStore" | ||
const session = require('electron').remote.session; | ||
const session = require('electron').remote.session; | ||
|
||
@observer | ||
class ReferencePanel extends React.Component { | ||
constructor(props) { | ||
super(props); | ||
this.state = { verses: [], refContent: '', refList: [], scriptDir: "LTR" } | ||
session.defaultSession.cookies.get({ url: 'http://refs.autographa.com' }, (error, refCookie) => { | ||
if(refCookie.length > 0){ | ||
if (refCookie.length > 0) { | ||
AutographaStore.refId = refCookie[0].value; | ||
} | ||
}); | ||
session.defaultSession.cookies.get({ url: 'http://book.autographa.com' }, (error, bookCookie) => { | ||
if(bookCookie.length > 0){ | ||
if (bookCookie.length > 0) { | ||
AutographaStore.bookId = bookCookie[0].value; | ||
} | ||
}); | ||
session.defaultSession.cookies.get({ url: 'http://chapter.autographa.com' }, (error, chapterCookie) => { | ||
if(chapterCookie.length > 0){ | ||
if (chapterCookie.length > 0) { | ||
AutographaStore.chapterId = chapterCookie[0].value; | ||
} | ||
}); | ||
} | ||
render (){ | ||
const {tIns, tDel} = this.props; | ||
return ( | ||
copiedSelection = () => { | ||
document.addEventListener('copy', (event) => { | ||
const selection = document.getSelection(); | ||
event.clipboardData.setData('text/plain', selection.toString()); | ||
event.preventDefault(); | ||
}); | ||
} | ||
render() { | ||
const { tIns, tDel } = this.props; | ||
return ( | ||
<div className="container-fluid"> | ||
<div className="row row-col-fixed rmvflex" style={{display: 'flex'}}> | ||
<div className="col-sm-12 col-fixed" id="section-0"> | ||
{tIns || tDel ? <div style={{textAlign: 'center'}}><span style={{color: '#27b97e', fontWeight: 'bold'}}>(+) {tIns}</span> | <span style={{color: '#f50808', fontWeight: 'bold'}}> (-) {tDel}</span></div> : ""} | ||
<div className="row row-col-fixed rmvflex" style={{ display: 'flex' }}> | ||
<div className="col-sm-12 col-fixed" onClick={this.copiedSelection} id="section-0"> | ||
{tIns || tDel ? <div style={{ textAlign: 'center' }}><span style={{ color: '#27b97e', fontWeight: 'bold' }}>(+) {tIns}</span> | <span style={{ color: '#f50808', fontWeight: 'bold' }}> (-) {tDel}</span></div> : ""} | ||
<div className="row"> | ||
<div dangerouslySetInnerHTML={{__html: this.props.refContent}} className="col-12 col-ref"></div> | ||
<div dangerouslySetInnerHTML={{ __html: this.props.refContent }} className="col-12 col-ref"></div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
) | ||
} | ||
} | ||
module.exports = ReferencePanel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters