diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100644 index c6cc8c819..000000000 --- a/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/lbry-app.iml b/.idea/lbry-app.iml deleted file mode 100644 index 24643cc37..000000000 --- a/.idea/lbry-app.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 3668dc8ca..000000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index b37b46a86..000000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 94a25f7f4..000000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml deleted file mode 100644 index a51b0ec12..000000000 --- a/.idea/workspace.xml +++ /dev/null @@ -1,547 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - TYPE_FEATURED_DOWNLOAD - TYPE_FEATURED_DOW - doOpen - doNotify - settings - - - - - - - - - - - - - true - - false - true - true - - - true - DEFINITION_ORDER - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (this.input = input)} - className="search__input" - value={query} - placeholder={__('Search for anything...')} - onChange={event => updateSearchQuery(event.target.value)} - /> - - {isURIValid(query) && ( - -
- {__('Exact URL')} - - - -
- -
- )} - -
{__('These search results are provided by LBRY, Inc.')}
- + + {isURIValid(query) && ( + +
+ {__('Exact URL')} + + + +
+ +
+ )} + +
{__('These search results are provided by LBRY, Inc.')}
); } diff --git a/src/renderer/redux/actions/content.js b/src/renderer/redux/actions/content.js index 7278beb3d..f16d89f6f 100644 --- a/src/renderer/redux/actions/content.js +++ b/src/renderer/redux/actions/content.js @@ -225,7 +225,11 @@ export function doDownloadFile(uri, streamInfo) { return dispatch => { dispatch(doStartDownload(uri, streamInfo.outpoint)); - analytics.apiLogView(uri, streamInfo.output, streamInfo.claim_id); + analytics.apiLogView( + `${streamInfo.claim_name}#${streamInfo.claim_id}`, + streamInfo.outpoint, + streamInfo.claim_id + ); dispatch(doClaimEligiblePurchaseRewards()); }; diff --git a/src/renderer/scss/_vars.scss b/src/renderer/scss/_vars.scss index a30c51765..1909e3ffe 100644 --- a/src/renderer/scss/_vars.scss +++ b/src/renderer/scss/_vars.scss @@ -150,8 +150,8 @@ $large-breakpoint: 1760px; --success-msg-bg: var(--color-green-light); /* File Tile Card */ - --file-tile--media-height: 60px; - --file-tile--media-width: 94px; // 60 * (1 + 9/16) + --file-tile--media-height: 100px; + --file-tile--media-width: calc(100px * (1 + 9 / 16)); /* Modal */ --modal-width: 440px; diff --git a/src/renderer/scss/component/_card.scss b/src/renderer/scss/component/_card.scss index e9f38fbd1..f06976225 100644 --- a/src/renderer/scss/component/_card.scss +++ b/src/renderer/scss/component/_card.scss @@ -100,13 +100,6 @@ color: var(--text-color); } -.card__title--file { - font-family: 'metropolis-bold'; - font-size: 28px; - line-height: 36px; - padding-top: 20px; -} - .card__title--small { font-size: 14px; line-height: 18px; @@ -114,11 +107,16 @@ } .card__title--file { + font-family: 'metropolis-bold'; + font-size: 28px; + margin-bottom: 0; padding-top: 0; padding-bottom: 5px; + font-size: 18px; } .card__subtitle { + margin: 0; font-size: 14px; font-family: 'metropolis-medium'; color: var(--card-text-color); @@ -200,6 +198,10 @@ font-family: 'metropolis-medium'; } +.card__subtext--small { + font-size: calc(var(--font-size-subtext-multiple) * 0.8em); +} + .card__actions { margin-top: $spacing-vertical * 2/3; display: flex; diff --git a/src/renderer/scss/component/_file-list.scss b/src/renderer/scss/component/_file-list.scss index 30b2de303..c7e21cc8d 100644 --- a/src/renderer/scss/component/_file-list.scss +++ b/src/renderer/scss/component/_file-list.scss @@ -13,7 +13,7 @@ .file-list__header { margin-top: $spacing-vertical * 4/3; - font-size: 18px; + font-size: 24px; .tooltip { margin-left: 5px; @@ -23,7 +23,6 @@ .file-tile { display: flex; margin-top: $spacing-vertical; - max-width: 260px; .card__media { height: var(--file-tile--media-height); @@ -40,7 +39,10 @@ } .file-tile__info { - margin-left: $spacing-vertical * 1/3; + display: flex; + flex-direction: column; + margin-left: $spacing-vertical * 2/3; + max-width: 500px; } .file-tile__uri { diff --git a/src/renderer/scss/component/_search.scss b/src/renderer/scss/component/_search.scss index ea3234369..29b05b12a 100644 --- a/src/renderer/scss/component/_search.scss +++ b/src/renderer/scss/component/_search.scss @@ -81,28 +81,15 @@ background-color: var(--color-secondary); } -// Search modal -// Input field used inside search modal -.search__wrapper { - height: var(--search-modal-input-height); -} - -.search__input { - font-family: 'metropolis-bold'; - font-size: var(--search-modal-input-height); - color: var(--search-color); - background: transparent; - width: 100%; -} - .search__results { - display: flex; padding-bottom: $spacing-vertical; + flex-flow: wrap column; - .search-result__column { - flex: 0 0 270px; - .card__media { - background-color: var(--color-search-placeholder); + .search-result__row { + padding: $spacing-vertical 0; + + &:first-of-type { + padding-top: 0; } } } diff --git a/src/renderer/util/contextMenu.js b/src/renderer/util/contextMenu.js index 79f47da5b..900ebf54a 100644 --- a/src/renderer/util/contextMenu.js +++ b/src/renderer/util/contextMenu.js @@ -21,26 +21,41 @@ function injectDevelopmentTemplate(event, templates) { return templates; } -export function openContextMenu(event, templates = [], addDefaultTemplates = true) { - if (addDefaultTemplates) { - const { value } = event.target; - const inputTemplates = [ - { label: 'Cut', accelerator: 'CmdOrCtrl+X', role: 'cut' }, - { label: 'Copy', accelerator: 'CmdOrCtrl+C', role: 'copy' }, - { - label: 'Paste', - accelerator: 'CmdOrCtrl+V', - role: 'paste', - enabled: clipboard.readText().length > 0, - }, - { - label: 'Select All', - accelerator: 'CmdOrCtrl+A', - role: 'selectall', - enabled: !!value, - }, - ]; - templates.push(...inputTemplates); +export function openContextMenu(event, templates = []) { + const isSomethingSelected = window.getSelection().toString().length > 0; + const { type } = event.target; + const isInput = event.target.matches('input') && (type === 'text' || type === 'number'); + const { value } = event.target; + + templates.push({ + label: 'Copy', + accelerator: 'CmdOrCtrl+C', + role: 'copy', + enabled: isSomethingSelected, + }); + + // If context menu is opened on Input and there is text on the input and something is selected. + const { selectionStart, selectionEnd } = event.target; + if (!!value && isInput && selectionStart !== selectionEnd) { + templates.push({ label: 'Cut', accelerator: 'CmdOrCtrl+X', role: 'cut' }); + } + + // If context menu is opened on Input and text is present on clipboard + if (clipboard.readText().length > 0 && isInput) { + templates.push({ + label: 'Paste', + accelerator: 'CmdOrCtrl+V', + role: 'paste', + }); + } + + // If context menu is opened on Input + if (isInput && value) { + templates.push({ + label: 'Select All', + accelerator: 'CmdOrCtrl+A', + role: 'selectall', + }); } injectDevelopmentTemplate(event, templates); @@ -57,12 +72,3 @@ export function openCopyLinkMenu(text, event) { ]; openContextMenu(event, templates, false); } - -export function initContextMenu(event) { - const { type } = event.target; - if (event.target.matches('input') && (type === 'text' || type === 'number')) { - openContextMenu(event); - } else { - event.preventDefault(); - } -}