Commit graph

18 commits

Author SHA1 Message Date
infinite-persistence
e2db26c595 Fix channel links being filtered by Staked Level
## Issue
Channel links were showing the "This channel isn't staking enough LBRY Credits for link previews." -- channel links shouldn't be showing previews in the first place.

## Change
Moved the logic into `ClaimLink`, which is the better place to put it anyway. I think I was trying to not touch as many components as possible (i.e. not passing `allowPreview` down too many layers) in the initial implementation. This caused the `isChannel` consideration to be missed.
2021-04-26 14:51:58 -04:00
infinite-persistence
c73ba60ef5 Revert "Use blank poster and advisory when preview is blocked by insufficient stake."
This reverts commit 9d1cf97aef.
2021-04-07 00:39:35 -04:00
infinite-persistence
9d1cf97aef Use blank poster and advisory when preview is blocked by insufficient stake.
## Issue
- Redo 5636: Disable video previews in comments/posts made by channels below a certain channel staked level
- Closes 5738: expand video preview level requierment to markdown images also
2021-04-06 12:55:33 -04:00
infinite-persistence
d91530b0c8 Markdown: don't convert '[label](uri)' to embeds.
## Issue
Closes 4936: Don't process markdown formatting as lbry:// url previews

## Approach
Preamble:
 - We want to convert plain `https://lbry.tv/befreeonlbry` to an embed, but not `[blah](https://lbry.tv/befreeonlbry)`.
 - At the markdown/remark level, both formats resolve to the same node type, having a `link` and a `text`, with the 'text' being auto-filled with the `href` if there is no label.

Fix by assuming the link is the non-labelled format if the `text` is the same as `href`.

This opens up one corner-case that we can't handle, which is when the user explicitly set the label using the href, e.g. `[https://lbry.tv/befreeonlbry](https://lbry.tv/befreeonlbry)`. This will still resolve to an embed. There's not enough data at the parsed level differentiate this case -- we would need to parse the content ourself before `remark`, which I think is not worth it.

## Aside/Reminder
If you see that the link doesn't resolve to an embed regardless of the format used, that's probably just due to `5636: Disable video previews in comments/posts made by channels below a certain channel staked level`
2021-03-15 13:31:17 -04:00
infinite-persistence
0d850742f5 Disable video previews in Comments and Post if author is below a certain level. 2021-03-12 10:38:16 -05:00
infiinte-persistence
897128a168 Restore "Handle timestamp in Markdown."
This reverts the revertion in:
- 85f8965d44.
- d3f0e471e5.
2020-12-18 11:35:47 -05:00
Sean Yesmunt
85f8965d44 Revert "Handle timestamp in Markdown."
This reverts commit 3f1913e5f4.
2020-12-14 22:31:18 -05:00
infiinte-persistence
3f1913e5f4 Handle timestamp in Markdown.
The videojs player is exposed through the 'window' object.
2020-12-14 12:12:50 -05:00
infiinte-persistence
b35e68c6d3 Don't parse a 'mailto:' into a lbry link.
## Issue
5130: Support mailto hyperlinks / urls in markdown

## Change
The markdown components already support mailto, just that the logic here ended up making it a 'ClaimLink'
2020-12-11 10:18:07 -05:00
Sean Yesmunt
c822f1702f handle malformed markdown links 2020-11-19 15:28:19 -05:00
Sean Yesmunt
d408b0fd96 fix page crash on mailto links 2020-11-04 16:08:23 -05:00
Sean Yesmunt
5a1eecfc4b fix iframe lbry links in markdown posts 2020-10-23 13:15:13 -04:00
Sean Yesmunt
33bf50e91b fix simpleLinks in MarkdownLink 2020-10-23 10:30:11 -04:00
Sean Yesmunt
221ae5b821 fix inline player not showing up broken from previous commit 2020-10-22 18:09:17 -04:00
Sean Yesmunt
c9fdaec997 don't show external link modal for lbry links 2020-10-22 14:30:40 -04:00
Sean Yesmunt
6659ef50ff don't show ClaimLinks in file description 2020-10-22 14:16:42 -04:00
Sean Yesmunt
ad88d8993d fix app crash 2020-10-22 14:08:53 -04:00
Sean Yesmunt
295b8cf2e1 refactor floatingUri to allow inline players in comments/markdown 2020-10-21 15:29:29 -04:00