Merge pull request #1420 from umap-project/restore-button

Restore style of "restore version button"
This commit is contained in:
Yohan Boniface 2023-11-26 21:58:58 +01:00 committed by GitHub
commit 3d7f87354b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 11 deletions

View file

@ -1347,13 +1347,14 @@ L.U.DataLayer = L.Evented.extend({
const date = new Date(parseInt(data.at, 10)) const date = new Date(parseInt(data.at, 10))
const content = `${date.toLocaleString(L.lang)} (${parseInt(data.size) / 1000}Kb)` const content = `${date.toLocaleString(L.lang)} (${parseInt(data.size) / 1000}Kb)`
const el = L.DomUtil.create('div', 'umap-datalayer-version', versionsContainer) const el = L.DomUtil.create('div', 'umap-datalayer-version', versionsContainer)
const a = L.DomUtil.createButton( const button = L.DomUtil.createButton(
'', '',
el, el,
L._('Restore this version'), '',
() => this.restore(data.name), () => this.restore(data.name),
this this
) )
button.title = L._('Restore this version')
L.DomUtil.add('span', '', el, content) L.DomUtil.add('span', '', el, content)
} }

View file

@ -731,18 +731,14 @@ ul.photon-autocomplete {
padding: 5px 0; padding: 5px 0;
border-bottom: 1px solid #202425; border-bottom: 1px solid #202425;
} }
.umap-datalayer-version a { .umap-datalayer-version button {
display: inline-block; display: inline-block;
width: 20px; width: 24px;
height: 20px; min-height: 24px;
margin-left: 5px; background-position: -122px -73px;
background-position: -123px -75px;
background-repeat: no-repeat; background-repeat: no-repeat;
background-image: url('./img/16-white.svg'); background-image: url('./img/16-white.svg');
vertical-align: middle; margin-right: 10px;
margin-right: 5px;
border: 1px solid #202425;
background-color: #2c3233;
} }