Commit graph

12323 commits

Author SHA1 Message Date
zeppi
c3c641b6ba feature: wallet sync export button 2022-07-15 16:49:24 -04:00
Rafael
7e0363a563 Add Comedy icon 2022-07-14 14:24:20 -03:00
infinite-persistence
d41b9ff1e7
Publish: add additional info in the error log 2022-07-14 21:27:46 +08:00
infinite-persistence
f95d5fa62e
config: add commit ID
Primary impetus is to determine whether the reported TUS errors are due to old code, but the commit ID can be re-used in other areas where it makes sense.

The value comes externally from the command line, e.g.:
  `COMMIT_ID=$(git rev-parse HEAD) NODE_ENV=development yarn dev:web`
2022-07-14 20:36:09 +08:00
Raphael Wickihalder
f97f3b380b
Fix edit redirects on file pages 2022-07-13 21:33:09 +02:00
Raphael Wickihalder
a56ddecc0f
Fix action button margin in modal on mobile 2022-07-13 19:01:26 +02:00
Raphael Wickihalder
91f4ce532e
Fix playlist save button on gile page in mobile view 2022-07-13 18:48:17 +02:00
infinite-persistence
ecc6cb8a77 ChannelsFollowingDiscover: exclude followed channels
Note that there is a side effect of the channel going away immediately after Follow button is pressed. More elaborate code is needed like in the Following Manage page if we want the claim to be retained.
2022-07-13 11:22:56 -04:00
infinite-persistence
58d9605033 ChannelsFollowingDiscover: remove Desktop code 2022-07-13 11:22:56 -04:00
infinite-persistence
c563889bf6 Grab Discover IDs from homepage API
Adds ability for homepage team to define the Discover list of IDs.

If undefined, falls back to English's list. If English is also undefined, falls back to LATEST / PRIMARY.
2022-07-13 11:22:56 -04:00
Thomas Zarebczan
9e18b30fdb
force rebuild 2022-07-13 10:46:19 -04:00
Rafael Saes
83dbe8ec7c
Playlists v2: Refactors, touch ups + Queue Mode (#1604)
* Playlists v2

* Style pass

* Change playlist items arrange icon

* Playlist card body open by default

* Refactor collectionEdit components

* Paginate & Refactor bid field

* Collection page changes

* Add Thumbnail optional

* Replace extra info for description on collection page

* Playlist card right below video on medium screen

* Allow editing private collections

* Add edit option to menus

* Allow deleting a public playlist but keeping a private version

* Add queue to Save menu, remove edit option from Builtin pages, show queue on playlists page

* Fix scroll to recent persisting on medium screen

* Fix adding to queue from menu

* Fixes for delete

* PublishList: delay mounting Items tab to prevent lock-up (#1783)

For a large list, the playlist publish form is unusable (super-slow typing) due to the entire list being mounted despite the tab is not active.
The full solution is still to paginate it, but for now, don't mount the tab until it is selected. Add a spinner to indicate something is loading. It's not prefect, but it's throwaway code anyway. At least we can fill in the fields properly now.

* Batch-resolve private collections (#1782)

* makeSelectClaimForClaimId --> selectClaimForClaimId

Move away from the problematic `makeSelect*`, especially in large loops.

* Batch-resolve private collections
1758

This alleviates the lock-up that is caused by large number of invidual resolves. There will still be some minor stutter due to the large DOM that React needs to handle -- that is logged in 1758 and will be handled separately.

At least the stutter is short (1-2s) and the app is still usable.
Private list items are being resolve individually, super slow if the list is large (>100). Published lists doesn't have this issue.
doFetchItemsInCollections contains most of the useful logic, but it isn't called for private/built-in lists because it's not an actual claim.
Tweaked doFetchItemsInCollections to handle private (UUID-based) collections.

* Use persisted state for floating player playlist card body
- I find it annoying being open everytime

* Fix removing edits from published playlist

* Fix scroll on mobile

* Allow going editing items from toast

* Fix ClaimShareButton

* Prevent edit/publish of builtin

* Fix async inside forEach

* Fix sync on queue edit

* Fix autoplayCountdown replay

* Fix deleting an item scrolling the playlist

* CreatedAt fixes

* Remove repost for now

* Anon publish fixes

* Fix mature case on floating

Co-authored-by: infinite-persistence <64950861+infinite-persistence@users.noreply.github.com>
2022-07-13 10:59:59 -03:00
infinite-persistence
5863ea8df4
Sync: operate on 'local' until the first successful sync (#1835)
## Issue
https://github.com/OdyseeTeam/odysee-frontend/issues/1815#issuecomment-1178728712

When settings are changed before the first successful sync, the changes are on top of the default wallet preferences, and becomes the "latest". When sync is possible again later, the bad data is pushed to the cloud.

## Change
Continue to operate on 'local' until the first successful sync. Most of the GUI will warn (or even prevent) the user from changing settings in this scenario, so the amount of "discarded" changes in 'local' is minimal.
2022-07-13 09:36:51 -04:00
Rafael Saes
68ceb7f440
Fix url problems (#1679)
* Fix Uri errors
2022-07-12 16:58:18 -03:00
infinite-persistence
68a4697c7d
ReportContent: add ?commentId support (#1826)
## Ticket
1822

## Changes
- Add `?commentId=` support in the URL.
- `claimId` remains a required parameter so that we can derive the comment URL.
    - The backend will know it's a comment report when both parameters are present.
- The comment URL is added to the top of `additional_details`.
- The backend rejects if `additional_details` is provided for DMCA. Grayed out DMCA for the case of reporting comments.
2022-07-12 13:44:34 -04:00
Raphael Wickihalder
7b89ad8c14
Fix currency select position on settings page 2022-07-12 19:37:45 +02:00
mayeaux
4bc5d25d5a
Revert "update frontend to work with new api return (#1830)" (#1831)
This reverts commit a2a795ae77.
2022-07-12 17:54:15 +02:00
Raphael Wickihalder
dde9f07ed9
Adjust uploading label 2022-07-12 16:27:25 +02:00
Raphael Wickihalder
f974383e7b
Adjust upload label 2022-07-12 16:12:02 +02:00
mayeaux
a2a795ae77
update frontend to work with new api return (#1830) 2022-07-12 14:53:56 +02:00
infinite-persistence
d8571781ed (patch) Don't nudge to refresh in localhost
d16ae73c

## Issue
dev instances are also affected.

## Change
Use another env to enable the feature.

The cleaner solution that avoids the double env is to simply not make MIN_VERSION appear in the default file + define only in production instances. But putting it in the default file makes things clearer, plus easier to "bump + build" by just pushing a new commit.
2022-07-12 18:52:35 +08:00
infinite-persistence
e858cdd88b
(patch) Add "Hide Repost" button in channel page
Fixes the "force repost" behavior in Category Page.

Got the logic wrong when the boolean parameter was inverted from "force" (+ve) to "hideRepostOverride" (-ve) to support the "Hide Repost" button.

hideRepostOverride:
- undefined = follow user setting
- true = always hide
- false = always show << we want this
2022-07-12 16:04:59 +08:00
infinite-persistence
147ac43eac
ReportContent: cleanup and improvements
- Use `finally` instead of an arbitrary timer to clear the spinner when resolving the claim.
- Move away from `makeSelect*`
- `perform`: use object form as there is no customization.
- Effect-dependency cleanup.
2022-07-12 15:08:36 +08:00
infinite-persistence
ed0fb59983 Comment: add hideContextMenu + hide reply button too when hideActions is set 2022-07-12 15:08:04 +08:00
infinite-persistence
8aa6a60acf
Fix v1-publish items not removable (#1823)
## Issue
https://odysee-workspace.slack.com/archives/C02GSHBKYEM/p1657571082411839?thread_ts=1654909550.197639&cid=C02GSHBKYEM

If the user refreshed on a v1 upload, we can't do much but must at least provide a Cancel button for them to remove the entry.

## Change
- Restore the cancel button behavior for v1 like it was before.  The recent changes on the visibility of the Cancel button should only be applied to v2.
- Also fixed missing cancel button on v2 after refresh if the progress reached 100%.
2022-07-12 01:13:58 -04:00
Raphael Wickihalder
62f90ae93e
Fix schedule options. Again. 2022-07-11 20:16:56 +02:00
Raphael Wickihalder
ad8fc035bb
Show balance on large & medium screens 2022-07-11 18:52:04 +02:00
Raphael Wickihalder
59c75c9cec
Fix premium badge position 2022-07-11 18:31:05 +02:00
Raphael Wickihalder
214263d111
Remove update label in new livestream forms 2022-07-11 17:03:04 +02:00
Rave | 図書館猫
b20b24bdb6
Publish revamp (Part 2) (#1781)
* Move menu entries & add publish buttons

* Save

* Separate publish forms

* Make new header dynamic for all screen sizes

* Save some livestream creation changes

* Save more livestream changes

* Save

* Change publish folder structure

* Update paths

* Change position of form elements. Again.

* Move, add & delete form fields

* Clean post form

* Clean post form even more

* Clean publish post component

* Save

* Add custom post form state

* Move price to additional options

* Adjust livestream form

* Adjust headers & titles

* Update key section

* Adjust active header icons

* Adjust toggle menu

* Save

* Adjust active button style

* Change active button selector in header

* Fix header menu links

* Move price section in post form

* Adjust instruction text color

* Adjust replay table

* Revert changes & adjust tag section

* Make more form elements dynamic

* Finalize additional options section

* Update post form

* Set mode in upload form

* Update livestream form

* Add clear button

* Make clear button dynamic

* Set upload mode

* Remove new button

* Clean upload form

* Show disabled key on livestream form

* Remove old key section

* Update channel selector for publish forms

* Add updated channel selector to publish forms

* Add mobile links

* Update mobile header

* Adjust channel selector on mobile

* Adjust livestream form on mobile

* Adjust edit links for livestreams

* Adjust edit links for posts

* Adjust more edit links

* Adjust channel selector

* Update disabled in livestream form

* Add missing change

* Fix sign out function

* Save

* Adjust livestream page on mobile

* Adjust tags section on upload page on mobile

* Adjust publish links in left navigation on mobile

* Add images to accepted filetypes on upload page

* Add autofocus to input fields

* Add autofocus to all publish forms

* Save

* Ignore thumbnail api status

* Put active thumbnail upload label in card

* Fix crashes

* Fix flow

* Fix licence fields

* Adjust wallet in header on smaller screens

* Fix channel selector line break on small screens

* Fix border radius for some buttons

* PublishReleaseDate: fix initial value to reflect what's actually in Redux

'undefined' is a valid value that means "use publish time", but the GUI incorrectly starts off by locking to the mounted timestamp.

* Add and hide channel selector on livestream publish page

* Fix channel selector on livestream setup page

* Fix gif aspect ratio in channel selector

* Make layout more dynamic

* Fix some edit redirects

* Save

* Clean publishFile

* Fix build errors

* Fix more build errors in profile menu button

* Remove console logs

* Remove post form reducer

* Limit publish title length to 200 characters

* Remove totalRewardValue from livestreamCreate index

* Remove console log

* Add tooltip to replay refresh button

* Remove scrollToTop function from publish forms

* Adjust emty wallet value trigger and add error to livestream publish page

* Disable some tabs in edit mode in livestream form

* Fix maxLength typo

* Remove 'as' label

* Remove selectPublishFormValues

* Reenable setup tab

* Remove inactive line

* Remove another inactive line

* Remove flow fix

* Update label switch logic in confirmation modal

Adjust gif margin

Adjust gif margin

Remove navigate from edit link

Remove manual updateLabels execution on init

Remove editLabel function

Fix labels in publish modal

Adjust post livestream setup redirect

Remove setOverMaxBitrate from livestream form

Clean livestream publish

More cleanup

Update post livestream creation redirect

Bring back edit tab for livestreams

Update edit tab

Reset form on livestream edit => clear

Update label switch logic

Readjust channel selector position on mobile

* Make some space adjustments for mobile

Update livestream edit page on mobile

Update action label on publish forms in edit mode

* Hide replay options in edit mode in livestream form

* Update label switch logic in confirmation modal

Adjust gif margin

Adjust gif margin

Remove navigate from edit link

Remove manual updateLabels execution on init

Remove editLabel function

Fix labels in publish modal

Adjust post livestream setup redirect

Remove setOverMaxBitrate from livestream form

Clean livestream publish

More cleanup

Update post livestream creation redirect

Bring back edit tab for livestreams

Update edit tab

Reset form on livestream edit => clear

Update label switch logic

Readjust channel selector position on mobile
Make some space adjustments for mobile

Update livestream edit page on mobile

Update action label on publish forms in edit mode
Hide replay options in edit mode in livestream form

* Make form titles dynamic

* Remove spinner on livestream form

* Remove console log

* Fix double history push

* Fix thumbnail status on post form

* Update error message style

* Handle publish error button behavior

* Clean code

* Fix scheduling & date picker

* Fix calendar overlap

* Add replay selector to livestream claim edit form

* Clean code

* Disable autocomplete

* Show replays in edit & replay tab

* Redesign replay picker

* Fix design details

* Save dynamic replay picker

* Fix autoComplete typo

* Change label text

* Add upload to livestream replay form

* Fix scss structure

* Add comunity guideline link to publish forms

* Fix error

* Fix selectThumbnail index

* Reset form values on replay source change

* Add replay redirect to upload page

* Fix publishError state change

* Remove label effect from publish confirmation modal

* Update labels in publish confirmation modal

* Add ? to chaptersButton

* Remove doPrepareEdit({ name })

* Bring upload redirect back

* Adjust redirects

* Save

* Update edit redirects

* Revert scheduling options

* Replace checkboxes for replays with radio

* Update form on source change

* Rearrange entries in mobile navigation

* Change key position on livestream setup page

* Change label for livestream update without replay change

* Adjust margin below label

Co-authored-by: infinite-persistence <inf.persistence@gmail.com>
2022-07-11 16:12:37 +02:00
infinite-persistence
d16ae73c0d
Don't nudge to refresh in localhost
This will keep appearing if the dev branch is behind master.
2022-07-08 19:06:04 +08:00
infinite-persistence
73e6dfd399
(patch) tus: Fix upload not found scenario (#1814)
Second attempt, this time just hiding the cancel button when the upload is done. If user is impatient and refreshed in between this and `notify`, it will still be resumable later.

Bumped MINIMUM_VERSION to nudge for a refresh so we get a slightly more accurate logging, and also to prevent the issue from lingering.
2022-07-08 06:45:43 -04:00
Thomas Zarebczan
294c5194a4
default fee amount to undefined (don't pass)
>= (and =) are having a filtering issue with reposts. Don't need to pass >= for all content - I think this was some old hackaround that's no longer required.
2022-07-07 16:37:37 -04:00
Thomas Zarebczan
ec745c31de
Revert "tus: Fix upload not found scenario (#1808)" (#1813)
This reverts commit cdcf7e7772.
2022-07-07 15:54:14 -04:00
ktprograms
fc32339d2d
Fix lbry:// URLs in iframes being broken by Safari (#1812)
When Safari parses lbry:// URLs, it breaks them as they are not
compliant with the RFC 3986 URI syntax. This causes iframes in text
posts which link to a lbry:// URL to not display on Safari.

Instead, just use the lbry:// URL matched from the iframe regex instead
of parsing the iframe on Safari.
2022-07-07 10:39:10 -04:00
infinite-persistence
54122f8998
Publish: restore percentage label when uploading (#1809)
Closes #1804

Can't recall why it was removed ... probably something not important.
2022-07-07 08:53:57 -04:00
infinite-persistence
cdcf7e7772
tus: Fix upload not found scenario (#1808)
## Steps
When it upload reaches 100%, click Cancel (not refresh).

## Issue
There was an old hack in b0509bc9 where we decided to wait a while before sending `notify` as the server was not responsive. Since the task was dispatched before the Cancel action, the server cleared the upload first and later received the `notify`.

## Change
Instead of trying to cancel the timer, I think the hack is no longer needed given the throughput and lock fixes. With things running back in sequential mode, the Cancel button will now just show the "upload already completed" modal.
2022-07-07 08:53:47 -04:00
infinite-persistence
acabdb6325
tus-js-client: 2.3.0 to 2.3.2 (#1807) 2022-07-07 08:43:45 -04:00
infinite-persistence
da691f286e
Assume weekly_watch is claimed when data is insufficient (#1806)
## Issue
If the reward-list fetch is slow, the selector assumes the weekly_watch hasn't been claimed yet, causing an unnecessary claim.

## Change
The selector now tells the caller if there is no data -- up to caller on what to do (in this case, don't claim the reward).

It should be harmless if the claim action was missed, since the user can still manually claim it.
2022-07-07 05:16:36 -04:00
Thomas Zarebczan
e073e120a1
temp cache bust for CDN issue
CDN has set a large max cache for some m3u8s the other day, hoping this helps alleviate browser side cache issues. We can remove later
2022-07-06 14:47:59 -04:00
infinite-persistence
7c82110326
(patch) Add "Hide Repost" button in channel page (#1796)
## Issue
Hide reposts gets enabled on channel page by default, on a fresh browser session.

Open Odysee in private tab
Go to some channel page
Go back
Go to some channel page(same or different)
"Hide reposts" is enabled, and settings expanded
Above also works with logging in while having "hide reposts" disabled in global settings. (edited)

## Fix
Forgot to add default value.
2022-07-06 22:04:03 +08:00
Rafael Saes
7ecbb779af
Improve ~more~ comment viewing operation (#1798) 2022-07-06 08:36:14 -04:00
infinite-persistence
3233e3ab64
Remove 'now' in the ad
## Issue
It's a split-string (both in sentence and html) that translators can't translate

## Change
Asked around, and it's not a design requirement to have 2 lines. Feel free to put in a better drive tagline.
2022-07-06 13:07:45 +08:00
Rafael Saes
1e3585f5cc
Fix Livestream Popout Chat not refreshing when closed (#1797) 2022-07-05 14:30:54 -04:00
infinite-persistence
b0e88ff5d1
Add "Hide Repost" button in channel page (#1796)
* Re-organized per 'state->var->func->effect->return' structure.

* Add "Hide Repost" button in channel page

Ticket: 1762

## Change
For the placement of the button, putting it inside the expanded settings group feels the most natural, plus we then don't need to check whether the channel has reposts or not before displaying it (the expanded area is for stuff like this).

## Notes
The tricky part was making the code maintainable w.r.t to the global "Hide Repost" setting. Changed `forceShowReposts` to `hideRepostsOverride`, hopefully makes things more obvious.
- undefined = fallback to global setting
- true/false = use override
2022-07-05 13:20:10 -04:00
infinite-persistence
5638f64831
New version nudge (#1793)
## Ticket
1329

The existing nudge to refresh the webpage only happens when the app cannot find the specific javascript file in the server. As we don't purge the files on each build, the browser typically uses the cached version of the app, which could be weeks behind (based on the error logs).

## Approach
Poll the current version periodically (set to 1 hour for now) and invoke the nudge when a newer version is detected.

We typically don't need to bump `MINIMUM_VERSION` unless there is an urgent need to make users move away from older versions (e.g. API changes, mistakes, etc.)

## Trade-offs
Wanted to put the value in a separate file called `.min.version` so that the env's history won't be polluted with version bumps, but not sure how to implement with minimal code without having to read from the file. Getting from the env is the easiest to implement (per my limited knowledge).
2022-07-05 09:14:32 -04:00
infinite-persistence
769b1cdabb
Fix notification target for some types (#1790)
## Ticket
"1742 Notification popup: incorrect target"

Commentron uses old links for some of the notification types.

## Change
Factored out the code that determines the new target and use it both Notifications Page and Popup Menu.
2022-07-05 06:55:04 -04:00
infinite-persistence
02d017d415
Bump weekly-watch auto claim interval (#1794)
## Ticket
1768 Check reward claiming logic

## Change
- Bump to >6.5 days
- Remove unnecessary `Math.ceil` -- not sure why I added that. It was causing diff to hit earlier than necessary.

> _and I'm 5 days away._

Not sure how to replicate/explain this, though -- the old code would have still covered this range.  One possibility is when `last_claimed` is not defined, where we assume user hasn't claimed yet. We could flip this to assume "claimed" and just let the user manually claim as the fallback -- let me know.
2022-07-05 06:44:40 -04:00
infinite-persistence
6696d32e66
Remove 'many_downloads' auto-claim (let user manually claim) (#1795)
Ticket: 1768
2022-07-05 06:36:23 -04:00
Rave | 図書館猫
da55cdbba8
Part 1 (#1789) 2022-07-04 14:32:30 +02:00