mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +02:00
chore: refine undo/redo buttons (#2605)

This commit is contained in:
commit
a59b0110fc
8 changed files with 15 additions and 14 deletions
|
@ -13,9 +13,14 @@
|
|||
padding: 0 var(--text-margin);
|
||||
background-color: inherit;
|
||||
}
|
||||
.leaflet-container .edit-undo {
|
||||
margin-left: var(--box-margin);
|
||||
}
|
||||
.leaflet-container .edit-undo[disabled],
|
||||
.leaflet-container .edit-redo[disabled] {
|
||||
filter: invert(.5);
|
||||
}
|
||||
.leaflet-container .edit-save,
|
||||
.leaflet-container .edit-undo,
|
||||
.leaflet-container .edit-redo,
|
||||
.leaflet-container .edit-disable,
|
||||
.leaflet-container .connected-peers
|
||||
{
|
||||
|
@ -40,8 +45,6 @@
|
|||
color: var(--color-darkGray);
|
||||
}
|
||||
|
||||
.leaflet-container .edit-undo:hover,
|
||||
.leaflet-container .edit-redo:hover,
|
||||
.leaflet-container .edit-disable:hover {
|
||||
border: 0.5px solid rgba(153, 153, 153, 0.80);
|
||||
text-decoration: none;
|
||||
|
|
|
@ -11,13 +11,11 @@ const TOP_BAR_TEMPLATE = `
|
|||
<div class="logo"><a class="" href="/" title="${translate('Go to the homepage')}">uMap</a></div>
|
||||
<button class="map-name flat truncate" type="button" data-ref="name"></button>
|
||||
<button class="share-status flat truncate" type="button" data-ref="share"></button>
|
||||
<button class="edit-undo round" type="button" data-ref="undo" disabled>
|
||||
<button class="edit-undo round flat" type="button" data-ref="undo" disabled>
|
||||
<i class="icon icon-16 icon-undo"></i>
|
||||
<span>${translate('Undo')}</span>
|
||||
</button>
|
||||
<button class="edit-redo round" type="button" data-ref="redo" disabled>
|
||||
<button class="edit-redo round flat" type="button" data-ref="redo" disabled>
|
||||
<i class="icon icon-16 icon-redo"></i>
|
||||
<span>${translate('Redo')}</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="umap-right-edit-toolbox" data-ref="right">
|
||||
|
|
|
@ -350,7 +350,7 @@ def test_should_redraw_list_on_feature_delete(live_server, openmap, page, bootst
|
|||
buttons.first.click()
|
||||
page.locator("dialog").get_by_role("button", name="OK").click()
|
||||
expect(buttons).to_have_count(2)
|
||||
page.get_by_role("button", name="Undo").click()
|
||||
page.locator(".edit-undo").click()
|
||||
expect(buttons).to_have_count(3)
|
||||
|
||||
|
||||
|
|
|
@ -261,7 +261,7 @@ def test_can_create_new_rule(live_server, page, openmap):
|
|||
page.get_by_title("AliceBlue").first.click()
|
||||
colors = getColors(markers)
|
||||
assert colors.count("rgb(240, 248, 255)") == 3
|
||||
page.get_by_role("button", name="Undo").click()
|
||||
page.locator(".edit-undo").click()
|
||||
colors = getColors(markers)
|
||||
assert colors.count("rgb(240, 248, 255)") == 0
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ def test_cancel_deleting_datalayer_should_restore(
|
|||
page.get_by_role("button", name="OK").click()
|
||||
expect(markers).to_have_count(0)
|
||||
expect(page.get_by_text("test datalayer")).to_be_hidden()
|
||||
page.get_by_role("button", name="Undo").click()
|
||||
page.locator(".edit-undo").click()
|
||||
expect(markers).to_have_count(1)
|
||||
expect(page.locator(".umap-browser").get_by_text("test datalayer")).to_be_visible()
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ def test_should_reset_style_on_cancel(live_server, openmap, page, bootstrap):
|
|||
expect(page.locator(".leaflet-overlay-pane path[fill='GoldenRod']")).to_have_count(
|
||||
1
|
||||
)
|
||||
page.get_by_role("button", name="Undo").click()
|
||||
page.locator(".edit-undo").click()
|
||||
expect(page.locator(".leaflet-overlay-pane path[fill='DarkBlue']")).to_have_count(1)
|
||||
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ def test_reseting_map_would_remove_from_save_queue(
|
|||
page.on("request", register_request)
|
||||
page.locator('input[name="name"]').click()
|
||||
page.locator('input[name="name"]').fill("new name")
|
||||
page.get_by_role("button", name="Undo").click()
|
||||
page.locator(".edit-undo").click()
|
||||
page.wait_for_timeout(500)
|
||||
page.get_by_role("button", name="Manage layers").click()
|
||||
page.get_by_role("button", name="Edit", exact=True).click()
|
||||
|
|
|
@ -686,7 +686,7 @@ def test_should_sync_datalayer_clear(
|
|||
expect(peerB.locator(".leaflet-marker-icon")).to_have_count(0)
|
||||
|
||||
# Undo in peer A
|
||||
peerA.get_by_role("button", name="Undo").click()
|
||||
peerA.locator(".edit-undo").click()
|
||||
expect(peerA.locator(".leaflet-marker-icon")).to_have_count(1)
|
||||
expect(peerB.locator(".leaflet-marker-icon")).to_have_count(1)
|
||||
|
||||
|
|
Loading…
Reference in a new issue