mirror of
https://github.com/pldubouilh/gossa.git
synced 2026-08-29 13:27:02 -04:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c517f7b7e1 |
+20
-5
@@ -163,6 +163,11 @@ const setBackgroundLinks = t => { t.style.backgroundColor = 'rgba(123, 123, 123,
|
|||||||
|
|
||||||
const getLink = e => e.target.parentElement.querySelectorAll('a.list-links')[0]
|
const getLink = e => e.target.parentElement.querySelectorAll('a.list-links')[0]
|
||||||
|
|
||||||
|
upGrid.ondragleave = e => {
|
||||||
|
cancelDefault(e)
|
||||||
|
upGrid.style.display = 'none'
|
||||||
|
}
|
||||||
|
|
||||||
document.ondragenter = e => {
|
document.ondragenter = e => {
|
||||||
if (isPicMode()) { return }
|
if (isPicMode()) { return }
|
||||||
cancelDefault(e)
|
cancelDefault(e)
|
||||||
@@ -181,10 +186,7 @@ document.ondragenter = e => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
upGrid.ondragleave = e => {
|
document.ondragend = e => resetBackgroundLinks()
|
||||||
cancelDefault(e)
|
|
||||||
upGrid.style.display = 'none'
|
|
||||||
}
|
|
||||||
|
|
||||||
document.ondragover = e => {
|
document.ondragover = e => {
|
||||||
cancelDefault(e)
|
cancelDefault(e)
|
||||||
@@ -365,6 +367,16 @@ function onPaste () {
|
|||||||
mvCall(root, dest + filename, onPaste)
|
mvCall(root, dest + filename, onPaste)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// dark mode
|
||||||
|
const darkMode = 'html, a { background-color: #2d3436; color: #dfe6e9; } .arrow, .icon-large-images { filter: invert(100%) !important; }'
|
||||||
|
const extraCss = document.createElement('style')
|
||||||
|
document.body.appendChild(extraCss);
|
||||||
|
|
||||||
|
const currentMode = () => localStorage.getItem('colorMode')
|
||||||
|
const setMode = () => { extraCss.innerHTML = currentMode() === 'dark' ? darkMode : '' }
|
||||||
|
const toggleBWMode = () => localStorage.setItem('colorMode', currentMode() === 'dark' ? 'white' : 'dark') || setMode()
|
||||||
|
setMode()
|
||||||
|
|
||||||
// Kb handler
|
// Kb handler
|
||||||
let typedPath = ''
|
let typedPath = ''
|
||||||
let typedToken = null
|
let typedToken = null
|
||||||
@@ -402,7 +414,7 @@ document.body.addEventListener('keydown', e => {
|
|||||||
return prevent(e) || picsNav(false) || prevPage()
|
return prevent(e) || picsNav(false) || prevPage()
|
||||||
|
|
||||||
case 'Escape':
|
case 'Escape':
|
||||||
return prevent(e) || picsOff()
|
return prevent(e) || resetBackgroundLinks() || picsOff()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ctrl keys
|
// Ctrl keys
|
||||||
@@ -426,6 +438,9 @@ document.body.addEventListener('keydown', e => {
|
|||||||
|
|
||||||
case 'KeyD':
|
case 'KeyD':
|
||||||
return prevent(e) || isPicMode() || window.mkdirBtn()
|
return prevent(e) || isPicMode() || window.mkdirBtn()
|
||||||
|
|
||||||
|
case 'KeyB':
|
||||||
|
return prevent(e) || toggleBWMode()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+7
-4
@@ -1,3 +1,9 @@
|
|||||||
|
a {
|
||||||
|
text-decoration: none;
|
||||||
|
background-color: transparent !important;
|
||||||
|
/* border-bottom: .01em solid #dfe6e9; */
|
||||||
|
}
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
display: block;
|
display: block;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
@@ -75,7 +81,6 @@ h1 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#progress {
|
#progress {
|
||||||
background-color: white;
|
|
||||||
width: 99%;
|
width: 99%;
|
||||||
left: 0.5%;
|
left: 0.5%;
|
||||||
right: 0.5%;
|
right: 0.5%;
|
||||||
@@ -83,7 +88,6 @@ h1 {
|
|||||||
bottom: 0px;
|
bottom: 0px;
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
max-height: 50%;
|
max-height: 50%;
|
||||||
overflow-y: scroll;
|
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -118,10 +122,9 @@ h1 {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 4em;
|
font-size: 4em;
|
||||||
font-family: Helvetica;
|
font-family: Helvetica;
|
||||||
background-color: white;
|
|
||||||
color: green;
|
color: green;
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
backdrop-filter: grayscale(100%);
|
background-color: rgba(123, 123, 123, 0.2)
|
||||||
}
|
}
|
||||||
|
|
||||||
#pics {
|
#pics {
|
||||||
|
|||||||
Reference in New Issue
Block a user