Corrects error messages #265
3 changed files with 66 additions and 44 deletions
61
dist/bundle.es.js
vendored
61
dist/bundle.es.js
vendored
|
@ -15,7 +15,6 @@ const CHANNEL_NEW = 'new';
|
||||||
const PAGE_SIZE = 20;
|
const PAGE_SIZE = 20;
|
||||||
|
|
||||||
var claim = /*#__PURE__*/Object.freeze({
|
var claim = /*#__PURE__*/Object.freeze({
|
||||||
__proto__: null,
|
|
||||||
MINIMUM_PUBLISH_BID: MINIMUM_PUBLISH_BID,
|
MINIMUM_PUBLISH_BID: MINIMUM_PUBLISH_BID,
|
||||||
CHANNEL_ANONYMOUS: CHANNEL_ANONYMOUS,
|
CHANNEL_ANONYMOUS: CHANNEL_ANONYMOUS,
|
||||||
CHANNEL_NEW: CHANNEL_NEW,
|
CHANNEL_NEW: CHANNEL_NEW,
|
||||||
|
@ -286,8 +285,7 @@ const TOGGLE_BLOCK_CHANNEL = 'TOGGLE_BLOCK_CHANNEL';
|
||||||
// Sync
|
// Sync
|
||||||
const USER_STATE_POPULATE = 'USER_STATE_POPULATE';
|
const USER_STATE_POPULATE = 'USER_STATE_POPULATE';
|
||||||
|
|
||||||
var action_types = /*#__PURE__*/Object.freeze({
|
var ACTIONS = /*#__PURE__*/Object.freeze({
|
||||||
__proto__: null,
|
|
||||||
WINDOW_FOCUSED: WINDOW_FOCUSED,
|
WINDOW_FOCUSED: WINDOW_FOCUSED,
|
||||||
DAEMON_READY: DAEMON_READY,
|
DAEMON_READY: DAEMON_READY,
|
||||||
DAEMON_VERSION_MATCH: DAEMON_VERSION_MATCH,
|
DAEMON_VERSION_MATCH: DAEMON_VERSION_MATCH,
|
||||||
|
@ -542,7 +540,6 @@ const OTHER = 'other';
|
||||||
const COPYRIGHT = 'copyright';
|
const COPYRIGHT = 'copyright';
|
||||||
|
|
||||||
var licenses = /*#__PURE__*/Object.freeze({
|
var licenses = /*#__PURE__*/Object.freeze({
|
||||||
__proto__: null,
|
|
||||||
CC_LICENSES: CC_LICENSES,
|
CC_LICENSES: CC_LICENSES,
|
||||||
NONE: NONE,
|
NONE: NONE,
|
||||||
PUBLIC_DOMAIN: PUBLIC_DOMAIN,
|
PUBLIC_DOMAIN: PUBLIC_DOMAIN,
|
||||||
|
@ -573,7 +570,6 @@ const HISTORY = 'user_history';
|
||||||
const WALLET = 'wallet';
|
const WALLET = 'wallet';
|
||||||
|
|
||||||
var pages = /*#__PURE__*/Object.freeze({
|
var pages = /*#__PURE__*/Object.freeze({
|
||||||
__proto__: null,
|
|
||||||
AUTH: AUTH,
|
AUTH: AUTH,
|
||||||
BACKUP: BACKUP,
|
BACKUP: BACKUP,
|
||||||
CHANNEL: CHANNEL,
|
CHANNEL: CHANNEL,
|
||||||
|
@ -623,7 +619,6 @@ const RECEIVE_INTERESTS_NOTIFICATIONS = 'receiveInterestsNotifications';
|
||||||
const RECEIVE_CREATOR_NOTIFICATIONS = 'receiveCreatorNotifications';
|
const RECEIVE_CREATOR_NOTIFICATIONS = 'receiveCreatorNotifications';
|
||||||
|
|
||||||
var settings = /*#__PURE__*/Object.freeze({
|
var settings = /*#__PURE__*/Object.freeze({
|
||||||
__proto__: null,
|
|
||||||
CREDIT_REQUIRED_ACKNOWLEDGED: CREDIT_REQUIRED_ACKNOWLEDGED,
|
CREDIT_REQUIRED_ACKNOWLEDGED: CREDIT_REQUIRED_ACKNOWLEDGED,
|
||||||
NEW_USER_ACKNOWLEDGED: NEW_USER_ACKNOWLEDGED,
|
NEW_USER_ACKNOWLEDGED: NEW_USER_ACKNOWLEDGED,
|
||||||
EMAIL_COLLECTION_ACKNOWLEDGED: EMAIL_COLLECTION_ACKNOWLEDGED,
|
EMAIL_COLLECTION_ACKNOWLEDGED: EMAIL_COLLECTION_ACKNOWLEDGED,
|
||||||
|
@ -651,7 +646,6 @@ const TITLE = 'title';
|
||||||
const FILENAME = 'filename';
|
const FILENAME = 'filename';
|
||||||
|
|
||||||
var sort_options = /*#__PURE__*/Object.freeze({
|
var sort_options = /*#__PURE__*/Object.freeze({
|
||||||
__proto__: null,
|
|
||||||
DATE_NEW: DATE_NEW,
|
DATE_NEW: DATE_NEW,
|
||||||
DATE_OLD: DATE_OLD,
|
DATE_OLD: DATE_OLD,
|
||||||
TITLE: TITLE,
|
TITLE: TITLE,
|
||||||
|
@ -665,7 +659,6 @@ const COMPLETE = 'complete';
|
||||||
const MANUAL = 'manual';
|
const MANUAL = 'manual';
|
||||||
|
|
||||||
var thumbnail_upload_statuses = /*#__PURE__*/Object.freeze({
|
var thumbnail_upload_statuses = /*#__PURE__*/Object.freeze({
|
||||||
__proto__: null,
|
|
||||||
API_DOWN: API_DOWN,
|
API_DOWN: API_DOWN,
|
||||||
READY: READY,
|
READY: READY,
|
||||||
IN_PROGRESS: IN_PROGRESS,
|
IN_PROGRESS: IN_PROGRESS,
|
||||||
|
@ -685,7 +678,6 @@ const UPDATE = 'update';
|
||||||
const ABANDON = 'abandon';
|
const ABANDON = 'abandon';
|
||||||
|
|
||||||
var transaction_types = /*#__PURE__*/Object.freeze({
|
var transaction_types = /*#__PURE__*/Object.freeze({
|
||||||
__proto__: null,
|
|
||||||
ALL: ALL,
|
ALL: ALL,
|
||||||
SPEND: SPEND,
|
SPEND: SPEND,
|
||||||
RECEIVE: RECEIVE,
|
RECEIVE: RECEIVE,
|
||||||
|
@ -702,7 +694,6 @@ const PAGE_SIZE$1 = 50;
|
||||||
const LATEST_PAGE_SIZE = 20;
|
const LATEST_PAGE_SIZE = 20;
|
||||||
|
|
||||||
var transaction_list = /*#__PURE__*/Object.freeze({
|
var transaction_list = /*#__PURE__*/Object.freeze({
|
||||||
__proto__: null,
|
|
||||||
PAGE_SIZE: PAGE_SIZE$1,
|
PAGE_SIZE: PAGE_SIZE$1,
|
||||||
LATEST_PAGE_SIZE: LATEST_PAGE_SIZE
|
LATEST_PAGE_SIZE: LATEST_PAGE_SIZE
|
||||||
});
|
});
|
||||||
|
@ -711,7 +702,6 @@ const SPEECH_STATUS = 'https://spee.ch/api/config/site/publishing';
|
||||||
const SPEECH_PUBLISH = 'https://spee.ch/api/claim/publish';
|
const SPEECH_PUBLISH = 'https://spee.ch/api/claim/publish';
|
||||||
|
|
||||||
var speech_urls = /*#__PURE__*/Object.freeze({
|
var speech_urls = /*#__PURE__*/Object.freeze({
|
||||||
__proto__: null,
|
|
||||||
SPEECH_STATUS: SPEECH_STATUS,
|
SPEECH_STATUS: SPEECH_STATUS,
|
||||||
SPEECH_PUBLISH: SPEECH_PUBLISH
|
SPEECH_PUBLISH: SPEECH_PUBLISH
|
||||||
});
|
});
|
||||||
|
@ -757,7 +747,6 @@ const WALLET_DIR = 'wallet_dir';
|
||||||
const WALLETS = 'wallets';
|
const WALLETS = 'wallets';
|
||||||
|
|
||||||
var daemon_settings = /*#__PURE__*/Object.freeze({
|
var daemon_settings = /*#__PURE__*/Object.freeze({
|
||||||
__proto__: null,
|
|
||||||
ANNOUNCE_HEAD_AND_SD_ONLY: ANNOUNCE_HEAD_AND_SD_ONLY,
|
ANNOUNCE_HEAD_AND_SD_ONLY: ANNOUNCE_HEAD_AND_SD_ONLY,
|
||||||
API: API,
|
API: API,
|
||||||
BLOB_DOWNLOAD_TIMEOUT: BLOB_DOWNLOAD_TIMEOUT,
|
BLOB_DOWNLOAD_TIMEOUT: BLOB_DOWNLOAD_TIMEOUT,
|
||||||
|
@ -811,7 +800,6 @@ var daemon_settings = /*#__PURE__*/Object.freeze({
|
||||||
const WALLET_SERVERS = LBRYUM_SERVERS;
|
const WALLET_SERVERS = LBRYUM_SERVERS;
|
||||||
|
|
||||||
var shared_preferences = /*#__PURE__*/Object.freeze({
|
var shared_preferences = /*#__PURE__*/Object.freeze({
|
||||||
__proto__: null,
|
|
||||||
WALLET_SERVERS: WALLET_SERVERS
|
WALLET_SERVERS: WALLET_SERVERS
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -4269,7 +4257,7 @@ function doCommentCreate(comment = '', claim_id = '', channel, parent_id) {
|
||||||
data: error
|
data: error
|
||||||
});
|
});
|
||||||
dispatch(doToast({
|
dispatch(doToast({
|
||||||
message: 'Oops, someone broke comments.',
|
message: 'Unable to create comment, please try again later.',
|
||||||
isError: true
|
isError: true
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
@ -4294,7 +4282,7 @@ function doCommentHide(comment_id) {
|
||||||
data: error
|
data: error
|
||||||
});
|
});
|
||||||
dispatch(doToast({
|
dispatch(doToast({
|
||||||
message: 'There was an error hiding this comment. Please try again later.',
|
message: 'Unable to hide this comment, please try again later.',
|
||||||
isError: true
|
isError: true
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
@ -4322,6 +4310,10 @@ function doCommentAbandon(comment_id) {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: COMMENT_ABANDON_FAILED
|
type: COMMENT_ABANDON_FAILED
|
||||||
});
|
});
|
||||||
|
dispatch(doToast({
|
||||||
|
message: 'Your channel is still being setup, try again in a few moments.',
|
||||||
|
isError: true
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
dispatch({
|
dispatch({
|
||||||
|
@ -4329,7 +4321,7 @@ function doCommentAbandon(comment_id) {
|
||||||
data: error
|
data: error
|
||||||
});
|
});
|
||||||
dispatch(doToast({
|
dispatch(doToast({
|
||||||
message: 'There was an error hiding this comment. Please try again later.',
|
message: 'Unable to delete this comment, please try again later.',
|
||||||
isError: true
|
isError: true
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
@ -4349,16 +4341,30 @@ function doCommentUpdate(comment_id, comment) {
|
||||||
comment_id: comment_id,
|
comment_id: comment_id,
|
||||||
comment: comment
|
comment: comment
|
||||||
}).then(result => {
|
}).then(result => {
|
||||||
dispatch({
|
if (result != null) {
|
||||||
type: COMMENT_UPDATE_COMPLETED,
|
dispatch({
|
||||||
data: {
|
type: COMMENT_UPDATE_COMPLETED,
|
||||||
comment: result
|
data: {
|
||||||
}
|
comment: result
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// the result will return null
|
||||||
|
dispatch({
|
||||||
|
type: undefined
|
||||||
|
});
|
||||||
|
dispatch(doToast({
|
||||||
|
message: 'Your channel is still being setup, try again in a few moments.',
|
||||||
|
isError: true
|
||||||
|
}));
|
||||||
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
dispatch({ type: COMMENT_UPDATE_FAILED, data: error });
|
dispatch({
|
||||||
|
type: COMMENT_UPDATE_FAILED,
|
||||||
|
data: error
|
||||||
|
});
|
||||||
dispatch(doToast({
|
dispatch(doToast({
|
||||||
message: 'There was an error hiding this comment. Please try again later.',
|
message: 'Unable to edit this comment, please try again later.',
|
||||||
isError: true
|
isError: true
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
@ -4890,10 +4896,7 @@ const commentReducer = handleActions({
|
||||||
[COMMENT_UPDATE_COMPLETED]: (state, action) => {
|
[COMMENT_UPDATE_COMPLETED]: (state, action) => {
|
||||||
const { comment } = action.data;
|
const { comment } = action.data;
|
||||||
const commentById = Object.assign({}, state.commentById);
|
const commentById = Object.assign({}, state.commentById);
|
||||||
|
commentById[comment.comment_id] = comment;
|
||||||
if (comment) {
|
|
||||||
commentById[comment.comment_id] = comment;
|
|
||||||
}
|
|
||||||
|
|
||||||
return _extends$8({}, state, {
|
return _extends$8({}, state, {
|
||||||
commentById,
|
commentById,
|
||||||
|
@ -5913,7 +5916,7 @@ const selectChannelIsBlocked = uri => reselect.createSelector(selectBlockedChann
|
||||||
return state.includes(uri);
|
return state.includes(uri);
|
||||||
});
|
});
|
||||||
|
|
||||||
exports.ACTIONS = action_types;
|
exports.ACTIONS = ACTIONS;
|
||||||
exports.CLAIM_VALUES = claim;
|
exports.CLAIM_VALUES = claim;
|
||||||
exports.DAEMON_SETTINGS = daemon_settings;
|
exports.DAEMON_SETTINGS = daemon_settings;
|
||||||
exports.DEFAULT_FOLLOWED_TAGS = DEFAULT_FOLLOWED_TAGS;
|
exports.DEFAULT_FOLLOWED_TAGS = DEFAULT_FOLLOWED_TAGS;
|
||||||
|
|
|
@ -76,7 +76,7 @@ export function doCommentCreate(
|
||||||
});
|
});
|
||||||
dispatch(
|
dispatch(
|
||||||
doToast({
|
doToast({
|
||||||
message: 'Oops, someone broke comments.',
|
message: 'Unable to create comment, please try again later.',
|
||||||
isError: true,
|
isError: true,
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
@ -105,7 +105,7 @@ export function doCommentHide(comment_id: string) {
|
||||||
});
|
});
|
||||||
dispatch(
|
dispatch(
|
||||||
doToast({
|
doToast({
|
||||||
message: 'There was an error hiding this comment. Please try again later.',
|
message: 'Unable to hide this comment, please try again later.',
|
||||||
isError: true,
|
isError: true,
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
@ -135,6 +135,12 @@ export function doCommentAbandon(comment_id: string) {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.COMMENT_ABANDON_FAILED,
|
type: ACTIONS.COMMENT_ABANDON_FAILED,
|
||||||
});
|
});
|
||||||
|
dispatch(
|
||||||
|
doToast({
|
||||||
|
message: 'Your channel is still being setup, try again in a few moments.',
|
||||||
|
isError: true,
|
||||||
|
})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
|
@ -144,7 +150,7 @@ export function doCommentAbandon(comment_id: string) {
|
||||||
});
|
});
|
||||||
dispatch(
|
dispatch(
|
||||||
doToast({
|
doToast({
|
||||||
message: 'There was an error hiding this comment. Please try again later.',
|
message: 'Unable to delete this comment, please try again later.',
|
||||||
isError: true,
|
isError: true,
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
@ -166,18 +172,34 @@ export function doCommentUpdate(comment_id: string, comment: string) {
|
||||||
comment: comment,
|
comment: comment,
|
||||||
})
|
})
|
||||||
.then((result: CommentUpdateResponse) => {
|
.then((result: CommentUpdateResponse) => {
|
||||||
dispatch({
|
if (result != null) {
|
||||||
type: ACTIONS.COMMENT_UPDATE_COMPLETED,
|
dispatch({
|
||||||
data: {
|
type: ACTIONS.COMMENT_UPDATE_COMPLETED,
|
||||||
comment: result,
|
data: {
|
||||||
},
|
comment: result,
|
||||||
});
|
},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// the result will return null
|
||||||
|
dispatch({
|
||||||
|
type: ACTIONS.COMENT_UPDATE_FAILED,
|
||||||
|
});
|
||||||
|
dispatch(
|
||||||
|
doToast({
|
||||||
|
message: 'Your channel is still being setup, try again in a few moments.',
|
||||||
|
isError: true,
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
dispatch({ type: ACTIONS.COMMENT_UPDATE_FAILED, data: error });
|
dispatch({
|
||||||
|
type: ACTIONS.COMMENT_UPDATE_FAILED,
|
||||||
|
data: error,
|
||||||
|
});
|
||||||
dispatch(
|
dispatch(
|
||||||
doToast({
|
doToast({
|
||||||
message: 'There was an error hiding this comment. Please try again later.',
|
message: 'Unable to edit this comment, please try again later.',
|
||||||
isError: true,
|
isError: true,
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
|
@ -121,10 +121,7 @@ export const commentReducer = handleActions(
|
||||||
[ACTIONS.COMMENT_UPDATE_COMPLETED]: (state: CommentsState, action: any) => {
|
[ACTIONS.COMMENT_UPDATE_COMPLETED]: (state: CommentsState, action: any) => {
|
||||||
const { comment } = action.data;
|
const { comment } = action.data;
|
||||||
const commentById = Object.assign({}, state.commentById);
|
const commentById = Object.assign({}, state.commentById);
|
||||||
|
commentById[comment.comment_id] = comment;
|
||||||
if (comment) {
|
|
||||||
commentById[comment.comment_id] = comment;
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
|
|
Loading…
Reference in a new issue