Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix env designation pt 2 #186

Merged
merged 2 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion mirror-godot-app/scripts/autoload/analytics/analytics_v2.gd
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,14 @@ func track_event(event_type: String, properties:={}) -> void:

## Send a single event to the Mixpanel Analytics service
func _send_track_event(event: AnalyticsEvent, properties := {}) -> void:
var version := Util.get_version_string()
var release := Util.get_release_name()
var standard_properties = {
"token": api_token,
"distinct_id": event.user_id,
"env": "open-source-v2"
"env": "open-source-v2",
"version": version,
"release": release
}
if not properties.is_empty():
standard_properties.merge(properties)
Expand Down
4 changes: 4 additions & 0 deletions mirror-godot-app/scripts/autoload/util_funcs.gd
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ static func current_platform_is_windows() -> bool:
return get_current_platform_name() == WIN_NAME


static func get_release_name() -> String:
return "Horizon"


static func get_simple_platform_name(os_name:String) -> String:
var lower_os_name = os_name.to_lower()
return PLATFORMS.get(lower_os_name, lower_os_name)
Expand Down
6 changes: 2 additions & 4 deletions mirror-godot-app/ui/global_version_label/version_label.gd
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,14 @@ func _ready():
## Sets the version label to the parsed version string.
func _set_version_label() -> void:
var version := Util.get_version_string()
var release := Util.get_release_name()
text = ' '.join([
text,
_release_name(version),
release,
"v%s-%s" % [
version,
ProjectSettings.get_setting("mirror/env_name")
]
])
if ProjectSettings.get_setting("feature_flags/large_text_size", false):
add_theme_font_size_override(&"font_size", 22)

func _release_name(version) -> String:
return "Gravity"
Loading