mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 17:21:38 -05:00
Some fixes
This commit is contained in:
parent
5266436396
commit
78ac365c00
9 changed files with 49 additions and 18 deletions
12
CHANGELOG.md
12
CHANGELOG.md
|
|
@ -6,6 +6,18 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
## TEST
|
||||||
|
|
||||||
|
- [ ] KML upload
|
||||||
|
- [ ] OIDC login with Authentik
|
||||||
|
- [ ] How does it work with existing settings to disable registrations?
|
||||||
|
- [ ] Place creation
|
||||||
|
- [ ] Tag creation + management
|
||||||
|
- [ ] Place privacy zones
|
||||||
|
- [ ] Settings panel is scrollable
|
||||||
|
- [ ] Family members can enable their location sharing and see each other on the map
|
||||||
|
- [ ] Home location
|
||||||
|
|
||||||
# OIDC and KML support release
|
# OIDC and KML support release
|
||||||
|
|
||||||
To configure your OIDC provider, set the following environment variables:
|
To configure your OIDC provider, set the following environment variables:
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import { Controller } from "@hotwired/stimulus"
|
||||||
// Enhanced Color Picker Controller
|
// Enhanced Color Picker Controller
|
||||||
// Based on RailsBlocks pattern: https://railsblocks.com/docs/color-picker
|
// Based on RailsBlocks pattern: https://railsblocks.com/docs/color-picker
|
||||||
export default class extends Controller {
|
export default class extends Controller {
|
||||||
static targets = ["picker", "display", "input", "swatch"]
|
static targets = ["picker", "display", "displayText", "input", "swatch"]
|
||||||
static values = {
|
static values = {
|
||||||
default: { type: String, default: "#6ab0a4" }
|
default: { type: String, default: "#6ab0a4" }
|
||||||
}
|
}
|
||||||
|
|
@ -49,6 +49,11 @@ export default class extends Controller {
|
||||||
this.displayTarget.style.backgroundColor = color
|
this.displayTarget.style.backgroundColor = color
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Update display text
|
||||||
|
if (this.hasDisplayTextTarget) {
|
||||||
|
this.displayTextTarget.textContent = color
|
||||||
|
}
|
||||||
|
|
||||||
// Update active swatch styling
|
// Update active swatch styling
|
||||||
this.updateActiveSwatchWithColor(color)
|
this.updateActiveSwatchWithColor(color)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
<li><strong>✅ GPX:</strong> Track files (.gpx)</li>
|
<li><strong>✅ GPX:</strong> Track files (.gpx)</li>
|
||||||
<li><strong>✅ GeoJSON:</strong> Feature collections (.json)</li>
|
<li><strong>✅ GeoJSON:</strong> Feature collections (.json)</li>
|
||||||
<li><strong>✅ OwnTracks:</strong> Recorder files (.rec)</li>
|
<li><strong>✅ OwnTracks:</strong> Recorder files (.rec)</li>
|
||||||
<li><strong>✅ KML:</strong> KML files (.kml)</li>
|
<li><strong>✅ KML:</strong> KML files (.kml, .kmz)</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="text-xs text-gray-500 mt-2">
|
<div class="text-xs text-gray-500 mt-2">
|
||||||
File format is automatically detected during upload.
|
File format is automatically detected during upload.
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% unless DawarichSettings.self_hosted? %>
|
<% unless DawarichSettings.self_hosted? || current_user.provider.blank? %>
|
||||||
<div>
|
<div>
|
||||||
<h2 class="text-2xl font-bold mb-4 flex items-center">
|
<h2 class="text-2xl font-bold mb-4 flex items-center">
|
||||||
<%= icon 'link', class: "text-primary mr-1" %> Connected Accounts
|
<%= icon 'link', class: "text-primary mr-1" %> Connected Accounts
|
||||||
|
|
|
||||||
|
|
@ -71,13 +71,11 @@
|
||||||
<div class="flex items-center gap-3">
|
<div class="flex items-center gap-3">
|
||||||
<label class="flex items-center gap-2 cursor-pointer group">
|
<label class="flex items-center gap-2 cursor-pointer group">
|
||||||
<span class="text-sm font-medium">Custom:</span>
|
<span class="text-sm font-medium">Custom:</span>
|
||||||
<%= f.color_field :color,
|
<input type="color"
|
||||||
class: "w-12 h-12 rounded-lg cursor-pointer border-2 border-base-300 hover:scale-105 transition-transform color-input",
|
class="w-12 h-12 rounded-lg cursor-pointer border-2 border-base-300 hover:scale-105 transition-transform color-input"
|
||||||
data: {
|
value="<%= tag.color.presence || '#6ab0a4' %>"
|
||||||
color_picker_target: "picker",
|
data-color-picker-target="picker"
|
||||||
action: "input->color-picker#updateFromPicker"
|
data-action="input->color-picker#updateFromPicker">
|
||||||
},
|
|
||||||
value: tag.color.presence || '#6ab0a4' %>
|
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<!-- Color Display -->
|
<!-- Color Display -->
|
||||||
|
|
@ -92,7 +90,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%= f.hidden_field :color, data: { color_picker_target: "input" } %>
|
<%= f.hidden_field :color, value: tag.color.presence || '#6ab0a4', data: { color_picker_target: "input" } %>
|
||||||
|
|
||||||
<label class="label">
|
<label class="label">
|
||||||
<span class="label-text-alt">Choose from swatches or pick a custom color</span>
|
<span class="label-text-alt">Choose from swatches or pick a custom color</span>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
class AddOmniauthToUsers < ActiveRecord::Migration[8.0]
|
class AddOmniauthToUsers < ActiveRecord::Migration[8.0]
|
||||||
def change
|
def change
|
||||||
add_column :users, :provider, :string
|
add_column :users, :provider, :string unless column_exists? :users, :provider
|
||||||
add_column :users, :uid, :string
|
add_column :users, :uid, :string unless column_exists? :users, :uid
|
||||||
|
add_index :users, [:provider, :uid], unique: true, algorithm: :concurrently
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,12 @@ class AddUserIdToPlaces < ActiveRecord::Migration[8.0]
|
||||||
|
|
||||||
def up
|
def up
|
||||||
# Add nullable for backward compatibility, will enforce later via data migration
|
# Add nullable for backward compatibility, will enforce later via data migration
|
||||||
add_reference :places, :user, null: true, index: {algorithm: :concurrently} unless foreign_key_exists?(:places, :users)
|
unless column_exists?(:places, :user_id)
|
||||||
|
add_reference :places, :user, null: true, index: { algorithm: :concurrently }
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def down
|
def down
|
||||||
remove_reference :places, :user, index: true if foreign_key_exists?(:places, :users)
|
remove_reference :places, :user, index: true if column_exists?(:places, :user_id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,21 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class AddPrivacyRadiusToTags < ActiveRecord::Migration[8.0]
|
class AddPrivacyRadiusToTags < ActiveRecord::Migration[8.0]
|
||||||
disable_ddl_transaction!
|
disable_ddl_transaction!
|
||||||
|
|
||||||
def change
|
def up
|
||||||
add_column :tags, :privacy_radius_meters, :integer
|
add_column :tags, :privacy_radius_meters, :integer
|
||||||
add_index :tags, :privacy_radius_meters, where: "privacy_radius_meters IS NOT NULL", algorithm: :concurrently
|
add_index :tags,
|
||||||
|
:privacy_radius_meters,
|
||||||
|
where: 'privacy_radius_meters IS NOT NULL',
|
||||||
|
algorithm: :concurrently
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
remove_index :tags,
|
||||||
|
column: :privacy_radius_meters,
|
||||||
|
where: 'privacy_radius_meters IS NOT NULL',
|
||||||
|
algorithm: :concurrently
|
||||||
|
remove_column :tags, :privacy_radius_meters
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
class AddNoteToPlaces < ActiveRecord::Migration[8.0]
|
class AddNoteToPlaces < ActiveRecord::Migration[8.0]
|
||||||
def change
|
def change
|
||||||
add_column :places, :note, :text
|
add_column :places, :note, :text unless column_exists? :places, :note
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue