@use "sass:map";
@import "parameters";
-@import "browse";
@import "bootstrap";
@import "rails_bootstrap_forms";
.search_forms {
display: block;
}
+
+ .username {
+ max-width: unset;
+ }
}
#sidebar .search_forms {
}
@include color-mode(dark) {
- .leaflet-tile-container .leaflet-tile,
- .mapkey-table-entry td:first-child > * {
- filter: brightness(.8);
- }
-
.leaflet-container .leaflet-control-attribution a {
color: var(--bs-link-color);
}
}
}
+ @mixin dark-map-color-scheme {
+ .leaflet-tile-container .leaflet-tile,
+ .mapkey-table-entry td:first-child > * {
+ filter: brightness(.8);
+ }
+ }
+
+ body[data-map-theme="dark"] {
+ @include dark-map-color-scheme;
+ }
+
+ @include color-mode(dark) {
+ body:not([data-map-theme]) {
+ @include dark-map-color-scheme;
+ }
+ }
+
/* Rules for attribution text under the main map shown on printouts */
.donate-attr { color: darken($green, 10%) !important; }
}
}
-/* Rules for block pages */
+/* Rules for tables with usernames */
+.messages-table .username,
#block_list .username {
max-width: 20em;
}
-/* Rules for tabs inside secondary background sections */
+/* Rules for navigation tabs */
+
+.nav-tabs .username {
+ max-width: 20em;
+}
.bg-body-secondary .nav-tabs {
--bs-border-color: var(--bs-secondary-border-subtle);
/* Rules for map sidebar icons */
-.browse-section {
- .node::before,
- .way::before,
- .relation::before {
- display: inline-block;
- width: 25px;
- margin-left: -25px;
- }
+.browse-section .browse-element-list {
+ line-height: 1.25rem;
- .node, .way, .relation {
- margin-left: 25px;
+ .browse-icon {
+ height: 1.25rem;
}
- .node::before { content: image-url('browse/node.svg'); }
- .way::before { content: image-url('browse/way.svg'); }
- .relation::before { content: image-url('browse/relation.svg'); }
-}
-
-@each $class, $item in $map-sidebar-icons {
- .browse-section #{$class}::before {
- content: image-url('browse/#{map.get($item, "filename")}');
+ .d-flex > .browse-icon {
+ height: max(20px, 1.25rem);
}
- @if map.get($item, "invert") {
- @include color-mode(dark) {
- .browse-section #{$class}::before {
- filter: invert(.8) hue-rotate(180deg);
- }
+ @include color-mode(dark) {
+ .browse-icon-invertible {
+ filter: invert(.8) hue-rotate(180deg);
}
}
}
def self.allow_thirdparty_images(**options)
content_security_policy(options) do |policy|
- policy.img_src("*")
+ policy.img_src("*", :data)
end
end
def map_layout
policy = request.content_security_policy.clone
- policy.child_src(*policy.child_src, "http://127.0.0.1:8111", "https://127.0.0.1:8112")
- policy.frame_src(*policy.frame_src, "http://127.0.0.1:8111", "https://127.0.0.1:8112")
- policy.connect_src(*policy.connect_src, Settings.nominatim_url, Settings.overpass_url, Settings.fossgis_osrm_url, Settings.graphhopper_url, Settings.fossgis_valhalla_url)
+ policy.connect_src(*policy.connect_src, "http://127.0.0.1:8111", Settings.nominatim_url, Settings.overpass_url, Settings.fossgis_osrm_url, Settings.graphhopper_url, Settings.fossgis_valhalla_url)
policy.form_action(*policy.form_action, "render.openstreetmap.org")
policy.style_src(*policy.style_src, :unsafe_inline)
end
end
- helper_method :preferred_editor
+ def preferred_color_scheme(subject)
+ if current_user
+ current_user.preferences.find_by(:k => "#{subject}.color_scheme")&.v || "auto"
+ else
+ "auto"
+ end
+ end
+
+ helper_method :preferred_editor, :preferred_color_scheme
def update_totp
if Settings.key?(:totp_key)
message: "Message"
node: "Node"
node_tag: "Node Tag"
+ note: "Note"
old_node: "Old Node"
old_node_tag: "Old Node Tag"
old_relation: "Old Relation"
way: "Way"
relation: "Relation"
containing_relation:
- entry_html: "Relation %{relation_name}"
- entry_role_html: "Relation %{relation_name} (as %{relation_role})"
+ entry_role_html: "%{relation_name} (as %{relation_role})"
not_found:
title: Not Found
sorry: "Sorry, %{type} #%{id} could not be found."
open: Open
resolved: Resolved
show:
- title: "%{status} Issue #%{issue_id}"
+ title:
+ open: "Open Issue #%{issue_id}"
+ ignored: "Ignored Issue #%{issue_id}"
+ resolved: "Resolved Issue #%{issue_id}"
reports:
one: "%{count} report"
other: "%{count} reports"
title: My Preferences
preferred_editor: Preferred Editor
preferred_languages: Preferred Languages
+ preferred_site_color_scheme: Preferred Website Color Scheme
+ site_color_schemes:
+ auto: Auto
+ light: Light
+ dark: Dark
+ preferred_map_color_scheme: Preferred Map Color Scheme
+ map_color_schemes:
+ auto: Auto
+ light: Light
+ dark: Dark
edit_preferences: Edit Preferences
edit:
title: Edit Preferences
upload_trace: "Upload a trace"
all_traces: "All Traces"
my_traces: "My Traces"
- traces_from: "Public Traces from %{user}"
+ traces_from_html: "Public Traces from %{user}"
remove_tag_filter: "Remove Tag Filter"
destroy:
scheduled_for_deletion: "Trace scheduled for deletion"
years:
one: "%{count} year"
other: "%{count} years"
+ short:
+ ended: "ended"
+ revoked_html: "revoked by %{name}"
+ active: "active"
+ active_unread: "active unread"
+ expired_unread: "expired unread"
+ read_html: "read at %{time}"
+ time_in_future_title: "%{time_absolute}; in %{time_relative}"
+ time_in_past_title: "%{time_absolute}; %{time_relative}"
blocks_on:
title: "Blocks on %{name}"
heading_html: "List of Blocks on %{name}"
reason: "Reason for block:"
revoker: "Revoker:"
block:
- not_revoked: "(not revoked)"
show: "Show"
edit: "Edit"
page:
display_name: "Blocked User"
creator_name: "Creator"
reason: "Reason for block"
+ start: "Start"
+ end: "End"
status: "Status"
- revoker_name: "Revoked by"
navigation:
all_blocks: "All Blocks"
blocks_on_me: "Blocks on Me"
- blocks_on_user: "Blocks on %{user}"
+ blocks_on_user_html: "Blocks on %{user}"
blocks_by_me: "Blocks by Me"
- blocks_by_user: "Blocks by %{user}"
+ blocks_by_user_html: "Blocks by %{user}"
block: "Block #%{id}"
new_block: "New Block"
user_mutes: