mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-10 17:52:47 +00:00
Move copy ID to clipboard to separate button
This commit is contained in:
@@ -207,23 +207,26 @@ const LockTable = createClass({
|
|||||||
{this.state.result[this.props.resultName] &&
|
{this.state.result[this.props.resultName] &&
|
||||||
<>
|
<>
|
||||||
<p>Total Reviews Waiting: {this.state.result[this.props.resultName].length}</p>
|
<p>Total Reviews Waiting: {this.state.result[this.props.resultName].length}</p>
|
||||||
<p>Click a row to copy the Share ID to the clipboard</p>
|
|
||||||
<table className='lockTable'>
|
<table className='lockTable'>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
{this.props.propertyNames.map((name, idx)=>{
|
{this.props.propertyNames.map((name, idx)=>{
|
||||||
return <th key={idx}>{name}</th>;
|
return <th key={idx}>{name}</th>;
|
||||||
})}
|
})}
|
||||||
|
<th>clip</th>
|
||||||
|
<th>view</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{this.state.result[this.props.resultName].map((result, resultIdx)=>{
|
{this.state.result[this.props.resultName].map((result, resultIdx)=>{
|
||||||
return <tr key={`${resultIdx}-row`} onClick={()=>{navigator.clipboard.writeText(result.shareId.toString());}}>
|
return <tr className='row' key={`${resultIdx}-row`}>
|
||||||
{this.props.propertyNames.map((name, nameIdx)=>{
|
{this.props.propertyNames.map((name, nameIdx)=>{
|
||||||
return <td key={`${resultIdx}-${nameIdx}`}>
|
return <td key={`${resultIdx}-${nameIdx}`}>
|
||||||
{result[name].toString()}
|
{result[name].toString()}
|
||||||
</td>;
|
</td>;
|
||||||
})}
|
})}
|
||||||
|
<td className='icon' onClick={()=>{navigator.clipboard.writeText(result.shareId.toString());}}><i className='fa-regular fa-clipboard'></i></td>
|
||||||
|
<td className='icon'><i className='fa-regular fa-circle-right'></i></td>
|
||||||
</tr>;
|
</tr>;
|
||||||
})}
|
})}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
@@ -39,8 +39,16 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.lockTable{
|
.lockTable{
|
||||||
td:hover {
|
cursor: default;
|
||||||
|
.row:hover {
|
||||||
|
background-color: #ccc;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
.icon {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
&:hover{
|
||||||
|
text-shadow: 0px 0px 6px black;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user