open editor on clicking anywhere in the cell; add hover effect

This commit is contained in:
tophf 2017-11-26 20:25:25 +03:00
parent 5a489e7043
commit 77a07b7f2b
2 changed files with 19 additions and 2 deletions

View File

@ -262,6 +262,23 @@ summary {
text-indent: -2em; text-indent: -2em;
padding-left: 3em; padding-left: 3em;
padding-right: 40px; padding-right: 40px;
position: relative;
cursor: pointer;
}
.newUI .entry .style-name:hover::before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(to right, hsla(180, 50%, 30%, 0.2), hsla(180, 20%, 10%, 0.05) 50%, transparent);
pointer-events: none;
}
.newUI .style-name:hover .style-name-link {
color: hsla(180, 100%, 15%, 1);
} }
.newUI .homepage .svg-icon { .newUI .homepage .svg-icon {

View File

@ -278,7 +278,7 @@ Object.assign(handleEvent, {
ENTRY_ROUTES: { ENTRY_ROUTES: {
'.checker, .enable, .disable': 'toggle', '.checker, .enable, .disable': 'toggle',
'.style-name-link': 'edit', '.style-name': 'edit',
'.homepage': 'external', '.homepage': 'external',
'.check-update': 'check', '.check-update': 'check',
'.update': 'update', '.update': 'update',
@ -331,7 +331,7 @@ Object.assign(handleEvent, {
const openWindow = left && shift && !ctrl; const openWindow = left && shift && !ctrl;
const openBackgroundTab = (middle && !shift) || (left && ctrl && !shift); const openBackgroundTab = (middle && !shift) || (left && ctrl && !shift);
const openForegroundTab = (middle && shift) || (left && ctrl && shift); const openForegroundTab = (middle && shift) || (left && ctrl && shift);
const url = event.target.closest('[href]').href; const url = $('[href]', event.target.closest('.entry')).href;
if (openWindow || openBackgroundTab || openForegroundTab) { if (openWindow || openBackgroundTab || openForegroundTab) {
if (chrome.windows && openWindow) { if (chrome.windows && openWindow) {
chrome.windows.create(Object.assign(prefs.get('windowPosition'), {url})); chrome.windows.create(Object.assign(prefs.get('windowPosition'), {url}));