Add favicon and allow setting concurrency via BACKGROUND_PROCESSING_CONCURRENCY
@@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
### Added
|
||||
|
||||
- Background jobs concurrency now can be set with `BACKGROUND_PROCESSING_CONCURRENCY` env variable in `docker-compose.yml` file. Default value is 10.
|
||||
- Hand-made favicon
|
||||
|
||||
### Changed
|
||||
|
||||
- Change minutes to days and hours on route popup
|
||||
|
||||
@@ -10,12 +10,12 @@ You can find changelog [here](CHANGELOG.md).
|
||||
|
||||
To track your location, install the [Owntracks app](https://owntracks.org/booklet/guide/apps/) or [Overland app](https://overland.p3k.app/) on your phone and configure it to send location updates to your Dawarich instance.
|
||||
|
||||
Currently, the app only supports [HTTP mode](https://owntracks.org/booklet/tech/http/).
|
||||
|
||||
### OwnTracks
|
||||
|
||||
The url to send the location updates to is `http://<your-dawarich-instance>/api/v1/owntracks/points?api_key=YOUR_API_KEY`.
|
||||
|
||||
Currently, the app only supports [HTTP mode](https://owntracks.org/booklet/tech/http/) of OwnTracks.
|
||||
|
||||
### Overland
|
||||
|
||||
The url to send the location updates to is `http://<your-dawarich-instance>/api/v1/overland/batches?api_key=YOUR_API_KEY`.
|
||||
|
||||
@@ -3,3 +3,4 @@
|
||||
//= link_tree ../builds
|
||||
//= link_tree ../../javascript .js
|
||||
//= link_tree ../../../vendor/javascript .js
|
||||
//= link favicon/browserconfig.xml
|
||||
|
||||
BIN
app/assets/images/favicon.jpeg
Normal file
|
After Width: | Height: | Size: 72 KiB |
BIN
app/assets/images/favicon/android-chrome-192x192.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
app/assets/images/favicon/android-chrome-512x512.png
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
app/assets/images/favicon/apple-touch-icon.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
9
app/assets/images/favicon/browserconfig.xml.erb
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square150x150logo src="<%= asset_path 'favicon/mstile-150x150.png' %>"/>
|
||||
<TileColor>#da532c</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
</browserconfig>
|
||||
BIN
app/assets/images/favicon/favicon-16x16.png
Normal file
|
After Width: | Height: | Size: 841 B |
BIN
app/assets/images/favicon/favicon-32x32.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
app/assets/images/favicon/favicon.ico
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
app/assets/images/favicon/mstile-150x150.png
Normal file
|
After Width: | Height: | Size: 9.8 KiB |
15
app/assets/images/favicon/safari-pinned-tab.svg
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
||||
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
||||
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
||||
width="1180.000000pt" height="1180.000000pt" viewBox="0 0 1180.000000 1180.000000"
|
||||
preserveAspectRatio="xMidYMid meet">
|
||||
<metadata>
|
||||
Created by potrace 1.14, written by Peter Selinger 2001-2017
|
||||
</metadata>
|
||||
<g transform="translate(0.000000,1180.000000) scale(0.100000,-0.100000)"
|
||||
fill="#000000" stroke="none">
|
||||
<path d="M570 5900 l0 -5900 5330 0 5330 0 0 5900 0 5900 -5330 0 -5330 0 0
|
||||
-5900z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 610 B |
19
app/assets/images/favicon/site.webmanifest.erb
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "Dawarich",
|
||||
"short_name": "Dawarich",
|
||||
"icons": [
|
||||
{
|
||||
"src": "<%= asset_path 'favicon/android-chrome-192x192.png' %>",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "<%= asset_path 'favicon/android-chrome-512x512.png' %>",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
}
|
||||
],
|
||||
"theme_color": "#ffffff",
|
||||
"background_color": "#ffffff",
|
||||
"display": "standalone"
|
||||
}
|
||||
@@ -93,8 +93,8 @@ export default class extends Controller {
|
||||
<b>Start:</b> ${firstTimestamp}<br>
|
||||
<b>End:</b> ${lastTimestamp}<br>
|
||||
<b>Duration:</b> ${timeOnRoute}<br>
|
||||
<b>Prev Route:</b> ${Math.round(distanceToPrev)} m, ${minutesToDaysHoursMinutes(timeBetweenPrev)} away<br>
|
||||
<b>Next Route:</b> ${Math.round(distanceToNext)} m, ${minutesToDaysHoursMinutes(timeBetweenNext)} away<br>
|
||||
<b>Prev Route:</b> ${Math.round(distanceToPrev)}m and ${minutesToDaysHoursMinutes(timeBetweenPrev)} away<br>
|
||||
<b>Next Route:</b> ${Math.round(distanceToNext)}m and ${minutesToDaysHoursMinutes(timeBetweenNext)} away<br>
|
||||
`);
|
||||
|
||||
// Add mouseover event to highlight the polyline and show the start and end markers
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
class ImportGoogleTakeoutJob < ApplicationJob
|
||||
queue_as :imports
|
||||
sidekiq_options retry: false
|
||||
|
||||
def perform(import_id, json_string)
|
||||
import = Import.find(import_id)
|
||||
|
||||
9
app/views/application/_favicon.html.erb
Normal file
@@ -0,0 +1,9 @@
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="<%= asset_path 'favicon/apple-touch-icon.png' %>">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="<%= asset_path 'favicon/favicon-32x32.png' %>">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="<%= asset_path 'favicon/favicon-16x16.png' %>">
|
||||
<link rel="manifest" href="<%= asset_path 'favicon/site.webmanifest' %>">
|
||||
<link rel="mask-icon" href="<%= asset_path 'favicon/safari-pinned-tab.svg' %>" color="#5bbad5">
|
||||
<link rel="shortcut icon" href="<%= asset_path 'favicon/favicon.ico' %>">
|
||||
<meta name="msapplication-TileColor" content="#da532c">
|
||||
<meta name="msapplication-config" content="<%= asset_path 'favicon/browserconfig.xml' %>">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
@@ -12,6 +12,7 @@
|
||||
<%= stylesheet_link_tag "tailwind", "inter-font", "data-turbo-track": "reload" %>
|
||||
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
|
||||
<%= javascript_importmap_tags %>
|
||||
<%= render 'application/favicon' %>
|
||||
</head>
|
||||
|
||||
<body class='min-h-screen'>
|
||||
|
||||
61
config/favicon.json
Normal file
@@ -0,0 +1,61 @@
|
||||
{
|
||||
"master_picture": "app/assets/images/favicon.jpeg",
|
||||
"favicon_design": {
|
||||
"ios": {
|
||||
"picture_aspect": "background_and_margin",
|
||||
"background_color": "#ffffff",
|
||||
"margin": "14%",
|
||||
"assets": {
|
||||
"ios6_and_prior_icons": false,
|
||||
"ios7_and_later_icons": false,
|
||||
"precomposed_icons": false,
|
||||
"declare_only_default_icon": true
|
||||
}
|
||||
},
|
||||
"desktop_browser": {
|
||||
"design": "raw"
|
||||
},
|
||||
"windows": {
|
||||
"picture_aspect": "no_change",
|
||||
"background_color": "#da532c",
|
||||
"on_conflict": "override",
|
||||
"assets": {
|
||||
"windows_80_ie_10_tile": false,
|
||||
"windows_10_ie_11_edge_tiles": {
|
||||
"small": false,
|
||||
"medium": true,
|
||||
"big": false,
|
||||
"rectangle": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"android_chrome": {
|
||||
"picture_aspect": "background_and_margin",
|
||||
"margin": "17%",
|
||||
"background_color": "#ffffff",
|
||||
"theme_color": "#ffffff",
|
||||
"manifest": {
|
||||
"name": "Dawarich",
|
||||
"display": "standalone",
|
||||
"orientation": "not_set",
|
||||
"on_conflict": "override",
|
||||
"declared": true
|
||||
},
|
||||
"assets": {
|
||||
"legacy_icon": false,
|
||||
"low_resolution_icons": false
|
||||
}
|
||||
},
|
||||
"safari_pinned_tab": {
|
||||
"picture_aspect": "silhouette",
|
||||
"theme_color": "#5bbad5"
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
"scaling_algorithm": "Mitchell",
|
||||
"error_on_image_too_small": false,
|
||||
"readme_file": false,
|
||||
"html_code_file": false,
|
||||
"use_path_as_is": false
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
Rswag::Ui.configure do |c|
|
||||
|
||||
# List the Swagger endpoints that you want to be documented through the
|
||||
@@ -8,7 +10,7 @@ Rswag::Ui.configure do |c|
|
||||
# (under openapi_root) as JSON or YAML endpoints, then the list below should
|
||||
# correspond to the relative paths for those endpoints.
|
||||
|
||||
c.swagger_endpoint '/api-docs/v1/swagger.yaml', 'API V1 Docs'
|
||||
c.openapi_endpoint '/api-docs/v1/swagger.yaml', 'API V1 Docs'
|
||||
|
||||
# Add Basic Auth in case your API is private
|
||||
# c.basic_auth_enabled = true
|
||||
|
||||
18
config/initializers/web_app_manifest.rb
Normal file
@@ -0,0 +1,18 @@
|
||||
# This file was generated by rails_favicon_generator, from
|
||||
# https://realfavicongenerator.net/
|
||||
|
||||
# It makes files with .webmanifest extension first class files in the asset
|
||||
# pipeline. This is to preserve this extension, as is it referenced in a call
|
||||
# to asset_path in the _favicon.html.erb partial.
|
||||
|
||||
Rails.application.config.assets.configure do |env|
|
||||
mime_type = 'application/manifest+json'
|
||||
extensions = ['.webmanifest']
|
||||
|
||||
if Sprockets::VERSION.to_i >= 4
|
||||
extensions << '.webmanifest.erb'
|
||||
env.register_preprocessor(mime_type, Sprockets::ERBProcessor)
|
||||
end
|
||||
|
||||
env.register_mime_type(mime_type, extensions: extensions)
|
||||
end
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
:concurrency: 10
|
||||
:concurrency: <%= ENV.fetch("BACKGROUND_PROCESSING_CONCURRENCY", 10) %>
|
||||
:queues:
|
||||
- default
|
||||
- imports
|
||||
|
||||
@@ -68,6 +68,7 @@ services:
|
||||
DATABASE_PASSWORD: password
|
||||
DATABASE_NAME: dawarich_development
|
||||
APPLICATION_HOST: localhost
|
||||
BACKGROUND_PROCESSING_CONCURRENCY: 10
|
||||
depends_on:
|
||||
- dawarich_db
|
||||
- dawarich_redis
|
||||
|
||||