Compare commits
2 Commits
c4a96af5d3
...
82788b35bf
Author | SHA1 | Date | |
---|---|---|---|
|
82788b35bf | ||
|
896265a4a8 |
2
.github/pull_request_template.md
vendored
2
.github/pull_request_template.md
vendored
@ -32,7 +32,7 @@ You can mention here anything that you think is relevant for this PR. Some examp
|
|||||||
If your PR is not ready for review yet, please mark your PR as a draft.
|
If your PR is not ready for review yet, please mark your PR as a draft.
|
||||||
If changes were requested, request a new review when you incorporated the feedback.
|
If changes were requested, request a new review when you incorporated the feedback.
|
||||||
-->
|
-->
|
||||||
**Did you QA this? Could we deploy this straight to production? Please answer below:**
|
**On a scale of 1-10 how well and how have you QA'd this change and any features it might affect? Please answer below:**
|
||||||
|
|
||||||
<!-- put your answer about QA here -->
|
<!-- put your answer about QA here -->
|
||||||
|
|
||||||
|
@ -146,6 +146,7 @@ export default gql`
|
|||||||
rel: String
|
rel: String
|
||||||
apiKey: Boolean
|
apiKey: Boolean
|
||||||
invoice: Invoice
|
invoice: Invoice
|
||||||
|
cost: Int!
|
||||||
}
|
}
|
||||||
|
|
||||||
input ItemForwardInput {
|
input ItemForwardInput {
|
||||||
|
@ -25,6 +25,7 @@ import UserPopover from './user-popover'
|
|||||||
import { useQrPayment } from './payment'
|
import { useQrPayment } from './payment'
|
||||||
import { useRetryCreateItem } from './use-item-submit'
|
import { useRetryCreateItem } from './use-item-submit'
|
||||||
import { useToast } from './toast'
|
import { useToast } from './toast'
|
||||||
|
import { useShowModal } from './modal'
|
||||||
|
|
||||||
export default function ItemInfo ({
|
export default function ItemInfo ({
|
||||||
item, full, commentsText = 'comments',
|
item, full, commentsText = 'comments',
|
||||||
@ -210,6 +211,7 @@ export default function ItemInfo ({
|
|||||||
<EditInfo />
|
<EditInfo />
|
||||||
<ActionDropdown>
|
<ActionDropdown>
|
||||||
<CopyLinkDropdownItem item={item} />
|
<CopyLinkDropdownItem item={item} />
|
||||||
|
<InfoDropdownItem item={item} />
|
||||||
{(item.parentId || item.text) && onQuoteReply &&
|
{(item.parentId || item.text) && onQuoteReply &&
|
||||||
<Dropdown.Item onClick={onQuoteReply}>quote reply</Dropdown.Item>}
|
<Dropdown.Item onClick={onQuoteReply}>quote reply</Dropdown.Item>}
|
||||||
{me && <BookmarkDropdownItem item={item} />}
|
{me && <BookmarkDropdownItem item={item} />}
|
||||||
@ -269,3 +271,39 @@ export default function ItemInfo ({
|
|||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function InfoDropdownItem ({ item }) {
|
||||||
|
const me = useMe()
|
||||||
|
const showModal = useShowModal()
|
||||||
|
|
||||||
|
const onClick = () => {
|
||||||
|
showModal((onClose) => {
|
||||||
|
return (
|
||||||
|
<div className={styles.details}>
|
||||||
|
<div>id</div>
|
||||||
|
<div>{item.id}</div>
|
||||||
|
<div>created at</div>
|
||||||
|
<div>{item.createdAt}</div>
|
||||||
|
<div>cost</div>
|
||||||
|
<div>{item.cost}</div>
|
||||||
|
<div>sats</div>
|
||||||
|
<div>{item.sats}</div>
|
||||||
|
{me && (
|
||||||
|
<>
|
||||||
|
<div>sats from me</div>
|
||||||
|
<div>{item.meSats}</div>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
<div>zappers</div>
|
||||||
|
<div>{item.upvotes}</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Dropdown.Item onClick={onClick}>
|
||||||
|
details
|
||||||
|
</Dropdown.Item>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
@ -154,6 +154,12 @@ a.link:visited {
|
|||||||
grid-template-columns: auto minmax(0, 1fr);
|
grid-template-columns: auto minmax(0, 1fr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.details {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: auto auto;
|
||||||
|
column-gap: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
/* .itemJob .hunk {
|
/* .itemJob .hunk {
|
||||||
align-self: center;
|
align-self: center;
|
||||||
}
|
}
|
||||||
|
@ -65,6 +65,7 @@ export const ITEM_FIELDS = gql`
|
|||||||
actionState
|
actionState
|
||||||
confirmedAt
|
confirmedAt
|
||||||
}
|
}
|
||||||
|
cost
|
||||||
}`
|
}`
|
||||||
|
|
||||||
export const ITEM_FULL_FIELDS = gql`
|
export const ITEM_FULL_FIELDS = gql`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user