mirror of
https://github.com/wanderer-industries/wanderer
synced 2025-12-05 07:15:34 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4419c86164 | ||
|
|
9848f49b49 | ||
|
|
4c23069a0a | ||
|
|
4a1d7be44c |
18
CHANGELOG.md
18
CHANGELOG.md
@@ -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)
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user