Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8260bf1ec8 |
No files matched your search
+4
-20
@@ -2,33 +2,17 @@
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
## [Unreleased for desktop]
|
||||
|
||||
### Added
|
||||
- Checkbox to disable background wallpaper ([#7630](https://github.com/lbryio/lbry-desktop/pull/7630))
|
||||
|
||||
### Fixed
|
||||
- Better handle cover uploads ([#7647](https://github.com/lbryio/lbry-desktop/pull/7647))
|
||||
- Use default path when first choosing file on windows ([#7625](https://github.com/lbryio/lbry-desktop/pull/7625))
|
||||
- Emoji button hover ([#7620](https://github.com/lbryio/lbry-desktop/pull/7620))
|
||||
- Prevent infinite retries on thumbs ([#7618](https://github.com/lbryio/lbry-desktop/pull/7618))
|
||||
- Double splash/error on app startup ([#7615](https://github.com/lbryio/lbry-desktop/pull/7615))
|
||||
- App updates are now more coherent, also debs work. ([#7502](https://github.com/lbryio/lbry-desktop/pull/7502))
|
||||
|
||||
### Changed
|
||||
- Upgraded Electron to v15.5.5 ([#7614](https://github.com/lbryio/lbry-desktop/pull/7614))
|
||||
|
||||
|
||||
## [0.53.4] - [2022-06-10]
|
||||
|
||||
### Added
|
||||
## Added
|
||||
- Add top in language category for non-english on homepage ([#7585](https://github.com/lbryio/lbry-desktop/pull/7585))
|
||||
- Auto hosting in settings and hosting first run page ([#7598](https://github.com/lbryio/lbry-desktop/pull/7598))
|
||||
|
||||
### Changed
|
||||
- Updated lbry-sdk to [0.107.2](https://github.com/lbryio/lbry-sdk/releases/tag/v0.107.2)
|
||||
|
||||
### Fixed
|
||||
## Fixed
|
||||
- Better handle empty collections ([#7571](https://github.com/lbryio/lbry-desktop/pull/7571))
|
||||
- Better handle thumbnails in uploads/collections ([#7574](https://github.com/lbryio/lbry-desktop/pull/7574))
|
||||
- Work towards supporting collections of any claim type ([#7578](https://github.com/lbryio/lbry-desktop/pull/7578))
|
||||
@@ -38,7 +22,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
|
||||
## [0.53.3] - [2022-04-27]
|
||||
|
||||
### Fixed
|
||||
## Fixed
|
||||
- Reverted lbry.tv changes that broke production login ([#7569](https://github.com/lbryio/lbry-desktop/pull/7569))
|
||||
- Reverted lbry.tv changes that broke login ([#7570](https://github.com/lbryio/lbry-desktop/pull/7570))
|
||||
|
||||
@@ -49,7 +33,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
- Removed some lbrytv references ([#7560](https://github.com/lbryio/lbry-desktop/pull/7560))
|
||||
- Removed some lbrytv player references ([#7552](https://github.com/lbryio/lbry-desktop/pull/7552))
|
||||
|
||||
### Fixed
|
||||
## Fixed
|
||||
- Repost style issues ([#7559](https://github.com/lbryio/lbry-desktop/pull/7559))
|
||||
- Disappearing sidebar thumbs ([#7556](https://github.com/lbryio/lbry-desktop/pull/7556))
|
||||
- Restore tags sidebar link ([#7555](https://github.com/lbryio/lbry-desktop/pull/7555))
|
||||
|
||||
@@ -2316,5 +2316,13 @@
|
||||
"Installing, please wait...": "Installing, please wait...",
|
||||
"There was an error during installation. Please, try again.": "There was an error during installation. Please, try again.",
|
||||
"Odysee Connect --[Section in Help Page]--": "Odysee Connect",
|
||||
"Export Wallet": "Export Wallet",
|
||||
"Export encrypted sync data for import in another app.": "Export encrypted sync data for import in another app.",
|
||||
"Export wallet sync data. Choose a secure password you will need for import.": "Export wallet sync data. Choose a secure password you will need for import.",
|
||||
"Choose Password": "Choose Password",
|
||||
"Sync data copied.": "Sync data copied.",
|
||||
"Your Sync Data is prepared. You can now copy or save it.": "Your Sync Data is prepared. You can now copy or save it.",
|
||||
"Export wallet": "Export wallet",
|
||||
"Sync data saved.": "Sync data saved.",
|
||||
"--end--": "--end--"
|
||||
}
|
||||
@@ -94,11 +94,10 @@ function ChannelForm(props: Props) {
|
||||
const [nameError, setNameError] = React.useState(undefined);
|
||||
const [bidError, setBidError] = React.useState('');
|
||||
const [isUpload, setIsUpload] = React.useState({ cover: false, thumbnail: false });
|
||||
const [coverError, setCoverError] = React.useState(false);
|
||||
const [thumbError, setThumbError] = React.useState(false);
|
||||
const { claim_id: claimId } = claim || {};
|
||||
const [params, setParams]: [any, (any) => void] = React.useState(getChannelParams());
|
||||
const [coverError, setCoverError] = React.useState(false);
|
||||
const [coverPreview, setCoverPreview] = React.useState(params.coverUrl);
|
||||
const { channelName } = parseURI(uri);
|
||||
const name = params.name;
|
||||
const isNewChannel = !uri;
|
||||
@@ -207,8 +206,7 @@ function ChannelForm(props: Props) {
|
||||
setThumbError(false);
|
||||
}
|
||||
|
||||
function handleCoverChange(coverUrl: string, uploadSelected: boolean, preview: ?string) {
|
||||
setCoverPreview(preview || '');
|
||||
function handleCoverChange(coverUrl: string, uploadSelected: boolean) {
|
||||
setParams({ ...params, coverUrl });
|
||||
setIsUpload({ ...isUpload, cover: uploadSelected });
|
||||
setCoverError(false);
|
||||
@@ -261,7 +259,7 @@ function ChannelForm(props: Props) {
|
||||
}
|
||||
}, [hasClaimedInitialRewards, claimInitialRewards]);
|
||||
|
||||
const coverSrc = coverError ? ThumbnailBrokenImage : coverPreview;
|
||||
const coverSrc = coverError ? ThumbnailBrokenImage : params.coverUrl;
|
||||
|
||||
let thumbnailPreview;
|
||||
if (!params.thumbnailUrl) {
|
||||
@@ -283,7 +281,7 @@ function ChannelForm(props: Props) {
|
||||
title={__('Cover')}
|
||||
onClick={() =>
|
||||
openModal(MODALS.IMAGE_UPLOAD, {
|
||||
onUpdate: (coverUrl, isUpload, preview) => handleCoverChange(coverUrl, isUpload, preview),
|
||||
onUpdate: (coverUrl, isUpload) => handleCoverChange(coverUrl, isUpload),
|
||||
title: __('Edit Cover Image'),
|
||||
helpText: __('(6.25:1)'),
|
||||
assetName: __('Cover Image'),
|
||||
|
||||
@@ -28,6 +28,7 @@ import type { ElementRef } from 'react';
|
||||
import UriIndicator from 'component/uriIndicator';
|
||||
import usePersistedState from 'effects/use-persisted-state';
|
||||
import WalletTipAmountSelector from 'component/walletTipAmountSelector';
|
||||
|
||||
import { getStripeEnvironment } from 'util/stripe';
|
||||
const stripeEnvironment = getStripeEnvironment();
|
||||
|
||||
|
||||
@@ -23,9 +23,6 @@ import { doCommentReset, doCommentList, doCommentById, doCommentReactList } from
|
||||
import { selectActiveChannelClaim } from 'redux/selectors/app';
|
||||
import { getChannelIdFromClaim } from 'util/claim';
|
||||
import CommentsList from './view';
|
||||
import { makeSelectClientSetting } from 'redux/selectors/settings';
|
||||
import * as SETTINGS from 'constants/settings';
|
||||
import { doSetClientSetting } from 'redux/actions/settings';
|
||||
|
||||
const select = (state, props) => {
|
||||
const { uri } = props;
|
||||
@@ -59,19 +56,15 @@ const select = (state, props) => {
|
||||
myReactsByCommentId: selectMyReacts(state),
|
||||
othersReactsById: selectOthersReacts(state),
|
||||
activeChannelId: activeChannelClaim && activeChannelClaim.claim_id,
|
||||
customCommentServers: makeSelectClientSetting(SETTINGS.CUSTOM_COMMENTS_SERVERS)(state),
|
||||
commentServer: makeSelectClientSetting(SETTINGS.CUSTOM_COMMENTS_SERVER_URL)(state),
|
||||
};
|
||||
};
|
||||
|
||||
const perform = (dispatch, ownProps) => ({
|
||||
fetchTopLevelComments: (uri, parentId, page, pageSize, sortBy) =>
|
||||
dispatch(doCommentList(uri, parentId, page, pageSize, sortBy)),
|
||||
fetchComment: (commentId) => dispatch(doCommentById(commentId)),
|
||||
fetchReacts: (commentIds) => dispatch(doCommentReactList(commentIds)),
|
||||
resetComments: (claimId) => dispatch(doCommentReset(claimId)),
|
||||
doResolveUris: (uris, returnCachedClaims) => dispatch(doResolveUris(uris, returnCachedClaims)),
|
||||
setCommentServer: (url) => dispatch(doSetClientSetting(SETTINGS.CUSTOM_COMMENTS_SERVER_URL, url, true)),
|
||||
});
|
||||
const perform = {
|
||||
fetchTopLevelComments: doCommentList,
|
||||
fetchComment: doCommentById,
|
||||
fetchReacts: doCommentReactList,
|
||||
resetComments: doCommentReset,
|
||||
doResolveUris,
|
||||
};
|
||||
|
||||
export default connect(select, perform)(CommentsList);
|
||||
@@ -1,6 +1,6 @@
|
||||
// @flow
|
||||
import { COMMENT_PAGE_SIZE_TOP_LEVEL, SORT_BY } from 'constants/comment';
|
||||
import { ENABLE_COMMENT_REACTIONS, COMMENT_SERVER_API, COMMENT_SERVER_NAME } from 'config';
|
||||
import { ENABLE_COMMENT_REACTIONS } from 'config';
|
||||
import { useIsMobile, useIsMediumScreen } from 'effects/use-screensize';
|
||||
import { getCommentsListTitle } from 'util/comments';
|
||||
import * as ICONS from 'constants/icons';
|
||||
@@ -15,8 +15,6 @@ import Empty from 'component/common/empty';
|
||||
import React, { useEffect } from 'react';
|
||||
import Spinner from 'component/spinner';
|
||||
import usePersistedState from 'effects/use-persisted-state';
|
||||
import { FormField } from 'component/common/form';
|
||||
import Comments from 'comments';
|
||||
|
||||
const DEBOUNCE_SCROLL_HANDLER_MS = 200;
|
||||
|
||||
@@ -54,9 +52,6 @@ type Props = {
|
||||
fetchReacts: (commentIds: Array<string>) => Promise<any>,
|
||||
resetComments: (claimId: string) => void,
|
||||
doResolveUris: (uris: Array<string>, returnCachedClaims: boolean) => void,
|
||||
customCommentServers: Array<CommentServerDetails>,
|
||||
setCommentServer: (string) => void,
|
||||
commentServer: string,
|
||||
};
|
||||
|
||||
export default function CommentList(props: Props) {
|
||||
@@ -85,17 +80,11 @@ export default function CommentList(props: Props) {
|
||||
fetchReacts,
|
||||
resetComments,
|
||||
doResolveUris,
|
||||
customCommentServers,
|
||||
setCommentServer,
|
||||
commentServer,
|
||||
} = props;
|
||||
|
||||
const isMobile = useIsMobile();
|
||||
const isMediumScreen = useIsMediumScreen();
|
||||
|
||||
const defaultServer = { name: COMMENT_SERVER_NAME, url: COMMENT_SERVER_API };
|
||||
const allServers = [defaultServer, ...(customCommentServers || [])];
|
||||
|
||||
const spinnerRef = React.useRef();
|
||||
const DEFAULT_SORT = ENABLE_COMMENT_REACTIONS ? SORT_BY.POPULARITY : SORT_BY.NEWEST;
|
||||
const [sort, setSort] = usePersistedState('comment-sort-by', DEFAULT_SORT);
|
||||
@@ -266,16 +255,7 @@ export default function CommentList(props: Props) {
|
||||
}, [alreadyResolved, doResolveUris, topLevelComments]);
|
||||
|
||||
const commentProps = { isTopLevel: true, threadDepth: 3, uri, claimIsMine, linkedCommentId };
|
||||
const actionButtonsProps = {
|
||||
totalComments,
|
||||
sort,
|
||||
changeSort,
|
||||
setPage,
|
||||
allServers,
|
||||
commentServer,
|
||||
defaultServer,
|
||||
setCommentServer,
|
||||
};
|
||||
const actionButtonsProps = { totalComments, sort, changeSort, setPage };
|
||||
|
||||
return (
|
||||
<Card
|
||||
@@ -354,15 +334,11 @@ type ActionButtonsProps = {
|
||||
sort: string,
|
||||
changeSort: (string) => void,
|
||||
setPage: (number) => void,
|
||||
allServers: Array<CommentServerDetails>,
|
||||
commentServer: string,
|
||||
setCommentServer: (string) => void,
|
||||
defaultServer: CommentServerDetails,
|
||||
};
|
||||
|
||||
const CommentActionButtons = (actionButtonsProps: ActionButtonsProps) => {
|
||||
const { totalComments, sort, changeSort, setPage, allServers, commentServer, setCommentServer, defaultServer } =
|
||||
actionButtonsProps;
|
||||
const { totalComments, sort, changeSort, setPage } = actionButtonsProps;
|
||||
|
||||
const sortButtonProps = { activeSort: sort, changeSort };
|
||||
|
||||
return (
|
||||
@@ -379,34 +355,8 @@ const CommentActionButtons = (actionButtonsProps: ActionButtonsProps) => {
|
||||
<SortButton {...sortButtonProps} label={__('New')} icon={ICONS.NEW} sortOption={SORT_BY.NEWEST} />
|
||||
</span>
|
||||
)}
|
||||
<div className="button_refresh">
|
||||
<Button button="alt" icon={ICONS.REFRESH} title={__('Refresh')} onClick={() => setPage(0)} />
|
||||
</div>
|
||||
{allServers.length >= 2 && (
|
||||
<div className="button_selectedServer">
|
||||
<FormField
|
||||
type="select-tiny"
|
||||
onChange={function (x) {
|
||||
const selectedServer = x.target.value;
|
||||
setCommentServer(selectedServer);
|
||||
if (selectedServer === defaultServer.url) {
|
||||
Comments.setServerUrl(undefined);
|
||||
} else {
|
||||
Comments.setServerUrl(selectedServer);
|
||||
}
|
||||
}}
|
||||
value={commentServer}
|
||||
>
|
||||
{allServers.map(function (server) {
|
||||
return (
|
||||
<option key={server.url} value={server.url}>
|
||||
{server.name}
|
||||
</option>
|
||||
);
|
||||
})}
|
||||
</FormField>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<Button button="alt" icon={ICONS.REFRESH} title={__('Refresh')} onClick={() => setPage(0)} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -15,35 +15,15 @@ const SPEECH_UPLOADING = 'UPLOADING';
|
||||
type Props = {
|
||||
assetName: string,
|
||||
currentValue: ?string,
|
||||
onUpdate: (string, boolean, ?string) => void,
|
||||
onUpdate: (string, boolean) => void,
|
||||
recommended: string,
|
||||
title: string,
|
||||
onDone?: () => void,
|
||||
inline?: boolean,
|
||||
// When uploading pictures, the upload service
|
||||
// can return success but the image isn't ready
|
||||
// to be displayed yet. This is when a local preview
|
||||
// comes in handy. The preview (base 64) will be
|
||||
// passed to the onUpdate function after the
|
||||
// upload service returns success.
|
||||
buildImagePreview?: boolean,
|
||||
};
|
||||
|
||||
function filePreview(file) {
|
||||
return new Promise((resolve) => {
|
||||
const reader = new FileReader();
|
||||
reader.onload = () => {
|
||||
resolve(reader.result.toString());
|
||||
};
|
||||
reader.onerror = () => {
|
||||
resolve(undefined);
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
});
|
||||
}
|
||||
|
||||
function SelectAsset(props: Props) {
|
||||
const { onUpdate, onDone, assetName, currentValue, recommended, title, inline, buildImagePreview } = props;
|
||||
const { onUpdate, onDone, assetName, currentValue, recommended, title, inline } = props;
|
||||
const [pathSelected, setPathSelected] = React.useState('');
|
||||
const [fileSelected, setFileSelected] = React.useState<any>(null);
|
||||
const [uploadStatus, setUploadStatus] = React.useState(SPEECH_READY);
|
||||
@@ -56,15 +36,9 @@ function SelectAsset(props: Props) {
|
||||
setError(error);
|
||||
};
|
||||
|
||||
const onSuccess = async (thumbnailUrl) => {
|
||||
let preview;
|
||||
const onSuccess = (thumbnailUrl) => {
|
||||
setUploadStatus(SPEECH_READY);
|
||||
|
||||
if (buildImagePreview) {
|
||||
preview = await filePreview(fileSelected);
|
||||
}
|
||||
|
||||
onUpdate(thumbnailUrl, !useUrl, preview);
|
||||
onUpdate(thumbnailUrl, !useUrl);
|
||||
|
||||
if (onDone) {
|
||||
onDone();
|
||||
|
||||
@@ -6,6 +6,7 @@ import {
|
||||
doNotifyDecryptWallet,
|
||||
doNotifyEncryptWallet,
|
||||
doNotifyForgetPassword,
|
||||
doOpenModal,
|
||||
doToggle3PAnalytics,
|
||||
} from 'redux/actions/app';
|
||||
import { doSetDaemonSetting, doClearDaemonSetting, doFindFFmpeg } from 'redux/actions/settings';
|
||||
@@ -25,6 +26,7 @@ const select = (state) => ({
|
||||
});
|
||||
|
||||
const perform = (dispatch) => ({
|
||||
openModal: (modal, props) => dispatch(doOpenModal(modal, props)),
|
||||
setDaemonSetting: (key, value) => dispatch(doSetDaemonSetting(key, value)),
|
||||
clearDaemonSetting: (key) => dispatch(doClearDaemonSetting(key)),
|
||||
clearCache: () => dispatch(doClearCache()),
|
||||
|
||||
@@ -18,6 +18,7 @@ import { getPasswordFromCookie } from 'util/saved-passwords';
|
||||
import * as DAEMON_SETTINGS from 'constants/daemon_settings';
|
||||
import SettingEnablePrereleases from 'component/settingEnablePrereleases';
|
||||
import SettingDisableAutoUpdates from 'component/settingDisableAutoUpdates';
|
||||
import * as MODALS from 'constants/modal_types';
|
||||
|
||||
const IS_MAC = process.platform === 'darwin';
|
||||
|
||||
@@ -56,6 +57,7 @@ type Props = {
|
||||
updateWalletStatus: () => void,
|
||||
confirmForgetPassword: ({}) => void,
|
||||
toggle3PAnalytics: (boolean) => void,
|
||||
openModal: (string, any) => void,
|
||||
};
|
||||
|
||||
export default function SettingSystem(props: Props) {
|
||||
@@ -75,6 +77,7 @@ export default function SettingSystem(props: Props) {
|
||||
updateWalletStatus,
|
||||
confirmForgetPassword,
|
||||
toggle3PAnalytics,
|
||||
openModal,
|
||||
} = props;
|
||||
|
||||
const [clearingCache, setClearingCache] = React.useState(false);
|
||||
@@ -376,6 +379,20 @@ export default function SettingSystem(props: Props) {
|
||||
<SettingsRow title={__('Share url')} multirow>
|
||||
<SettingShareUrl />
|
||||
</SettingsRow>
|
||||
<SettingsRow
|
||||
title={__('Export Wallet')}
|
||||
subtitle={__('Export encrypted sync data for import in another app.')}
|
||||
>
|
||||
<Button
|
||||
button="primary"
|
||||
className="expandable__button"
|
||||
label={__('Export')}
|
||||
aria-label={__('Export wallet')}
|
||||
onClick={() => {
|
||||
openModal(MODALS.WALLET_EXPORT, {});
|
||||
}}
|
||||
/>
|
||||
</SettingsRow>
|
||||
<SettingsRow
|
||||
title={__('Clear application cache')}
|
||||
subtitle={__('This might fix issues that you are having. Your wallet will not be affected.')}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
import WalletExport from './view';
|
||||
import { doToast } from 'redux/actions/notifications';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
const perform = (dispatch) => ({
|
||||
toast: (message, isError) => dispatch(doToast({ message, isError })),
|
||||
});
|
||||
|
||||
export default connect(null, perform)(WalletExport);
|
||||
@@ -0,0 +1,112 @@
|
||||
// @flow
|
||||
import React from 'react';
|
||||
import Button from 'component/button';
|
||||
import { Form, FormField } from 'component/common/form';
|
||||
import Card from 'component/common/card';
|
||||
import Lbry from 'lbry';
|
||||
import fs from 'fs';
|
||||
import { clipboard } from 'electron';
|
||||
import * as ICONS from 'constants/icons';
|
||||
import * as remote from '@electron/remote';
|
||||
|
||||
type Props = {
|
||||
onDone: () => void,
|
||||
toast: (string, boolean) => void,
|
||||
};
|
||||
|
||||
function WalletExport(props: Props) {
|
||||
const { onDone, toast } = props;
|
||||
|
||||
const [password, setPassword] = React.useState();
|
||||
const [data, setData] = React.useState();
|
||||
const [fetching, setFetching] = React.useState();
|
||||
const getData = async (password) => {
|
||||
setFetching(true);
|
||||
const data = await Lbry.sync_apply({ password });
|
||||
setFetching(false);
|
||||
setData(data);
|
||||
};
|
||||
|
||||
const handleSaveFile = () => {
|
||||
let defaultPath;
|
||||
let isWin = process.platform === 'win32';
|
||||
|
||||
if (isWin === true) {
|
||||
defaultPath = process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE;
|
||||
}
|
||||
|
||||
remote.dialog
|
||||
.showSaveDialog({
|
||||
title: 'Select File Path',
|
||||
defaultPath,
|
||||
buttonLabel: 'Save',
|
||||
filters: [
|
||||
{
|
||||
name: 'JSON Files',
|
||||
extensions: ['json'],
|
||||
},
|
||||
],
|
||||
})
|
||||
.then((file) => {
|
||||
if (!file.canceled) {
|
||||
fs.writeFile(file.filePath.toString(), JSON.stringify(data), function (err) {
|
||||
if (err) throw err;
|
||||
toast(__('Sync data saved.'), false);
|
||||
onDone();
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
toast(__('Data could not be saved'), true);
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<Card
|
||||
title={__('Export Wallet')}
|
||||
subtitle={
|
||||
data
|
||||
? __('Your Sync Data is prepared. You can now copy or save it.')
|
||||
: __('Export wallet sync data. Choose a secure password you will need for import.')
|
||||
}
|
||||
actions={
|
||||
<React.Fragment>
|
||||
{!data && (
|
||||
<Form onSubmit={() => alert()}>
|
||||
<FormField
|
||||
autoFocus
|
||||
type="password"
|
||||
name="password_set"
|
||||
label={__('Choose Password')}
|
||||
value={password}
|
||||
onChange={(e) => setPassword(e.target.value)}
|
||||
/>
|
||||
<div className="section__actions--between">
|
||||
<Button button={'primary'} onClick={() => getData(password)} label={'Get Data'} disabled={fetching} />
|
||||
</div>
|
||||
</Form>
|
||||
)}
|
||||
{data && (
|
||||
<div className="section__actions">
|
||||
<div className="section__actions--between">
|
||||
<Button button={'primary'} onClick={handleSaveFile} label={'Save Data'} icon={ICONS.DOWNLOAD} />
|
||||
<Button
|
||||
button={'secondary'}
|
||||
onClick={() => {
|
||||
clipboard.writeText(JSON.stringify(data));
|
||||
toast(__('Sync data copied.'), false);
|
||||
}}
|
||||
label={'Copy Data'}
|
||||
icon={ICONS.COPY}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</React.Fragment>
|
||||
}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export default WalletExport;
|
||||
@@ -46,3 +46,4 @@ export const COLLECTION_ADD = 'collection_add';
|
||||
export const COLLECTION_DELETE = 'collection_delete';
|
||||
export const CONFIRM_REMOVE_CARD = 'CONFIRM_REMOVE_CARD';
|
||||
export const CONFIRM_REMOVE_COMMENT = 'CONFIRM_REMOVE_COMMENT';
|
||||
export const WALLET_EXPORT = 'WALLET_EXPORT';
|
||||
@@ -8,7 +8,7 @@ type Props = {
|
||||
currentValue: string,
|
||||
title: string,
|
||||
helpText: string,
|
||||
onUpdate: (string, boolean, ?string) => void,
|
||||
onUpdate: (string, boolean) => void,
|
||||
assetName: string,
|
||||
};
|
||||
|
||||
@@ -18,12 +18,11 @@ function ModalImageUpload(props: Props) {
|
||||
return (
|
||||
<Modal isOpen type="card" onAborted={closeModal} contentLabel={title}>
|
||||
<SelectAsset
|
||||
onUpdate={onUpdate}
|
||||
onUpdate={(a, b) => onUpdate(a, b)}
|
||||
currentValue={currentValue}
|
||||
assetName={assetName}
|
||||
recommended={helpText}
|
||||
onDone={closeModal}
|
||||
buildImagePreview
|
||||
/>
|
||||
</Modal>
|
||||
);
|
||||
|
||||
@@ -65,6 +65,7 @@ import ModalWalletDecrypt from 'modal/modalWalletDecrypt';
|
||||
import ModalWalletEncrypt from 'modal/modalWalletEncrypt';
|
||||
|
||||
import ModalWalletUnlock from 'modal/modalWalletUnlock';
|
||||
import ModalWalletExport from 'modal/modalWalletExport';
|
||||
|
||||
function getModal(id) {
|
||||
switch (id) {
|
||||
@@ -149,6 +150,8 @@ function getModal(id) {
|
||||
return ModalRemoveCard;
|
||||
case MODALS.CONFIRM_REMOVE_COMMENT:
|
||||
return ModalRemoveComment;
|
||||
case MODALS.WALLET_EXPORT:
|
||||
return ModalWalletExport;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { doHideModal } from 'redux/actions/app';
|
||||
import ModalWalletExport from './view';
|
||||
|
||||
const perform = (dispatch) => ({
|
||||
closeModal: () => dispatch(doHideModal()),
|
||||
});
|
||||
|
||||
export default connect(null, perform)(ModalWalletExport);
|
||||
@@ -0,0 +1,18 @@
|
||||
// @flow
|
||||
import React from 'react';
|
||||
import { Modal } from 'modal/modal';
|
||||
import WalletExport from 'component/walletExport';
|
||||
|
||||
type Props = {
|
||||
closeModal: () => void,
|
||||
};
|
||||
|
||||
export default function ModalWalletExport(props: Props) {
|
||||
const { closeModal } = props;
|
||||
|
||||
return (
|
||||
<Modal isOpen contentLabel={'Export Wallet'} type="card" onAborted={closeModal}>
|
||||
<WalletExport onDone={closeModal} />
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
@@ -274,21 +274,6 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
|
||||
.select--slim {
|
||||
display: flex;
|
||||
margin-left: var(--spacing-s);
|
||||
margin-bottom: var(--spacing-s);
|
||||
|
||||
@media (min-width: $breakpoint-small) {
|
||||
max-width: none;
|
||||
|
||||
select {
|
||||
padding: 0 var(--spacing-xs);
|
||||
padding-right: var(--spacing-l);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.card--enable-overflow {
|
||||
@@ -333,7 +318,6 @@
|
||||
align-self: flex-start;
|
||||
.button--alt {
|
||||
padding-top: 2px;
|
||||
padding: 0 var(--spacing-s);
|
||||
}
|
||||
.comment__sort {
|
||||
.button--alt {
|
||||
@@ -658,25 +642,3 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.button_selectedServer {
|
||||
display: inline;
|
||||
float: right;
|
||||
select {
|
||||
width: 12rem;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
@media (max-width: $breakpoint-small) {
|
||||
select {
|
||||
width: 8rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.button_refresh {
|
||||
display: inline;
|
||||
float: right;
|
||||
margin-left: var(--spacing-s);
|
||||
}
|
||||
@@ -37,12 +37,16 @@ $thumbnailWidthSmall: 1rem;
|
||||
}
|
||||
|
||||
.comment__sort {
|
||||
margin-right: var(--spacing-s);
|
||||
display: inline-block;
|
||||
|
||||
@media (min-width: $breakpoint-small) {
|
||||
margin-top: 0;
|
||||
display: inline;
|
||||
}
|
||||
@media (max-width: $breakpoint-small) {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.comment {
|
||||
|
||||
@@ -62,9 +62,6 @@ $spacing-width: 36px;
|
||||
--floating-viewer-container-height: calc(var(--floating-viewer-height) + var(--floating-viewer-info-height));
|
||||
--option-select-width: 8rem;
|
||||
|
||||
--input-select-server-min-width: 100px;
|
||||
--input-select-server-max-width: 250px;
|
||||
|
||||
// Text
|
||||
--text-max-width: 660px;
|
||||
--text-link-padding: 4px;
|
||||
|
||||
Reference in new issue
Block a user