Commit graph

5407 commits

Author SHA1 Message Date
Rave | 図書館猫
4cf7bf8d06
patch 5 (#1279) 2022-04-04 17:43:10 +02:00
infinite-persistence
1e6f64f235 Uploads: show placeholder when loading 2022-04-04 08:40:41 -04:00
infinite-persistence
2a38f2c177 Fix Paginate click area
https://github.com/AdeleD/react-paginate/ issues/125#issuecomment-276625181

Apparently, the page bubble cannot be made clickable due to accessibility issues, so the click area is very small.

Changed the css as suggested by the maintainer.
2022-04-04 08:40:41 -04:00
infinite-persistence
79a093eb28 Remove abandoned claim from Uploads Page
## Issue
Ticket: 108

## Interesting
Uploads Page uses `claim_list`
Channel Page uses `claim_search

A second `claim_list` would instantly show updated results, but `claim_search` takes a long while to reflect the deletion.

## Change
This PR only handles the `claim_list` (Uploads Page).

The `claim_search` version would be troublesome to handle. If a refresh would bring back the results (due to the `claim_search` slow update behavior), we would need to store the deleted claim persistently. Then ...
  - Store where? rehydrate?
  - When to clear?
  - How to make each `ClaimList` filter this out without polluting the code? etc.
...will be messy. Feels easier to "fix" at the `claim_search` level to make it update faster (maybe a command to clear cache at server or something).
2022-04-04 07:08:46 -04:00
Raphael Wickihalder
108b4a92a8 Merge branch 'master' of https://github.com/OdyseeTeam/odysee-frontend 2022-04-04 13:04:06 +02:00
Raphael Wickihalder
bb868777f8
Fix controls for mini player on mobile 2022-04-04 13:02:27 +02:00
infinite-persistence
89feddee0d Publish: handle failed 'notify' at the server
Ticket: 1256

For `notify`, "file is currently locked" and "no such file or directory" is indication that the previous "failed" SDK call actually worked. Tell the user to check the transactions.

This is the band aid until odysee-api/401 is addressed.
2022-04-04 07:02:23 -04:00
infinite-persistence
234bd2526a
Add backdrop to progress indicator 2022-04-04 17:27:00 +08:00
Raphael Wickihalder
57edddb058 Merge branch 'master' of https://github.com/OdyseeTeam/odysee-frontend 2022-04-03 17:03:12 +02:00
Raphael Wickihalder
85d9de60ca
Add dragging offset exception for Firefox 2022-04-03 17:02:18 +02:00
infinite-persistence
5631c10306
Fix context for translators 2022-04-03 22:13:18 +08:00
Raphael Wickihalder
052c602742
Fix element position when dragged in homepage customizer 2022-04-03 15:51:52 +02:00
Raphael Wickihalder
a6169a80a9
Fix element position when dragged in homepage customizer 2022-04-03 15:19:05 +02:00
Thomas Zarebczan
b7b27136fd Let's try 95... 2022-04-01 23:36:56 -04:00
infinite-persistence
7ccaf06527 Round optimized img dimension to next 100px for better caching.
Doing double `Math.ceil()` just to make it easier to disable the 100px thing in the future.
2022-04-01 23:36:56 -04:00
Rafael
8dcac30767 Add sports icon 2022-04-01 21:49:03 -04:00
Raphael Wickihalder
787c49ea98 Add border-top to claim-preview progress bar 2022-04-01 15:37:26 -04:00
infinite-persistence
4e63849061 Don't clear on position on dispose
Otherwise, we'll never see a full progress indicator. The "reset when too near end of video" should only happen when opening a file.
2022-04-01 15:37:26 -04:00
infinite-persistence
84b9bd617a Watch-progress indicator 2022-04-01 15:37:26 -04:00
Rave | 図書館猫
1706ceed81
patch 4 (#1271) 2022-04-01 18:40:04 +02:00
infinite-persistence
e0415ec493 Fix post-editor preview mode
## Cause
It broke because lack of awareness that we can't use our components in preview mode. For some reason, we don't have redux access in SimpleMDE's preview mode.

## Change
- Restore the stub for iframes
- Fix preview for images, and apply the same styling as in posts.
2022-04-01 12:36:49 -04:00
infinite-persistence
a61f943465 inline-attachment: move to local copy + handle xhr errors
(1) Move from Node to local copy
(2) Handle xhr errors more gracefully. Instead of erasing the syntax, we should say that it failed through the URL.
2022-04-01 12:36:49 -04:00
inline-attachment
c41c6bc2bb inline-attachment v2.0.3
Partial copy from https://github.com/Rovak/InlineAttachment

We need to make some changes to handle xhr errors.  Given than the repo hasn't been updated in 7 years, and it's a hassle to push the changes or fork the repo, just copy over the required files.
2022-04-01 12:36:49 -04:00
Thomas Zarebczan
8d4a05157d Paste/drop images directly to markdown editor
Ticket: 1135

- Changed `FileDrop` to only cover the upper 20% of the page, otherwise it will clash with markdown image drop.
2022-04-01 12:36:49 -04:00
Rafael
e765a74eb0 Fix claim switch comment.List fetch behavior 2022-04-01 11:55:30 -04:00
infinite-persistence
3e5290d8b0 Swap pinnedUrls vs. pinnedClaimIds precedence
pinnedUrls = resolve
pinnedClaimIds = claim_search

Make `pinnedClaimIds` take precedence for now, since the homepage is defining both to support Android.

For some reason, I previously made `pinnedUrls` the priority, thinking this should be the "correct" one to use when the SDK is fixed.
2022-04-01 11:35:29 -04:00
infinite-persistence
c36fd425a7 Fix failing video position reset
## Issue
Maybe related to https://github.com/OdyseeTeam/odysee-frontend/issues/99#issuecomment-1042384649

## Notes
`fileInfo` does not contain `metadata` anymore -- not sure what happened. With zero duration, `videoPlayedEnoughToResetPosition` was never true.

But the claim usually contains the duration already, so we can use that. There are some audio/video claims that don't, but those are a minority.
2022-04-01 09:58:09 -04:00
infinite-persistence
491c934119 Fix makeSelectContentPositionForUri memo
- Move away from the leaky makeSelect* pattern.
- No memoization since it's pretty light.
2022-04-01 09:58:09 -04:00
infinite-persistence
fb998208e2 Add flow to Content slice 2022-04-01 09:58:09 -04:00
Rafael
075e285bd2 Improve embed end screen 2022-03-31 20:56:26 -04:00
infinite-persistence
f5034f74ca Batch resolve pin urls in 2 ways
Expanded homepage pins to support 2 types of input (if both are passed in, pinnedUrls take precedence):
  (1) pinnedUrls     --> uses doResolveUris (resolve)
  (2) pinnedClaimIds --> uses doResolveClaimIds (claim_search)

Instead of injecting the pinned URLs directly, we inject from `resolvedPinUris`, which will be blank until the uris are resolved, thus preventing it from being resolved individually from the tiles.

There's additional complexity with the `claim_search` method, as the rest of the code deals with uris instead of IDs. Fortunately, it's all contained with `useResolvePins`, so removal would be easier when the batch `resolve` issue is fixed.
2022-03-31 15:58:10 -04:00
infinite-persistence
dd5f4872fc Minor cleanup, no functional change
- Self-documenting variable.
- Remove incorrect comments.
- Remove redundant variables.
2022-03-31 15:58:10 -04:00
Niko Storni
8c20d516cd replace cdn url 2022-03-31 21:28:33 +02:00
infinite-persistence
d482b2d35a Second attempt at preventing "empty homepage" flash
The delay in fetching homepages causes the "empty homepage" splash to appear briefly for the authenticated case.

Part 2 of 61630930
2022-03-31 10:55:11 -04:00
Thomas Zarebczan
8c7c1cfd5c fixes from review
remove config, remove unused app strings + add new, add disabled message
2022-03-31 10:35:24 -04:00
Thomas Zarebczan
db687204a4 livestream for all 2022-03-31 10:35:24 -04:00
infinite-persistence
1a2fefa6ec Option to hide notification count in title bar 2022-03-31 10:23:31 -04:00
infinite-persistence
3b98f73a0f Fix livestream countdown i18n
Ticket: 1228

## Code changes
- Pass through `getTimeAgoStr` so that the value gets localized.
- Pass the simpler `number` around instead of the `moment` object for better memoization.

## Notable differences
Due to how `getTimeAgoStr` is written, we now get to see the time actually counting down, vs "in a few seconds" currently in production.  I think the counting-down behavior was the original intentional, since a 1s timer was used (otherwise, a 1-minute timer could be used) ... or maybe not since streams may not start on the dot.
2022-03-31 08:25:32 -04:00
infinite-persistence
071b86fa06
Make "Send a xxx tip" currency-agnostic so we don't need to re-translate again 2022-03-31 17:54:21 +08:00
infinite-persistence
c232981f0c
Catch up on string changes 2022-03-31 17:54:20 +08:00
infinite-persistence
fae8c6dff4
Don't translate product names
...at least, that is the current decision.
2022-03-31 17:46:12 +08:00
infinite-persistence
aa5e4d6c13
Fix double translation
No need for the macro when `<I18nMessage>` is used.
2022-03-31 17:46:12 +08:00
infinite-persistence
e21db9d58e
Sidebar: add option to not localize certain strings
I think we want to keep Premium as a product name (consistent for all languages). It was popping up in the `window.new_strings` because the current code localizes every link.
2022-03-31 17:46:11 +08:00
Rave | 図書館猫
2c6fb66206
patch 3 (#1251) 2022-03-31 11:19:32 +02:00
infinite-persistence
e9e232f008 Consolidate transaction result strings
## Issue
Accumulation of so many strings for a "successful tip" that it is getting annoying to re-translate them for minor changes.

## Change
- Consolidate and re-use strings.
- Make the tip string currency-agnostic so we don't have to touch it again. The amount and currency is moved to the `subMessage`.
- Fix spacing being incorrectly enforced through i18n (it should be done via code/css).
2022-03-30 21:59:54 -04:00
Rave | 図書館猫
99d730d0e3
Design fallout patch 2 (#1245)
* patch 1
* patch 2
2022-03-30 17:53:05 +02:00
infinite-persistence
49de7b1c64 Fix outbrain not removed after auth'd
The variable name changed. This seems to be the only one left.

Perhaps we need a formal method from Outbrain to remove?
2022-03-30 11:35:51 -04:00
Rave | 図書館猫
b9436def23
patch 1 (#1244) 2022-03-30 16:40:35 +02:00
infinite-persistence
1366f8d3ce Force reposts in Homepage + Category Page, except Following & WW
Ticket: 1220
2022-03-30 09:39:06 -04:00
Anthony
911ccaa07e
Support EUR tipping #1222 2022-03-30 13:43:07 +08:00
Anthony
beaf425068 fix some flow errors and other pointers 2022-03-29 23:00:55 -04:00
Anthony
d70c489163 support eur in transactions 2022-03-29 23:00:55 -04:00
Anthony
e9b1a11e44 fix flow errors 2022-03-29 23:00:55 -04:00
Anthony
fe9b33e42b allow tips in euros 2022-03-29 23:00:55 -04:00
Anthony
631d3cc1f3 supporting EURO icon 2022-03-29 23:00:55 -04:00
infinite-persistence
cc8812d751 ClaimListDiscover: fix broken excludeUris logic 2022-03-29 22:39:36 -04:00
Rafael
8823461ebd Add percentage video duration keybinds› 2022-03-29 22:39:01 -04:00
infinite-persistence
9fe20699a0 doResolveUris, doResolveClaimIds: Return resolved empty results rather than undefined promise for the no-op case.
This allows clients to chain without needs to check if it's undefined.
2022-03-29 21:21:58 -04:00
infinite-persistence
122d561a20 Batch resolve with claim_search | [Recommended, Comments]
Ticket: 1189

## Issue
There is a bug in a batched `resolve` that returns jumbled data. Temporarily switch to `claim_search` until that is fixed.

## Notable differences:
- `resolve` will tell us directly that a claim has been removed or filtered, so redux will mark the ID as such. `claim_search` simply returns nothing, so we will still end up with an extra `resolve` for these items when the component tries to display it.

- The new function currently does not handle Collections (i.e. resolving individual items in the Collection) and Reposts. Given that this is temporarily, I'd like to leave `doClaimSearch` as is, instead of trying to replicate what's in `doResolveUris`.

## Notes:
Since we don't care if the resolve fails (and we weren't doing anything in the `catch` anyways), use `finally` instead.
2022-03-29 21:21:58 -04:00
Anthony
29ec4e3ad6 use BEM 2022-03-29 12:23:20 -04:00
Anthony
13a7785315 fix css bug 2022-03-29 12:23:20 -04:00
infinite-persistence
0d3f6c2f9e getImageProxyUrl: don't assume IMAGE_PROXY_URL is always defined
This allows us to disable it by not defining.
2022-03-29 10:16:52 -04:00
infinite-persistence
b40160a939 Remove the desktop Welcome Page 2022-03-29 10:05:58 -04:00
infinite-persistence
2fb0e00bc0 Publish Preview: i18n
Fix remaining fields
2022-03-29 09:08:49 -04:00
infinite-persistence
e358f0715d tus: retry only after 2-minute wait
There is anecdote that we need to wait up to 2 minutes to preven the locking scenario.
`https://github.com/tus/tusd/pull/667#issuecomment-1079647640`

## Change
Instead of multiple retries at short intervals, do a one-time retry after a 2-minute wait. We'll do this until the fix is available in tusd v2.
2022-03-29 09:01:10 -04:00
Anthony
4fffb035de reverse string changes 2022-03-28 15:30:36 -04:00
Anthony
0f407914f3 link livestream comments to membership page from badge 2022-03-28 15:30:36 -04:00
Anthony
d64f1c5cc2 bold more text in popup dialog 2022-03-28 15:30:36 -04:00
Anthony
1eb66a6d66 improve tip support functionality 2022-03-28 15:30:36 -04:00
Anthony
d88b14ccc7 add back to premium button 2022-03-28 15:30:36 -04:00
Anthony
5a2684643e allow user to save currency on client 2022-03-28 15:30:36 -04:00
Anthony
fed8fafe6c allow user to select preferred currency 2022-03-28 15:30:36 -04:00
Thomas Zarebczan
157b6d3f19
fix recommended showing blank on homepage 2022-03-28 10:01:55 -04:00
Thomas Zarebczan
726dc77943 Hide news by default 2022-03-26 16:01:27 -04:00
Thomas Zarebczan
79aa098484 fix: always inject FYP 2022-03-26 16:01:27 -04:00
David Granado
09fc18cc02 Fix 'PAGES.DEPRECATED__DOWNLOADED' value 2022-03-26 00:54:39 -04:00
David Granado
2c3432c9cb Guess at the correct value for 'PAGES.DOWNLOADED' 2022-03-26 00:54:39 -04:00
David Granado
3c20332912 Fix incorrect imports 2022-03-26 00:54:39 -04:00
Thomas Zarebczan
e40b65b975 Revert "send 10 percent of traffic to other server"
This reverts commit 0fcdbc7858.
2022-03-25 15:35:05 -04:00
Anthony
63a4a597a9 passing meme actually isnt required 2022-03-25 14:44:13 -04:00
Anthony
632cce4dbb bugfix 2022-03-25 14:44:13 -04:00
Anthony
b74dc804d6 dont open in a new tab for internal urls 2022-03-25 14:44:13 -04:00
Anthony
e921d58f73 dont open meme link in new tab 2022-03-25 14:44:13 -04:00
Anthony
0fcdbc7858 send 10 percent of traffic to other server 2022-03-25 14:28:57 -04:00
Thomas Zarebczan
087282578f add airplay 2022-03-25 11:31:11 -04:00
infinite-persistence
616309301d Homepage: don't wait for prefs if incognito
It causes the "empty homepage" splash to briefly appear.
2022-03-25 09:14:37 -04:00
infinite-persistence
093594de3f
OptimizedImage: clean up attribute removal
Cleanup for 1e0da661
2022-03-25 10:54:18 +08:00
infinite-persistence
173ab36451
Beautify FYP toast 2022-03-24 16:16:54 +08:00
infinite-persistence
c970176386
Sub-message was hard to read for non-error toasts
- Non-error = pink background, Error = dark red. The former provides bad contrast for --color-text-subtitle.

- Use opacity instead of a hardcoded color.
2022-03-24 16:16:53 +08:00
infinite-persistence
f1ea0b20dd
Fix i18n issues reported
- Changed to "Add a Card" to reuse existing string.
2022-03-24 15:36:09 +08:00
infinite-persistence
42451e14a8
Split toast wrappers into separate file 2022-03-24 15:19:50 +08:00
infinite-persistence
e0ddd94c01
Rename: [commentron-error.js] -> [api-message.js] 2022-03-24 15:18:13 +08:00
infinite-persistence
f53680ea63
Refactor ERR_MAP to be general purpose
- Remove the need for an object key. Just use an array. It gets hard to maintain as more messages come in, and so far there is no need to access the configs directly.

- Just focus on handling the message and not creating a toast object. Leave the latter to the client.
2022-03-24 15:16:47 +08:00
infinite-persistence
a96db41782 FYP: show placeholder tiles when fetching membership or fyp itself.
This prevents the "no membership" and "no recommendations" message from flashing during load.
2022-03-23 23:21:46 -04:00
Rafael
09557c8ce2 Fix warnings 2022-03-23 17:09:17 -04:00
Raphael Wickihalder
ec6cb7380b Adjust premium splash in homepage customization modal 2022-03-23 15:35:27 -04:00
Thomas Zarebczan
56ae81198a Shorten title
Mobile was cutting off, otherwise worked okay!
2022-03-23 15:35:27 -04:00
infinite-persistence
ec5cd10ab1 Remove hideFyp setting 2022-03-23 15:35:27 -04:00
infinite-persistence
5b16b3b058 Ability to customize homepage
Ticket: 1145

- Limited to premium for now (early access).
- Needed to handle custom categories from non-English homepages.
2022-03-23 15:35:27 -04:00
infinite-persistence
d854a99250 Inject ID into homepage data
This will be used to sorting.
2022-03-23 15:35:27 -04:00