Compare commits

..

9 Commits

Author SHA1 Message Date
CI
bee64c2570 chore: release version v1.0.12 2024-09-20 10:06:40 +00:00
Dmitry Popov
5393321953 Merge branch 'main' of github.com:wanderer-industries/wanderer 2024-09-20 14:06:02 +04:00
Dmitry Popov
b44669da87 fix(audit): Hide character for non-character map activities 2024-09-20 14:05:56 +04:00
CI
9d8bf1529a chore: release version v1.0.11 2024-09-20 09:55:21 +00:00
Dmitry Popov
a514825eaf Merge branches 'main' and 'main' of github.com:wanderer-industries/wanderer 2024-09-20 13:54:54 +04:00
Dmitry Popov
8abcacb517 chore: release version v1.0.9 2024-09-20 13:54:46 +04:00
CI
a3fc55e63d chore: release version v1.0.10 2024-09-19 20:25:53 +00:00
Dmitry Popov
a4c1d5bf98 Merge branch 'main' of github.com:wanderer-industries/wanderer 2024-09-20 00:25:21 +04:00
Dmitry Popov
b16bc615fa fix(signatures): Fix update signatures error if no character tracked on map 2024-09-20 00:25:18 +04:00
5 changed files with 76 additions and 36 deletions

View File

@@ -2,6 +2,29 @@
<!-- changelog -->
## [v1.0.12](https://github.com/wanderer-industries/wanderer/compare/v1.0.11...v1.0.12) (2024-09-20)
### Bug Fixes:
* audit: Hide character for non-character map activities
## [v1.0.11](https://github.com/wanderer-industries/wanderer/compare/v1.0.10...v1.0.11) (2024-09-20)
## [v1.0.10](https://github.com/wanderer-industries/wanderer/compare/v1.0.9...v1.0.10) (2024-09-19)
### Bug Fixes:
* signatures: Fix update signatures error if no character tracked on map
## [v1.0.9](https://github.com/wanderer-industries/wanderer/compare/v1.0.8...v1.0.9) (2024-09-19)

View File

@@ -53,6 +53,15 @@ map_subscriptions_enabled =
|> get_var_from_path_or_env("WANDERER_MAP_SUBSCRIPTIONS_ENABLED", "false")
|> String.to_existing_atom()
map_subscription_characters_limit =
config_dir
|> get_int_from_path_or_env("WANDERER_MAP_SUBSCRIPTION_CHARACTERS_LIMIT", 100)
map_subscription_hubs_limit =
config_dir
|> get_int_from_path_or_env("WANDERER_MAP_SUBSCRIPTION_HUBS_LIMIT", 10)
wallet_tracking_enabled =
config_dir
|> get_var_from_path_or_env("WANDERER_WALLET_TRACKING_ENABLED", "false")
@@ -77,7 +86,7 @@ config :wanderer_app,
wallet_tracking_enabled: wallet_tracking_enabled,
subscription_settings: %{
plans: [
%{id: "alpha", characters_limit: 100, hubs_limit: 10, base_price: 0, monthly_discount: 0},
%{id: "alpha", characters_limit: map_subscription_characters_limit, hubs_limit: map_subscription_hubs_limit, base_price: 0, monthly_discount: 0},
%{
id: "omega",
characters_limit: 300,

View File

@@ -46,7 +46,7 @@ defmodule WandererAppWeb.UserActivity do
<.local_time id={@activity.id} at={@activity.inserted_at} />
</span>
</p>
<p class="flex shrink-0 items-center space-x-1 min-w-[200px]">
<p :if={not is_nil(@activity.character)} class="flex shrink-0 items-center space-x-1 min-w-[200px]">
<.character_item character={@activity.character} />
</p>
</div>

View File

@@ -724,47 +724,55 @@ defmodule WandererAppWeb.MapLive do
first_character_eve_id =
Map.get(socket.assigns, :user_characters, []) |> List.first()
added_signatures =
added_signatures
|> _parse_signatures(first_character_eve_id, system.id)
case not is_nil(first_character_eve_id) do
true ->
added_signatures =
added_signatures
|> _parse_signatures(first_character_eve_id, system.id)
updated_signatures =
updated_signatures
|> _parse_signatures(first_character_eve_id, system.id)
updated_signatures =
updated_signatures
|> _parse_signatures(first_character_eve_id, system.id)
updated_signatures_eve_ids =
updated_signatures
|> Enum.map(fn s -> s.eve_id end)
updated_signatures_eve_ids =
updated_signatures
|> Enum.map(fn s -> s.eve_id end)
removed_signatures_eve_ids =
removed_signatures
|> _parse_signatures(first_character_eve_id, system.id)
|> Enum.map(fn s -> s.eve_id end)
removed_signatures_eve_ids =
removed_signatures
|> _parse_signatures(first_character_eve_id, system.id)
|> Enum.map(fn s -> s.eve_id end)
WandererApp.Api.MapSystemSignature.by_system_id!(system.id)
|> Enum.filter(fn s -> s.eve_id in removed_signatures_eve_ids end)
|> Enum.each(fn s ->
s
|> Ash.destroy!()
end)
WandererApp.Api.MapSystemSignature.by_system_id!(system.id)
|> Enum.filter(fn s -> s.eve_id in removed_signatures_eve_ids end)
|> Enum.each(fn s ->
s
|> Ash.destroy!()
end)
WandererApp.Api.MapSystemSignature.by_system_id!(system.id)
|> Enum.filter(fn s -> s.eve_id in updated_signatures_eve_ids end)
|> Enum.each(fn s ->
updated = updated_signatures |> Enum.find(fn u -> u.eve_id == s.eve_id end)
WandererApp.Api.MapSystemSignature.by_system_id!(system.id)
|> Enum.filter(fn s -> s.eve_id in updated_signatures_eve_ids end)
|> Enum.each(fn s ->
updated = updated_signatures |> Enum.find(fn u -> u.eve_id == s.eve_id end)
if not is_nil(updated) do
s
|> WandererApp.Api.MapSystemSignature.update(updated)
end
end)
if not is_nil(updated) do
s
|> WandererApp.Api.MapSystemSignature.update(updated)
end
end)
added_signatures
|> Enum.map(fn s ->
s |> WandererApp.Api.MapSystemSignature.create!()
end)
added_signatures
|> Enum.map(fn s ->
s |> WandererApp.Api.MapSystemSignature.create!()
end)
{:reply, %{signatures: _get_system_signatures(system.id)}, socket}
{:reply, %{signatures: _get_system_signatures(system.id)}, socket}
_ ->
{:reply, %{signatures: []}, socket |> put_flash(
:error,
"You should enable tracking for at least one character to work with signatures."
)}
end
_ ->
{:noreply, socket}

View File

@@ -2,7 +2,7 @@ defmodule WandererApp.MixProject do
use Mix.Project
@source_url "https://github.com/wanderer-industries/wanderer"
@version "1.0.9"
@version "1.0.12"
def project do
[