~Final~ Discovery fixes/cleanup #2599

Merged
neb-b merged 16 commits from discovery-fixes into master 2019-07-05 20:03:12 +02:00
4 changed files with 10 additions and 6 deletions
Showing only changes of commit 8aef97f8cd - Show all commits

View file

@ -124,7 +124,7 @@
"jsmediatags": "^3.8.1",
"json-loader": "^0.5.4",
"lbry-format": "https://github.com/lbryio/lbry-format.git",
"lbry-redux": "lbryio/lbry-redux#009ae8b8fac991c306179b66ac76066e92e16322",
"lbry-redux": "lbryio/lbry-redux#cf4bf4c4896d300827c7e07cdf17ca669394fcc4",
"lbryinc": "lbryio/lbryinc#43d382d9b74d396a581a74d87e4c53105e04f845",
"lint-staged": "^7.0.2",
"localforage": "^1.7.1",

View file

@ -1,7 +1,7 @@
// @flow
import React, { useEffect, Fragment } from 'react';
import { CHANNEL_NEW, CHANNEL_ANONYMOUS } from 'constants/claim';
import { buildURI, THUMBNAIL_STATUSES } from 'lbry-redux';
import { buildURI, isURIValid, THUMBNAIL_STATUSES } from 'lbry-redux';
import Button from 'component/button';
import ChannelSection from 'component/selectChannel';
import classnames from 'classnames';
@ -112,7 +112,8 @@ function PublishForm(props: Props) {
} catch (e) {}
}
if (uri) {
const isValid = isURIValid(uri);
if (uri && isValid) {
resolveUri(uri);
updatePublishForm({ uri });
}

View file

@ -49,7 +49,7 @@ function PublishName(props: Props) {
if (!name) {
nameError = __('A name is required');
} else if (!isNameValid(name, false)) {
nameError = __('LBRY names cannot contain that symbol ($, #, @)');
nameError = __('LBRY names cannot contain spaces or reserved symbols ($#@;/"<>%{}|^~[]`)');
}
setNameError(nameError);

View file

@ -36,7 +36,11 @@ function SelectAsset(props: Props) {
function doUploadAsset(filePath, thumbnailBuffer) {
let thumbnail, fileExt, fileName, fileType;
// @if TARGET='app'
if (IS_WEB) {
console.error('no upload support for web');
return;
}
if (filePath) {
thumbnail = fs.readFileSync(filePath);
fileExt = path.extname(filePath);
@ -50,7 +54,6 @@ function SelectAsset(props: Props) {
} else {
return null;
}
// @endif
const uploadError = (error = '') => {
console.log('error', error);