Compare commits
5 commits
fix-colUpd
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
0f930c4a7b | ||
|
32b5787071 | ||
|
129b0ea3fa | ||
|
e3bc848263 | ||
|
372e559cae |
4 changed files with 51 additions and 33 deletions
16
dist/bundle.es.js
vendored
16
dist/bundle.es.js
vendored
|
@ -1040,7 +1040,7 @@ var daemon_settings = /*#__PURE__*/Object.freeze({
|
||||||
const SDK_SYNC_KEYS = [LBRYUM_SERVERS, SHARE_USAGE_DATA];
|
const SDK_SYNC_KEYS = [LBRYUM_SERVERS, SHARE_USAGE_DATA];
|
||||||
|
|
||||||
// CLIENT
|
// CLIENT
|
||||||
const CLIENT_SYNC_KEYS = [SHOW_MATURE, HIDE_REPOSTS, SHOW_ANONYMOUS, INSTANT_PURCHASE_ENABLED, INSTANT_PURCHASE_MAX, THEME, AUTOPLAY_MEDIA, AUTOPLAY_NEXT, HIDE_BALANCE, HIDE_SPLASH_ANIMATION, FLOATING_PLAYER, DARK_MODE_TIMES, AUTOMATIC_DARK_MODE_ENABLED];
|
const CLIENT_SYNC_KEYS = [SHOW_MATURE, HIDE_REPOSTS, SHOW_ANONYMOUS, INSTANT_PURCHASE_ENABLED, INSTANT_PURCHASE_MAX, THEME, AUTOPLAY_MEDIA, AUTOPLAY_NEXT, HIDE_BALANCE, HIDE_SPLASH_ANIMATION, FLOATING_PLAYER, DARK_MODE_TIMES, AUTOMATIC_DARK_MODE_ENABLED, LANGUAGE];
|
||||||
|
|
||||||
var shared_preferences = /*#__PURE__*/Object.freeze({
|
var shared_preferences = /*#__PURE__*/Object.freeze({
|
||||||
SDK_SYNC_KEYS: SDK_SYNC_KEYS,
|
SDK_SYNC_KEYS: SDK_SYNC_KEYS,
|
||||||
|
@ -4535,6 +4535,10 @@ function doCollectionPublishUpdate(options, isBackgroundUpdate) {
|
||||||
updateParams['tags'] = options.tags.map(tag => tag.name);
|
updateParams['tags'] = options.tags.map(tag => tag.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (options.channel_id) {
|
||||||
|
updateParams['channel_id'] = options.channel_id;
|
||||||
|
}
|
||||||
|
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: COLLECTION_PUBLISH_UPDATE_STARTED
|
type: COLLECTION_PUBLISH_UPDATE_STARTED
|
||||||
|
@ -5629,7 +5633,7 @@ const doUpdatePublishForm = publishFormValue => dispatch => dispatch({
|
||||||
data: _extends$7({}, publishFormValue)
|
data: _extends$7({}, publishFormValue)
|
||||||
});
|
});
|
||||||
|
|
||||||
const doUploadThumbnail = (filePath, thumbnailBlob, fsAdapter, fs, path) => dispatch => {
|
const doUploadThumbnail = (filePath, thumbnailBlob, fsAdapter, fs, path, cb) => dispatch => {
|
||||||
const downMessage = __('Thumbnail upload service may be down, try again later.');
|
const downMessage = __('Thumbnail upload service may be down, try again later.');
|
||||||
let thumbnail, fileExt, fileName, fileType;
|
let thumbnail, fileExt, fileName, fileType;
|
||||||
|
|
||||||
|
@ -5663,13 +5667,17 @@ const doUploadThumbnail = (filePath, thumbnailBlob, fsAdapter, fs, path) => disp
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
body: data
|
body: data
|
||||||
}).then(res => res.text()).then(text => text.length ? JSON.parse(text) : {}).then(json => {
|
}).then(res => res.text()).then(text => text.length ? JSON.parse(text) : {}).then(json => {
|
||||||
return json.success ? dispatch({
|
if (!json.success) return uploadError(json.message || downMessage);
|
||||||
|
if (cb) {
|
||||||
|
cb(json.data.serveUrl);
|
||||||
|
}
|
||||||
|
return dispatch({
|
||||||
type: UPDATE_PUBLISH_FORM,
|
type: UPDATE_PUBLISH_FORM,
|
||||||
data: {
|
data: {
|
||||||
uploadThumbnailStatus: COMPLETE,
|
uploadThumbnailStatus: COMPLETE,
|
||||||
thumbnail: json.data.serveUrl
|
thumbnail: json.data.serveUrl
|
||||||
}
|
}
|
||||||
}) : uploadError(json.message || downMessage);
|
});
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
let message = err.message;
|
let message = err.message;
|
||||||
|
|
||||||
|
|
|
@ -28,4 +28,5 @@ export const CLIENT_SYNC_KEYS = [
|
||||||
SETTINGS.FLOATING_PLAYER,
|
SETTINGS.FLOATING_PLAYER,
|
||||||
SETTINGS.DARK_MODE_TIMES,
|
SETTINGS.DARK_MODE_TIMES,
|
||||||
SETTINGS.AUTOMATIC_DARK_MODE_ENABLED,
|
SETTINGS.AUTOMATIC_DARK_MODE_ENABLED,
|
||||||
|
SETTINGS.LANGUAGE,
|
||||||
];
|
];
|
||||||
|
|
|
@ -842,6 +842,7 @@ export function doCollectionPublishUpdate(
|
||||||
tags?: Array<Tag>,
|
tags?: Array<Tag>,
|
||||||
languages?: Array<string>,
|
languages?: Array<string>,
|
||||||
claims?: Array<string>,
|
claims?: Array<string>,
|
||||||
|
channel_id?: string,
|
||||||
},
|
},
|
||||||
isBackgroundUpdate?: boolean
|
isBackgroundUpdate?: boolean
|
||||||
) {
|
) {
|
||||||
|
@ -853,13 +854,14 @@ export function doCollectionPublishUpdate(
|
||||||
blocking?: true,
|
blocking?: true,
|
||||||
title?: string,
|
title?: string,
|
||||||
thumbnail_url?: string,
|
thumbnail_url?: string,
|
||||||
|
channel_id?: string,
|
||||||
description?: string,
|
description?: string,
|
||||||
claim_id: string,
|
claim_id: string,
|
||||||
tags?: Array<string>,
|
tags?: Array<string>,
|
||||||
languages?: Array<string>,
|
languages?: Array<string>,
|
||||||
claims?: Array<string>,
|
claims?: Array<string>,
|
||||||
clear_claims: boolean,
|
clear_claims: boolean,
|
||||||
replace: boolean,
|
replace?: boolean,
|
||||||
} = isBackgroundUpdate
|
} = isBackgroundUpdate
|
||||||
? {
|
? {
|
||||||
blocking: true,
|
blocking: true,
|
||||||
|
@ -891,6 +893,10 @@ export function doCollectionPublishUpdate(
|
||||||
updateParams['tags'] = options.tags.map(tag => tag.name);
|
updateParams['tags'] = options.tags.map(tag => tag.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (options.channel_id) {
|
||||||
|
updateParams['channel_id'] = options.channel_id;
|
||||||
|
}
|
||||||
|
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.COLLECTION_PUBLISH_UPDATE_STARTED,
|
type: ACTIONS.COLLECTION_PUBLISH_UPDATE_STARTED,
|
||||||
|
|
|
@ -69,7 +69,8 @@ export const doUploadThumbnail = (
|
||||||
thumbnailBlob?: File,
|
thumbnailBlob?: File,
|
||||||
fsAdapter?: any,
|
fsAdapter?: any,
|
||||||
fs?: any,
|
fs?: any,
|
||||||
path?: any
|
path?: any,
|
||||||
|
cb?: (string) => void
|
||||||
) => (dispatch: Dispatch) => {
|
) => (dispatch: Dispatch) => {
|
||||||
const downMessage = __('Thumbnail upload service may be down, try again later.');
|
const downMessage = __('Thumbnail upload service may be down, try again later.');
|
||||||
let thumbnail, fileExt, fileName, fileType;
|
let thumbnail, fileExt, fileName, fileType;
|
||||||
|
@ -112,15 +113,17 @@ export const doUploadThumbnail = (
|
||||||
.then(res => res.text())
|
.then(res => res.text())
|
||||||
.then(text => (text.length ? JSON.parse(text) : {}))
|
.then(text => (text.length ? JSON.parse(text) : {}))
|
||||||
.then(json => {
|
.then(json => {
|
||||||
return json.success
|
if (!json.success) return uploadError(json.message || downMessage);
|
||||||
? dispatch({
|
if (cb) {
|
||||||
|
cb(json.data.serveUrl);
|
||||||
|
}
|
||||||
|
return dispatch({
|
||||||
type: ACTIONS.UPDATE_PUBLISH_FORM,
|
type: ACTIONS.UPDATE_PUBLISH_FORM,
|
||||||
data: {
|
data: {
|
||||||
uploadThumbnailStatus: THUMBNAIL_STATUSES.COMPLETE,
|
uploadThumbnailStatus: THUMBNAIL_STATUSES.COMPLETE,
|
||||||
thumbnail: json.data.serveUrl,
|
thumbnail: json.data.serveUrl,
|
||||||
},
|
},
|
||||||
})
|
});
|
||||||
: uploadError(json.message || downMessage);
|
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
let message = err.message;
|
let message = err.message;
|
||||||
|
|
Loading…
Reference in a new issue