Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b3b19af437 |
No files matched your search
@@ -24,7 +24,7 @@ jobs:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- macos-latest
|
||||
- windows-latest
|
||||
# - windows-latest
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
@@ -56,6 +56,11 @@ jobs:
|
||||
NOTARIZATION_PASSWORD: ${{ secrets.NOTARIZATION_PASSWORD }}
|
||||
WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }}
|
||||
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
|
||||
ARTIFACTS_BUCKET: ${{ secrets.ARTIFACTS_BUCKET }}
|
||||
ARTIFACTS_KEY: ${{ secrets.ARTIFACTS_KEY }}
|
||||
ARTIFACTS_SECRET: ${{ secrets.ARTIFACTS_SECRET }}
|
||||
ARTIFACTS_REGION: ${{ secrets.ARTIFACTS_REGION }}
|
||||
|
||||
WIN_CSC_LINK: https://raw.githubusercontent.com/lbryio/lbry-desktop/master/build/win-csc-2021-2022-08.p12
|
||||
CSC_LINK: https://s3.amazonaws.com/files.lbry.io/cert/osx-csc-2021-2022.p12
|
||||
|
||||
@@ -98,3 +103,15 @@ jobs:
|
||||
with:
|
||||
name: Windows
|
||||
path: ./dist/electron/*.*
|
||||
- uses: jakejarvis/s3-sync-action@master
|
||||
if: |
|
||||
startsWith(runner.os, 'linux')
|
||||
with:
|
||||
args: --acl public-read --follow-symlinks --exclude '*' --include '*.deb' --include '*.AppImage' --include '*.dmg'
|
||||
env:
|
||||
AWS_S3_BUCKET: ${{ secrets.ARTIFACTS_BUCKET }}
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.ARTIFACTS_KEY }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.ARTIFACTS_SECRET }}
|
||||
AWS_REGION: 'us-east-1'
|
||||
SOURCE_DIR: 'dist/electron'
|
||||
DEST_DIR: 'app/release'
|
||||
+14
-4
@@ -6,14 +6,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
## [Unreleased for Desktop]
|
||||
## [0.52.0] - [2021-10-24]
|
||||
|
||||
### Compatibility
|
||||
- Mac <= 10.13 (High Sierra) and Ubuntu <= 16 (Xenial) are no longer supported. If you upgrade, you will need to manually build and install your own lbrynet SDK
|
||||
|
||||
### Added
|
||||
- Added direct replying to notifications _community pr!_ ([#6935](https://github.com/lbryio/lbry-desktop/pull/6935))
|
||||
- Direct replying to notifications _community pr!_ ([#6935](https://github.com/lbryio/lbry-desktop/pull/6935))
|
||||
- Added "Replay" option on autoplay countdown ([#6921](https://github.com/lbryio/lbry-desktop/pull/6921))
|
||||
- Added "Loop" option on Lists ([#6921](https://github.com/lbryio/lbry-desktop/pull/6921))
|
||||
- Added "Shuffle" option on Lists ([#6921](https://github.com/lbryio/lbry-desktop/pull/6921))
|
||||
- Added Play Next/Previous buttons (with shortcuts SHIFT+N/SHIFT+P) ([#6921](https://github.com/lbryio/lbry-desktop/pull/6921))
|
||||
- Added separate control for autoplay next on video player ([#6921](https://github.com/lbryio/lbry-desktop/pull/6921))
|
||||
- Added Channel Mention selection ability while creating a comment ([#7151](https://github.com/lbryio/lbry-desktop/pull/7151))
|
||||
- Separate control for autoplay next on video player ([#6921](https://github.com/lbryio/lbry-desktop/pull/6921))
|
||||
- Channel Mention selection ability while creating a comment ([#7151](https://github.com/lbryio/lbry-desktop/pull/7151))
|
||||
- Disk space setting under Data Hosting ([#7266](https://github.com/lbryio/lbry-desktop/pull/7266))
|
||||
- Paginated 'All Playlists' page ([#7268](https://github.com/lbryio/lbry-desktop/pull/7268))
|
||||
- Expanded playlist ordering tools ([#7305](https://github.com/lbryio/lbry-desktop/pull/7305))
|
||||
|
||||
### Changed
|
||||
- Changing the supported language from Filipino to Tagalog _community pr!_ ([#6951](https://github.com/lbryio/lbry-desktop/pull/6951))
|
||||
@@ -23,7 +29,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
- Styling cleanup for file reactions ([#7251](https://github.com/lbryio/lbry-desktop/pull/7251))
|
||||
- Change share url to odysee and allow custom share url in settings ([#7258](https://github.com/lbryio/lbry-desktop/pull/7258))
|
||||
- Change Sign in/up to Cloud Connect for Odysee ([#7260](https://github.com/lbryio/lbry-desktop/pull/7260))
|
||||
- Upgraded to lbrynet v0.103.0 ([#7265](https://github.com/lbryio/lbry-desktop/pull/7265))
|
||||
- Upgraded to lbrynet v0.106.0 ([#7315](https://github.com/lbryio/lbry-desktop/pull/7315))
|
||||
- Upgraded Electron to v11.5.0 ([#7276](https://github.com/lbryio/lbry-desktop/pull/7276))
|
||||
- Cleaner Discover page filters ([#7306](https://github.com/lbryio/lbry-desktop/pull/7306))
|
||||
- Scroll bar styling ([#7314](https://github.com/lbryio/lbry-desktop/pull/7314))
|
||||
|
||||
### Fixed
|
||||
- Clicking on the title of a floating player will take you back to the list ([#6921](https://github.com/lbryio/lbry-desktop/pull/6921))
|
||||
@@ -33,6 +42,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
- Fix playlist preview thumbnail ([#7178](https://github.com/lbryio/lbry-desktop/pull/7178)
|
||||
- Fixed “Your Account” popup on mobile ([#7172](https://github.com/lbryio/lbry-desktop/pull/7172))
|
||||
- Fix disable-support for comments ([#7245](https://github.com/lbryio/lbry-desktop/pull/7245))
|
||||
- Fix Electron taking over .html files on linux ([#7291](https://github.com/lbryio/lbry-desktop/pull/7291))
|
||||
|
||||
## [0.51.2] - [2021-08-20]
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<img width="40%" src="https://miro.medium.com/max/5198/1*bTVuL2THG_0mpwmE-n7Ezg.png" />
|
||||
|
||||
# LBRY App - https://lbry.tv
|
||||
# LBRY App
|
||||
|
||||
This repo contains the UI code that powers the official LBRY desktop app, as well as lbry.tv. The LBRY app is a graphical browser for the decentralized content marketplace provided by the
|
||||
This repo contains the UI code that powers the official LBRY desktop app. The LBRY app is a graphical browser for the decentralized content marketplace provided by the
|
||||
[LBRY](https://lbry.com) protocol. It is essentially the
|
||||
[lbry daemon](https://github.com/lbryio/lbry) bundled with a UI using
|
||||
[Electron](https://electron.atom.io/).
|
||||
@@ -92,66 +92,6 @@ You can run the web version (lbry.tv), the electron app, or both at the same tim
|
||||
|
||||
- If you want to build and launch the production app you can run `yarn build`. This will give you an executable inside the `/dist` folder. We use [electron-builder](https://github.com/electron-userland/electron-builder) to create distributable packages.
|
||||
|
||||
#### Run the web app for development
|
||||
|
||||
`yarn dev:web`
|
||||
|
||||
- This uses webpack-dev-server and includes hot-reloading. If you want to debug the [web server we use in production](https://github.com/lbryio/lbry-desktop/blob/master/web/index.js) you can run `yarn dev:web-server`. This starts a server at `localhost:1337` and does not include hot reloading.
|
||||
|
||||
#### Customize the web app
|
||||
|
||||
- In root directory, duplicate the .env.default file and rename it to .env then copy the code below and paste it anywhere in the .env file.
|
||||
|
||||
```
|
||||
cp .env.defaults .env
|
||||
nano .env
|
||||
```
|
||||
|
||||
- To specify your own OG-IMAGE
|
||||
You can either place a png named v2-og.png in the /custom folder or specify the OG_IMAGE_URL in .env
|
||||
|
||||
- To specify your own channels to be followed on first run
|
||||
`AUTO_FOLLOW_URLS=lbry://@chan#123...a lbry://@chan2#456...a`
|
||||
|
||||
- If you want to customize the homepage content
|
||||
|
||||
1. add `CUSTOM_HOMEPAGE=true` to the '.env' file
|
||||
2. copy `/custom/homepage.example.js` to `/custom/homepage.js` and make desired changes to `homepage.js`
|
||||
|
||||
- If you want up to two custom sidebar links
|
||||
|
||||
```
|
||||
PINNED_URI_1=@someurl#2/someclaim#4
|
||||
PINNED_LABEL_1=Linktext
|
||||
|
||||
PINNED_URI_2=$/discover?t=tag&[queryparams]
|
||||
PINNED_LABEL_2=OtherLinkText
|
||||
```
|
||||
|
||||
- Finally `NODE_ENV=production yarn compile:web` to rebuild
|
||||
_Note: You don't need to edit the .env file in the /web folder - that is copied during compile._
|
||||
|
||||
#### Deploy the web app (_experimental_)
|
||||
|
||||
1. Create a server with a domain name and a reverse proxy https to port 1337.
|
||||
2. Install pm2, node v10, yarn
|
||||
3. Clone this repo
|
||||
4. Make any customizations as above
|
||||
5. Run `yarn` to install
|
||||
6. Run `NODE_ENV=production yarn compile:web` to build
|
||||
7. Set up pm2 to start ./web/index.js
|
||||
|
||||
#### Run both at the same time
|
||||
|
||||
Run the two commands above in separate terminal windows
|
||||
|
||||
```
|
||||
yarn dev
|
||||
|
||||
// in another terminal window
|
||||
yarn dev:web
|
||||
```
|
||||
|
||||
#### Resetting your Packages
|
||||
|
||||
If the app isn't building, or `yarn xxx` commands aren't working you may need to just reset your `node_modules`. To do so you can run: `rm -r node_modules && yarn` or `del /s /q node_modules && yarn` on Windows.
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
}
|
||||
},
|
||||
"deb": {
|
||||
"depends": ["gconf2", "gconf-service", "libnotify4", "libappindicator1", "libxtst6", "libnss3"]
|
||||
"depends": ["gconf2", "gconf-service", "libnotify4", "libxtst6", "libnss3"]
|
||||
},
|
||||
"nsis": {
|
||||
"perMachine": true,
|
||||
|
||||
@@ -54,6 +54,7 @@ export default appState => {
|
||||
webSecurity: !isDev,
|
||||
plugins: true,
|
||||
nodeIntegration: true,
|
||||
enableRemoteModule: true, // see about removing this
|
||||
},
|
||||
};
|
||||
const lbryProto = 'lbry://';
|
||||
|
||||
+21
-2
@@ -4,7 +4,7 @@
|
||||
import '@babel/polyfill';
|
||||
import SemVer from 'semver';
|
||||
import https from 'https';
|
||||
import { app, dialog, ipcMain, session, shell } from 'electron';
|
||||
import { app, dialog, ipcMain, session, shell, BrowserWindow } from 'electron';
|
||||
import { autoUpdater } from 'electron-updater';
|
||||
import Lbry from 'lbry';
|
||||
import LbryFirstInstance from './LbryFirstInstance';
|
||||
@@ -17,6 +17,7 @@ import startSandbox from './startSandbox';
|
||||
import installDevtools from './installDevtools';
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
const { download } = require('electron-dl');
|
||||
const filePath = path.join(process.resourcesPath, 'static', 'upgradeDisabled');
|
||||
let upgradeDisabled;
|
||||
try {
|
||||
@@ -52,7 +53,7 @@ if (isDev && process.platform === 'win32') {
|
||||
app.setAsDefaultProtocolClient(PROTOCOL, process.execPath, [
|
||||
path.resolve(process.argv[1]),
|
||||
]);
|
||||
} else {
|
||||
} else if (process.platform !== 'linux') {
|
||||
app.setAsDefaultProtocolClient(PROTOCOL);
|
||||
}
|
||||
|
||||
@@ -283,6 +284,20 @@ app.on('before-quit', () => {
|
||||
appState.isQuitting = true;
|
||||
});
|
||||
|
||||
ipcMain.on('download-upgrade', async (event, params) => {
|
||||
const { url, options } = params;
|
||||
const dir = fs.mkdtempSync(app.getPath('temp') + path.sep);
|
||||
options.onProgress = function(p) {
|
||||
rendererWindow.webContents.send('download-progress-update', p);
|
||||
};
|
||||
options.directory = dir;
|
||||
options.onCompleted = function(c) {
|
||||
rendererWindow.webContents.send('download-update-complete', c);
|
||||
};
|
||||
const win = BrowserWindow.getFocusedWindow();
|
||||
await download(win, url, options).catch(e => console.log('e', e));
|
||||
});
|
||||
|
||||
ipcMain.on('upgrade', (event, installerPath) => {
|
||||
app.on('quit', () => {
|
||||
console.log('Launching upgrade installer at', installerPath);
|
||||
@@ -297,6 +312,10 @@ ipcMain.on('upgrade', (event, installerPath) => {
|
||||
app.quit();
|
||||
});
|
||||
|
||||
ipcMain.on('check-for-updates', () => {
|
||||
autoUpdater.checkForUpdates();
|
||||
});
|
||||
|
||||
autoUpdater.on('update-downloaded', () => {
|
||||
autoUpdateDownloaded = true;
|
||||
});
|
||||
|
||||
Vendored
+1
@@ -45,6 +45,7 @@ declare type CommentsState = {
|
||||
isLoading: boolean,
|
||||
isLoadingById: boolean,
|
||||
isLoadingByParentId: { [string]: boolean },
|
||||
isCommenting: boolean,
|
||||
myComments: ?Set<string>,
|
||||
isFetchingReacts: boolean,
|
||||
myReactsByCommentId: ?{ [string]: Array<string> }, // {"CommentId:MyChannelId": ["like", "dislike", ...]}
|
||||
|
||||
Vendored
+43
@@ -91,3 +91,46 @@ declare type NotificationState = {
|
||||
errors: Array<ErrorNotification>,
|
||||
toasts: Array<Toast>,
|
||||
};
|
||||
|
||||
declare type WebNotification = {
|
||||
active_at: string,
|
||||
created_at: string,
|
||||
id: number,
|
||||
is_app_readable: boolean,
|
||||
is_device_notified: boolean,
|
||||
is_emailed: boolean,
|
||||
is_read: boolean,
|
||||
is_seen: boolean,
|
||||
notification_parameters: {
|
||||
device: {
|
||||
analytics_label: string,
|
||||
image_url: string,
|
||||
is_data_only: boolean,
|
||||
name: string,
|
||||
placeholders: ?string,
|
||||
target: string,
|
||||
text: string,
|
||||
title: string,
|
||||
type: string,
|
||||
},
|
||||
dynamic: {
|
||||
comment_author: string,
|
||||
reply_author: string,
|
||||
hash: string,
|
||||
claim_title: string,
|
||||
comment?: string,
|
||||
channel_url: string,
|
||||
},
|
||||
email: {},
|
||||
},
|
||||
notification_rule: string,
|
||||
type: string,
|
||||
updated_at: string,
|
||||
user_id: number,
|
||||
group_count?: number,
|
||||
};
|
||||
|
||||
declare type NotificationCategory = {
|
||||
name: string,
|
||||
types: ?Array<string>,
|
||||
};
|
||||
Vendored
+28
-1
@@ -11,17 +11,44 @@ declare type UpdatePublishFormData = {
|
||||
thumbnail_url?: string,
|
||||
uploadThumbnailStatus?: string,
|
||||
thumbnailPath?: string,
|
||||
thumbnailError?: boolean,
|
||||
description?: string,
|
||||
language?: string,
|
||||
channel?: string,
|
||||
channelId?: string,
|
||||
name?: string,
|
||||
nameError?: string,
|
||||
bid?: string,
|
||||
bid?: number,
|
||||
bidError?: string,
|
||||
otherLicenseDescription?: string,
|
||||
licenseUrl?: string,
|
||||
licenseType?: string,
|
||||
uri?: string,
|
||||
nsfw: boolean,
|
||||
isMarkdownPost?: boolean,
|
||||
};
|
||||
|
||||
declare type PublishParams = {
|
||||
name: ?string,
|
||||
bid: ?number,
|
||||
filePath?: string,
|
||||
description: ?string,
|
||||
language: string,
|
||||
publishingLicense?: string,
|
||||
publishingLicenseUrl?: string,
|
||||
thumbnail: ?string,
|
||||
channel: string,
|
||||
channelId?: string,
|
||||
title: string,
|
||||
contentIsFree: boolean,
|
||||
uri?: string,
|
||||
license: ?string,
|
||||
licenseUrl: ?string,
|
||||
fee?: {
|
||||
amount: string,
|
||||
currency: string,
|
||||
},
|
||||
claim: StreamClaim,
|
||||
nsfw: boolean,
|
||||
tags: Array<Tag>,
|
||||
};
|
||||
Vendored
-93
@@ -1,93 +0,0 @@
|
||||
// @flow
|
||||
import * as ACTIONS from 'constants/action_types';
|
||||
|
||||
/*
|
||||
Toasts:
|
||||
- First-in, first-out queue
|
||||
- Simple messages that are shown in response to user interactions
|
||||
- Never saved
|
||||
- If they are the result of errors, use the isError flag when creating
|
||||
- For errors that should interrupt user behavior, use Error
|
||||
*/
|
||||
declare type ToastParams = {
|
||||
message: string,
|
||||
title?: string,
|
||||
linkText?: string,
|
||||
linkTarget?: string,
|
||||
isError?: boolean,
|
||||
};
|
||||
|
||||
declare type Toast = {
|
||||
id: string,
|
||||
params: ToastParams,
|
||||
};
|
||||
|
||||
declare type DoToast = {
|
||||
type: ACTIONS.CREATE_TOAST,
|
||||
data: Toast,
|
||||
};
|
||||
|
||||
/*
|
||||
Notifications:
|
||||
- List of notifications based on user interactions/app notifications
|
||||
- Always saved, but can be manually deleted
|
||||
- Can happen in the background, or because of user interaction (ex: publish confirmed)
|
||||
*/
|
||||
declare type Notification = {
|
||||
id: string, // Unique id
|
||||
dateCreated: number,
|
||||
isRead: boolean, // Used to display "new" notifications that a user hasn't seen yet
|
||||
source?: string, // The type/area an notification is from. Used for sorting (ex: publishes, transactions)
|
||||
// We may want to use priority/isDismissed in the future to specify how urgent a notification is
|
||||
// and if the user should see it immediately
|
||||
// isDissmied: boolean,
|
||||
// priority?: number
|
||||
};
|
||||
|
||||
declare type DoNotification = {
|
||||
type: ACTIONS.CREATE_NOTIFICATION,
|
||||
data: Notification,
|
||||
};
|
||||
|
||||
declare type DoEditNotification = {
|
||||
type: ACTIONS.EDIT_NOTIFICATION,
|
||||
data: {
|
||||
notification: Notification,
|
||||
},
|
||||
};
|
||||
|
||||
declare type DoDeleteNotification = {
|
||||
type: ACTIONS.DELETE_NOTIFICATION,
|
||||
data: {
|
||||
id: string, // The id to delete
|
||||
},
|
||||
};
|
||||
|
||||
/*
|
||||
Errors:
|
||||
- First-in, first-out queue
|
||||
- Errors that should interupt user behavior
|
||||
- For errors that can be shown without interrupting a user, use Toast with the isError flag
|
||||
*/
|
||||
declare type ErrorNotification = {
|
||||
title: string,
|
||||
text: string,
|
||||
};
|
||||
|
||||
declare type DoError = {
|
||||
type: ACTIONS.CREATE_ERROR,
|
||||
data: ErrorNotification,
|
||||
};
|
||||
|
||||
declare type DoDismissError = {
|
||||
type: ACTIONS.DISMISS_ERROR,
|
||||
};
|
||||
|
||||
/*
|
||||
NotificationState
|
||||
*/
|
||||
declare type NotificationState = {
|
||||
notifications: Array<Notification>,
|
||||
errors: Array<ErrorNotification>,
|
||||
toasts: Array<Toast>,
|
||||
};
|
||||
Vendored
-54
@@ -1,54 +0,0 @@
|
||||
// @flow
|
||||
|
||||
declare type UpdatePublishFormData = {
|
||||
filePath?: string,
|
||||
contentIsFree?: boolean,
|
||||
fee?: {
|
||||
amount: string,
|
||||
currency: string,
|
||||
},
|
||||
title?: string,
|
||||
thumbnail_url?: string,
|
||||
uploadThumbnailStatus?: string,
|
||||
thumbnailPath?: string,
|
||||
thumbnailError?: boolean,
|
||||
description?: string,
|
||||
language?: string,
|
||||
channel?: string,
|
||||
channelId?: string,
|
||||
name?: string,
|
||||
nameError?: string,
|
||||
bid?: number,
|
||||
bidError?: string,
|
||||
otherLicenseDescription?: string,
|
||||
licenseUrl?: string,
|
||||
licenseType?: string,
|
||||
uri?: string,
|
||||
nsfw: boolean,
|
||||
isMarkdownPost?: boolean,
|
||||
};
|
||||
|
||||
declare type PublishParams = {
|
||||
name: ?string,
|
||||
bid: ?number,
|
||||
filePath?: string,
|
||||
description: ?string,
|
||||
language: string,
|
||||
publishingLicense?: string,
|
||||
publishingLicenseUrl?: string,
|
||||
thumbnail: ?string,
|
||||
channel: string,
|
||||
channelId?: string,
|
||||
title: string,
|
||||
contentIsFree: boolean,
|
||||
uri?: string,
|
||||
license: ?string,
|
||||
licenseUrl: ?string,
|
||||
fee?: {
|
||||
amount: string,
|
||||
currency: string,
|
||||
},
|
||||
claim: StreamClaim,
|
||||
nsfw: boolean,
|
||||
tags: Array<Tag>,
|
||||
};
|
||||
Vendored
-6
@@ -1,6 +0,0 @@
|
||||
// @flow
|
||||
/* eslint-disable no-use-before-define */
|
||||
declare type GetState = () => any;
|
||||
declare type ThunkAction = (dispatch: Dispatch, getState: GetState) => any;
|
||||
declare type Dispatch = (action: {} | Promise<*> | Array<{}> | ThunkAction) => any; // Need to refer to ThunkAction
|
||||
/* eslint-enable */
|
||||
+6
-5
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lbry",
|
||||
"version": "0.52.0-rc.5",
|
||||
"version": "0.52.0-rc.7",
|
||||
"description": "A browser for the LBRY network, a digital marketplace controlled by its users.",
|
||||
"keywords": [
|
||||
"lbry"
|
||||
@@ -46,7 +46,7 @@
|
||||
"dependencies": {
|
||||
"@ungap/from-entries": "^0.2.1",
|
||||
"auto-launch": "^5.0.5",
|
||||
"electron-dl": "^1.11.0",
|
||||
"electron-dl": "^3.2.0",
|
||||
"electron-log": "^2.2.12",
|
||||
"electron-notarize": "^1.0.0",
|
||||
"electron-updater": "^4.2.4",
|
||||
@@ -56,6 +56,7 @@
|
||||
"match-sorter": "^6.3.0",
|
||||
"parse-duration": "^1.0.0",
|
||||
"proxy-polyfill": "0.1.6",
|
||||
"re-reselect": "^4.0.0",
|
||||
"react-datetime-picker": "^3.2.1",
|
||||
"react-plastic": "^1.1.1",
|
||||
"react-top-loading-bar": "^2.0.1",
|
||||
@@ -123,7 +124,7 @@
|
||||
"dom-scroll-into-view": "^1.2.1",
|
||||
"dotenv-defaults": "^2.0.1",
|
||||
"dotenv-webpack": "^1.8.0",
|
||||
"electron": "9.4.0",
|
||||
"electron": "11.5.0",
|
||||
"electron-builder": "^22.9.1",
|
||||
"electron-devtools-installer": "^3.1.1",
|
||||
"electron-is-dev": "^0.3.0",
|
||||
@@ -215,7 +216,7 @@
|
||||
"unist-util-visit": "^2.0.3",
|
||||
"uuid": "^8.3.2",
|
||||
"vast-client": "^3.1.1",
|
||||
"video.js": "^7.13.3",
|
||||
"video.js": "^7.14.3",
|
||||
"videojs-contrib-quality-levels": "^2.0.9",
|
||||
"videojs-event-tracking": "^1.0.1",
|
||||
"villain-react": "^1.0.9",
|
||||
@@ -237,7 +238,7 @@
|
||||
"yarn": "^1.3"
|
||||
},
|
||||
"lbrySettings": {
|
||||
"lbrynetDaemonVersion": "0.103.0",
|
||||
"lbrynetDaemonVersion": "0.106.0",
|
||||
"lbrynetDaemonUrlTemplate": "https://github.com/lbryio/lbry/releases/download/vDAEMONVER/lbrynet-OSNAME.zip",
|
||||
"lbrynetDaemonDir": "static/daemon",
|
||||
"lbrynetDaemonFileName": "lbrynet"
|
||||
|
||||
@@ -2216,6 +2216,11 @@
|
||||
"Enable Data Hosting": "Enable Data Hosting",
|
||||
"Data over the limit will be deleted within 30 minutes. This will make the Yrbl cry a little bit.": "Data over the limit will be deleted within 30 minutes. This will make the Yrbl cry a little bit.",
|
||||
"Choose %asset%": "Choose %asset%",
|
||||
"Uploaded image will be visible in a few minutes.": "Uploaded image will be visible in a few minutes.",
|
||||
"Showing %filtered% results of %total%": "Showing %filtered% results of %total%",
|
||||
"filtered": "filtered",
|
||||
"View All Playlists": "View All Playlists",
|
||||
"Your wallet is not currently using a cloud sync service. You are in control of backing up your wallet.": "Your wallet is not currently using a cloud sync service. You are in control of backing up your wallet.",
|
||||
"Sending": "Sending",
|
||||
"You sent %lbc%": "You sent %lbc%",
|
||||
"--end--": "--end--"
|
||||
}
|
||||
@@ -310,27 +310,18 @@ const analytics: Analytics = {
|
||||
setUser: (userId) => {
|
||||
if (internalAnalyticsEnabled && userId) {
|
||||
window._paq.push(['setUserId', String(userId)]);
|
||||
// @if TARGET='app'
|
||||
Native.getAppVersionInfo().then(({ localVersion }) => {
|
||||
sendMatomoEvent('Version', 'Desktop-Version', localVersion);
|
||||
});
|
||||
// @endif
|
||||
}
|
||||
},
|
||||
toggleInternal: (enabled: boolean): void => {
|
||||
// Always collect analytics on lbry.tv
|
||||
// @if TARGET='app'
|
||||
internalAnalyticsEnabled = enabled;
|
||||
window.localStorage.setItem(SHARE_INTERNAL, enabled);
|
||||
// @endif
|
||||
},
|
||||
|
||||
toggleThirdParty: (enabled: boolean): void => {
|
||||
// Always collect analytics on lbry.tv
|
||||
// @if TARGET='app'
|
||||
// thirdPartyAnalyticsEnabled = enabled;
|
||||
window.localStorage.setItem(SHARE_THIRD_PARTY, enabled);
|
||||
// @endif
|
||||
},
|
||||
|
||||
apiLogView: (uri, outpoint, claimId, timeToStart) => {
|
||||
@@ -347,7 +338,6 @@ const analytics: Analytics = {
|
||||
claim_id: claimId,
|
||||
};
|
||||
|
||||
// lbry.tv streams from AWS so we don't care about the time to start
|
||||
if (timeToStart && !IS_WEB) {
|
||||
params.time_to_start = timeToStart;
|
||||
}
|
||||
|
||||
@@ -4,12 +4,12 @@ import { selectSubscriptions } from 'redux/selectors/subscriptions';
|
||||
import { withRouter } from 'react-router';
|
||||
import { makeSelectClaimForUri } from 'redux/selectors/claims';
|
||||
import { doResolveUris } from 'redux/actions/claims';
|
||||
import { makeSelectTopLevelCommentsForUri } from 'redux/selectors/comments';
|
||||
import { selectTopLevelCommentsForUri } from 'redux/selectors/comments';
|
||||
import ChannelMentionSuggestions from './view';
|
||||
|
||||
const select = (state, props) => {
|
||||
const subscriptionUris = selectSubscriptions(state).map(({ uri }) => uri);
|
||||
const topLevelComments = makeSelectTopLevelCommentsForUri(props.uri)(state);
|
||||
const topLevelComments = selectTopLevelCommentsForUri(state, props.uri);
|
||||
|
||||
const commentorUris = [];
|
||||
// Avoid repeated commentors
|
||||
|
||||
@@ -78,8 +78,6 @@ export default function ClaimList(props: Props) {
|
||||
noEmpty,
|
||||
} = props;
|
||||
|
||||
console.log('noempty', noEmpty);
|
||||
|
||||
const [currentSort, setCurrentSort] = usePersistedState(persistedStorageKey, SORT_NEW);
|
||||
|
||||
// Exclude prefix uris in these results variables. We don't want to show
|
||||
|
||||
@@ -277,7 +277,7 @@ function ClaimListHeader(props: Props) {
|
||||
</div>
|
||||
{expanded && (
|
||||
<>
|
||||
<div className={classnames(`card claim-search__menus`)}>
|
||||
<div className={classnames(`claim-search__menus`)}>
|
||||
{/* FRESHNESS FIELD */}
|
||||
{orderParam === CS.ORDER_BY_TOP && (
|
||||
<div className="claim-search__input-container">
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
// @flow
|
||||
import React from 'react';
|
||||
import Button from 'component/button';
|
||||
import * as ICONS from 'constants/icons';
|
||||
type Props = {
|
||||
collectionIndex?: number,
|
||||
editCollection: (string, CollectionEditParams) => void,
|
||||
listId?: string,
|
||||
lastCollectionIndex?: number,
|
||||
claim: ?Claim,
|
||||
};
|
||||
|
||||
function CollectionButtons(props: Props) {
|
||||
const { collectionIndex, editCollection, listId, lastCollectionIndex, claim } = props;
|
||||
const [confirmDelete, setConfirmDelete] = React.useState(false);
|
||||
return (
|
||||
<div className="collection-preview__edit-buttons">
|
||||
<div className="collection-preview__edit-group">
|
||||
<Button
|
||||
className={'button-collection-manage top-left'}
|
||||
icon={ICONS.UP_TOP}
|
||||
disabled={collectionIndex === 0}
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
if (editCollection) {
|
||||
// $FlowFixMe
|
||||
editCollection(listId, {
|
||||
order: { from: collectionIndex, to: 0 },
|
||||
});
|
||||
}
|
||||
}}
|
||||
/>
|
||||
<Button
|
||||
className={'button-collection-manage bottom-left'}
|
||||
icon={ICONS.DOWN_BOTTOM}
|
||||
disabled={collectionIndex === lastCollectionIndex}
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
if (editCollection) {
|
||||
// $FlowFixMe
|
||||
editCollection(listId, {
|
||||
order: { from: collectionIndex, to: lastCollectionIndex },
|
||||
});
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<div className="collection-preview__edit-group">
|
||||
<Button
|
||||
className={'button-collection-manage'}
|
||||
disabled={collectionIndex === 0}
|
||||
icon={ICONS.UP}
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
if (editCollection) {
|
||||
// $FlowFixMe
|
||||
editCollection(listId, {
|
||||
order: { from: collectionIndex, to: Number(collectionIndex) - 1 },
|
||||
});
|
||||
}
|
||||
}}
|
||||
/>
|
||||
<Button
|
||||
className={'button-collection-manage'}
|
||||
icon={ICONS.DOWN}
|
||||
disabled={collectionIndex === lastCollectionIndex}
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
if (editCollection) {
|
||||
// $FlowFixMe
|
||||
editCollection(listId, {
|
||||
order: { from: collectionIndex, to: Number(collectionIndex + 1) },
|
||||
});
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
{!confirmDelete && (
|
||||
<div className="collection-preview__edit-group collection-preview__delete ">
|
||||
<Button
|
||||
className={'button-collection-manage button-collection-delete top-right bottom-right'}
|
||||
icon={ICONS.DELETE}
|
||||
onClick={(e) => {
|
||||
setConfirmDelete(true);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
{confirmDelete && (
|
||||
<div className="collection-preview__edit-group collection-preview__delete">
|
||||
<Button
|
||||
className={'button-collection-manage button-collection-delete-cancel top-right'}
|
||||
icon={ICONS.REMOVE}
|
||||
onClick={(e) => {
|
||||
setConfirmDelete(false);
|
||||
}}
|
||||
/>
|
||||
<Button
|
||||
className={'button-collection-manage button-collection-delete-confirm bottom-right'}
|
||||
icon={ICONS.DELETE}
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
// $FlowFixMe
|
||||
if (editCollection) editCollection(listId, { claims: [claim], remove: true });
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default CollectionButtons;
|
||||
@@ -1,6 +1,6 @@
|
||||
import { connect } from 'react-redux';
|
||||
import {
|
||||
makeSelectClaimForUri,
|
||||
selectClaimForUri,
|
||||
makeSelectIsUriResolving,
|
||||
makeSelectClaimIsMine,
|
||||
makeSelectClaimIsPending,
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
makeSelectReflectingClaimForUri,
|
||||
makeSelectClaimWasPurchased,
|
||||
makeSelectTitleForUri,
|
||||
makeSelectDateForUri,
|
||||
selectDateForUri,
|
||||
} from 'redux/selectors/claims';
|
||||
import { makeSelectStreamingUrlForUri } from 'redux/selectors/file_info';
|
||||
import {
|
||||
@@ -30,14 +30,14 @@ import ClaimPreview from './view';
|
||||
import formatMediaDuration from 'util/formatMediaDuration';
|
||||
|
||||
const select = (state, props) => {
|
||||
const claim = props.uri && makeSelectClaimForUri(props.uri)(state);
|
||||
const claim = props.uri && selectClaimForUri(state, props.uri);
|
||||
const media = claim && claim.value && (claim.value.video || claim.value.audio);
|
||||
const mediaDuration = media && media.duration && formatMediaDuration(media.duration, { screenReader: true });
|
||||
|
||||
return {
|
||||
claim,
|
||||
mediaDuration,
|
||||
date: props.uri && makeSelectDateForUri(props.uri)(state),
|
||||
date: props.uri && selectDateForUri(state, props.uri),
|
||||
title: props.uri && makeSelectTitleForUri(props.uri)(state),
|
||||
pending: props.uri && makeSelectClaimIsPending(props.uri)(state),
|
||||
reflectingProgress: props.uri && makeSelectReflectingClaimForUri(props.uri)(state),
|
||||
@@ -45,7 +45,6 @@ const select = (state, props) => {
|
||||
claimIsMine: props.uri && makeSelectClaimIsMine(props.uri)(state),
|
||||
isResolvingUri: props.uri && makeSelectIsUriResolving(props.uri)(state),
|
||||
isResolvingRepost: props.uri && makeSelectIsUriResolving(props.repostUrl)(state),
|
||||
repostClaim: props.uri && makeSelectClaimForUri(props.uri)(state),
|
||||
nsfw: props.uri && makeSelectClaimIsNsfw(props.uri)(state),
|
||||
blackListedOutpoints: selectBlackListedOutpoints(state),
|
||||
filteredOutpoints: selectFilteredOutpoints(state),
|
||||
|
||||
@@ -25,8 +25,7 @@ import ClaimMenuList from 'component/claimMenuList';
|
||||
import ClaimPreviewLoading from './claim-preview-loading';
|
||||
import ClaimPreviewHidden from './claim-preview-no-mature';
|
||||
import ClaimPreviewNoContent from './claim-preview-no-content';
|
||||
import Button from 'component/button';
|
||||
import * as ICONS from 'constants/icons';
|
||||
import CollectionEditButtons from './collection-buttons';
|
||||
|
||||
import AbandonedChannelPreview from 'component/abandonedChannelPreview';
|
||||
|
||||
@@ -151,7 +150,7 @@ const ClaimPreview = forwardRef<any, {}>((props: Props, ref: any) => {
|
||||
} = props;
|
||||
const isCollection = claim && claim.value_type === 'collection';
|
||||
const collectionClaimId = isCollection && claim && claim.claim_id;
|
||||
const listId = collectionId || collectionClaimId;
|
||||
const listId = collectionId || collectionClaimId || null;
|
||||
const WrapperElement = wrapperElement || 'li';
|
||||
const shouldFetch =
|
||||
claim === undefined || (claim !== null && claim.value_type === 'channel' && isEmpty(claim.meta) && !pending);
|
||||
@@ -347,8 +346,18 @@ const ClaimPreview = forwardRef<any, {}>((props: Props, ref: any) => {
|
||||
'claim-preview--channel': isChannelUri,
|
||||
'claim-preview--visited': !isChannelUri && !claimIsMine && hasVisitedUri,
|
||||
'claim-preview--pending': pending,
|
||||
'claim-preview--collection-mine': isMyCollection && listId && type === 'listview',
|
||||
})}
|
||||
>
|
||||
{isMyCollection && listId && type === 'listview' && (
|
||||
<CollectionEditButtons
|
||||
collectionIndex={collectionIndex}
|
||||
editCollection={editCollection}
|
||||
listId={listId}
|
||||
lastCollectionIndex={lastCollectionIndex}
|
||||
claim={claim}
|
||||
/>
|
||||
)}
|
||||
{isChannelUri && claim ? (
|
||||
<UriIndicator focusable={false} uri={uri} link>
|
||||
<ChannelThumbnail uri={uri} small={type === 'inline'} />
|
||||
@@ -396,58 +405,6 @@ const ClaimPreview = forwardRef<any, {}>((props: Props, ref: any) => {
|
||||
{!pending && (
|
||||
<>
|
||||
{renderActions && claim && renderActions(claim)}
|
||||
{Boolean(isMyCollection && listId) && (
|
||||
<>
|
||||
<div className="collection-preview__edit-buttons">
|
||||
<div className="collection-preview__edit-group">
|
||||
<Button
|
||||
button="alt"
|
||||
className={'button-collection-order'}
|
||||
disabled={collectionIndex === 0}
|
||||
icon={ICONS.UP}
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
if (editCollection) {
|
||||
// $FlowFixMe
|
||||
editCollection(listId, {
|
||||
order: { from: collectionIndex, to: Number(collectionIndex) - 1 },
|
||||
});
|
||||
}
|
||||
}}
|
||||
/>
|
||||
<Button
|
||||
button="alt"
|
||||
className={'button-collection-order'}
|
||||
icon={ICONS.DOWN}
|
||||
disabled={collectionIndex === lastCollectionIndex}
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
if (editCollection) {
|
||||
// $FlowFixMe
|
||||
editCollection(listId, {
|
||||
order: { from: collectionIndex, to: Number(collectionIndex + 1) },
|
||||
});
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<div className="collection-preview__edit-group">
|
||||
<Button
|
||||
button="alt"
|
||||
icon={ICONS.DELETE}
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
// $FlowFixMe
|
||||
if (editCollection) editCollection(listId, { claims: [claim], remove: true });
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
{shouldHideActions || renderActions ? null : actions !== undefined ? (
|
||||
actions
|
||||
) : (
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
makeSelectTitleForUri,
|
||||
makeSelectChannelForClaimUri,
|
||||
makeSelectClaimIsNsfw,
|
||||
makeSelectDateForUri,
|
||||
selectDateForUri,
|
||||
} from 'redux/selectors/claims';
|
||||
import { doFileGet } from 'redux/actions/file';
|
||||
import { doResolveUri } from 'redux/actions/claims';
|
||||
@@ -24,7 +24,7 @@ const select = (state, props) => {
|
||||
return {
|
||||
claim,
|
||||
mediaDuration,
|
||||
date: props.uri && makeSelectDateForUri(props.uri)(state),
|
||||
date: props.uri && selectDateForUri(state, props.uri),
|
||||
channel: props.uri && makeSelectChannelForClaimUri(props.uri)(state),
|
||||
isResolvingUri: props.uri && makeSelectIsUriResolving(props.uri)(state),
|
||||
thumbnail: props.uri && makeSelectThumbnailForUri(props.uri)(state),
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { makeSelectTagsForUri } from 'redux/selectors/claims';
|
||||
import { selectTagsForUri } from 'redux/selectors/claims';
|
||||
import { selectFollowedTags } from 'redux/selectors/tags';
|
||||
import ClaimTags from './view';
|
||||
|
||||
const select = (state, props) => ({
|
||||
tags: makeSelectTagsForUri(props.uri)(state),
|
||||
tags: selectTagsForUri(state, props.uri),
|
||||
followedTags: selectFollowedTags(state),
|
||||
});
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@ type Props = {
|
||||
collectionId: string,
|
||||
showInfo: boolean,
|
||||
setShowInfo: (boolean) => void,
|
||||
showEdit: boolean,
|
||||
setShowEdit: (boolean) => void,
|
||||
collectionHasEdits: boolean,
|
||||
isBuiltin: boolean,
|
||||
doToggleShuffleList: (string, boolean) => void,
|
||||
@@ -44,6 +46,8 @@ function CollectionActions(props: Props) {
|
||||
doToggleShuffleList,
|
||||
playNextUri,
|
||||
firstItem,
|
||||
showEdit,
|
||||
setShowEdit,
|
||||
} = props;
|
||||
const [doShuffle, setDoShuffle] = React.useState(false);
|
||||
const { push } = useHistory();
|
||||
@@ -158,6 +162,17 @@ function CollectionActions(props: Props) {
|
||||
/>
|
||||
);
|
||||
|
||||
const showEditButton = (
|
||||
<Button
|
||||
title={__('Edit')}
|
||||
className={classnames('button-toggle', {
|
||||
'button-toggle--active': showEdit,
|
||||
})}
|
||||
icon={ICONS.EDIT}
|
||||
onClick={() => setShowEdit(!showEdit)}
|
||||
/>
|
||||
);
|
||||
|
||||
if (isMobile) {
|
||||
return (
|
||||
<div className="media__actions">
|
||||
@@ -173,7 +188,12 @@ function CollectionActions(props: Props) {
|
||||
{lhsSection}
|
||||
{rhsSection}
|
||||
</div>
|
||||
{uri && <>{infoButton}</>}
|
||||
{uri && (
|
||||
<div className="section">
|
||||
{infoButton}
|
||||
{showEditButton}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -358,7 +358,12 @@ function CollectionForm(props: Props) {
|
||||
</div>
|
||||
</TabPanel>
|
||||
<TabPanel>
|
||||
<ClaimList uris={collectionUrls} collectionId={collectionId} empty={__('This list has no items.')} />
|
||||
<ClaimList
|
||||
uris={collectionUrls}
|
||||
collectionId={collectionId}
|
||||
empty={__('This list has no items.')}
|
||||
type={'listview'}
|
||||
/>
|
||||
</TabPanel>
|
||||
<TabPanel>
|
||||
<Card
|
||||
|
||||
@@ -10,7 +10,7 @@ import { doFetchItemsInCollection } from 'redux/actions/collections';
|
||||
import CollectionPreviewOverlay from './view';
|
||||
|
||||
const select = (state, props) => {
|
||||
const collectionId = props.collectionId || (props.uri && makeSelectClaimIdForUri(props.uri));
|
||||
const collectionId = props.collectionId || (props.uri && makeSelectClaimIdForUri(props.uri)(state));
|
||||
const claim = props.collectionId && makeSelectClaimForClaimId(props.collectionId)(state);
|
||||
const collectionUri = props.uri || (claim && (claim.canonical_url || claim.permanent_url)) || null;
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ import { selectShowMatureContent } from 'redux/selectors/settings';
|
||||
import CollectionPreviewTile from './view';
|
||||
|
||||
const select = (state, props) => {
|
||||
const collectionId = props.collectionId || (props.uri && makeSelectClaimIdForUri(props.uri));
|
||||
const collectionId = props.collectionId || (props.uri && makeSelectClaimIdForUri(props.uri)(state));
|
||||
const claim = props.collectionId && makeSelectClaimForClaimId(props.collectionId)(state);
|
||||
const collectionUri = props.uri || (claim && (claim.canonical_url || claim.permanent_url)) || null;
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ const ALL = 'All';
|
||||
const PRIVATE = 'Private';
|
||||
const PUBLIC = 'Public';
|
||||
const COLLECTION_FILTERS = [ALL, PRIVATE, PUBLIC];
|
||||
const COLLECTION_SHOW_COUNT = 12;
|
||||
|
||||
export default function CollectionsListMine(props: Props) {
|
||||
const {
|
||||
@@ -42,6 +43,7 @@ export default function CollectionsListMine(props: Props) {
|
||||
const [filterType, setFilterType] = React.useState(ALL);
|
||||
const [searchText, setSearchText] = React.useState('');
|
||||
|
||||
const playlistPageUrl = `/$/${PAGES.PLAYLISTS}?type=${filterType}`;
|
||||
let collectionsToShow = [];
|
||||
if (filterType === ALL) {
|
||||
collectionsToShow = unpublishedCollectionsList.concat(publishedList);
|
||||
@@ -53,18 +55,24 @@ export default function CollectionsListMine(props: Props) {
|
||||
|
||||
let filteredCollections;
|
||||
if (searchText && collectionsToShow) {
|
||||
filteredCollections = collectionsToShow.filter((id) => {
|
||||
return (
|
||||
(unpublishedCollections[id] &&
|
||||
unpublishedCollections[id].name.toLocaleLowerCase().includes(searchText.toLocaleLowerCase())) ||
|
||||
(publishedCollections[id] &&
|
||||
publishedCollections[id].name.toLocaleLowerCase().includes(searchText.toLocaleLowerCase()))
|
||||
);
|
||||
});
|
||||
filteredCollections = collectionsToShow
|
||||
.filter((id) => {
|
||||
return (
|
||||
(unpublishedCollections[id] &&
|
||||
unpublishedCollections[id].name.toLocaleLowerCase().includes(searchText.toLocaleLowerCase())) ||
|
||||
(publishedCollections[id] &&
|
||||
publishedCollections[id].name.toLocaleLowerCase().includes(searchText.toLocaleLowerCase()))
|
||||
);
|
||||
})
|
||||
.slice(0, COLLECTION_SHOW_COUNT);
|
||||
} else {
|
||||
filteredCollections = collectionsToShow || [];
|
||||
filteredCollections = collectionsToShow.slice(0, COLLECTION_SHOW_COUNT) || [];
|
||||
}
|
||||
|
||||
const totalLength = collectionsToShow ? collectionsToShow.length : 0;
|
||||
const filteredLength = filteredCollections.length;
|
||||
const isTruncated = totalLength > filteredLength;
|
||||
|
||||
const watchLater = builtinCollectionsList.find((list) => list.id === COLLECTIONS_CONSTS.WATCH_LATER_ID);
|
||||
const favorites = builtinCollectionsList.find((list) => list.id === COLLECTIONS_CONSTS.FAVORITES_ID);
|
||||
const builtin = [watchLater, favorites];
|
||||
@@ -130,7 +138,19 @@ export default function CollectionsListMine(props: Props) {
|
||||
<div className="claim-grid__wrapper">
|
||||
<div className="claim-grid__header section">
|
||||
<h1 className="claim-grid__title">
|
||||
{__('Playlists')}
|
||||
<Button
|
||||
className="claim-grid__title"
|
||||
button="link"
|
||||
navigate={playlistPageUrl}
|
||||
label={
|
||||
<span className="claim-grid__title-span">
|
||||
{__('Playlists')}
|
||||
<div className="claim-grid__title--empty">
|
||||
<Icon className="icon--margin-right" icon={ICONS.STACK} />
|
||||
</div>
|
||||
</span>
|
||||
}
|
||||
/>
|
||||
{!hasCollections && !fetchingCollections && (
|
||||
<div className="claim-grid__title--empty">{__('(Empty) --[indicates empty playlist]--')}</div>
|
||||
)}
|
||||
@@ -139,38 +159,55 @@ export default function CollectionsListMine(props: Props) {
|
||||
)}
|
||||
</h1>
|
||||
</div>
|
||||
<div className="section__header--actions">
|
||||
<div className="claim-search__wrapper">
|
||||
<div className="claim-search__menu-group">
|
||||
{COLLECTION_FILTERS.map((value) => (
|
||||
<Button
|
||||
label={__(value)}
|
||||
key={value}
|
||||
button="alt"
|
||||
onClick={() => setFilterType(value)}
|
||||
className={classnames('button-toggle', {
|
||||
'button-toggle--active': filterType === value,
|
||||
})}
|
||||
/>
|
||||
))}
|
||||
<div className="section__header-action-stack">
|
||||
<div className="section__header--actions">
|
||||
<div className="claim-search__wrapper">
|
||||
<div className="claim-search__menu-group">
|
||||
{COLLECTION_FILTERS.map((value) => (
|
||||
<Button
|
||||
label={__(value)}
|
||||
key={value}
|
||||
button="alt"
|
||||
onClick={() => setFilterType(value)}
|
||||
className={classnames('button-toggle', {
|
||||
'button-toggle--active': filterType === value,
|
||||
})}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
<Form onSubmit={() => {}} className="wunderbar--inline">
|
||||
<Icon icon={ICONS.SEARCH} />
|
||||
<FormField
|
||||
onFocus={onTextareaFocus}
|
||||
onBlur={onTextareaBlur}
|
||||
className="wunderbar__input--inline"
|
||||
value={searchText}
|
||||
onChange={(e) => setSearchText(e.target.value)}
|
||||
type="text"
|
||||
placeholder={__('Search')}
|
||||
/>
|
||||
</Form>
|
||||
</div>
|
||||
<Form onSubmit={() => {}} className="wunderbar--inline">
|
||||
<Icon icon={ICONS.SEARCH} />
|
||||
<FormField
|
||||
onFocus={onTextareaFocus}
|
||||
onBlur={onTextareaBlur}
|
||||
className="wunderbar__input--inline"
|
||||
value={searchText}
|
||||
onChange={(e) => setSearchText(e.target.value)}
|
||||
type="text"
|
||||
placeholder={__('Search')}
|
||||
<p className="collection-grid__results-summary">
|
||||
{isTruncated && (
|
||||
<>
|
||||
{__(`Showing %filtered% results of %total%`, {
|
||||
filtered: filteredLength,
|
||||
total: totalLength,
|
||||
})}
|
||||
{`${searchText ? ' (' + __('filtered') + ') ' : ' '}`}
|
||||
</>
|
||||
)}
|
||||
<Button
|
||||
button="link"
|
||||
navigate={playlistPageUrl}
|
||||
label={<span className="claim-grid__title-span">{__('View All Playlists')}</span>}
|
||||
/>
|
||||
</Form>
|
||||
</p>
|
||||
</div>
|
||||
{Boolean(hasCollections) && (
|
||||
<div>
|
||||
{/* TODO: fix above spacing hack */}
|
||||
<div className="claim-grid">
|
||||
{filteredCollections &&
|
||||
filteredCollections.length > 0 &&
|
||||
|
||||
@@ -12,7 +12,7 @@ import { doSetPlayingUri } from 'redux/actions/content';
|
||||
import { selectUserVerifiedEmail } from 'redux/selectors/user';
|
||||
import {
|
||||
selectLinkedCommentAncestors,
|
||||
makeSelectOthersReactionsForComment,
|
||||
selectOthersReactsForComment,
|
||||
makeSelectTotalReplyPagesForParentId,
|
||||
} from 'redux/selectors/comments';
|
||||
import { selectActiveChannelClaim } from 'redux/selectors/app';
|
||||
@@ -29,7 +29,7 @@ const select = (state, props) => {
|
||||
thumbnail: props.authorUri && makeSelectThumbnailForUri(props.authorUri)(state),
|
||||
channelIsBlocked: props.authorUri && makeSelectChannelIsMuted(props.authorUri)(state),
|
||||
commentingEnabled: IS_WEB ? Boolean(selectUserVerifiedEmail(state)) : true,
|
||||
othersReacts: makeSelectOthersReactionsForComment(reactionKey)(state),
|
||||
othersReacts: selectOthersReactsForComment(state, reactionKey),
|
||||
activeChannelClaim,
|
||||
myChannels: selectMyChannelClaims(state),
|
||||
playingUri: selectPlayingUri(state),
|
||||
|
||||
@@ -3,7 +3,7 @@ import Comment from './view';
|
||||
import { makeSelectClaimIsMine, makeSelectClaimForUri } from 'redux/selectors/claims';
|
||||
import { doResolveUri } from 'redux/actions/claims';
|
||||
import { doToast } from 'redux/actions/notifications';
|
||||
import { makeSelectMyReactionsForComment, makeSelectOthersReactionsForComment } from 'redux/selectors/comments';
|
||||
import { selectMyReactsForComment, selectOthersReactsForComment } from 'redux/selectors/comments';
|
||||
import { doCommentReact } from 'redux/actions/comments';
|
||||
import { selectActiveChannelClaim } from 'redux/selectors/app';
|
||||
|
||||
@@ -15,8 +15,8 @@ const select = (state, props) => {
|
||||
return {
|
||||
claim: makeSelectClaimForUri(props.uri)(state),
|
||||
claimIsMine: makeSelectClaimIsMine(props.uri)(state),
|
||||
myReacts: makeSelectMyReactionsForComment(reactionKey)(state),
|
||||
othersReacts: makeSelectOthersReactionsForComment(reactionKey)(state),
|
||||
myReacts: selectMyReactsForComment(state, reactionKey),
|
||||
othersReacts: selectOthersReactsForComment(state, reactionKey),
|
||||
activeChannelId,
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { doResolveUris } from 'redux/actions/claims';
|
||||
import {
|
||||
makeSelectClaimForUri,
|
||||
makeSelectClaimIsMine,
|
||||
@@ -6,17 +7,17 @@ import {
|
||||
selectMyChannelClaims,
|
||||
} from 'redux/selectors/claims';
|
||||
import {
|
||||
makeSelectTopLevelCommentsForUri,
|
||||
selectTopLevelCommentsForUri,
|
||||
makeSelectTopLevelTotalPagesForUri,
|
||||
selectIsFetchingComments,
|
||||
selectIsFetchingCommentsById,
|
||||
selectIsFetchingReacts,
|
||||
makeSelectTotalCommentsCountForUri,
|
||||
selectOthersReactsById,
|
||||
selectMyReactionsByCommentId,
|
||||
selectOthersReacts,
|
||||
selectMyReacts,
|
||||
makeSelectCommentIdsForUri,
|
||||
selectSettingsByChannelId,
|
||||
makeSelectPinnedCommentsForUri,
|
||||
selectPinnedCommentsForUri,
|
||||
} from 'redux/selectors/comments';
|
||||
import { doCommentReset, doCommentList, doCommentById, doCommentReactList } from 'redux/actions/comments';
|
||||
import { selectActiveChannelClaim } from 'redux/selectors/app';
|
||||
@@ -24,11 +25,19 @@ import CommentsList from './view';
|
||||
|
||||
const select = (state, props) => {
|
||||
const activeChannelClaim = selectActiveChannelClaim(state);
|
||||
const topLevelComments = selectTopLevelCommentsForUri(state, props.uri);
|
||||
|
||||
const resolvedComments =
|
||||
topLevelComments && topLevelComments.length > 0
|
||||
? topLevelComments.filter(({ channel_url }) => makeSelectClaimForUri(channel_url)(state) !== undefined)
|
||||
: [];
|
||||
|
||||
return {
|
||||
topLevelComments,
|
||||
resolvedComments,
|
||||
myChannels: selectMyChannelClaims(state),
|
||||
allCommentIds: makeSelectCommentIdsForUri(props.uri)(state),
|
||||
pinnedComments: makeSelectPinnedCommentsForUri(props.uri)(state),
|
||||
topLevelComments: makeSelectTopLevelCommentsForUri(props.uri)(state),
|
||||
pinnedComments: selectPinnedCommentsForUri(state, props.uri),
|
||||
topLevelTotalPages: makeSelectTopLevelTotalPagesForUri(props.uri)(state),
|
||||
totalComments: makeSelectTotalCommentsCountForUri(props.uri)(state),
|
||||
claim: makeSelectClaimForUri(props.uri)(state),
|
||||
@@ -38,8 +47,8 @@ const select = (state, props) => {
|
||||
isFetchingReacts: selectIsFetchingReacts(state),
|
||||
fetchingChannels: selectFetchingMyChannels(state),
|
||||
settingsByChannelId: selectSettingsByChannelId(state),
|
||||
myReactsByCommentId: selectMyReactionsByCommentId(state),
|
||||
othersReactsById: selectOthersReactsById(state),
|
||||
myReactsByCommentId: selectMyReacts(state),
|
||||
othersReactsById: selectOthersReacts(state),
|
||||
activeChannelId: activeChannelClaim && activeChannelClaim.claim_id,
|
||||
};
|
||||
};
|
||||
@@ -49,6 +58,7 @@ const perform = (dispatch) => ({
|
||||
fetchComment: (commentId) => dispatch(doCommentById(commentId)),
|
||||
fetchReacts: (commentIds) => dispatch(doCommentReactList(commentIds)),
|
||||
resetComments: (claimId) => dispatch(doCommentReset(claimId)),
|
||||
doResolveUris: (uris) => dispatch(doResolveUris(uris, true)),
|
||||
});
|
||||
|
||||
export default connect(select, perform)(CommentsList);
|
||||
@@ -1,15 +1,27 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { makeSelectClaimIsMine, selectMyChannelClaims } from 'redux/selectors/claims';
|
||||
import { selectIsFetchingCommentsByParentId, makeSelectRepliesForParentId } from 'redux/selectors/comments';
|
||||
import { doResolveUris } from 'redux/actions/claims';
|
||||
import { makeSelectClaimIsMine, selectMyChannelClaims, makeSelectClaimForUri } from 'redux/selectors/claims';
|
||||
import { selectIsFetchingCommentsByParentId, selectRepliesForParentId } from 'redux/selectors/comments';
|
||||
import { selectUserVerifiedEmail } from 'redux/selectors/user';
|
||||
import CommentsReplies from './view';
|
||||
|
||||
const select = (state, props) => ({
|
||||
fetchedReplies: makeSelectRepliesForParentId(props.parentId)(state),
|
||||
claimIsMine: makeSelectClaimIsMine(props.uri)(state),
|
||||
commentingEnabled: IS_WEB ? Boolean(selectUserVerifiedEmail(state)) : true,
|
||||
myChannels: selectMyChannelClaims(state),
|
||||
isFetchingByParentId: selectIsFetchingCommentsByParentId(state),
|
||||
});
|
||||
const select = (state, props) => {
|
||||
const fetchedReplies = selectRepliesForParentId(state, props.parentId);
|
||||
const resolvedReplies =
|
||||
fetchedReplies && fetchedReplies.length > 0
|
||||
? fetchedReplies.filter(({ channel_url }) => makeSelectClaimForUri(channel_url)(state) !== undefined)
|
||||
: [];
|
||||
|
||||
export default connect(select)(CommentsReplies);
|
||||
return {
|
||||
fetchedReplies,
|
||||
resolvedReplies,
|
||||
claimIsMine: makeSelectClaimIsMine(props.uri)(state),
|
||||
userCanComment: IS_WEB ? Boolean(selectUserVerifiedEmail(state)) : true,
|
||||
myChannels: selectMyChannelClaims(state),
|
||||
isFetchingByParentId: selectIsFetchingCommentsByParentId(state),
|
||||
};
|
||||
};
|
||||
|
||||
const perform = (dispatch) => ({ doResolveUris: (uris) => dispatch(doResolveUris(uris, true)) });
|
||||
|
||||
export default connect(select, perform)(CommentsReplies);
|
||||
@@ -382,7 +382,21 @@ export const icons = {
|
||||
[ICONS.NO]: buildIcon(
|
||||
<path d="M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17" />
|
||||
),
|
||||
[ICONS.UP]: buildIcon(<polyline transform="matrix(1,0,0,-1,0,24.707107)" points="6 9 12 15 18 9" />),
|
||||
[ICONS.UP]: buildIcon(
|
||||
<g>
|
||||
<polyline transform="matrix(1,0,0,-1,0,24.707107)" points="6 9 12 15 18 9" />
|
||||
</g>
|
||||
),
|
||||
[ICONS.UP_TOP]: buildIcon(
|
||||
<g>
|
||||
<path d="m6 16 6-6 6 6M6 8h12" />
|
||||
</g>
|
||||
),
|
||||
[ICONS.DOWN_BOTTOM]: buildIcon(
|
||||
<g>
|
||||
<path d="m6 8 6 6 6-6M6 16h12" />
|
||||
</g>
|
||||
),
|
||||
[ICONS.DOWN]: buildIcon(<polyline points="6 9 12 15 18 9" />),
|
||||
[ICONS.FULLSCREEN]: buildIcon(
|
||||
<path d="M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3" />
|
||||
|
||||
@@ -20,7 +20,8 @@ function Paginate(props: Props) {
|
||||
const { search } = location;
|
||||
const [textValue, setTextValue] = React.useState('');
|
||||
const urlParams = new URLSearchParams(search);
|
||||
const initialPage = disableHistory ? 1 : Number(urlParams.get(PAGINATE_PARAM)) || 1;
|
||||
const urlParamPage = Number(urlParams.get(PAGINATE_PARAM));
|
||||
const initialPage = disableHistory ? 1 : urlParamPage || 1;
|
||||
const [currentPage, setCurrentPage] = React.useState(initialPage);
|
||||
const isMobile = useIsMobile();
|
||||
|
||||
@@ -47,6 +48,12 @@ function Paginate(props: Props) {
|
||||
}
|
||||
}
|
||||
|
||||
React.useEffect(() => {
|
||||
if (urlParamPage) {
|
||||
setCurrentPage(urlParamPage);
|
||||
}
|
||||
}, [urlParamPage, setCurrentPage]);
|
||||
|
||||
return (
|
||||
// Hide the paginate controls if we are loading or there is only one page
|
||||
// It should still be rendered to trigger the onPageChange callback
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { makeSelectDateForUri } from 'redux/selectors/claims';
|
||||
import { selectDateForUri } from 'redux/selectors/claims';
|
||||
import * as SETTINGS from 'constants/settings';
|
||||
import { makeSelectClientSetting } from 'redux/selectors/settings';
|
||||
import DateTime from './view';
|
||||
|
||||
const select = (state, props) => ({
|
||||
date: props.date || makeSelectDateForUri(props.uri)(state),
|
||||
date: props.date || selectDateForUri(state, props.uri),
|
||||
clock24h: makeSelectClientSetting(SETTINGS.CLOCK_24H)(state),
|
||||
});
|
||||
export default connect(select)(DateTime);
|
||||
@@ -27,7 +27,7 @@ function FileDescription(props: Props) {
|
||||
const { uri, claim, metadata, pendingAmount, doOpenModal, claimIsMine, expandOverride } = props;
|
||||
const [expanded, setExpanded] = React.useState(false);
|
||||
const [showCreditDetails, setShowCreditDetails] = React.useState(false);
|
||||
const amount = parseFloat(claim.amount) + parseFloat(pendingAmount || claim.meta.support_amount);
|
||||
const amount = claim ? parseFloat(claim.amount) + parseFloat(pendingAmount || claim.meta.support_amount) : undefined;
|
||||
const formattedAmount = formatCredits(amount, 2, true);
|
||||
const hasSupport = claim && claim.meta && claim.meta.support_amount && Number(claim.meta.support_amount) > 0;
|
||||
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
// @flow
|
||||
import React from 'react';
|
||||
import FileDownloadLink from 'component/fileDownloadLink';
|
||||
import * as RENDER_MODES from 'constants/file_render_modes';
|
||||
import Card from 'component/common/card';
|
||||
import Button from 'component/button';
|
||||
|
||||
type Props = {
|
||||
uri: string,
|
||||
@@ -11,30 +9,7 @@ type Props = {
|
||||
};
|
||||
|
||||
export default function FileRenderDownload(props: Props) {
|
||||
const { uri, renderMode } = props;
|
||||
|
||||
// @if TARGET='web'
|
||||
if (RENDER_MODES.UNSUPPORTED_IN_THIS_APP.includes(renderMode)) {
|
||||
return (
|
||||
<Card
|
||||
title={__('Download or get the app')}
|
||||
subtitle={
|
||||
<p>
|
||||
{__(
|
||||
'This content can be downloaded from lbry.tv, but not displayed. It will display in LBRY Desktop, an app for desktop computers.'
|
||||
)}
|
||||
</p>
|
||||
}
|
||||
actions={
|
||||
<div className="section__actions">
|
||||
<FileDownloadLink uri={uri} buttonType="primary" showLabel />
|
||||
<Button button={'link'} label={__('Get the App')} href="https://lbry.com/get" />
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
);
|
||||
}
|
||||
// @endif
|
||||
const { uri } = props;
|
||||
|
||||
return <Card title={__('Download')} actions={<FileDownloadLink uri={uri} buttonType="primary" showLabel />} />;
|
||||
}
|
||||
@@ -19,9 +19,64 @@ import { isURIEqual } from 'util/lbryURI';
|
||||
import AutoplayCountdown from 'component/autoplayCountdown';
|
||||
|
||||
const IS_DESKTOP_MAC = typeof process === 'object' ? process.platform === 'darwin' : false;
|
||||
const DEBOUNCE_WINDOW_RESIZE_HANDLER_MS = 60;
|
||||
const DEBOUNCE_WINDOW_RESIZE_HANDLER_MS = 100;
|
||||
export const INLINE_PLAYER_WRAPPER_CLASS = 'inline-player__wrapper';
|
||||
|
||||
function getScreenWidth() {
|
||||
if (document && document.documentElement) {
|
||||
return document.documentElement.clientWidth;
|
||||
} else {
|
||||
return window.innerWidth;
|
||||
}
|
||||
}
|
||||
|
||||
function getScreenHeight() {
|
||||
if (document && document.documentElement) {
|
||||
return document.documentElement.clientHeight;
|
||||
} else {
|
||||
return window.innerHeight;
|
||||
}
|
||||
}
|
||||
|
||||
function getFloatingPlayerRect() {
|
||||
// TODO: use 'fileViewerRect'?
|
||||
const FLOATING_PLAYER_CLASS = 'content__viewer--floating';
|
||||
const elem = document.querySelector(`.${FLOATING_PLAYER_CLASS}`);
|
||||
if (elem) {
|
||||
return elem.getBoundingClientRect();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
function clampRectToScreen(x, y, rect) {
|
||||
if (rect) {
|
||||
const ESTIMATED_SCROLL_BAR_PX = 50;
|
||||
const screenW = getScreenWidth();
|
||||
const screenH = getScreenHeight();
|
||||
|
||||
if (x + rect.width > screenW - ESTIMATED_SCROLL_BAR_PX) {
|
||||
x = screenW - rect.width - ESTIMATED_SCROLL_BAR_PX;
|
||||
}
|
||||
|
||||
if (y + rect.height > screenH) {
|
||||
y = screenH - rect.height;
|
||||
}
|
||||
}
|
||||
|
||||
return { x, y };
|
||||
}
|
||||
|
||||
function calculateRelativePos(x, y) {
|
||||
return {
|
||||
x: x / getScreenWidth(),
|
||||
y: y / getScreenHeight(),
|
||||
};
|
||||
}
|
||||
|
||||
// ****************************************************************************
|
||||
// ****************************************************************************
|
||||
|
||||
type Props = {
|
||||
isFloating: boolean,
|
||||
fileInfo: FileListItem,
|
||||
@@ -85,10 +140,7 @@ export default function FileRenderFloating(props: Props) {
|
||||
x: -25,
|
||||
y: window.innerHeight - 400,
|
||||
});
|
||||
const [relativePos, setRelativePos] = useState({
|
||||
x: 0,
|
||||
y: 0,
|
||||
});
|
||||
const relativePosRef = React.useRef({ x: 0, y: 0 });
|
||||
|
||||
const navigateUrl =
|
||||
playingUri &&
|
||||
@@ -103,93 +155,49 @@ export default function FileRenderFloating(props: Props) {
|
||||
? __("It looks like you deleted or moved this file. We're rebuilding it now. It will only take a few seconds.")
|
||||
: __('Loading');
|
||||
|
||||
function getScreenWidth() {
|
||||
if (document && document.documentElement) {
|
||||
return document.documentElement.clientWidth;
|
||||
} else {
|
||||
return window.innerWidth;
|
||||
}
|
||||
function restoreToRelativePosition() {
|
||||
const newX = Math.round(relativePosRef.current.x * getScreenWidth());
|
||||
const newY = Math.round(relativePosRef.current.y * getScreenHeight());
|
||||
setPosition(clampRectToScreen(newX, newY, getFloatingPlayerRect()));
|
||||
}
|
||||
|
||||
function getScreenHeight() {
|
||||
if (document && document.documentElement) {
|
||||
return document.documentElement.clientHeight;
|
||||
} else {
|
||||
return window.innerHeight;
|
||||
}
|
||||
}
|
||||
const clampToScreenOnResize = React.useCallback(
|
||||
debounce(() => {
|
||||
restoreToRelativePosition();
|
||||
}, DEBOUNCE_WINDOW_RESIZE_HANDLER_MS),
|
||||
[]
|
||||
);
|
||||
|
||||
const clampToScreen = React.useCallback((pos) => {
|
||||
const ESTIMATED_SCROLL_BAR_PX = 50;
|
||||
const FLOATING_PLAYER_CLASS = 'content__viewer--floating';
|
||||
const fpPlayerElem = document.querySelector(`.${FLOATING_PLAYER_CLASS}`);
|
||||
|
||||
if (fpPlayerElem) {
|
||||
if (pos.x + fpPlayerElem.getBoundingClientRect().width > getScreenWidth() - ESTIMATED_SCROLL_BAR_PX) {
|
||||
pos.x = getScreenWidth() - fpPlayerElem.getBoundingClientRect().width - ESTIMATED_SCROLL_BAR_PX;
|
||||
}
|
||||
if (pos.y + fpPlayerElem.getBoundingClientRect().height > getScreenHeight()) {
|
||||
pos.y = getScreenHeight() - fpPlayerElem.getBoundingClientRect().height;
|
||||
}
|
||||
}
|
||||
}, []);
|
||||
|
||||
// Updated 'relativePos' based on persisted 'position':
|
||||
const stringifiedPosition = JSON.stringify(position);
|
||||
// ???
|
||||
useEffect(() => {
|
||||
const jsonPosition = JSON.parse(stringifiedPosition);
|
||||
|
||||
setRelativePos({
|
||||
x: jsonPosition.x / getScreenWidth(),
|
||||
y: jsonPosition.y / getScreenHeight(),
|
||||
});
|
||||
}, [stringifiedPosition]);
|
||||
|
||||
// Ensure player is within screen when 'isFloating' changes.
|
||||
useEffect(() => {
|
||||
const jsonPosition = JSON.parse(stringifiedPosition);
|
||||
|
||||
if (isFloating) {
|
||||
// When the player begins floating, remove the comment source
|
||||
// so that it doesn't try to resize again in case of going back
|
||||
// to the origin's comment section and fail to position correctly
|
||||
if (isComment && playingUri) clearSecondarySource(playingUri.uri);
|
||||
|
||||
let pos = { x: jsonPosition.x, y: jsonPosition.y };
|
||||
clampToScreen(pos);
|
||||
if (pos.x !== position.x || pos.y !== position.y) {
|
||||
setPosition({ x: pos.x, y: pos.y });
|
||||
}
|
||||
}
|
||||
}, [
|
||||
clampToScreen,
|
||||
clearSecondarySource,
|
||||
isComment,
|
||||
isFloating,
|
||||
playingUri,
|
||||
position.x,
|
||||
position.y,
|
||||
setPosition,
|
||||
stringifiedPosition,
|
||||
]);
|
||||
}, [isFloating, isComment, clearSecondarySource, playingUri]);
|
||||
|
||||
// Initial update for relativePosRef:
|
||||
useEffect(() => {
|
||||
relativePosRef.current = calculateRelativePos(position.x, position.y);
|
||||
}, []); // eslint-disable-line react-hooks/exhaustive-deps
|
||||
|
||||
// Ensure player is within screen when 'isFloating' changes.
|
||||
useEffect(() => {
|
||||
if (isFloating) {
|
||||
restoreToRelativePosition();
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [isFloating]);
|
||||
|
||||
// Listen to main-window resizing and adjust the fp position accordingly:
|
||||
useEffect(() => {
|
||||
const handleMainWindowResize = debounce(() => {
|
||||
let newPos = {
|
||||
x: Math.round(relativePos.x * getScreenWidth()),
|
||||
y: Math.round(relativePos.y * getScreenHeight()),
|
||||
};
|
||||
clampToScreen(newPos);
|
||||
setPosition({ x: newPos.x, y: newPos.y });
|
||||
}, DEBOUNCE_WINDOW_RESIZE_HANDLER_MS);
|
||||
|
||||
window.addEventListener('resize', handleMainWindowResize);
|
||||
return () => window.removeEventListener('resize', handleMainWindowResize);
|
||||
|
||||
// 'relativePos' is needed in the dependency list to avoid stale closure.
|
||||
// Otherwise, this could just be changed to a one-time effect.
|
||||
}, [clampToScreen, relativePos.x, relativePos.y, setPosition]);
|
||||
if (isFloating) {
|
||||
window.addEventListener('resize', clampToScreenOnResize);
|
||||
return () => window.removeEventListener('resize', clampToScreenOnResize);
|
||||
}
|
||||
}, [isFloating, clampToScreenOnResize]);
|
||||
|
||||
const handleResize = React.useCallback(() => {
|
||||
const element = mainFilePlaying
|
||||
@@ -295,24 +303,27 @@ export default function FileRenderFloating(props: Props) {
|
||||
}
|
||||
|
||||
function handleDragMove(e, ui) {
|
||||
setWasDragging(true);
|
||||
const { x, y } = position;
|
||||
const newX = x + ui.deltaX;
|
||||
const newY = y + ui.deltaY;
|
||||
setPosition({
|
||||
x: newX,
|
||||
y: newY,
|
||||
});
|
||||
const newX = ui.x;
|
||||
const newY = ui.y;
|
||||
|
||||
// Mark as dragging if the position changed and we were not dragging before.
|
||||
if (!wasDragging && (newX !== x || newY !== y)) {
|
||||
setWasDragging(true);
|
||||
}
|
||||
}
|
||||
|
||||
function handleDragStop(e) {
|
||||
function handleDragStop(e, ui) {
|
||||
if (wasDragging) {
|
||||
e.stopPropagation();
|
||||
// e.stopPropagation();
|
||||
setWasDragging(false);
|
||||
setRelativePos({
|
||||
x: position.x / getScreenWidth(),
|
||||
y: position.y / getScreenHeight(),
|
||||
});
|
||||
}
|
||||
|
||||
let newPos = { x: ui.x, y: ui.y };
|
||||
if (newPos.x !== position.x || newPos.y !== position.y) {
|
||||
newPos = clampRectToScreen(newPos.x, newPos.y, getFloatingPlayerRect());
|
||||
setPosition(newPos);
|
||||
relativePosRef.current = calculateRelativePos(newPos.x, newPos.y);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -334,6 +345,7 @@ export default function FileRenderFloating(props: Props) {
|
||||
'content__viewer--inline': !isFloating,
|
||||
'content__viewer--secondary': isComment,
|
||||
'content__viewer--theater-mode': !isFloating && videoTheaterMode,
|
||||
'content__viewer--disable-click': wasDragging,
|
||||
})}
|
||||
style={
|
||||
!isFloating && fileViewerRect
|
||||
@@ -363,13 +375,7 @@ export default function FileRenderFloating(props: Props) {
|
||||
)}
|
||||
|
||||
{isReadyToPlay ? (
|
||||
<FileRender
|
||||
className="draggable"
|
||||
uri={uri}
|
||||
// @if TARGET='app'
|
||||
desktopPlayStartTime={desktopPlayStartTime}
|
||||
// @endif
|
||||
/>
|
||||
<FileRender className="draggable" uri={uri} desktopPlayStartTime={desktopPlayStartTime} />
|
||||
) : (
|
||||
<>
|
||||
{collectionId && !canViewFile ? (
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// @flow
|
||||
import React from 'react';
|
||||
import DateTime from 'component/dateTime';
|
||||
import FileViewCount from 'component/fileViewCount';
|
||||
import FileActions from 'component/fileActions';
|
||||
|
||||
@@ -13,6 +14,7 @@ function FileSubtitle(props: Props) {
|
||||
return (
|
||||
<div className="media__subtitle--between">
|
||||
<div className="file__viewdate">
|
||||
<DateTime uri={uri} show={DateTime.SHOW_DATE} />
|
||||
<FileViewCount uri={uri} />
|
||||
</div>
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { withRouter } from 'react-router';
|
||||
import {
|
||||
selectMyPublishedPlaylistCollections,
|
||||
selectMyUnpublishedCollections, // should probably distinguish types
|
||||
// selectSavedCollections,
|
||||
} from 'redux/selectors/collections';
|
||||
import { selectFetchingMyCollections } from 'redux/selectors/claims';
|
||||
import PlaylistsMine from './view';
|
||||
|
||||
const select = (state) => {
|
||||
return {
|
||||
publishedCollections: selectMyPublishedPlaylistCollections(state),
|
||||
unpublishedCollections: selectMyUnpublishedCollections(state),
|
||||
// savedCollections: selectSavedCollections(state),
|
||||
fetchingCollections: selectFetchingMyCollections(state),
|
||||
};
|
||||
};
|
||||
|
||||
export default withRouter(connect(select)(PlaylistsMine));
|
||||
@@ -0,0 +1,182 @@
|
||||
// @flow
|
||||
import React from 'react';
|
||||
import CollectionPreviewTile from 'component/collectionPreviewTile';
|
||||
import Button from 'component/button';
|
||||
import Icon from 'component/common/icon';
|
||||
import * as ICONS from 'constants/icons';
|
||||
import * as KEYCODES from 'constants/keycodes';
|
||||
import Paginate from 'component/common/paginate';
|
||||
|
||||
import Yrbl from 'component/yrbl';
|
||||
import classnames from 'classnames';
|
||||
import { FormField, Form } from 'component/common/form';
|
||||
|
||||
type Props = {
|
||||
publishedCollections: CollectionGroup,
|
||||
unpublishedCollections: CollectionGroup,
|
||||
// savedCollections: CollectionGroup,
|
||||
fetchingCollections: boolean,
|
||||
page: number,
|
||||
pageSize: number,
|
||||
history: { replace: (string) => void },
|
||||
location: { search: string },
|
||||
};
|
||||
|
||||
const ALL = 'All';
|
||||
const PRIVATE = 'Private';
|
||||
const PUBLIC = 'Public';
|
||||
const COLLECTION_FILTERS = [ALL, PRIVATE, PUBLIC];
|
||||
const FILTER_TYPE_PARAM = 'type';
|
||||
const PAGE_PARAM = 'page';
|
||||
|
||||
export default function PlaylistsMine(props: Props) {
|
||||
const {
|
||||
publishedCollections,
|
||||
unpublishedCollections,
|
||||
// savedCollections, these are resolved on startup from sync'd claimIds or urls
|
||||
fetchingCollections,
|
||||
history,
|
||||
location,
|
||||
} = props;
|
||||
|
||||
const { search } = location;
|
||||
const urlParams = new URLSearchParams(search);
|
||||
const page = Number(urlParams.get(PAGE_PARAM)) || 1;
|
||||
const type = urlParams.get(FILTER_TYPE_PARAM) || ALL;
|
||||
const pageSize = 12;
|
||||
|
||||
const unpublishedCollectionsList = (Object.keys(unpublishedCollections || {}): any);
|
||||
const publishedList = (Object.keys(publishedCollections || {}): any);
|
||||
const hasCollections = unpublishedCollectionsList.length || publishedList.length;
|
||||
const [filterType, setFilterType] = React.useState(type);
|
||||
const [searchText, setSearchText] = React.useState('');
|
||||
|
||||
let collectionsToShow = [];
|
||||
if (filterType === ALL) {
|
||||
collectionsToShow = unpublishedCollectionsList.concat(publishedList);
|
||||
} else if (filterType === PRIVATE) {
|
||||
collectionsToShow = unpublishedCollectionsList;
|
||||
} else if (filterType === PUBLIC) {
|
||||
collectionsToShow = publishedList;
|
||||
}
|
||||
|
||||
let filteredCollections;
|
||||
if (searchText && collectionsToShow) {
|
||||
filteredCollections = collectionsToShow.filter((id) => {
|
||||
return (
|
||||
(unpublishedCollections[id] &&
|
||||
unpublishedCollections[id].name.toLocaleLowerCase().includes(searchText.toLocaleLowerCase())) ||
|
||||
(publishedCollections[id] &&
|
||||
publishedCollections[id].name.toLocaleLowerCase().includes(searchText.toLocaleLowerCase()))
|
||||
);
|
||||
});
|
||||
} else {
|
||||
filteredCollections = collectionsToShow || [];
|
||||
}
|
||||
|
||||
const shouldPaginate = filteredCollections.length > pageSize;
|
||||
const paginateStartIndex = shouldPaginate ? (page - 1) * pageSize : 0;
|
||||
const paginateEndIndex = paginateStartIndex + pageSize;
|
||||
const paginatedCollections = filteredCollections.slice(paginateStartIndex, paginateEndIndex);
|
||||
|
||||
function escapeListener(e: SyntheticKeyboardEvent<*>) {
|
||||
if (e.keyCode === KEYCODES.ESCAPE) {
|
||||
e.preventDefault();
|
||||
setSearchText('');
|
||||
}
|
||||
}
|
||||
|
||||
function onTextareaFocus() {
|
||||
window.addEventListener('keydown', escapeListener);
|
||||
}
|
||||
|
||||
function onTextareaBlur() {
|
||||
window.removeEventListener('keydown', escapeListener);
|
||||
}
|
||||
|
||||
function handleFilterType(val) {
|
||||
const newParams = new URLSearchParams();
|
||||
if (val) {
|
||||
newParams.set(FILTER_TYPE_PARAM, val);
|
||||
}
|
||||
newParams.set(PAGE_PARAM, '1');
|
||||
history.replace(`?${newParams.toString()}`);
|
||||
setFilterType(val);
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="claim-grid__wrapper">
|
||||
<div className="claim-grid__header section">
|
||||
<h1 className="claim-grid__title">
|
||||
{__('Playlists')}
|
||||
{!hasCollections && !fetchingCollections && (
|
||||
<div className="claim-grid__title--empty">{__('(Empty) --[indicates empty playlist]--')}</div>
|
||||
)}
|
||||
{!hasCollections && fetchingCollections && (
|
||||
<div className="claim-grid__title--empty">{__('(Empty) --[indicates empty playlist]--')}</div>
|
||||
)}
|
||||
</h1>
|
||||
</div>
|
||||
<div className="section__header--actions">
|
||||
<div className="claim-search__wrapper">
|
||||
<div className="claim-search__menu-group">
|
||||
{COLLECTION_FILTERS.map((value) => (
|
||||
<Button
|
||||
label={__(value)}
|
||||
key={value}
|
||||
button="alt"
|
||||
onClick={() => handleFilterType(value)}
|
||||
className={classnames('button-toggle', {
|
||||
'button-toggle--active': filterType === value,
|
||||
})}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
<Form onSubmit={() => {}} className="wunderbar--inline">
|
||||
<Icon icon={ICONS.SEARCH} />
|
||||
<FormField
|
||||
onFocus={onTextareaFocus}
|
||||
onBlur={onTextareaBlur}
|
||||
className="wunderbar__input--inline"
|
||||
value={searchText}
|
||||
onChange={(e) => setSearchText(e.target.value)}
|
||||
type="text"
|
||||
placeholder={__('Search')}
|
||||
/>
|
||||
</Form>
|
||||
</div>
|
||||
{Boolean(hasCollections) && (
|
||||
<div>
|
||||
{/* TODO: fix above spacing hack */}
|
||||
|
||||
<div className="claim-grid">
|
||||
{paginatedCollections &&
|
||||
paginatedCollections.length > 0 &&
|
||||
paginatedCollections.map((key) => <CollectionPreviewTile tileLayout collectionId={key} key={key} />)}
|
||||
{!paginatedCollections.length && <div className="empty main--empty">{__('No matching playlists')}</div>}
|
||||
</div>
|
||||
{shouldPaginate && (
|
||||
<Paginate
|
||||
totalPages={
|
||||
filteredCollections.length > 0 ? Math.ceil(filteredCollections.length / Number(pageSize)) : 1
|
||||
}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
{!hasCollections && !fetchingCollections && (
|
||||
<div className="main--empty">
|
||||
<Yrbl type={'sad'} title={__('You have no lists yet. Better start hoarding!')} />
|
||||
</div>
|
||||
)}
|
||||
{!hasCollections && fetchingCollections && (
|
||||
<div className="main--empty">
|
||||
<h2 className="main--empty empty">{__('Loading...')}</h2>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -14,11 +14,11 @@ const LIMITED = 'limited';
|
||||
const NONE = 'none';
|
||||
|
||||
type Props = {
|
||||
setWelcomeVersion: number => void,
|
||||
setWelcomeVersion: (number) => void,
|
||||
signOut: () => void,
|
||||
setShareDataInternal: boolean => void,
|
||||
setShareDataThirdParty: boolean => void,
|
||||
history: { replace: string => void },
|
||||
setShareDataInternal: (boolean) => void,
|
||||
setShareDataThirdParty: (boolean) => void,
|
||||
history: { replace: (string) => void },
|
||||
authenticated: boolean,
|
||||
authenticateIfSharingData: () => void,
|
||||
};
|
||||
@@ -88,7 +88,7 @@ function PrivacyAgreement(props: Props) {
|
||||
helper={__(`Sending information to third parties (e.g. Google Analytics or Mixpanel) allows us to use detailed
|
||||
analytical reports to improve all aspects of LBRY.`)}
|
||||
checked={share === FREE}
|
||||
onChange={e => setShare(FREE)}
|
||||
onChange={(e) => setShare(FREE)}
|
||||
/>
|
||||
<FormField
|
||||
name={'shareWithLBRY'}
|
||||
@@ -103,7 +103,7 @@ function PrivacyAgreement(props: Props) {
|
||||
`Sharing information with LBRY, Inc. allows us to report to publishers how their content is doing, as
|
||||
well as track basic usage and performance. This is the minimum required to earn rewards from LBRY, Inc.`
|
||||
)}
|
||||
onChange={e => setShare(LIMITED)}
|
||||
onChange={(e) => setShare(LIMITED)}
|
||||
/>
|
||||
<FormField
|
||||
disabled={authenticated}
|
||||
@@ -118,7 +118,7 @@ function PrivacyAgreement(props: Props) {
|
||||
helper={__(`No information will be sent directly to LBRY, Inc. or third-parties about your usage. Note that as
|
||||
peer-to-peer software, your IP address and potentially other system information can be sent to other
|
||||
users, though this information is not stored permanently.`)}
|
||||
onChange={e => setShare(NONE)}
|
||||
onChange={(e) => setShare(NONE)}
|
||||
/>
|
||||
{authenticated && (
|
||||
<div className="card--inline section--padded">
|
||||
@@ -128,7 +128,7 @@ function PrivacyAgreement(props: Props) {
|
||||
signout_button: <Button button="link" label={__('Sign Out')} onClick={signOut} />,
|
||||
}}
|
||||
>
|
||||
You are signed into lbry.tv which automatically shares data with LBRY inc. %signout_button%.
|
||||
You are signed in and sharing data with your cloud service provider. %signout_button%.
|
||||
</I18nMessage>
|
||||
</p>
|
||||
</div>
|
||||
@@ -153,14 +153,14 @@ function PrivacyAgreement(props: Props) {
|
||||
type="radio"
|
||||
label={'Yes'}
|
||||
checked={agree === true}
|
||||
onChange={e => setAgree(e.target.checked)}
|
||||
onChange={(e) => setAgree(e.target.checked)}
|
||||
/>
|
||||
<FormField
|
||||
name={'disagreeButton'}
|
||||
type="radio"
|
||||
checked={agree === false}
|
||||
label={__('No')}
|
||||
onChange={e => setAgree(!e.target.checked)}
|
||||
onChange={(e) => setAgree(!e.target.checked)}
|
||||
/>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
@@ -23,7 +23,6 @@ import SignInVerifyPage from 'page/signInVerify';
|
||||
import BuyPage from 'page/buy';
|
||||
import ReceivePage from 'page/receive';
|
||||
import SendPage from 'page/send';
|
||||
import SwapPage from 'page/swap';
|
||||
import WalletPage from 'page/wallet';
|
||||
|
||||
// Chunk: none
|
||||
@@ -34,7 +33,6 @@ import ChannelsFollowingDiscoverPage from 'page/channelsFollowingDiscover';
|
||||
|
||||
import ChannelsFollowingPage from 'page/channelsFollowing';
|
||||
import ChannelsPage from 'page/channels';
|
||||
import CheckoutPage from 'page/checkoutPage';
|
||||
import CreatorDashboard from 'page/creatorDashboard';
|
||||
import DiscoverPage from 'page/discover';
|
||||
import FileListPublished from 'page/fileListPublished';
|
||||
@@ -45,6 +43,7 @@ import InvitedPage from 'page/invited';
|
||||
import LibraryPage from 'page/library';
|
||||
import ListBlockedPage from 'page/listBlocked';
|
||||
import ListsPage from 'page/lists';
|
||||
import PlaylistsPage from 'page/playlists';
|
||||
import OwnComments from 'page/ownComments';
|
||||
import PasswordResetPage from 'page/passwordReset';
|
||||
import PasswordSetPage from 'page/passwordSet';
|
||||
@@ -223,9 +222,7 @@ function AppRouter(props: Props) {
|
||||
|
||||
return (
|
||||
<Switch>
|
||||
{/* @if TARGET='app' */}
|
||||
{welcomeVersion < WELCOME_VERSION && <Route path="/*" component={Welcome} />}
|
||||
{/* @endif */}
|
||||
<Redirect
|
||||
from={`/$/${PAGES.DEPRECATED__CHANNELS_FOLLOWING_MANAGE}`}
|
||||
to={`/$/${PAGES.CHANNELS_FOLLOWING_DISCOVER}`}
|
||||
@@ -263,7 +260,6 @@ function AppRouter(props: Props) {
|
||||
<Route path={`/$/${PAGES.TOP}`} exact component={TopPage} />
|
||||
<Route path={`/$/${PAGES.SETTINGS}`} exact component={SettingsPage} />
|
||||
<Route path={`/$/${PAGES.INVITE}/:referrer`} exact component={InvitedPage} />
|
||||
<Route path={`/$/${PAGES.CHECKOUT}`} exact component={CheckoutPage} />
|
||||
<Route path={`/$/${PAGES.REPORT_CONTENT}`} exact component={ReportContentPage} />
|
||||
<Route {...props} path={`/$/${PAGES.LIST}/:collectionId`} component={CollectionPage} />
|
||||
|
||||
@@ -294,6 +290,7 @@ function AppRouter(props: Props) {
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.REWARDS_VERIFY}`} component={RewardsVerifyPage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.LIBRARY}`} component={LibraryPage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.LISTS}`} component={ListsPage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.PLAYLISTS}`} component={PlaylistsPage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.TAGS_FOLLOWING_MANAGE}`} component={TagsFollowingManagePage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.SETTINGS_BLOCKED_MUTED}`} component={ListBlockedPage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.SETTINGS_CREATOR}`} component={SettingsCreatorPage} />
|
||||
@@ -302,7 +299,6 @@ function AppRouter(props: Props) {
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.BUY}`} component={BuyPage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.RECEIVE}`} component={ReceivePage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.SEND}`} component={SendPage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.SWAP}`} component={SwapPage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.NOTIFICATIONS}`} component={NotificationsPage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.AUTH_WALLET_PASSWORD}`} component={SignInWalletPasswordPage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.SETTINGS_OWN_COMMENTS}`} component={OwnComments} />
|
||||
|
||||
@@ -267,7 +267,7 @@ export default function SettingSystem(props: Props) {
|
||||
subtitle={
|
||||
<React.Fragment>
|
||||
{__(
|
||||
`This is information like error logging, performance tracking, and usage statistics. It includes your IP address and basic system details, but no other identifying information (unless you sign in to lbry.tv)`
|
||||
`This is information like error logging, performance tracking, and usage statistics. It includes your IP address and basic system details, but no other identifying information (unless you connect to a cloud service)`
|
||||
)}{' '}
|
||||
<Button button="link" label={__('Learn more')} href="https://lbry.com/privacypolicy" />
|
||||
</React.Fragment>
|
||||
|
||||
@@ -114,7 +114,7 @@ function SettingWalletServer(props: Props) {
|
||||
type="radio"
|
||||
name="default_wallet_servers"
|
||||
checked={!advancedMode}
|
||||
label={__('Use official lbry.tv wallet servers')}
|
||||
label={__('Use official LBRY wallet servers')}
|
||||
onChange={(e) => {
|
||||
if (e.target.checked) {
|
||||
doClear();
|
||||
|
||||
@@ -10,7 +10,7 @@ import Card from 'component/common/card';
|
||||
type Props = {
|
||||
cancelButton: Node,
|
||||
email: string,
|
||||
resendVerificationEmail: string => void,
|
||||
resendVerificationEmail: (string) => void,
|
||||
checkEmailVerified: () => void,
|
||||
user: {
|
||||
has_verified_email: boolean,
|
||||
@@ -35,12 +35,12 @@ function UserEmail(props: Props) {
|
||||
|
||||
return (
|
||||
<Card
|
||||
title={__('lbry.tv Account')}
|
||||
title={__('Cloud Account')}
|
||||
subtitle={
|
||||
isVerified
|
||||
? undefined
|
||||
: __(
|
||||
'Creating a lbry.tv account will allow you to earn rewards, receive content and security updates, and optionally backup your data.'
|
||||
'Connecting with a cloud account will allow you to earn rewards, receive content and security updates, and optionally backup your data.'
|
||||
)
|
||||
}
|
||||
actions={
|
||||
|
||||
@@ -38,8 +38,6 @@ function UserEmailNew(props: Props) {
|
||||
setShareDiagnosticData,
|
||||
clearEmailEntry,
|
||||
emailExists,
|
||||
interestedInYoutubSync,
|
||||
doToggleInterestedInYoutubeSync,
|
||||
} = props;
|
||||
const { share_usage_data: shareUsageData } = daemonSettings;
|
||||
const { push, location } = useHistory();
|
||||
@@ -95,9 +93,7 @@ function UserEmailNew(props: Props) {
|
||||
<div className={classnames('main__sign-up')}>
|
||||
<Card
|
||||
title={__('Cloud Connect')}
|
||||
// @if TARGET='app'
|
||||
subtitle={__('Connect your wallet to Odysee')}
|
||||
// @endif
|
||||
actions={
|
||||
<div className={classnames({ 'card--disabled': DOMAIN === 'lbry.tv' && IS_WEB })}>
|
||||
<Form onSubmit={handleSubmit} className="section">
|
||||
@@ -118,17 +114,6 @@ function UserEmailNew(props: Props) {
|
||||
onChange={(e) => setPassword(e.target.value)}
|
||||
/>
|
||||
|
||||
{/* @if TARGET='web' */}
|
||||
<FormField
|
||||
type="checkbox"
|
||||
name="youtube_sync_checkbox"
|
||||
label={__('Sync my YouTube channel')}
|
||||
checked={interestedInYoutubSync}
|
||||
onChange={() => doToggleInterestedInYoutubeSync()}
|
||||
/>
|
||||
{/* @endif */}
|
||||
|
||||
{/* @if TARGET='app' */}
|
||||
<FormField
|
||||
type="checkbox"
|
||||
name="sync_checkbox"
|
||||
@@ -141,7 +126,6 @@ function UserEmailNew(props: Props) {
|
||||
checked={formSyncEnabled}
|
||||
onChange={() => setFormSyncEnabled(!formSyncEnabled)}
|
||||
/>
|
||||
{/* @endif */}
|
||||
|
||||
{!shareUsageData && !IS_WEB && (
|
||||
<FormField
|
||||
|
||||
@@ -15,6 +15,7 @@ import { addPlayNextButton } from './internal/play-next';
|
||||
import { addPlayPreviousButton } from './internal/play-previous';
|
||||
import { useHistory } from 'react-router';
|
||||
import type { HomepageCat } from 'util/buildHomepage';
|
||||
import debounce from 'util/debounce';
|
||||
import { formatLbryUrlForWeb, generateListSearchUrlParams } from 'util/url';
|
||||
|
||||
const PLAY_TIMEOUT_ERROR = 'play_timeout_error';
|
||||
@@ -111,6 +112,14 @@ function VideoViewer(props: Props) {
|
||||
const [replay, setReplay] = useState(false);
|
||||
const [videoNode, setVideoNode] = useState();
|
||||
|
||||
const updateVolumeState = React.useCallback(
|
||||
debounce((volume, muted) => {
|
||||
changeVolume(volume);
|
||||
changeMute(muted);
|
||||
}, 500),
|
||||
[]
|
||||
);
|
||||
|
||||
// force everything to recent when URI changes, can cause weird corner cases otherwise (e.g. navigate while autoplay is true)
|
||||
useEffect(() => {
|
||||
if (uri && previousUri && uri !== previousUri) {
|
||||
@@ -343,8 +352,7 @@ function VideoViewer(props: Props) {
|
||||
});
|
||||
player.on('volumechange', () => {
|
||||
if (player) {
|
||||
changeVolume(player.volume());
|
||||
changeMute(player.muted());
|
||||
updateVolumeState(player.volume(), player.muted());
|
||||
}
|
||||
});
|
||||
player.on('ratechange', () => {
|
||||
|
||||
@@ -138,19 +138,19 @@ const WalletBalance = (props: Props) => {
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* @if TARGET='app' */}
|
||||
{hasSynced ? (
|
||||
<p className="section help">
|
||||
{__('A backup of your wallet is synced with lbry.tv.')}
|
||||
{__('A backup of your wallet is synced with a cloud service.')}
|
||||
<HelpLink href="https://lbry.com/faq/account-sync" />
|
||||
</p>
|
||||
) : (
|
||||
<p className="help--warning">
|
||||
{__('Your wallet is not currently synced with lbry.tv. You are in control of backing up your wallet.')}
|
||||
<p className="help">
|
||||
{__(
|
||||
'Your wallet is not currently using a cloud sync service. You are in control of backing up your wallet.'
|
||||
)}
|
||||
<HelpLink navigate={`/$/${PAGES.BACKUP}`} />
|
||||
</p>
|
||||
)}
|
||||
{/* @endif */}
|
||||
<div className="section__actions">
|
||||
<Button button="primary" label={__('Buy')} icon={ICONS.BUY} navigate={`/$/${PAGES.BUY}`} />
|
||||
<Button button="secondary" label={__('Receive')} icon={ICONS.RECEIVE} navigate={`/$/${PAGES.RECEIVE}`} />
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
// @flow
|
||||
|
||||
/*
|
||||
This component is not used at this time.
|
||||
*/
|
||||
import React from 'react';
|
||||
import Button from 'component/button';
|
||||
import { FormField, Form } from 'component/common/form';
|
||||
|
||||
@@ -28,7 +28,7 @@ export const FRESH_DEFAULT = 'default';
|
||||
export const FRESH_TYPES = [FRESH_DEFAULT, FRESH_DAY, FRESH_WEEK, FRESH_MONTH, FRESH_YEAR, FRESH_ALL];
|
||||
|
||||
export const ORDER_BY_TRENDING = 'trending';
|
||||
export const ORDER_BY_TRENDING_VALUE = ['trending_group', 'trending_mixed'];
|
||||
export const ORDER_BY_TRENDING_VALUE = ['trending_score']; // was ['trending_group', 'trending_mixed'] - deprecated
|
||||
export const ORDER_BY_TOP = 'top';
|
||||
export const ORDER_BY_TOP_VALUE = ['effective_amount'];
|
||||
export const ORDER_BY_NEW = 'new';
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
export const ALREADY_CLAIMED = 'once the invite reward has been claimed the referrer cannot be changed';
|
||||
export const REFERRER_NOT_FOUND = 'A lbry.tv account could not be found for the referrer you provided.';
|
||||
export const REFERRER_NOT_FOUND = 'A LBRY account could not be found for the referrer you provided.';
|
||||
@@ -65,7 +65,9 @@ export const OPTIONS = 'Sliders';
|
||||
export const YES = 'ThumbsUp';
|
||||
export const NO = 'ThumbsDown';
|
||||
export const UP = 'ChevronUp';
|
||||
export const UP_TOP = 'ChevronUpTop';
|
||||
export const DOWN = 'ChevronDown';
|
||||
export const DOWN_BOTTOM = 'ChevronDownBottom';
|
||||
export const SECURE = 'Lock';
|
||||
export const MENU = 'Menu';
|
||||
export const BACKUP = 'Database';
|
||||
|
||||
@@ -27,6 +27,7 @@ exports.HOME = 'home';
|
||||
exports.HELP = 'help';
|
||||
exports.LIBRARY = 'library';
|
||||
exports.LISTS = 'lists';
|
||||
exports.PLAYLISTS = 'playlists';
|
||||
exports.INVITE = 'invite';
|
||||
exports.DEPRECATED__PUBLISH = 'publish';
|
||||
exports.DEPRECATED__PUBLISHED = 'published';
|
||||
|
||||
+21
-1
@@ -11,7 +11,14 @@ import * as MODALS from 'constants/modal_types';
|
||||
import React, { Fragment, useState, useEffect } from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import { Provider } from 'react-redux';
|
||||
import { doDaemonReady, doAutoUpdate, doOpenModal, doHideModal, doToggle3PAnalytics } from 'redux/actions/app';
|
||||
import {
|
||||
doDaemonReady,
|
||||
doAutoUpdate,
|
||||
doOpenModal,
|
||||
doHideModal,
|
||||
doToggle3PAnalytics,
|
||||
doUpdateDownloadProgress,
|
||||
} from 'redux/actions/app';
|
||||
import { isURIValid } from 'util/lbryURI';
|
||||
import { setSearchApi } from 'redux/actions/search';
|
||||
import { doSetLanguage, doFetchLanguage, doUpdateIsNightAsync } from 'redux/actions/settings';
|
||||
@@ -107,6 +114,19 @@ ipcRenderer.on('open-uri-requested', (event, url, newSession) => {
|
||||
handleError();
|
||||
});
|
||||
|
||||
ipcRenderer.on('download-progress-update', (e, p) => {
|
||||
app.store.dispatch(doUpdateDownloadProgress(Math.round(p.percent * 100)));
|
||||
});
|
||||
|
||||
ipcRenderer.on('download-update-complete', (e, c) => {
|
||||
app.store.dispatch({
|
||||
type: ACTIONS.UPGRADE_DOWNLOAD_COMPLETED,
|
||||
data: {
|
||||
path: c.path,
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
ipcRenderer.on('language-set', (event, language) => {
|
||||
app.store.dispatch(doSetLanguage(language));
|
||||
});
|
||||
|
||||
@@ -66,7 +66,7 @@ class ModalSetReferrer extends React.PureComponent<Props, State> {
|
||||
title={__('Enter inviter')}
|
||||
subtitle={
|
||||
<React.Fragment>
|
||||
{__('Did someone invite you to use lbry.tv? Tell us who and you both get a reward!')}
|
||||
{__('Did someone invite you to use LBRY? Tell us who and you both get a reward!')}
|
||||
<HelpLink href="https://lbry.com/faq/referrals" />
|
||||
</React.Fragment>
|
||||
}
|
||||
|
||||
+88
-119
@@ -1,5 +1,4 @@
|
||||
// @flow
|
||||
import * as ICONS from 'constants/icons';
|
||||
import React from 'react';
|
||||
import Page from 'component/page';
|
||||
import Card from 'component/common/card';
|
||||
@@ -14,8 +13,6 @@ import Button from 'component/button';
|
||||
import Nag from 'component/common/nag';
|
||||
import I18nMessage from 'component/i18nMessage';
|
||||
import LbcSymbol from 'component/common/lbc-symbol';
|
||||
import classnames from 'classnames';
|
||||
import WalletSwap from 'component/walletSwap';
|
||||
|
||||
const MOONPAY_KEY = process.env.MOONPAY_SECRET_KEY;
|
||||
const COUNTRIES = Array.from(
|
||||
@@ -37,11 +34,6 @@ const COUNTRIES = Array.from(
|
||||
)
|
||||
);
|
||||
|
||||
const TAB = {
|
||||
BUY: 'BUY',
|
||||
SWAP: 'SWAP',
|
||||
};
|
||||
|
||||
type Props = {
|
||||
receiveAddress: ?string,
|
||||
gettingNewAddress: boolean,
|
||||
@@ -54,7 +46,6 @@ type Props = {
|
||||
export default function BuyPage(props: Props) {
|
||||
const { receiveAddress, gettingNewAddress, doGetNewAddress, email, user, doUserSetCountry } = props;
|
||||
const initialCountry = (user && user.country) || '';
|
||||
const [tab, setTab] = React.useState(TAB.BUY);
|
||||
const [url, setUrl] = React.useState();
|
||||
const [country, setCountry] = React.useState(initialCountry);
|
||||
const [showPurchaseScreen, setShowPurchaseScreen] = React.useState(false);
|
||||
@@ -107,121 +98,99 @@ export default function BuyPage(props: Props) {
|
||||
className="main--swap"
|
||||
backout={{
|
||||
backoutLabel: __('Done'),
|
||||
title: <LbcSymbol prefix={__('Buy or Swap')} size={28} />,
|
||||
title: <LbcSymbol prefix={__('Buy')} size={28} />,
|
||||
}}
|
||||
>
|
||||
<div className="section">
|
||||
<Button
|
||||
key="tip"
|
||||
icon={ICONS.BUY}
|
||||
label={__('Buy')}
|
||||
button="alt"
|
||||
onClick={() => setTab(TAB.BUY)}
|
||||
className={classnames('button-toggle', { 'button-toggle--active': tab === TAB.BUY })}
|
||||
/>
|
||||
<Button
|
||||
key="boost"
|
||||
icon={ICONS.COIN_SWAP}
|
||||
label={__('Swap')}
|
||||
button="alt"
|
||||
onClick={() => setTab(TAB.SWAP)}
|
||||
className={classnames('button-toggle', { 'button-toggle--active': tab === TAB.SWAP })}
|
||||
/>
|
||||
</div>
|
||||
<div className="section">
|
||||
{tab === TAB.SWAP && <WalletSwap />}
|
||||
{tab === TAB.BUY && (
|
||||
<>
|
||||
{!user && (
|
||||
<div className="main--empty">
|
||||
<Spinner delayed />
|
||||
</div>
|
||||
)}
|
||||
<>
|
||||
{!user && (
|
||||
<div className="main--empty">
|
||||
<Spinner delayed />
|
||||
</div>
|
||||
)}
|
||||
|
||||
{user && (
|
||||
<>
|
||||
{showPurchaseScreen ? (
|
||||
<Card
|
||||
title={title}
|
||||
subtitle={subtitle}
|
||||
actions={
|
||||
url ? (
|
||||
<iframe
|
||||
allow="accelerometer; autoplay; camera; gyroscope; payment"
|
||||
frameBorder="0"
|
||||
src={url}
|
||||
width="100%"
|
||||
>
|
||||
<p>{__('Your browser does not support iframes.')}</p>
|
||||
</iframe>
|
||||
) : (
|
||||
<div className="main--empty">
|
||||
<Spinner delayed />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
/>
|
||||
) : (
|
||||
<Card
|
||||
title={title}
|
||||
subtitle={subtitle}
|
||||
nag={
|
||||
country &&
|
||||
!isValid && <Nag relative type="helpful" message={"This country isn't supported yet."} />
|
||||
}
|
||||
actions={
|
||||
<div>
|
||||
<div className="section">
|
||||
<FormField
|
||||
label={__('Country')}
|
||||
type="select"
|
||||
name="country-codes"
|
||||
helper={__(
|
||||
'Only some countries are eligible at this time. We are working to make this available to everyone.'
|
||||
)}
|
||||
value={country}
|
||||
onChange={(e) => setCountry(e.target.value)}
|
||||
>
|
||||
<option value="" disabled defaultValue>
|
||||
{__('Select your country')}
|
||||
</option>
|
||||
{COUNTRIES.map((country, index) => (
|
||||
<option key={country} value={country}>
|
||||
{country}
|
||||
</option>
|
||||
))}
|
||||
</FormField>
|
||||
</div>
|
||||
{country && (
|
||||
<div className="section">
|
||||
{isValid ? (
|
||||
<div className="section__actions">
|
||||
<Button
|
||||
button="primary"
|
||||
label={__('Continue')}
|
||||
onClick={() => setShowPurchaseScreen(true)}
|
||||
/>
|
||||
</div>
|
||||
) : (
|
||||
<div className="section__actions">
|
||||
<Button button="alt" label={__('Go Back')} onClick={() => goBack()} />
|
||||
<Button
|
||||
button="link"
|
||||
label={__('Try Anyway')}
|
||||
onClick={() => setShowPurchaseScreen(true)}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
{user && (
|
||||
<>
|
||||
{showPurchaseScreen ? (
|
||||
<Card
|
||||
title={title}
|
||||
subtitle={subtitle}
|
||||
actions={
|
||||
url ? (
|
||||
<iframe
|
||||
allow="accelerometer; autoplay; camera; gyroscope; payment"
|
||||
frameBorder="0"
|
||||
src={url}
|
||||
width="100%"
|
||||
>
|
||||
<p>{__('Your browser does not support iframes.')}</p>
|
||||
</iframe>
|
||||
) : (
|
||||
<div className="main--empty">
|
||||
<Spinner delayed />
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
)
|
||||
}
|
||||
/>
|
||||
) : (
|
||||
<Card
|
||||
title={title}
|
||||
subtitle={subtitle}
|
||||
nag={
|
||||
country && !isValid && <Nag relative type="helpful" message={"This country isn't supported yet."} />
|
||||
}
|
||||
actions={
|
||||
<div>
|
||||
<div className="section">
|
||||
<FormField
|
||||
label={__('Country')}
|
||||
type="select"
|
||||
name="country-codes"
|
||||
helper={__(
|
||||
'Only some countries are eligible at this time. We are working to make this available to everyone.'
|
||||
)}
|
||||
value={country}
|
||||
onChange={(e) => setCountry(e.target.value)}
|
||||
>
|
||||
<option value="" disabled defaultValue>
|
||||
{__('Select your country')}
|
||||
</option>
|
||||
{COUNTRIES.map((country, index) => (
|
||||
<option key={country} value={country}>
|
||||
{country}
|
||||
</option>
|
||||
))}
|
||||
</FormField>
|
||||
</div>
|
||||
{country && (
|
||||
<div className="section">
|
||||
{isValid ? (
|
||||
<div className="section__actions">
|
||||
<Button
|
||||
button="primary"
|
||||
label={__('Continue')}
|
||||
onClick={() => setShowPurchaseScreen(true)}
|
||||
/>
|
||||
</div>
|
||||
) : (
|
||||
<div className="section__actions">
|
||||
<Button button="alt" label={__('Go Back')} onClick={() => goBack()} />
|
||||
<Button
|
||||
button="link"
|
||||
label={__('Try Anyway')}
|
||||
onClick={() => setShowPurchaseScreen(true)}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
</div>
|
||||
</Page>
|
||||
);
|
||||
|
||||
@@ -49,7 +49,7 @@ function ChannelsFollowingDiscover(props: Props) {
|
||||
options: {
|
||||
pageSize: 12,
|
||||
claimType: 'channel',
|
||||
orderBy: ['effective_amount'],
|
||||
orderBy: CS.ORDER_BY_TOP_VALUE,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -59,7 +59,7 @@ function ChannelsFollowingDiscover(props: Props) {
|
||||
options: {
|
||||
pageSize: 8,
|
||||
claimType: 'channel',
|
||||
orderBy: ['trending_group', 'trending_mixed'],
|
||||
orderBy: CS.ORDER_BY_TRENDING_VALUE,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 29 KiB |
@@ -1,2 +0,0 @@
|
||||
import CheckoutPage from './view';
|
||||
export default CheckoutPage;
|
||||
@@ -1,32 +0,0 @@
|
||||
// @flow
|
||||
import * as React from 'react';
|
||||
import Page from 'component/page';
|
||||
import Button from 'component/button';
|
||||
import Card from 'component/common/card';
|
||||
import CreditCards from './credit-card-logos.png';
|
||||
|
||||
export default function CheckoutPage() {
|
||||
return (
|
||||
<Page authPage>
|
||||
<Card
|
||||
title={__('Checkout')}
|
||||
subtitle={__('Your cart contains 1 item.')}
|
||||
body={
|
||||
<div className="card--inline card--section card--highlighted">
|
||||
<strong>{__('lbry.tv Premium - 1 month')}</strong>
|
||||
<div>$5 per month</div>
|
||||
</div>
|
||||
}
|
||||
actions={
|
||||
<div className="section__actions">
|
||||
<Button button="primary" label={__('Checkout')} />
|
||||
<div>
|
||||
<img src={CreditCards} style={{ height: '1.5rem' }} />
|
||||
</div>
|
||||
<div className="help">We will refund no questions asked within 30 days.</div>
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
@@ -62,6 +62,7 @@ export default function CollectionPage(props: Props) {
|
||||
|
||||
const [didTryResolve, setDidTryResolve] = React.useState(false);
|
||||
const [showInfo, setShowInfo] = React.useState(false);
|
||||
const [showEdit, setShowEdit] = React.useState(false);
|
||||
const { name, totalItems } = collection || {};
|
||||
const isBuiltin = COLLECTIONS_CONSTS.BUILTIN_LISTS.includes(collectionId);
|
||||
|
||||
@@ -133,6 +134,8 @@ export default function CollectionPage(props: Props) {
|
||||
showInfo={showInfo}
|
||||
isBuiltin={isBuiltin}
|
||||
collectionUrls={collectionUrls}
|
||||
setShowEdit={setShowEdit}
|
||||
showEdit={showEdit}
|
||||
/>
|
||||
}
|
||||
actions={
|
||||
@@ -188,7 +191,7 @@ export default function CollectionPage(props: Props) {
|
||||
<Page>
|
||||
<div className={classnames('section card-stack')}>
|
||||
{info}
|
||||
<ClaimList uris={collectionUrls} collectionId={collectionId} />
|
||||
<ClaimList uris={collectionUrls} collectionId={collectionId} type={showEdit ? 'listview' : undefined} />
|
||||
</div>
|
||||
</Page>
|
||||
);
|
||||
|
||||
@@ -13,7 +13,7 @@ import InvitePage from './view';
|
||||
const select = (state) => ({
|
||||
isFailed: selectUserInviteStatusFailed(state),
|
||||
isPending: selectUserInviteStatusIsPending(state),
|
||||
inviteAcknowledged: makeSelectClientSetting(state)(SETTINGS.INVITE_ACKNOWLEDGED),
|
||||
inviteAcknowledged: makeSelectClientSetting(SETTINGS.INVITE_ACKNOWLEDGED)(state),
|
||||
authenticated: selectUserVerifiedEmail(state),
|
||||
});
|
||||
|
||||
|
||||
+1
-29
@@ -1,31 +1,3 @@
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { doPurchaseList } from 'redux/actions/claims';
|
||||
import { selectMyPurchases, selectIsFetchingMyPurchases } from 'redux/selectors/claims';
|
||||
import { selectDownloadUrlsCount, selectIsFetchingFileList } from 'redux/selectors/file_info';
|
||||
|
||||
import {
|
||||
selectBuiltinCollections,
|
||||
selectMyPublishedMixedCollections,
|
||||
selectMyPublishedPlaylistCollections,
|
||||
selectMyUnpublishedCollections, // should probably distinguish types
|
||||
// selectSavedCollections, // TODO: implement saving and copying collections
|
||||
} from 'redux/selectors/collections';
|
||||
|
||||
import ListsPage from './view';
|
||||
|
||||
const select = (state) => ({
|
||||
allDownloadedUrlsCount: selectDownloadUrlsCount(state),
|
||||
fetchingFileList: selectIsFetchingFileList(state),
|
||||
myPurchases: selectMyPurchases(state),
|
||||
fetchingMyPurchases: selectIsFetchingMyPurchases(state),
|
||||
builtinCollections: selectBuiltinCollections(state),
|
||||
publishedCollections: selectMyPublishedMixedCollections(state),
|
||||
publishedPlaylists: selectMyPublishedPlaylistCollections(state),
|
||||
unpublishedCollections: selectMyUnpublishedCollections(state),
|
||||
// savedCollections: selectSavedCollections(state),
|
||||
});
|
||||
|
||||
export default connect(select, {
|
||||
doPurchaseList,
|
||||
})(ListsPage);
|
||||
export default ListsPage;
|
||||
@@ -3,7 +3,7 @@ import { doCommentListOwn, doCommentReset } from 'redux/actions/comments';
|
||||
import { selectActiveChannelClaim } from 'redux/selectors/app';
|
||||
import {
|
||||
selectIsFetchingComments,
|
||||
makeSelectCommentsForUri,
|
||||
selectCommentsForUri,
|
||||
makeSelectTotalCommentsCountForUri,
|
||||
makeSelectTopLevelTotalPagesForUri,
|
||||
} from 'redux/selectors/comments';
|
||||
@@ -17,7 +17,7 @@ const select = (state) => {
|
||||
|
||||
return {
|
||||
activeChannelClaim,
|
||||
allComments: makeSelectCommentsForUri(uri)(state),
|
||||
allComments: selectCommentsForUri(state, uri),
|
||||
totalComments: makeSelectTotalCommentsCountForUri(uri)(state),
|
||||
topLevelTotalPages: makeSelectTopLevelTotalPagesForUri(uri)(state),
|
||||
isFetchingComments: selectIsFetchingComments(state),
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
import PlaylistsPage from './view';
|
||||
|
||||
export default PlaylistsPage;
|
||||
@@ -0,0 +1,22 @@
|
||||
// @flow
|
||||
import * as ICONS from 'constants/icons';
|
||||
import React from 'react';
|
||||
import Page from 'component/page';
|
||||
import PlaylistsMine from 'component/playlistsMine';
|
||||
import Icon from 'component/common/icon';
|
||||
|
||||
function PlaylistsPage() {
|
||||
return (
|
||||
<Page>
|
||||
<label className="claim-list__header-label">
|
||||
<span>
|
||||
<Icon icon={ICONS.STACK} size={10} />
|
||||
{__('Playlists')}
|
||||
</span>
|
||||
</label>
|
||||
<PlaylistsMine />
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default PlaylistsPage;
|
||||
@@ -1,6 +0,0 @@
|
||||
import { connect } from 'react-redux';
|
||||
import SwapPage from './view';
|
||||
|
||||
const select = (state) => ({});
|
||||
|
||||
export default connect(select, null)(SwapPage);
|
||||
@@ -1,21 +0,0 @@
|
||||
// @flow
|
||||
import React from 'react';
|
||||
import Page from 'component/page';
|
||||
import WalletSwap from 'component/walletSwap';
|
||||
|
||||
type Props = {};
|
||||
|
||||
export default function SwapPage(props: Props) {
|
||||
return (
|
||||
<Page
|
||||
noSideNavigation
|
||||
className="main--swap"
|
||||
backout={{
|
||||
backoutLabel: __('Done'),
|
||||
title: __('Swap Crypto'),
|
||||
}}
|
||||
>
|
||||
<WalletSwap />
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
@@ -3,6 +3,7 @@ import React from 'react';
|
||||
import { useHistory } from 'react-router';
|
||||
import TxoList from 'component/txoList';
|
||||
import Page from 'component/page';
|
||||
import WalletBalance from 'component/walletBalance';
|
||||
import Spinner from 'component/spinner';
|
||||
import YrblWalletEmpty from 'component/yrblWalletEmpty';
|
||||
|
||||
@@ -34,6 +35,7 @@ const WalletPage = (props: Props) => {
|
||||
<YrblWalletEmpty includeWalletLink />
|
||||
) : (
|
||||
<div className="card-stack">
|
||||
<WalletBalance />
|
||||
<TxoList search={search} />
|
||||
</div>
|
||||
)}
|
||||
|
||||
+4
-39
@@ -1,9 +1,6 @@
|
||||
// @if TARGET='app'
|
||||
import { execSync } from 'child_process';
|
||||
import isDev from 'electron-is-dev';
|
||||
import { ipcRenderer, remote } from 'electron';
|
||||
// @endif
|
||||
import path from 'path';
|
||||
import * as ACTIONS from 'constants/action_types';
|
||||
import * as MODALS from 'constants/modal_types';
|
||||
import * as SETTINGS from 'constants/settings';
|
||||
@@ -33,7 +30,6 @@ import {
|
||||
selectUpdateUrl,
|
||||
selectUpgradeDownloadItem,
|
||||
selectUpgradeDownloadPath,
|
||||
selectUpgradeFilename,
|
||||
selectAutoUpdateDeclined,
|
||||
selectRemoteVersion,
|
||||
selectUpgradeTimer,
|
||||
@@ -50,12 +46,6 @@ import { doSignOutCleanup } from 'util/saved-passwords';
|
||||
import { doNotificationSocketConnect } from 'redux/actions/websocket';
|
||||
import { stringifyServerParam, shouldSetSetting } from 'util/sync-settings';
|
||||
|
||||
// @if TARGET='app'
|
||||
const { autoUpdater } = remote.require('electron-updater');
|
||||
const { download } = remote.require('electron-dl');
|
||||
const Fs = remote.require('fs');
|
||||
// @endif
|
||||
|
||||
const CHECK_UPGRADE_INTERVAL = 10 * 60 * 1000;
|
||||
|
||||
export function doOpenModal(id, modalProps = {}) {
|
||||
@@ -100,38 +90,14 @@ export function doStartUpgrade() {
|
||||
|
||||
export function doDownloadUpgrade() {
|
||||
return (dispatch, getState) => {
|
||||
// @if TARGET='app'
|
||||
const state = getState();
|
||||
// Make a new directory within temp directory so the filename is guaranteed to be available
|
||||
const dir = Fs.mkdtempSync(remote.app.getPath('temp') + path.sep);
|
||||
const upgradeFilename = selectUpgradeFilename(state);
|
||||
|
||||
const options = {
|
||||
onProgress: (p) => dispatch(doUpdateDownloadProgress(Math.round(p * 100))),
|
||||
directory: dir,
|
||||
};
|
||||
download(remote.getCurrentWindow(), selectUpdateUrl(state), options).then((downloadItem) => {
|
||||
/**
|
||||
* TODO: get the download path directly from the download object. It should just be
|
||||
* downloadItem.getSavePath(), but the copy on the main process is being garbage collected
|
||||
* too soon.
|
||||
*/
|
||||
|
||||
dispatch({
|
||||
type: ACTIONS.UPGRADE_DOWNLOAD_COMPLETED,
|
||||
data: {
|
||||
downloadItem,
|
||||
path: path.join(dir, upgradeFilename),
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
const url = selectUpdateUrl(state);
|
||||
ipcRenderer.send('download-upgrade', { url, options: {} });
|
||||
dispatch({
|
||||
type: ACTIONS.UPGRADE_DOWNLOAD_STARTED,
|
||||
});
|
||||
dispatch(doHideModal());
|
||||
dispatch(doOpenModal(MODALS.DOWNLOADING));
|
||||
// @endif
|
||||
};
|
||||
}
|
||||
|
||||
@@ -222,7 +188,7 @@ export function doCheckUpgradeAvailable() {
|
||||
const autoUpdateDeclined = selectAutoUpdateDeclined(state);
|
||||
|
||||
if (!autoUpdateDeclined && !isDev) {
|
||||
autoUpdater.checkForUpdates();
|
||||
ipcRenderer.send('check-for-updates');
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -666,9 +632,8 @@ export function doGetAndPopulatePreferences() {
|
||||
export function doHandleSyncComplete(error, hasNewData) {
|
||||
return (dispatch) => {
|
||||
if (!error) {
|
||||
dispatch(doGetAndPopulatePreferences());
|
||||
|
||||
if (hasNewData) {
|
||||
dispatch(doGetAndPopulatePreferences());
|
||||
// we just got sync data, better update our channels
|
||||
dispatch(doFetchChannelListMine());
|
||||
}
|
||||
|
||||
@@ -9,8 +9,8 @@ import { selectClaimsByUri, selectMyChannelClaims } from 'redux/selectors/claims
|
||||
import { doClaimSearch } from 'redux/actions/claims';
|
||||
import { doToast, doSeeNotifications } from 'redux/actions/notifications';
|
||||
import {
|
||||
makeSelectMyReactionsForComment,
|
||||
makeSelectOthersReactionsForComment,
|
||||
selectMyReactsForComment,
|
||||
selectOthersReactsForComment,
|
||||
selectPendingCommentReacts,
|
||||
selectModerationBlockList,
|
||||
selectModerationDelegatorsById,
|
||||
@@ -466,8 +466,8 @@ export function doCommentReact(commentId: string, type: string) {
|
||||
}
|
||||
|
||||
const reactKey = `${commentId}:${activeChannelClaim.claim_id}`;
|
||||
const myReacts = makeSelectMyReactionsForComment(reactKey)(state);
|
||||
const othersReacts = makeSelectOthersReactionsForComment(reactKey)(state);
|
||||
const myReacts = selectMyReactsForComment(state, reactKey) || [];
|
||||
const othersReacts = selectOthersReactsForComment(state, reactKey) || {};
|
||||
|
||||
const signatureData = await channelSignName(activeChannelClaim.claim_id, activeChannelClaim.name);
|
||||
if (!signatureData) {
|
||||
|
||||
@@ -4,7 +4,12 @@ import * as SETTINGS from 'constants/settings';
|
||||
import { Lbryio } from 'lbryinc';
|
||||
import Lbry from 'lbry';
|
||||
import { doWalletEncrypt, doWalletDecrypt } from 'redux/actions/wallet';
|
||||
import { selectGetSyncIsPending, selectSetSyncIsPending, selectSyncIsLocked } from 'redux/selectors/sync';
|
||||
import {
|
||||
selectSyncHash,
|
||||
selectGetSyncIsPending,
|
||||
selectSetSyncIsPending,
|
||||
selectSyncIsLocked,
|
||||
} from 'redux/selectors/sync';
|
||||
import { makeSelectClientSetting } from 'redux/selectors/settings';
|
||||
import { getSavedPassword } from 'util/saved-passwords';
|
||||
import { doAnalyticsTagSync, doHandleSyncComplete } from 'redux/actions/app';
|
||||
@@ -154,7 +159,9 @@ export function doGetSync(passedPassword?: string, callback?: (any, ?boolean) =>
|
||||
}
|
||||
}
|
||||
|
||||
return (dispatch: Dispatch) => {
|
||||
return (dispatch: Dispatch, getState: GetState) => {
|
||||
const state = getState();
|
||||
const localHash = selectSyncHash(state);
|
||||
dispatch({
|
||||
type: ACTIONS.GET_SYNC_STARTED,
|
||||
});
|
||||
@@ -182,7 +189,7 @@ export function doGetSync(passedPassword?: string, callback?: (any, ?boolean) =>
|
||||
const syncHash = response.hash;
|
||||
data.syncHash = syncHash;
|
||||
data.syncData = response.data;
|
||||
data.changed = response.changed;
|
||||
data.changed = response.changed || syncHash !== localHash;
|
||||
data.hasSyncedWallet = true;
|
||||
|
||||
if (response.changed) {
|
||||
|
||||
@@ -534,6 +534,7 @@ reducers[ACTIONS.ABANDON_CLAIM_SUCCEEDED] = (state: State, action: any): State =
|
||||
const newMyClaims = state.myClaims ? state.myClaims.slice() : [];
|
||||
const newMyChannelClaims = state.myChannelClaims ? state.myChannelClaims.slice() : [];
|
||||
const claimsByUri = Object.assign({}, state.claimsByUri);
|
||||
const abandoningById = Object.assign({}, state.abandoningById);
|
||||
const newMyCollectionClaims = state.myCollectionClaims ? state.myCollectionClaims.slice() : [];
|
||||
|
||||
Object.keys(claimsByUri).forEach((uri) => {
|
||||
@@ -541,6 +542,11 @@ reducers[ACTIONS.ABANDON_CLAIM_SUCCEEDED] = (state: State, action: any): State =
|
||||
delete claimsByUri[uri];
|
||||
}
|
||||
});
|
||||
|
||||
if (abandoningById[claimId]) {
|
||||
delete abandoningById[claimId];
|
||||
}
|
||||
|
||||
const myClaims = newMyClaims.filter((i) => i !== claimId);
|
||||
const myChannelClaims = newMyChannelClaims.filter((i) => i !== claimId);
|
||||
const myCollectionClaims = newMyCollectionClaims.filter((i) => i !== claimId);
|
||||
@@ -553,6 +559,7 @@ reducers[ACTIONS.ABANDON_CLAIM_SUCCEEDED] = (state: State, action: any): State =
|
||||
myCollectionClaims,
|
||||
byId,
|
||||
claimsByUri,
|
||||
abandoningById,
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -65,11 +65,22 @@ export default handleActions(
|
||||
[ACTIONS.USER_STATE_POPULATE]: (state: TagState, action: { data: { tags: ?Array<string> } }) => {
|
||||
const { tags } = action.data;
|
||||
if (Array.isArray(tags)) {
|
||||
const next = tags && tags.filter((tag) => typeof tag === 'string');
|
||||
const prev = state.followedTags;
|
||||
|
||||
if (next && prev && prev.length === next.length && prev.every((value, index) => value === next[index])) {
|
||||
// No changes
|
||||
return state;
|
||||
}
|
||||
|
||||
// New state
|
||||
return {
|
||||
...state,
|
||||
followedTags: tags,
|
||||
followedTags: next || [],
|
||||
};
|
||||
}
|
||||
|
||||
// Purge 'followedTags'
|
||||
return {
|
||||
...state,
|
||||
};
|
||||
|
||||
@@ -2,20 +2,22 @@
|
||||
import { normalizeURI, parseURI, isURIValid } from 'util/lbryURI';
|
||||
import { selectSupportsByOutpoint } from 'redux/selectors/wallet';
|
||||
import { createSelector } from 'reselect';
|
||||
import { createCachedSelector } from 're-reselect';
|
||||
import { isClaimNsfw, filterClaims } from 'util/claim';
|
||||
import * as CLAIM from 'constants/claim';
|
||||
|
||||
type State = { claims: any };
|
||||
|
||||
const selectState = (state) => state.claims || {};
|
||||
|
||||
export const selectById = createSelector(selectState, (state) => state.byId || {});
|
||||
|
||||
export const selectPendingClaimsById = createSelector(selectState, (state) => state.pendingById || {});
|
||||
export const selectById = (state: State) => selectState(state).byId || {};
|
||||
export const selectPendingClaimsById = (state: State) => selectState(state).pendingById || {};
|
||||
|
||||
export const selectClaimsById = createSelector(selectById, selectPendingClaimsById, (byId, pendingById) => {
|
||||
return Object.assign(byId, pendingById); // do I need merged to keep metadata?
|
||||
});
|
||||
|
||||
export const selectClaimIdsByUri = createSelector(selectState, (state) => state.claimsByUri || {});
|
||||
export const selectClaimIdsByUri = (state: State) => selectState(state).claimsByUri || {};
|
||||
|
||||
export const selectCurrentChannelPage = createSelector(selectState, (state) => state.currentChannelPage || 1);
|
||||
|
||||
@@ -74,6 +76,43 @@ export const selectReflectingById = createSelector(selectState, (state) => state
|
||||
|
||||
export const makeSelectClaimForClaimId = (claimId: string) => createSelector(selectClaimsById, (byId) => byId[claimId]);
|
||||
|
||||
export const selectClaimForUri = createCachedSelector(
|
||||
selectClaimIdsByUri,
|
||||
selectClaimsById,
|
||||
(state, uri) => uri,
|
||||
(state, uri, returnRepost = true) => returnRepost,
|
||||
(byUri, byId, uri, returnRepost) => {
|
||||
const validUri = isURIValid(uri);
|
||||
|
||||
if (validUri && byUri) {
|
||||
const claimId = uri && byUri[normalizeURI(uri)];
|
||||
const claim = byId[claimId];
|
||||
|
||||
// Make sure to return the claim as is so apps can check if it's been resolved before (null) or still needs to be resolved (undefined)
|
||||
if (claimId === null) {
|
||||
return null;
|
||||
} else if (claimId === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const repostedClaim = claim && claim.reposted_claim;
|
||||
if (repostedClaim && returnRepost) {
|
||||
const channelUrl =
|
||||
claim.signing_channel && (claim.signing_channel.canonical_url || claim.signing_channel.permanent_url);
|
||||
|
||||
return {
|
||||
...repostedClaim,
|
||||
repost_url: normalizeURI(uri),
|
||||
repost_channel_url: channelUrl,
|
||||
repost_bid_amount: claim && claim.meta && claim.meta.effective_amount,
|
||||
};
|
||||
} else {
|
||||
return claim;
|
||||
}
|
||||
}
|
||||
}
|
||||
)((state, uri, returnRepost = true) => `${uri}:${returnRepost ? '1' : '0'}`);
|
||||
|
||||
export const makeSelectClaimForUri = (uri: string, returnRepost: boolean = true) =>
|
||||
createSelector(selectClaimIdsByUri, selectClaimsById, (byUri, byId) => {
|
||||
const validUri = isURIValid(uri);
|
||||
@@ -137,10 +176,7 @@ export const selectMyActiveClaims = createSelector(
|
||||
selectMyClaimsRaw,
|
||||
selectAbandoningIds,
|
||||
(claims, abandoningIds) =>
|
||||
new Set(
|
||||
claims &&
|
||||
claims.map((claim) => claim.claim_id).filter((claimId) => Object.keys(abandoningIds).indexOf(claimId) === -1)
|
||||
)
|
||||
new Set(claims && claims.map((claim) => claim.claim_id).filter((claimId) => !abandoningIds.includes(claimId)))
|
||||
);
|
||||
|
||||
export const makeSelectClaimIsMine = (rawUri: string) => {
|
||||
@@ -231,6 +267,11 @@ export const makeSelectTotalPagesInChannelSearch = (uri: string) =>
|
||||
return byChannel['pageCount'];
|
||||
});
|
||||
|
||||
export const selectMetadataForUri = createCachedSelector(selectClaimForUri, (claim, uri) => {
|
||||
const metadata = claim && claim.value;
|
||||
return metadata || (claim === undefined ? undefined : null);
|
||||
})((state, uri) => uri);
|
||||
|
||||
export const makeSelectMetadataForUri = (uri: string) =>
|
||||
createSelector(makeSelectClaimForUri(uri), (claim) => {
|
||||
const metadata = claim && claim.value;
|
||||
@@ -245,8 +286,9 @@ export const makeSelectMetadataItemForUri = (uri: string, key: string) =>
|
||||
export const makeSelectTitleForUri = (uri: string) =>
|
||||
createSelector(makeSelectMetadataForUri(uri), (metadata) => metadata && metadata.title);
|
||||
|
||||
export const makeSelectDateForUri = (uri: string) =>
|
||||
createSelector(makeSelectClaimForUri(uri), (claim) => {
|
||||
export const selectDateForUri = createCachedSelector(
|
||||
selectClaimForUri, // input: (state, uri, ?returnRepost)
|
||||
(claim) => {
|
||||
const timestamp =
|
||||
claim &&
|
||||
claim.value &&
|
||||
@@ -260,7 +302,8 @@ export const makeSelectDateForUri = (uri: string) =>
|
||||
}
|
||||
const dateObj = new Date(timestamp);
|
||||
return dateObj;
|
||||
});
|
||||
}
|
||||
)((state, uri) => uri);
|
||||
|
||||
export const makeSelectAmountForUri = (uri: string) =>
|
||||
createSelector(makeSelectClaimForUri(uri), (claim) => {
|
||||
@@ -496,6 +539,10 @@ export const makeSelectMyChannelPermUrlForName = (name: string) =>
|
||||
return matchingClaim ? matchingClaim.permanent_url : null;
|
||||
});
|
||||
|
||||
export const selectTagsForUri = createCachedSelector(selectMetadataForUri, (metadata: ?GenericMetadata) => {
|
||||
return (metadata && metadata.tags) || [];
|
||||
})((state, uri) => uri);
|
||||
|
||||
export const makeSelectTagsForUri = (uri: string) =>
|
||||
createSelector(makeSelectMetadataForUri(uri), (metadata: ?GenericMetadata) => {
|
||||
return (metadata && metadata.tags) || [];
|
||||
|
||||
+206
-221
@@ -1,43 +1,79 @@
|
||||
// @flow
|
||||
import { createSelector } from 'reselect';
|
||||
import { createCachedSelector } from 're-reselect';
|
||||
import { selectMutedChannels } from 'redux/selectors/blocked';
|
||||
import { selectShowMatureContent } from 'redux/selectors/settings';
|
||||
import { selectBlacklistedOutpointMap, selectFilteredOutpointMap } from 'lbryinc';
|
||||
import { selectClaimsById, selectMyActiveClaims } from 'redux/selectors/claims';
|
||||
import { isClaimNsfw } from 'util/claim';
|
||||
|
||||
type State = { comments: CommentsState };
|
||||
|
||||
const selectState = (state) => state.comments || {};
|
||||
|
||||
export const selectCommentsById = createSelector(selectState, (state) => state.commentById || {});
|
||||
export const selectIsFetchingComments = createSelector(selectState, (state) => state.isLoading);
|
||||
export const selectIsFetchingCommentsById = createSelector(selectState, (state) => state.isLoadingById);
|
||||
export const selectIsFetchingCommentsByParentId = createSelector(selectState, (state) => state.isLoadingByParentId);
|
||||
export const selectIsFetchingReacts = createSelector(selectState, (state) => state.isFetchingReacts);
|
||||
export const selectOthersReactsById = createSelector(selectState, (state) => state.othersReactsByCommentId);
|
||||
export const selectCommentsById = (state: State) => selectState(state).commentById || {};
|
||||
export const selectIsFetchingComments = (state: State) => selectState(state).isLoading;
|
||||
export const selectIsFetchingCommentsById = (state: State) => selectState(state).isLoadingById;
|
||||
export const selectIsFetchingCommentsByParentId = (state: State) => selectState(state).isLoadingByParentId;
|
||||
export const selectIsFetchingReacts = (state: State) => selectState(state).isFetchingReacts;
|
||||
|
||||
export const selectPinnedCommentsById = createSelector(selectState, (state) => state.pinnedCommentsById);
|
||||
export const makeSelectPinnedCommentsForUri = (uri: string) =>
|
||||
createSelector(
|
||||
selectCommentsByUri,
|
||||
selectCommentsById,
|
||||
selectPinnedCommentsById,
|
||||
(byUri, byId, pinnedCommentsById) => {
|
||||
const claimId = byUri[uri];
|
||||
const pinnedCommentIds = pinnedCommentsById && pinnedCommentsById[claimId];
|
||||
const pinnedComments = [];
|
||||
export const selectMyReacts = (state: State) => state.comments.myReactsByCommentId;
|
||||
export const selectMyReactsForComment = (state: State, commentIdChannelId: string) => {
|
||||
// @commentIdChannelId: Format = 'commentId:MyChannelId'
|
||||
return state.comments.myReactsByCommentId && state.comments.myReactsByCommentId[commentIdChannelId];
|
||||
};
|
||||
|
||||
if (pinnedCommentIds) {
|
||||
pinnedCommentIds.forEach((commentId) => {
|
||||
pinnedComments.push(byId[commentId]);
|
||||
});
|
||||
}
|
||||
export const selectOthersReacts = (state: State) => state.comments.othersReactsByCommentId;
|
||||
export const selectOthersReactsForComment = (state: State, id: string) => {
|
||||
return state.comments.othersReactsByCommentId && state.comments.othersReactsByCommentId[id];
|
||||
};
|
||||
|
||||
return pinnedComments;
|
||||
// previously this used a mapping from claimId -> Array<Comments>
|
||||
/* export const selectCommentsById = createSelector(
|
||||
selectState,
|
||||
state => state.byId || {}
|
||||
); */
|
||||
export const selectCommentsByUri = createSelector(selectState, (state) => {
|
||||
const byUri = state.commentsByUri || {};
|
||||
const comments = {};
|
||||
Object.keys(byUri).forEach((uri) => {
|
||||
const claimId = byUri[uri];
|
||||
if (claimId === null) {
|
||||
comments[uri] = null;
|
||||
} else {
|
||||
comments[uri] = claimId;
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
export const selectModerationBlockList = createSelector(selectState, (state) =>
|
||||
state.moderationBlockList ? state.moderationBlockList.reverse() : []
|
||||
return comments;
|
||||
});
|
||||
|
||||
export const selectPinnedCommentsById = (state: State) => selectState(state).pinnedCommentsById;
|
||||
export const selectPinnedCommentsForUri = createCachedSelector(
|
||||
selectCommentsByUri,
|
||||
selectCommentsById,
|
||||
selectPinnedCommentsById,
|
||||
(state, uri) => uri,
|
||||
(byUri, byId, pinnedCommentsById, uri) => {
|
||||
const claimId = byUri[uri];
|
||||
const pinnedCommentIds = pinnedCommentsById && pinnedCommentsById[claimId];
|
||||
const pinnedComments = [];
|
||||
|
||||
if (pinnedCommentIds) {
|
||||
pinnedCommentIds.forEach((commentId) => {
|
||||
pinnedComments.push(byId[commentId]);
|
||||
});
|
||||
}
|
||||
|
||||
return pinnedComments;
|
||||
}
|
||||
)((state, uri) => uri);
|
||||
|
||||
export const selectModerationBlockList = createSelector(
|
||||
(state) => selectState(state).moderationBlockList,
|
||||
(moderationBlockList) => {
|
||||
return moderationBlockList ? moderationBlockList.reverse() : [];
|
||||
}
|
||||
);
|
||||
export const selectAdminBlockList = createSelector(selectState, (state) =>
|
||||
state.adminBlockList ? state.adminBlockList.reverse() : []
|
||||
@@ -46,35 +82,19 @@ export const selectModeratorBlockList = createSelector(selectState, (state) =>
|
||||
state.moderatorBlockList ? state.moderatorBlockList.reverse() : []
|
||||
);
|
||||
|
||||
export const selectPersonalTimeoutMap = createSelector(selectState, (state) => state.personalTimeoutMap);
|
||||
export const selectAdminTimeoutMap = createSelector(selectState, (state) => state.adminTimeoutMap);
|
||||
export const selectModeratorTimeoutMap = createSelector(selectState, (state) => state.moderatorTimeoutMap);
|
||||
|
||||
export const selectModeratorBlockListDelegatorsMap = createSelector(
|
||||
selectState,
|
||||
(state) => state.moderatorBlockListDelegatorsMap
|
||||
);
|
||||
|
||||
export const selectTogglingForDelegatorMap = createSelector(selectState, (state) => state.togglingForDelegatorMap);
|
||||
|
||||
export const selectBlockingByUri = createSelector(selectState, (state) => state.blockingByUri);
|
||||
export const selectUnBlockingByUri = createSelector(selectState, (state) => state.unBlockingByUri);
|
||||
export const selectFetchingModerationBlockList = createSelector(
|
||||
selectState,
|
||||
(state) => state.fetchingModerationBlockList
|
||||
);
|
||||
|
||||
export const selectModerationDelegatesById = createSelector(selectState, (state) => state.moderationDelegatesById);
|
||||
export const selectIsFetchingModerationDelegates = createSelector(
|
||||
selectState,
|
||||
(state) => state.fetchingModerationDelegates
|
||||
);
|
||||
|
||||
export const selectModerationDelegatorsById = createSelector(selectState, (state) => state.moderationDelegatorsById);
|
||||
export const selectIsFetchingModerationDelegators = createSelector(
|
||||
selectState,
|
||||
(state) => state.fetchingModerationDelegators
|
||||
);
|
||||
export const selectPersonalTimeoutMap = (state: State) => selectState(state).personalTimeoutMap;
|
||||
export const selectAdminTimeoutMap = (state: State) => selectState(state).adminTimeoutMap;
|
||||
export const selectModeratorTimeoutMap = (state: State) => selectState(state).moderatorTimeoutMap;
|
||||
export const selectModeratorBlockListDelegatorsMap = (state: State) =>
|
||||
selectState(state).moderatorBlockListDelegatorsMap;
|
||||
export const selectTogglingForDelegatorMap = (state: State) => selectState(state).togglingForDelegatorMap;
|
||||
export const selectBlockingByUri = (state: State) => selectState(state).blockingByUri;
|
||||
export const selectUnBlockingByUri = (state: State) => selectState(state).unBlockingByUri;
|
||||
export const selectFetchingModerationBlockList = (state: State) => selectState(state).fetchingModerationBlockList;
|
||||
export const selectModerationDelegatesById = (state: State) => selectState(state).moderationDelegatesById;
|
||||
export const selectIsFetchingModerationDelegates = (state: State) => selectState(state).fetchingModerationDelegates;
|
||||
export const selectModerationDelegatorsById = (state: State) => selectState(state).moderationDelegatorsById;
|
||||
export const selectIsFetchingModerationDelegators = (state: State) => selectState(state).fetchingModerationDelegators;
|
||||
|
||||
export const selectHasAdminChannel = createSelector(selectState, (state) => {
|
||||
const myChannelIds = Object.keys(state.moderationDelegatorsById);
|
||||
@@ -107,24 +127,29 @@ export const selectCommentsByClaimId = createSelector(selectState, selectComment
|
||||
return comments;
|
||||
});
|
||||
|
||||
export const selectSuperchatsByUri = createSelector(selectState, (state) => state.superChatsByUri);
|
||||
// no superchats?
|
||||
export const selectSuperchatsByUri = (state: State) => selectState(state).superChatsByUri;
|
||||
|
||||
export const selectTopLevelCommentsByClaimId = createSelector(selectState, selectCommentsById, (state, byId) => {
|
||||
const byClaimId = state.topLevelCommentsById || {};
|
||||
const comments = {};
|
||||
export const selectTopLevelCommentsByClaimId = createSelector(
|
||||
(state) => selectState(state).topLevelCommentsById,
|
||||
selectCommentsById,
|
||||
(topLevelCommentsById, byId) => {
|
||||
const byClaimId = topLevelCommentsById || {};
|
||||
const comments = {};
|
||||
|
||||
// replace every comment_id in the list with the actual comment object
|
||||
Object.keys(byClaimId).forEach((claimId) => {
|
||||
const commentIds = byClaimId[claimId];
|
||||
// replace every comment_id in the list with the actual comment object
|
||||
Object.keys(byClaimId).forEach((claimId) => {
|
||||
const commentIds = byClaimId[claimId];
|
||||
|
||||
comments[claimId] = Array(commentIds === null ? 0 : commentIds.length);
|
||||
for (let i = 0; i < commentIds.length; i++) {
|
||||
comments[claimId][i] = byId[commentIds[i]];
|
||||
}
|
||||
});
|
||||
comments[claimId] = Array(commentIds === null ? 0 : commentIds.length);
|
||||
for (let i = 0; i < commentIds.length; i++) {
|
||||
comments[claimId][i] = byId[commentIds[i]];
|
||||
}
|
||||
});
|
||||
|
||||
return comments;
|
||||
});
|
||||
return comments;
|
||||
}
|
||||
);
|
||||
|
||||
export const makeSelectCommentForCommentId = (commentId: string) =>
|
||||
createSelector(selectCommentsById, (comments) => comments[commentId]);
|
||||
@@ -146,27 +171,7 @@ export const selectRepliesByParentId = createSelector(selectState, selectComment
|
||||
return comments;
|
||||
});
|
||||
|
||||
// previously this used a mapping from claimId -> Array<Comments>
|
||||
/* export const selectCommentsById = createSelector(
|
||||
selectState,
|
||||
state => state.byId || {}
|
||||
); */
|
||||
export const selectCommentsByUri = createSelector(selectState, (state) => {
|
||||
const byUri = state.commentsByUri || {};
|
||||
const comments = {};
|
||||
Object.keys(byUri).forEach((uri) => {
|
||||
const claimId = byUri[uri];
|
||||
if (claimId === null) {
|
||||
comments[uri] = null;
|
||||
} else {
|
||||
comments[uri] = claimId;
|
||||
}
|
||||
});
|
||||
|
||||
return comments;
|
||||
});
|
||||
|
||||
export const selectLinkedCommentAncestors = createSelector(selectState, (state) => state.linkedCommentAncestors);
|
||||
export const selectLinkedCommentAncestors = (state: State) => selectState(state).linkedCommentAncestors;
|
||||
|
||||
export const makeSelectCommentIdsForUri = (uri: string) =>
|
||||
createSelector(selectState, selectCommentsByUri, selectClaimsById, (state, byUri) => {
|
||||
@@ -174,62 +179,48 @@ export const makeSelectCommentIdsForUri = (uri: string) =>
|
||||
return state.byId[claimId];
|
||||
});
|
||||
|
||||
export const selectMyReactionsByCommentId = createSelector(selectState, (state) => state.myReactsByCommentId);
|
||||
const filterCommentsDepOnList = {
|
||||
claimsById: selectClaimsById,
|
||||
myClaims: selectMyActiveClaims,
|
||||
mutedChannels: selectMutedChannels,
|
||||
personalBlockList: selectModerationBlockList,
|
||||
blacklistedMap: selectBlacklistedOutpointMap,
|
||||
filteredMap: selectFilteredOutpointMap,
|
||||
showMatureContent: selectShowMatureContent,
|
||||
};
|
||||
|
||||
/**
|
||||
* makeSelectMyReactionsForComment
|
||||
*
|
||||
* @param commentIdChannelId Format = "commentId:MyChannelId".
|
||||
*/
|
||||
export const makeSelectMyReactionsForComment = (commentIdChannelId: string) =>
|
||||
createSelector(selectState, (state) => {
|
||||
if (!state.myReactsByCommentId) {
|
||||
return [];
|
||||
}
|
||||
const filterCommentsPropKeys = Object.keys(filterCommentsDepOnList);
|
||||
|
||||
return state.myReactsByCommentId[commentIdChannelId] || [];
|
||||
});
|
||||
export const selectPendingCommentReacts = (state: State) => selectState(state).pendingCommentReactions;
|
||||
export const selectSettingsByChannelId = (state: State) => selectState(state).settingsByChannelId;
|
||||
export const selectFetchingCreatorSettings = (state: State) => selectState(state).fetchingSettings;
|
||||
export const selectFetchingBlockedWords = (state: State) => selectState(state).fetchingBlockedWords;
|
||||
|
||||
export const makeSelectOthersReactionsForComment = (commentId: string) =>
|
||||
createSelector(selectState, (state) => {
|
||||
if (!state.othersReactsByCommentId) {
|
||||
return {};
|
||||
}
|
||||
export const selectCommentsForUri = createCachedSelector(
|
||||
(state, uri) => uri,
|
||||
selectCommentsByClaimId,
|
||||
selectCommentsByUri,
|
||||
...Object.values(filterCommentsDepOnList),
|
||||
(uri, byClaimId, byUri, ...filterInputs) => {
|
||||
const claimId = byUri[uri];
|
||||
const comments = byClaimId && byClaimId[claimId];
|
||||
return filterComments(comments, claimId, filterInputs);
|
||||
}
|
||||
)((state, uri) => uri);
|
||||
|
||||
return state.othersReactsByCommentId[commentId] || {};
|
||||
});
|
||||
|
||||
export const selectPendingCommentReacts = createSelector(selectState, (state) => state.pendingCommentReactions);
|
||||
|
||||
export const selectSettingsByChannelId = createSelector(selectState, (state) => state.settingsByChannelId);
|
||||
|
||||
export const selectFetchingCreatorSettings = createSelector(selectState, (state) => state.fetchingSettings);
|
||||
|
||||
export const selectFetchingBlockedWords = createSelector(selectState, (state) => state.fetchingBlockedWords);
|
||||
|
||||
export const makeSelectCommentsForUri = (uri: string) =>
|
||||
createSelector(
|
||||
(state) => state,
|
||||
selectCommentsByClaimId,
|
||||
selectCommentsByUri,
|
||||
(state, byClaimId, byUri) => {
|
||||
const claimId = byUri[uri];
|
||||
const comments = byClaimId && byClaimId[claimId];
|
||||
return makeSelectFilteredComments(comments, claimId)(state);
|
||||
}
|
||||
);
|
||||
|
||||
export const makeSelectTopLevelCommentsForUri = (uri: string) =>
|
||||
createSelector(
|
||||
(state) => state,
|
||||
selectTopLevelCommentsByClaimId,
|
||||
selectCommentsByUri,
|
||||
(state, byClaimId, byUri) => {
|
||||
const claimId = byUri[uri];
|
||||
const comments = byClaimId && byClaimId[claimId];
|
||||
return makeSelectFilteredComments(comments, claimId)(state);
|
||||
}
|
||||
);
|
||||
export const selectTopLevelCommentsForUri = createCachedSelector(
|
||||
(state, uri) => uri,
|
||||
(state, uri, maxCount) => maxCount,
|
||||
selectTopLevelCommentsByClaimId,
|
||||
selectCommentsByUri,
|
||||
...Object.values(filterCommentsDepOnList),
|
||||
(uri, maxCount = -1, byClaimId, byUri, ...filterInputs) => {
|
||||
const claimId = byUri[uri];
|
||||
const comments = byClaimId && byClaimId[claimId];
|
||||
const filtered = filterComments(comments, claimId, filterInputs);
|
||||
return maxCount > 0 ? filtered.slice(0, maxCount) : filtered;
|
||||
}
|
||||
)((state, uri, maxCount = -1) => `${uri}:${maxCount}`);
|
||||
|
||||
export const makeSelectTopLevelTotalCommentsForUri = (uri: string) =>
|
||||
createSelector(selectState, selectCommentsByUri, (state, byUri) => {
|
||||
@@ -243,99 +234,93 @@ export const makeSelectTopLevelTotalPagesForUri = (uri: string) =>
|
||||
return state.topLevelTotalPagesById[claimId] || 0;
|
||||
});
|
||||
|
||||
export const makeSelectRepliesForParentId = (id: string) =>
|
||||
createSelector(
|
||||
(state) => state,
|
||||
selectCommentsById,
|
||||
(state, commentsById) => {
|
||||
// const claimId = byUri[uri]; // just parentId (id)
|
||||
const replyIdsByParentId = state.comments.repliesByParentId;
|
||||
const replyIdsForParent = replyIdsByParentId[id] || [];
|
||||
if (!replyIdsForParent.length) return null;
|
||||
export const selectRepliesForParentId = createCachedSelector(
|
||||
(state, id) => id,
|
||||
(state) => selectState(state).repliesByParentId,
|
||||
selectCommentsById,
|
||||
...Object.values(filterCommentsDepOnList),
|
||||
(id, repliesByParentId, commentsById, ...filterInputs) => {
|
||||
// const claimId = byUri[uri]; // just parentId (id)
|
||||
const replyIdsForParent = repliesByParentId[id] || [];
|
||||
if (!replyIdsForParent.length) return null;
|
||||
|
||||
const comments = [];
|
||||
replyIdsForParent.forEach((cid) => {
|
||||
comments.push(commentsById[cid]);
|
||||
});
|
||||
// const comments = byParentId && byParentId[id];
|
||||
const comments = [];
|
||||
replyIdsForParent.forEach((cid) => {
|
||||
comments.push(commentsById[cid]);
|
||||
});
|
||||
// const comments = byParentId && byParentId[id];
|
||||
|
||||
return makeSelectFilteredComments(comments)(state);
|
||||
}
|
||||
);
|
||||
return filterComments(comments, undefined, filterInputs);
|
||||
}
|
||||
)((state, id: string) => id);
|
||||
|
||||
/**
|
||||
* makeSelectFilteredComments
|
||||
* filterComments
|
||||
*
|
||||
* @param comments List of comments to filter.
|
||||
* @param claimId The claim that `comments` reside in.
|
||||
* @oaram filterInputs Values returned by filterCommentsDepOnList.
|
||||
*/
|
||||
const makeSelectFilteredComments = (comments: Array<Comment>, claimId?: string) =>
|
||||
createSelector(
|
||||
selectClaimsById,
|
||||
selectMyActiveClaims,
|
||||
selectMutedChannels,
|
||||
selectModerationBlockList,
|
||||
selectAdminBlockList,
|
||||
selectModeratorBlockList,
|
||||
selectBlacklistedOutpointMap,
|
||||
selectFilteredOutpointMap,
|
||||
selectShowMatureContent,
|
||||
(
|
||||
claimsById,
|
||||
myClaims,
|
||||
mutedChannels,
|
||||
personalBlockList,
|
||||
adminBlockList,
|
||||
moderatorBlockList,
|
||||
blacklistedMap,
|
||||
filteredMap,
|
||||
showMatureContent
|
||||
) => {
|
||||
return comments
|
||||
? comments.filter((comment) => {
|
||||
if (!comment) {
|
||||
// It may have been recently deleted after being blocked
|
||||
const filterComments = (comments: Array<Comment>, claimId?: string, filterInputs: any) => {
|
||||
const filterProps = filterInputs.reduce(function (acc, cur, i) {
|
||||
acc[filterCommentsPropKeys[i]] = cur;
|
||||
return acc;
|
||||
}, {});
|
||||
|
||||
const {
|
||||
claimsById,
|
||||
myClaims,
|
||||
mutedChannels,
|
||||
personalBlockList,
|
||||
blacklistedMap,
|
||||
filteredMap,
|
||||
showMatureContent,
|
||||
} = filterProps;
|
||||
|
||||
return comments
|
||||
? comments.filter((comment) => {
|
||||
if (!comment) {
|
||||
// It may have been recently deleted after being blocked
|
||||
return false;
|
||||
}
|
||||
|
||||
const channelClaim = claimsById[comment.channel_id];
|
||||
|
||||
// Return comment if `channelClaim` doesn't exist so the component knows to resolve the author
|
||||
if (channelClaim) {
|
||||
if (myClaims && myClaims.size > 0) {
|
||||
const claimIsMine = channelClaim.is_my_output || myClaims.has(channelClaim.claim_id);
|
||||
if (claimIsMine) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
const outpoint = `${channelClaim.txid}:${channelClaim.nout}`;
|
||||
if (blacklistedMap[outpoint] || filteredMap[outpoint]) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!showMatureContent) {
|
||||
const claimIsMature = isClaimNsfw(channelClaim);
|
||||
if (claimIsMature) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const channelClaim = claimsById[comment.channel_id];
|
||||
|
||||
// Return comment if `channelClaim` doesn't exist so the component knows to resolve the author
|
||||
if (channelClaim) {
|
||||
if (myClaims && myClaims.size > 0) {
|
||||
const claimIsMine = channelClaim.is_my_output || myClaims.has(channelClaim.claim_id);
|
||||
if (claimIsMine) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
const outpoint = `${channelClaim.txid}:${channelClaim.nout}`;
|
||||
if (blacklistedMap[outpoint] || filteredMap[outpoint]) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!showMatureContent) {
|
||||
const claimIsMature = isClaimNsfw(channelClaim);
|
||||
if (claimIsMature) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (claimId) {
|
||||
const claimIdIsMine = myClaims && myClaims.size > 0 && myClaims.has(claimId);
|
||||
if (!claimIdIsMine) {
|
||||
if (personalBlockList.includes(comment.channel_url)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (claimId) {
|
||||
const claimIdIsMine = myClaims && myClaims.size > 0 && myClaims.has(claimId);
|
||||
if (!claimIdIsMine) {
|
||||
if (personalBlockList.includes(comment.channel_url) || adminBlockList.includes(comment.channel_url)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return !mutedChannels.includes(comment.channel_url);
|
||||
})
|
||||
: [];
|
||||
}
|
||||
);
|
||||
return !mutedChannels.includes(comment.channel_url);
|
||||
})
|
||||
: [];
|
||||
};
|
||||
|
||||
export const makeSelectTotalReplyPagesForParentId = (parentId: string) =>
|
||||
createSelector(selectState, (state) => {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
// @flow
|
||||
import { createSelector } from 'reselect';
|
||||
|
||||
const selectState = (state: { tags: TagState }) => state.tags || {};
|
||||
type State = { tags: TagState };
|
||||
|
||||
const selectState = (state: State) => state.tags || {};
|
||||
|
||||
export const selectKnownTagsByName = createSelector(selectState, (state: TagState): KnownTags => state.knownTags);
|
||||
|
||||
export const selectFollowedTagsList = createSelector(selectState, (state: TagState): Array<string> =>
|
||||
state.followedTags.filter(tag => typeof tag === 'string')
|
||||
);
|
||||
export const selectFollowedTagsList = (state: State) => selectState(state).followedTags;
|
||||
|
||||
export const selectFollowedTags = createSelector(selectFollowedTagsList, (followedTags: Array<string>): Array<Tag> =>
|
||||
followedTags.map(tag => ({ name: tag.toLowerCase() })).sort((a, b) => a.name.localeCompare(b.name))
|
||||
followedTags.map((tag) => ({ name: tag.toLowerCase() })).sort((a, b) => a.name.localeCompare(b.name))
|
||||
);
|
||||
|
||||
export const selectUnfollowedTags = createSelector(
|
||||
@@ -19,7 +19,7 @@ export const selectUnfollowedTags = createSelector(
|
||||
(tagsByName: KnownTags, followedTags: Array<string>): Array<Tag> => {
|
||||
const followedTagsSet = new Set(followedTags);
|
||||
let tagsToReturn = [];
|
||||
Object.keys(tagsByName).forEach(key => {
|
||||
Object.keys(tagsByName).forEach((key) => {
|
||||
if (!followedTagsSet.has(key)) {
|
||||
const { name } = tagsByName[key];
|
||||
tagsToReturn.push({ name: name.toLowerCase() });
|
||||
@@ -31,6 +31,6 @@ export const selectUnfollowedTags = createSelector(
|
||||
);
|
||||
|
||||
export const makeSelectIsFollowingTag = (tag: string) =>
|
||||
createSelector(selectFollowedTags, followedTags => {
|
||||
return followedTags.some(followedTag => followedTag.name === tag.toLowerCase());
|
||||
createSelector(selectFollowedTags, (followedTags) => {
|
||||
return followedTags.some((followedTag) => followedTag.name === tag.toLowerCase());
|
||||
});
|
||||
@@ -604,30 +604,55 @@ svg + .button__label {
|
||||
}
|
||||
}
|
||||
|
||||
.button-collection-order {
|
||||
height: 100%;
|
||||
.button-collection-manage {
|
||||
font-size: var(--font-base);
|
||||
border-left-width: 0;
|
||||
border-radius: 0;
|
||||
margin: 0;
|
||||
color: var(--color-text);
|
||||
width: 100%;
|
||||
button {
|
||||
padding: var(--spacing-xs);
|
||||
padding: var(--spacing-xxs);
|
||||
}
|
||||
|
||||
.button__content {
|
||||
display: unset;
|
||||
}
|
||||
line-height: 1.2;
|
||||
font-weight: var(--font-weight-bold);
|
||||
height: 100%;
|
||||
background-color: var(--color-button-alt-bg);
|
||||
color: var(--color-button-alt-text);
|
||||
text-align: center;
|
||||
&:hover {
|
||||
background-color: var(--color-button-alt-bg-hover);
|
||||
}
|
||||
|
||||
@media (max-width: $breakpoint-small) {
|
||||
font-size: var(--font-small);
|
||||
}
|
||||
|
||||
@media (max-width: $breakpoint-small) {
|
||||
padding: var(--spacing-s) var(--spacing-s);
|
||||
}
|
||||
|
||||
&:first-of-type {
|
||||
border-left-width: 1px;
|
||||
&.top-right {
|
||||
border-top-right-radius: var(--border-radius);
|
||||
}
|
||||
&.top-left {
|
||||
border-top-left-radius: var(--border-radius);
|
||||
}
|
||||
&.bottom-right {
|
||||
border-bottom-right-radius: var(--border-radius);
|
||||
}
|
||||
&.bottom-left {
|
||||
border-bottom-left-radius: var(--border-radius);
|
||||
}
|
||||
|
||||
&:last-of-type {
|
||||
border-top-right-radius: var(--border-radius);
|
||||
border-bottom-right-radius: var(--border-radius);
|
||||
&.button-collection-delete-confirm {
|
||||
background-color: green;
|
||||
}
|
||||
|
||||
&.button-collection-delete-cancel {
|
||||
background-color: red;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -40,9 +40,6 @@ $actions-z-index: 2;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
p {
|
||||
padding: var(--spacing-m);
|
||||
}
|
||||
}
|
||||
|
||||
.channel-cover__gradient {
|
||||
|
||||
@@ -215,6 +215,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
.claim-preview--collection-mine {
|
||||
padding-left: 7rem;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.claim-preview--pending {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,8 @@
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
padding: var(--spacing-m);
|
||||
padding-bottom: var(--spacing-s);
|
||||
padding-left: 0;
|
||||
padding-bottom: 0;
|
||||
margin-top: var(--spacing-m);
|
||||
margin-bottom: var(--spacing-m);
|
||||
color: var(--color-text-subtitle);
|
||||
@@ -41,17 +42,14 @@
|
||||
flex-direction: column;
|
||||
font-size: var(--font-body);
|
||||
width: 100%;
|
||||
|
||||
&:not(:first-of-type) {
|
||||
margin-top: var(--spacing-s);
|
||||
}
|
||||
margin-bottom: var(--spacing-m);
|
||||
|
||||
@media (min-width: $breakpoint-small) {
|
||||
width: auto;
|
||||
margin-top: 0;
|
||||
|
||||
&:not(:first-of-type) {
|
||||
margin-top: 0;
|
||||
padding-left: var(--spacing-m);
|
||||
&:not(:last-of-type) {
|
||||
padding-right: var(--spacing-m);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,22 +86,27 @@
|
||||
}
|
||||
|
||||
.collection-preview__edit-buttons {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
margin-top: var(--spacing-xs);
|
||||
margin-bottom: var(--spacing-xs);
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: calc(-1 * var(--spacing-m));
|
||||
bottom: calc(-1 * var(--spacing-m));
|
||||
padding-left: 0;
|
||||
padding-top: var(--spacing-m);
|
||||
padding-bottom: var(--spacing-m);
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr 1fr;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.collection-preview__edit-group {
|
||||
&:not(:last-of-type) {
|
||||
margin-right: var(--spacing-s);
|
||||
}
|
||||
margin-right: var(--spacing-s);
|
||||
button {
|
||||
@media (max-width: $breakpoint-small) {
|
||||
padding: var(--spacing-s) var(--spacing-s);
|
||||
}
|
||||
}
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 2rem;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
align-items: stretch;
|
||||
flex-grow: 4;
|
||||
}
|
||||
|
||||
.collection-edit__header {
|
||||
@@ -136,3 +141,9 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.collection-grid__results-summary {
|
||||
padding: 0;
|
||||
padding-bottom: var(--spacing-m);
|
||||
color: var(--color-text-help);
|
||||
}
|
||||
@@ -313,14 +313,16 @@ fieldset-group {
|
||||
}
|
||||
|
||||
&:nth-of-type(2) {
|
||||
input,
|
||||
select {
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
||||
label {
|
||||
margin-left: var(--spacing-s);
|
||||
&:not(input.paginate-channel) {
|
||||
// yuck
|
||||
input,
|
||||
select {
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
label {
|
||||
margin-left: var(--spacing-s);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -331,6 +333,12 @@ fieldset-group {
|
||||
align-items: flex-end;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
&.fieldgroup--paginate-top {
|
||||
padding-bottom: var(--spacing-m);
|
||||
align-items: flex-end;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
// This is a special case where the prefix appears "inside" the input
|
||||
|
||||
@@ -437,3 +437,18 @@
|
||||
// scrollbar for all browsers.
|
||||
background-color: var(--color-scrollbar-thumb-bg);
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background-color: transparent;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: var(--color-scrollbar-thumb-bg);
|
||||
border-radius: 10px;
|
||||
}
|
||||
@@ -75,7 +75,7 @@
|
||||
|
||||
.media__info-text--contracted {
|
||||
margin-top: var(--spacing-m);
|
||||
max-height: 3rem;
|
||||
max-height: 5rem;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
}
|
||||
|
||||
.media__info-text--fade {
|
||||
-webkit-mask-image: -webkit-gradient(linear, left 30%, left bottom, from(rgba(0, 0, 0, 1)), to(rgba(0, 0, 0, 0)));
|
||||
-webkit-mask-image: -webkit-gradient(linear, left 55%, left bottom, from(rgba(0, 0, 0, 1)), to(rgba(0, 0, 0, 0)));
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
|
||||
@@ -48,6 +48,11 @@
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.section__header-action-stack {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.section__flex {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
|
||||
@@ -235,7 +235,7 @@ export function GetLinksData(
|
||||
)}`,
|
||||
options: {
|
||||
claimType: ['stream'],
|
||||
orderBy: ['release_time'],
|
||||
orderBy: CS.ORDER_BY_NEW_VALUE,
|
||||
pageSize: getPageSize(12),
|
||||
channelIds: YOUTUBER_CHANNEL_IDS,
|
||||
limitClaimsPerChannel: 1,
|
||||
@@ -248,7 +248,7 @@ export function GetLinksData(
|
||||
link: `/$/${PAGES.DISCOVER}?${CS.ORDER_BY_KEY}=${CS.ORDER_BY_TOP}&${CS.FRESH_KEY}=${CS.FRESH_DAY}`,
|
||||
options: {
|
||||
pageSize: getPageSize(showPersonalizedChannels || showPersonalizedTags ? 4 : 8),
|
||||
orderBy: ['effective_amount'],
|
||||
orderBy: CS.ORDER_BY_TOP_VALUE,
|
||||
claimType: ['stream'],
|
||||
limitClaimsPerChannel: 2,
|
||||
releaseTime: `>${Math.floor(moment().subtract(1, 'day').startOf('day').unix())}`,
|
||||
@@ -259,7 +259,7 @@ export function GetLinksData(
|
||||
title: __('Top Channels On LBRY'),
|
||||
link: `/$/${PAGES.DISCOVER}?claim_type=channel&${CS.ORDER_BY_KEY}=${CS.ORDER_BY_TOP}&${CS.FRESH_KEY}=${CS.FRESH_ALL}`,
|
||||
options: {
|
||||
orderBy: ['effective_amount'],
|
||||
orderBy: CS.ORDER_BY_TOP_VALUE,
|
||||
claimType: ['channel'],
|
||||
},
|
||||
};
|
||||
@@ -268,7 +268,7 @@ export function GetLinksData(
|
||||
title: __('Latest From @lbry'),
|
||||
link: `/@lbry:3f`,
|
||||
options: {
|
||||
orderBy: ['release_time'],
|
||||
orderBy: CS.ORDER_BY_NEW_VALUE,
|
||||
pageSize: getPageSize(4),
|
||||
channelIds: ['3fda836a92faaceedfe398225fb9b2ee2ed1f01a'],
|
||||
},
|
||||
|
||||
@@ -1153,14 +1153,7 @@
|
||||
core-js-pure "^3.0.0"
|
||||
regenerator-runtime "^0.13.4"
|
||||
|
||||
"@babel/runtime@^7.1.2", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.0", "@babel/runtime@^7.4.5", "@babel/runtime@^7.7.7", "@babel/runtime@^7.8.4":
|
||||
version "7.10.2"
|
||||
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.10.2.tgz#d103f21f2602497d38348a32e008637d506db839"
|
||||
integrity sha512-6sF3uQw2ivImfVIl62RZ7MXhO2tap69WeWK57vAaimT6AZbE4FbqjdEJIN1UqoD6wI6B+1n9UiagafH1sxjOtg==
|
||||
dependencies:
|
||||
regenerator-runtime "^0.13.4"
|
||||
|
||||
"@babel/runtime@^7.11.2", "@babel/runtime@^7.12.5", "@babel/runtime@^7.5.5", "@babel/runtime@^7.9.2":
|
||||
"@babel/runtime@^7.1.2", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.5", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.0", "@babel/runtime@^7.4.5", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.7", "@babel/runtime@^7.8.4":
|
||||
version "7.14.6"
|
||||
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.14.6.tgz#535203bc0892efc7dec60bdc27b2ecf6e409062d"
|
||||
integrity sha512-/PCB2uJ7oM44tz8YhC4Z/6PeOKXp4K588f+5M3clr1M4zbqztlo0XEfJ2LEzj/FgwfgGcIdl8n7YYjTCI0BYwg==
|
||||
@@ -1854,24 +1847,10 @@
|
||||
resolved "https://registry.yarnpkg.com/@ungap/from-entries/-/from-entries-0.2.1.tgz#7e86196b8b2e99d73106a8f25c2a068326346354"
|
||||
integrity sha512-CAqefTFAfnUPwYqsWHXpOxHaq1Zo5UQ3m9Zm2p09LggGe57rqHoBn3c++xcoomzXKynAUuiBMDUCQvKMnXjUpA==
|
||||
|
||||
"@videojs/http-streaming@2.2.4":
|
||||
version "2.2.4"
|
||||
resolved "https://registry.yarnpkg.com/@videojs/http-streaming/-/http-streaming-2.2.4.tgz#c71bb63dbc4749e35193c4c334430bd8ce728ec0"
|
||||
integrity sha512-gzT46RpAEegOhMId/zZ6uXCVGDMPOv8qmoTykBuvd6/4lVM3lZ1ZJCq0kytAkisDuDKipy93gP46oZEtonlc/Q==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.5.5"
|
||||
"@videojs/vhs-utils" "^2.2.1"
|
||||
aes-decrypter "3.1.0"
|
||||
global "^4.3.2"
|
||||
m3u8-parser "4.5.0"
|
||||
mpd-parser "0.14.0"
|
||||
mux.js "5.6.7"
|
||||
video.js "^6 || ^7"
|
||||
|
||||
"@videojs/http-streaming@2.9.1":
|
||||
version "2.9.1"
|
||||
resolved "https://registry.yarnpkg.com/@videojs/http-streaming/-/http-streaming-2.9.1.tgz#16b59efe24a832b89b5bd6a6c52f0d80ad7996a2"
|
||||
integrity sha512-QAtlrBBILOflrei1KE0GcSDDWiP888ZOySck6zWlQNYi/pXOm6QXTJHzOMIKiRQOndyJIZRTfLHedeUdUIDNLA==
|
||||
"@videojs/http-streaming@2.9.2":
|
||||
version "2.9.2"
|
||||
resolved "https://registry.yarnpkg.com/@videojs/http-streaming/-/http-streaming-2.9.2.tgz#47d33bb02bd9c1287200398b1e85d213dee814d0"
|
||||
integrity sha512-2ZsxJn4/nZZ6k6jIhic2l9ynGmKwprtuI5b3+M6JgqOSLvQQ/ah+heVs/0g2Ze7qJxodqR+aSY948JwJIz1gCw==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.12.5"
|
||||
"@videojs/vhs-utils" "^3.0.2"
|
||||
@@ -1879,18 +1858,9 @@
|
||||
global "^4.4.0"
|
||||
m3u8-parser "4.7.0"
|
||||
mpd-parser "0.17.0"
|
||||
mux.js "5.11.1"
|
||||
mux.js "5.12.2"
|
||||
video.js "^6 || ^7"
|
||||
|
||||
"@videojs/vhs-utils@^2.2.1":
|
||||
version "2.3.0"
|
||||
resolved "https://registry.yarnpkg.com/@videojs/vhs-utils/-/vhs-utils-2.3.0.tgz#490a3a00dfc1b51d85d5dcf8f8361e2d4c4d1440"
|
||||
integrity sha512-ThSmm91S7tuIJ757ON50K4y7S/bvKN4+B0tu303gCOxaG57PoP1UvPfMQZ90XGhxwNgngexVojOqbBHhTvXVHQ==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.5.5"
|
||||
global "^4.3.2"
|
||||
url-toolkit "^2.1.6"
|
||||
|
||||
"@videojs/vhs-utils@^3.0.0", "@videojs/vhs-utils@^3.0.2":
|
||||
version "3.0.2"
|
||||
resolved "https://registry.yarnpkg.com/@videojs/vhs-utils/-/vhs-utils-3.0.2.tgz#0203418ecaaff29bc33c69b6ad707787347b7614"
|
||||
@@ -2136,16 +2106,6 @@ adm-zip@^0.4.13:
|
||||
version "0.4.14"
|
||||
resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.14.tgz#2cf312bcc9f8875df835b0f6040bd89be0a727a9"
|
||||
|
||||
aes-decrypter@3.1.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/aes-decrypter/-/aes-decrypter-3.1.0.tgz#fc0b1d703f97a64aa3f7b13528f4661971db68c4"
|
||||
integrity sha512-wL1NFwP2yNrJG4InpXYFhhYe9TfonnDyhyxMq2+K9/qt+SrZzUieOpviN6pkDly7GawTqw5feehk0rn5iYo00g==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.5.5"
|
||||
"@videojs/vhs-utils" "^2.2.1"
|
||||
global "^4.3.2"
|
||||
pkcs7 "^1.0.4"
|
||||
|
||||
aes-decrypter@3.1.2:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/aes-decrypter/-/aes-decrypter-3.1.2.tgz#3545546f8e9f6b878640339a242efe221ba7a7cb"
|
||||
@@ -6005,13 +5965,14 @@ electron-devtools-installer@^3.1.1:
|
||||
semver "^7.2.1"
|
||||
unzip-crx-3 "^0.2.0"
|
||||
|
||||
electron-dl@^1.11.0:
|
||||
version "1.14.0"
|
||||
resolved "https://registry.yarnpkg.com/electron-dl/-/electron-dl-1.14.0.tgz#1466f1b945664ca3d784268307c2b935728177bf"
|
||||
electron-dl@^3.2.0:
|
||||
version "3.3.0"
|
||||
resolved "https://registry.yarnpkg.com/electron-dl/-/electron-dl-3.3.0.tgz#4e422e276c627373ba61fcf3f92ffa088988db1a"
|
||||
integrity sha512-Zwaz/OMGPIfBLV2SQH4sTsdDOs/U4y5AOHfremMBXEpjIxX+SiTx845DZAvJJwgb5hfowyWOBLiJhd/emBNLLQ==
|
||||
dependencies:
|
||||
ext-name "^5.0.0"
|
||||
pupa "^1.0.0"
|
||||
unused-filename "^1.0.0"
|
||||
pupa "^2.0.1"
|
||||
unused-filename "^2.1.0"
|
||||
|
||||
electron-is-dev@^0.3.0:
|
||||
version "0.3.0"
|
||||
@@ -6120,10 +6081,10 @@ electron-window-state@^4.1.1:
|
||||
jsonfile "^2.2.3"
|
||||
mkdirp "^0.5.1"
|
||||
|
||||
electron@9.4.0:
|
||||
version "9.4.0"
|
||||
resolved "https://registry.yarnpkg.com/electron/-/electron-9.4.0.tgz#c3c607e3598226ddbaaff8babcdffa8bb2210936"
|
||||
integrity sha512-hOC4q0jkb+UDYZRy8vrZ1IANnq+jznZnbkD62OEo06nU+hIbp2IrwDRBNuSLmQ3cwZMVir0WSIA1qEVK0PkzGA==
|
||||
electron@11.5.0:
|
||||
version "11.5.0"
|
||||
resolved "https://registry.yarnpkg.com/electron/-/electron-11.5.0.tgz#f1650543b9d8f2047d3807755bdb120153ed210f"
|
||||
integrity sha512-WjNDd6lGpxyiNjE3LhnFCAk/D9GIj1rU3GSDealVShhkkkPR3Vh4q8ErXGDl1OAO/faomVa10KoFPUN/pLbNxg==
|
||||
dependencies:
|
||||
"@electron/get" "^1.0.1"
|
||||
"@types/node" "^12.0.12"
|
||||
@@ -7947,14 +7908,6 @@ global-tunnel-ng@^2.7.1:
|
||||
npm-conf "^1.1.3"
|
||||
tunnel "^0.0.6"
|
||||
|
||||
global@4.3.2:
|
||||
version "4.3.2"
|
||||
resolved "https://registry.yarnpkg.com/global/-/global-4.3.2.tgz#e76989268a6c74c38908b1305b10fc0e394e9d0f"
|
||||
integrity sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8=
|
||||
dependencies:
|
||||
min-document "^2.19.0"
|
||||
process "~0.5.1"
|
||||
|
||||
global@^4.3.0, global@^4.3.1, global@^4.3.2, global@^4.4.0, global@~4.4.0:
|
||||
version "4.4.0"
|
||||
resolved "https://registry.yarnpkg.com/global/-/global-4.4.0.tgz#3e7b105179006a323ed71aafca3e9c57a5cc6406"
|
||||
@@ -10601,15 +10554,6 @@ lz-string@^1.4.4:
|
||||
version "1.4.4"
|
||||
resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.4.4.tgz#c0d8eaf36059f705796e1e344811cf4c498d3a26"
|
||||
|
||||
m3u8-parser@4.5.0:
|
||||
version "4.5.0"
|
||||
resolved "https://registry.yarnpkg.com/m3u8-parser/-/m3u8-parser-4.5.0.tgz#9c30b32c9b69cc3f81b5e6789717fa84b9fdb9aa"
|
||||
integrity sha512-RGm/1WVCX3o1bSWbJGmJUu4zTbtJy8lImtgHM4CESFvJRXYztr1j6SW/q9/ghYOrUjgH7radsIar+z1Leln0sA==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.5.5"
|
||||
"@videojs/vhs-utils" "^2.2.1"
|
||||
global "^4.3.2"
|
||||
|
||||
m3u8-parser@4.7.0:
|
||||
version "4.7.0"
|
||||
resolved "https://registry.yarnpkg.com/m3u8-parser/-/m3u8-parser-4.7.0.tgz#e01e8ce136098ade1b14ee691ea20fc4dc60abf6"
|
||||
@@ -11153,16 +11097,6 @@ move-concurrently@^1.0.1:
|
||||
rimraf "^2.5.4"
|
||||
run-queue "^1.0.3"
|
||||
|
||||
mpd-parser@0.14.0:
|
||||
version "0.14.0"
|
||||
resolved "https://registry.yarnpkg.com/mpd-parser/-/mpd-parser-0.14.0.tgz#f666a80c1e284e46c6f76f010fc4f5292a021148"
|
||||
integrity sha512-HqXQS3WLofcnYFcxv5oWdlciddUaEnN3NasXLVQ793mdnZRrinjz2Yk1DsUYPDYOUWf6ZBBqbFhaJT5LiT2ouA==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.5.5"
|
||||
"@videojs/vhs-utils" "^2.2.1"
|
||||
global "^4.3.2"
|
||||
xmldom "^0.1.27"
|
||||
|
||||
mpd-parser@0.17.0:
|
||||
version "0.17.0"
|
||||
resolved "https://registry.yarnpkg.com/mpd-parser/-/mpd-parser-0.17.0.tgz#d7f3002edcb706f98993ef75846a713d056d3332"
|
||||
@@ -11206,18 +11140,13 @@ mute-stream@0.0.7:
|
||||
version "0.0.7"
|
||||
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab"
|
||||
|
||||
mux.js@5.11.1:
|
||||
version "5.11.1"
|
||||
resolved "https://registry.yarnpkg.com/mux.js/-/mux.js-5.11.1.tgz#531192c2c5ee5e9abb6243ba58e2c1ef916b35eb"
|
||||
integrity sha512-U/JKEU4GZfk2BpEQpPfmH81nF79UKK2a1QOb6PF9viPspJpexGt11YzR/nTKNWdfjWG0DGjcSU+zb2F52Z/q8w==
|
||||
mux.js@5.12.2:
|
||||
version "5.12.2"
|
||||
resolved "https://registry.yarnpkg.com/mux.js/-/mux.js-5.12.2.tgz#cd823312f4bb69adb8b9c5f45635b4451066d6e6"
|
||||
integrity sha512-9OY1lrFIo7FxMeIC6aLUftiNv97AztufDfi30N7qDll1Pcy7bCxlHztyHp1Ce0KQwy2XqchGeENPS4v1NJngHQ==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.11.2"
|
||||
|
||||
mux.js@5.6.7:
|
||||
version "5.6.7"
|
||||
resolved "https://registry.yarnpkg.com/mux.js/-/mux.js-5.6.7.tgz#d39fc85cded5a1257de9f6eeb5cf1578c4a63eb8"
|
||||
integrity sha512-YSr6B8MUgE4S18MptbY2XM+JKGbw9JDkgs7YkuE/T2fpDKjOhZfb/nD6vmsVxvLYOExWNaQn1UGBp6PGsnTtew==
|
||||
|
||||
nan@^2.12.1:
|
||||
version "2.14.0"
|
||||
resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c"
|
||||
@@ -12990,11 +12919,6 @@ process@^0.11.10:
|
||||
resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182"
|
||||
integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI=
|
||||
|
||||
process@~0.5.1:
|
||||
version "0.5.2"
|
||||
resolved "https://registry.yarnpkg.com/process/-/process-0.5.2.tgz#1638d8a8e34c2f440a91db95ab9aeb677fc185cf"
|
||||
integrity sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8=
|
||||
|
||||
progress@2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f"
|
||||
@@ -13134,10 +13058,6 @@ punycode@^2.1.0, punycode@^2.1.1:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
|
||||
|
||||
pupa@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/pupa/-/pupa-1.0.0.tgz#9a9568a5af7e657b8462a6e9d5328743560ceff6"
|
||||
|
||||
pupa@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/pupa/-/pupa-2.0.1.tgz#dbdc9ff48ffbea4a26a069b6f9f7abb051008726"
|
||||
@@ -13259,6 +13179,11 @@ rc@^1.0.1, rc@^1.1.6, rc@^1.2.8:
|
||||
minimist "^1.2.0"
|
||||
strip-json-comments "~2.0.1"
|
||||
|
||||
re-reselect@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/re-reselect/-/re-reselect-4.0.0.tgz#9ddec4c72c4d952f68caa5aa4b76a9ed38b75cac"
|
||||
integrity sha512-wuygyq8TXUlSdVXv2kigXxQNOgdb9m7LbIjwfTNGSpaY1riLd5e+VeQjlQMyUtrk0oiyhi1AqIVynworl3qxHA==
|
||||
|
||||
react-async-script@^1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/react-async-script/-/react-async-script-1.1.1.tgz#f481c6c5f094bf4b94a9d52da0d0dda2e1a74bdf"
|
||||
@@ -15777,9 +15702,9 @@ tmp@^0.0.33:
|
||||
os-tmpdir "~1.0.2"
|
||||
|
||||
tmpl@1.0.x:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1"
|
||||
integrity sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE=
|
||||
version "1.0.5"
|
||||
resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc"
|
||||
integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==
|
||||
|
||||
to-arraybuffer@^1.0.0:
|
||||
version "1.0.1"
|
||||
@@ -16278,12 +16203,13 @@ untildify@^4.0.0:
|
||||
resolved "https://registry.yarnpkg.com/untildify/-/untildify-4.0.0.tgz#2bc947b953652487e4600949fb091e3ae8cd919b"
|
||||
integrity sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==
|
||||
|
||||
unused-filename@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/unused-filename/-/unused-filename-1.0.0.tgz#d340880f71ae2115ebaa1325bef05cc6684469c6"
|
||||
unused-filename@^2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/unused-filename/-/unused-filename-2.1.0.tgz#33719c4e8d9644f32d2dec1bc8525c6aaeb4ba51"
|
||||
integrity sha512-BMiNwJbuWmqCpAM1FqxCTD7lXF97AvfQC8Kr/DIeA6VtvhJaMDupZ82+inbjl5yVP44PcxOuCSxye1QMS0wZyg==
|
||||
dependencies:
|
||||
modify-filename "^1.1.0"
|
||||
path-exists "^3.0.0"
|
||||
path-exists "^4.0.0"
|
||||
|
||||
unzip-crx-3@^0.2.0:
|
||||
version "0.2.0"
|
||||
@@ -16418,7 +16344,7 @@ url-to-options@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9"
|
||||
|
||||
url-toolkit@^2.1.6, url-toolkit@^2.2.1:
|
||||
url-toolkit@^2.2.1:
|
||||
version "2.2.2"
|
||||
resolved "https://registry.yarnpkg.com/url-toolkit/-/url-toolkit-2.2.2.tgz#51ef27b56d3187185f9ecf4a8ac7e8f55203c89d"
|
||||
integrity sha512-l25w6Sy+Iy3/IbogunxhWwljPaDnqpiKvrQRoLBm6DfISco7NyRIS7Zf6+Oxhy1T8kHxWdwLND7ZZba6NjXMug==
|
||||
@@ -16563,13 +16489,13 @@ vfile@^2.0.0:
|
||||
unist-util-stringify-position "^1.0.0"
|
||||
vfile-message "^1.0.0"
|
||||
|
||||
"video.js@^6 || ^7", video.js@^7.13.3:
|
||||
version "7.13.3"
|
||||
resolved "https://registry.yarnpkg.com/video.js/-/video.js-7.13.3.tgz#5efab7bd56267406307f64d110662b2ccb3d7530"
|
||||
integrity sha512-rIGPFRh3v0HqSdfj+/iByKRDBgLVqILK/4i/hW15DfjvgCGhwbw53bRBoJXy496hwh/XYeOAqckc87L2FN375g==
|
||||
"video.js@^6 || ^7", video.js@^7.0.0, video.js@^7.14.3:
|
||||
version "7.14.3"
|
||||
resolved "https://registry.yarnpkg.com/video.js/-/video.js-7.14.3.tgz#0b612c09a0a81ef9bce65c710e73291cb06dc32c"
|
||||
integrity sha512-6avCdSIfn5ss5NOgoQfY/xEfPNcz9DXSw+ZN80NwPguCdRd4VL4y40b/d7osYJwyCdF+YkvhqAW7dw4s0vBigg==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.12.5"
|
||||
"@videojs/http-streaming" "2.9.1"
|
||||
"@videojs/http-streaming" "2.9.2"
|
||||
"@videojs/vhs-utils" "^3.0.2"
|
||||
"@videojs/xhr" "2.5.1"
|
||||
aes-decrypter "3.1.2"
|
||||
@@ -16577,25 +16503,11 @@ vfile@^2.0.0:
|
||||
keycode "^2.2.0"
|
||||
m3u8-parser "4.7.0"
|
||||
mpd-parser "0.17.0"
|
||||
mux.js "5.11.1"
|
||||
mux.js "5.12.2"
|
||||
safe-json-parse "4.0.0"
|
||||
videojs-font "3.2.0"
|
||||
videojs-vtt.js "^0.15.3"
|
||||
|
||||
video.js@^7.0.0:
|
||||
version "7.10.2"
|
||||
resolved "https://registry.yarnpkg.com/video.js/-/video.js-7.10.2.tgz#5156aabad7820e726d72ea6c32324059c68885a4"
|
||||
integrity sha512-kJTTrqcQn2MhPzWR8zQs6W3HPJWpowO/ZGZcKt2dcJeJdJT0dEDLYtiFdjV37SylCmu66V0flRnV8cipbthveQ==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.9.2"
|
||||
"@videojs/http-streaming" "2.2.4"
|
||||
"@videojs/xhr" "2.5.1"
|
||||
global "4.3.2"
|
||||
keycode "^2.2.0"
|
||||
safe-json-parse "4.0.0"
|
||||
videojs-font "3.2.0"
|
||||
videojs-vtt.js "^0.15.2"
|
||||
|
||||
videojs-contrib-ads@^6.6.5, videojs-contrib-ads@^6.9.0:
|
||||
version "6.9.0"
|
||||
resolved "https://registry.yarnpkg.com/videojs-contrib-ads/-/videojs-contrib-ads-6.9.0.tgz#c792d6fda77254b277545cc3222352fc653b5833"
|
||||
@@ -16644,7 +16556,7 @@ videojs-logo@^2.1.4:
|
||||
global "^4.3.2"
|
||||
video.js "^6 || ^7"
|
||||
|
||||
videojs-vtt.js@^0.15.2, videojs-vtt.js@^0.15.3:
|
||||
videojs-vtt.js@^0.15.3:
|
||||
version "0.15.3"
|
||||
resolved "https://registry.yarnpkg.com/videojs-vtt.js/-/videojs-vtt.js-0.15.3.tgz#84260393b79487fcf195d9372f812d7fab83a993"
|
||||
integrity sha512-5FvVsICuMRx6Hd7H/Y9s9GDeEtYcXQWzGMS+sl4UX3t/zoHp3y+isSfIPRochnTH7h+Bh1ILyC639xy9Z6kPag==
|
||||
@@ -17276,11 +17188,6 @@ xmlbuilder@^10.0.0:
|
||||
version "10.1.1"
|
||||
resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-10.1.1.tgz#8cae6688cc9b38d850b7c8d3c0a4161dcaf475b0"
|
||||
|
||||
xmldom@^0.1.27:
|
||||
version "0.1.31"
|
||||
resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.1.31.tgz#b76c9a1bd9f0a9737e5a72dc37231cf38375e2ff"
|
||||
integrity sha512-yS2uJflVQs6n+CyjHoaBmVSqIDevTAWrzMmjG1Gc7h1qQ7uVozNhEPJAwZXWyGQ/Gafo3fCwrcaokezLPupVyQ==
|
||||
|
||||
xmldom@^0.3.0:
|
||||
version "0.3.0"
|
||||
resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.3.0.tgz#e625457f4300b5df9c2e1ecb776147ece47f3e5a"
|
||||
|
||||
Reference in new issue
Block a user