Unify menu presentation and fix UI regressions

This commit is contained in:
Alexander Sellite 2026-07-30 10:46:15 -04:00
parent 3734d4a168
commit b18d9392d8
35 changed files with 588 additions and 361 deletions

View file

@ -189,7 +189,7 @@ func import_backup(
)
_finish(
bool(result.get("ok", false)),
"Identity imported. Restart NETFISHING before multiplayer."
"Identity imported. Restart NETfishing before multiplayer."
if bool(result.get("ok", false))
else "Could not install this identity backup.",
)

View file

@ -177,7 +177,7 @@ static func make_server_hello(
"protocol_version": PROTOCOL_VERSION,
"session_id": session_id,
"assigned_peer_id": assigned_peer_id,
"server_display_name": "NETFISHING",
"server_display_name": "NETfishing",
"player_count": player_count,
"max_players": max_players,
"capability_flags": PackedStringArray([

View file

@ -787,7 +787,7 @@ func resolve_server_trust(accepted: bool) -> void:
if not _server_trust.trust(
get_current_endpoint(),
str(_pending_server_proof["server_fingerprint"]),
"NETFISHING",
"NETfishing",
):
_fail_identity("The server identity could not be pinned.")
return

View file

@ -86,16 +86,16 @@ func select_new_root(path: String, app_data: bool = false) -> bool:
if FileAccess.file_exists(manifest_path):
var manifest: Dictionary = _read_json(manifest_path)
if not _valid_manifest(manifest):
return _fail("The selected folder has a malformed NETFISHING manifest.")
return _fail("The selected folder has a malformed NETfishing manifest.")
root_id = str(manifest["root_id"])
else:
if not _directory_is_empty(normalized) and not app_data:
return _fail(
"Choose an empty folder or an existing NETFISHING data folder."
"Choose an empty folder or an existing NETfishing data folder."
)
root_id = Crypto.new().generate_random_bytes(16).hex_encode()
if not _create_layout(normalized, root_id):
return _fail("The NETFISHING data folder could not be created.")
return _fail("The NETfishing data folder could not be created.")
if not _write_bootstrap(normalized, root_id):
return _fail("The data-folder pointer could not be saved.")
root_path = normalized
@ -207,15 +207,15 @@ func _activate_existing(path: String, expected_id: String, permit_creation: bool
return false
var manifest_path: String = normalized.path_join(MANIFEST_FILENAME)
if not FileAccess.file_exists(manifest_path):
return _fail("The selected folder is not a NETFISHING data folder.")
return _fail("The selected folder is not a NETfishing data folder.")
var manifest: Dictionary = _read_json(manifest_path)
if not _valid_manifest(manifest):
return _fail("The NETFISHING data-folder manifest is malformed.")
return _fail("The NETfishing data-folder manifest is malformed.")
var found_id: String = str(manifest["root_id"])
if not expected_id.is_empty() and expected_id != found_id:
return _fail("The selected data folder does not match this device pointer.")
if not _test_writable(normalized):
return _fail("The NETFISHING data folder is unavailable or unwritable.")
return _fail("The NETfishing data folder is unavailable or unwritable.")
root_path = normalized
root_id = found_id
requires_selection = false
@ -270,7 +270,7 @@ func _create_layout(path: String, id: String) -> bool:
):
return false
var readme: String = (
"NETFISHING player data\n\n"
"NETfishing player data\n\n"
+ "This folder is safe to synchronize with tools such as Syncthing.\n"
+ "Active private identity keys remain device-local.\n"
+ "Encrypted identity backups require their passphrase.\n"

View file

@ -33,12 +33,12 @@ static func migrate_legacy_to(
return {
"ok": false,
"requires_existing_root_decision": true,
"message": "The selected folder already contains NETFISHING data.",
"message": "The selected folder already contains NETfishing data.",
}
if not _directory_empty(normalized):
return {
"ok": false,
"message": "Choose an empty folder or create a NETFISHING subfolder.",
"message": "Choose an empty folder or create a NETfishing subfolder.",
}
var staging: String = "%s.migration-%s" % [
normalized, Crypto.new().generate_random_bytes(8).hex_encode()
@ -107,11 +107,11 @@ static func migrate_active_to(
"ok": false,
"requires_existing_root_decision": true,
"message": (
"The selected folder already contains NETFISHING data. "
"The selected folder already contains NETfishing data. "
+ "Choose it through the existing-data recovery flow."
),
}
return {"ok": false, "message": "Choose an empty folder or a NETFISHING subfolder."}
return {"ok": false, "message": "Choose an empty folder or a NETfishing subfolder."}
var staging: String = "%s.migration-%s" % [
normalized, Crypto.new().generate_random_bytes(8).hex_encode()
]
@ -188,7 +188,7 @@ static func replace_existing_with_legacy(
var normalized: String = destination.simplify_path().trim_suffix("/")
var manifest: String = normalized.path_join(PlayerDataRoot.MANIFEST_FILENAME)
if not FileAccess.file_exists(manifest):
return {"ok": false, "message": "The selected folder is not a NETFISHING data root."}
return {"ok": false, "message": "The selected folder is not a NETfishing data root."}
var recovery: String = ProjectSettings.globalize_path(
"user://migration-recovery"
).path_join(
@ -209,7 +209,7 @@ static func replace_existing_with_active(
) -> Dictionary:
var normalized: String = destination.simplify_path().trim_suffix("/")
if not FileAccess.file_exists(normalized.path_join(PlayerDataRoot.MANIFEST_FILENAME)):
return {"ok": false, "message": "The selected folder is not a NETFISHING data root."}
return {"ok": false, "message": "The selected folder is not a NETfishing data root."}
var recovery: String = ProjectSettings.globalize_path(
"user://migration-recovery"
).path_join(