Compare commits

..

4 Commits

Author SHA1 Message Date
CI
4419c86164 chore: release version v1.74.3
Some checks failed
Build / 🛠 Build (1.17, 18.x, 27) (push) Has been cancelled
Build / 🛠 Build Docker Images (linux/amd64) (push) Has been cancelled
Build / 🛠 Build Docker Images (linux/arm64) (push) Has been cancelled
Build / merge (push) Has been cancelled
Build / 🏷 Create Release (push) Has been cancelled
2025-07-06 08:55:48 +00:00
Dmitry Popov
9848f49b49 fix(Core): Fixed issues with map subscription component 2025-07-06 10:55:21 +02:00
CI
4c23069a0a chore: release version v1.74.2
Some checks failed
Build / 🛠 Build (1.17, 18.x, 27) (push) Has been cancelled
Build / 🛠 Build Docker Images (linux/amd64) (push) Has been cancelled
Build / 🛠 Build Docker Images (linux/arm64) (push) Has been cancelled
Build / merge (push) Has been cancelled
Build / 🏷 Create Release (push) Has been cancelled
2025-06-30 16:37:22 +00:00
Dmitry Popov
4a1d7be44c fix(Core): Fixed map loading for not existing maps 2025-06-30 18:36:55 +02:00
6 changed files with 54 additions and 25 deletions

View File

@@ -2,6 +2,24 @@
<!-- changelog -->
## [v1.74.3](https://github.com/wanderer-industries/wanderer/compare/v1.74.2...v1.74.3) (2025-07-06)
### Bug Fixes:
* Core: Fixed issues with map subscription component
## [v1.74.2](https://github.com/wanderer-industries/wanderer/compare/v1.74.1...v1.74.2) (2025-06-30)
### Bug Fixes:
* Core: Fixed map loading for not existing maps
## [v1.74.1](https://github.com/wanderer-industries/wanderer/compare/v1.74.0...v1.74.1) (2025-06-28)

View File

@@ -10,6 +10,8 @@ defmodule WandererAppWeb.MapSubscription do
socket =
socket
|> assign(title: "")
|> assign(status: :alpha)
|> assign(balance: 0)
{:ok, socket}
end
@@ -24,19 +26,20 @@ defmodule WandererAppWeb.MapSubscription do
) do
socket = handle_info_or_assign(socket, assigns)
{:ok, %{id: map_id} = map} =
WandererApp.MapRepo.get_by_slug_with_permissions(map_slug, current_user)
{:ok, %{plan: plan} = subscription} =
WandererApp.Map.SubscriptionManager.get_active_map_subscription(map_id)
{:ok, map_balance} = WandererApp.Map.SubscriptionManager.get_balance(map)
{:ok,
socket
|> assign(status: plan)
|> assign(title: get_title(subscription))
|> assign(balance: map_balance)}
with {:ok, %{id: map_id} = map} <-
WandererApp.MapRepo.get_by_slug_with_permissions(map_slug, current_user),
{:ok, %{plan: plan} = subscription} <-
WandererApp.Map.SubscriptionManager.get_active_map_subscription(map_id),
{:ok, map_balance} <- WandererApp.Map.SubscriptionManager.get_balance(map) do
{:ok,
socket
|> assign(status: plan)
|> assign(title: get_title(subscription))
|> assign(balance: map_balance)}
else
_error ->
{:ok, socket}
end
end
@impl true

View File

@@ -126,6 +126,14 @@ defmodule WandererAppWeb.MapCoreEventHandler do
|> assign(show_topup: true)
end
@impl true
def handle_server_event(
{_event, {:flash, type, message}},
socket
) do
socket |> put_flash(type, message)
end
def handle_server_event(event, socket) do
Logger.warning(fn -> "unhandled map core event: #{inspect(event)}" end)
socket

View File

@@ -515,19 +515,19 @@ defmodule WandererAppWeb.MapsLive do
{:ok, tmp_file_path}
end)
Task.async(fn ->
{:ok, data} =
WandererApp.Utils.JSONUtil.read_json(uploaded_file_path)
# Task.async(fn ->
# {:ok, data} =
# WandererApp.Utils.JSONUtil.read_json(uploaded_file_path)
WandererApp.Map.Manager.start_map(map_id)
# WandererApp.Map.Manager.start_map(map_id)
:timer.sleep(1000)
# :timer.sleep(1000)
map_id
|> WandererApp.Map.Server.import_settings(data, current_user.id)
# map_id
# |> WandererApp.Map.Server.import_settings(data, current_user.id)
:imported
end)
# :imported
# end)
{:noreply,
socket

View File

@@ -432,9 +432,9 @@
for={@import_form}
phx-change="import"
>
<div phx-drop-target="{@uploads.settings.ref}">
<%!-- <div phx-drop-target="{@uploads.settings.ref}">
<.live_file_input upload={@uploads.settings} />
</div>
</div> --%>
</.form>
<progress :if={@importing} class="progress w-56"></progress>
<.button

View File

@@ -3,7 +3,7 @@ defmodule WandererApp.MixProject do
@source_url "https://github.com/wanderer-industries/wanderer"
@version "1.74.1"
@version "1.74.3"
def project do
[