|
4 | 4 | .map-modal-header |
5 | 5 | %h3.mapforge-font= _("Share Map") |
6 | 6 |
|
| 7 | + %dialog#qr-viewer{ 'aria-label': _("QR code"), |
| 8 | + data: { "map--share-target": "qrViewer", |
| 9 | + action: "keydown.esc@document:capture->map--share#stopEsc click->map--share#closeQr" } } |
| 10 | + %button.modal-close-button{ type: "button" } × |
| 11 | + .qr-code{ data: { "map--share-target": "qrCode" } } |
| 12 | + %p.qr-caption.mapforge-font{ data: { "map--share-target": "qrCaption" } } |
| 13 | + %p.qr-label{ data: { "map--share-target": "qrLabel" } } |
| 14 | + |
7 | 15 | .map-modal-content.inline-scroll |
8 | 16 |
|
9 | 17 | .feature-section-card.pt-3 |
10 | 18 | - if @map_mode == 'rw' || map_owner? |
11 | 19 | - if map_owner? && !@map.playground? |
12 | 20 | .row.mb-3 |
13 | 21 | .col-12 |
14 | | - .d-flex.gap-2.align-items-center |
| 22 | + .d-flex.gap-0.gap-sm-2.align-items-center |
15 | 23 | %button#share-ownership-link.form-button.btn.btn-blue.flex-grow-1{ type: "button" } |
16 | 24 | =link_to(map_path(@map.private_id, join: true), data: { turbo: false, action: "click->map--share#nativeShare" }) do |
17 | 25 | - if @map.owners.any? |
|
20 | 28 | - if owner.image |
21 | 29 | = image_tag avatar_url(owner.image, 24), class: 'map-avatar', title: owner.name || owner.email, data: { "toggle": 'tooltip', 'bs-placement': 'top' }, referrerpolicy: 'no-referrer' |
22 | 30 | %i.bi.bi-shield-fill-check.me-2 |
23 | | - = _("Share ownership link") |
| 31 | + %span.d-none.d-sm-inline= _("Share ownership link") |
| 32 | + %span.d-sm-none= _("Ownership link") |
24 | 33 | %span.permission-badge.badge-owner.ms-2= _("Owner") |
25 | 34 | %a.link.text-muted.copy-link{ data: { action: "click->map--share#copyOwnershipLink", "toggle": 'tooltip', 'bs-placement': 'top' }, title: _("Copy link to clipboard") } |
26 | | - %i.bi.bi-copy.me-1 |
| 35 | + %i.bi.bi-copy.me-sm-1 |
| 36 | + %a.link.text-muted.copy-link.qr-link{ data: { action: "click->map--share#showQr", url: map_path(@map.private_id, join: true), label: _("Ownership link"), "toggle": 'tooltip', 'bs-placement': 'top' }, title: _("Show QR code") } |
| 37 | + %i.bi.bi-qr-code |
27 | 38 | %small.text-muted.mt-2.flex-center.center |
28 | 39 | = _("Map owners have this map listed in their account with full permissions.") |
29 | 40 |
|
30 | 41 | .row.mb-3 |
31 | 42 | .col-12 |
32 | | - .d-flex.gap-2.align-items-center |
| 43 | + .d-flex.gap-0.gap-sm-2.align-items-center |
33 | 44 | %button#share-edit-link.form-button.btn.btn-blue.flex-grow-1{ type: "button" } |
34 | 45 | =link_to(map_path(@map.private_id), data: { turbo: false, action: "click->map--share#nativeShare" }) do |
35 | 46 | %i.bi.bi-pencil-square.me-2 |
36 | | - = _("Share edit link") |
| 47 | + %span.d-none.d-sm-inline= _("Share edit link") |
| 48 | + %span.d-sm-none= _("Edit link") |
37 | 49 | %span.permission-badge.badge-edit.ms-2= _("Can Edit") |
38 | 50 | %a.link.text-muted.copy-link{ data: { action: "click->map--share#copyEditLink", "toggle": 'tooltip', 'bs-placement': 'top' }, title: _("Copy link to clipboard") } |
39 | | - %i.bi.bi-copy.me-1 |
| 51 | + %i.bi.bi-copy.me-sm-1 |
| 52 | + %a.link.text-muted.copy-link.qr-link{ data: { action: "click->map--share#showQr", url: map_path(@map.private_id), label: _("Edit link"), "toggle": 'tooltip', 'bs-placement': 'top' }, title: _("Show QR code") } |
| 53 | + %i.bi.bi-qr-code |
40 | 54 | %small.text-muted.mt-2.flex-center.center |
41 | 55 | = _("With this link, users can modify the map, add layers, and make changes.") |
42 | 56 |
|
43 | 57 | .row.mb-3 |
44 | 58 | .col-12 |
45 | | - .d-flex.gap-2.align-items-center |
| 59 | + .d-flex.gap-0.gap-sm-2.align-items-center |
46 | 60 | %button#share-view-link.form-button.btn.btn-blue.flex-grow-1{ type: "button" } |
47 | 61 | =link_to(map_path(id: @map.public_id), data: { turbo: false, action: "click->map--share#nativeShare" }) do |
48 | 62 | %i.bi.bi-eye-fill.me-2 |
49 | | - = _("Share view link") |
| 63 | + %span.d-none.d-sm-inline= _("Share view link") |
| 64 | + %span.d-sm-none= _("View link") |
50 | 65 | %span.permission-badge.badge-view.ms-2= _("Read Only") |
51 | 66 | %a.link.text-muted.copy-link{ data: { action: "click->map--share#copyViewLink", "toggle": 'tooltip', 'bs-placement': 'top' }, title: _("Copy link to clipboard") } |
52 | | - %i.bi.bi-copy.me-1 |
| 67 | + %i.bi.bi-copy.me-sm-1 |
| 68 | + %a.link.text-muted.copy-link.qr-link{ data: { action: "click->map--share#showQr", url: map_path(id: @map.public_id), label: _("View link"), "toggle": 'tooltip', 'bs-placement': 'top' }, title: _("Show QR code") } |
| 69 | + %i.bi.bi-qr-code |
53 | 70 | %small.text-muted.mt-2.flex-center.center |
54 | 71 | = _("Users can explore the map but cannot modify it.") |
55 | 72 |
|
|
0 commit comments