summaryrefslogtreecommitdiff
path: root/frontend/src/utils
diff options
context:
space:
mode:
authorynhhoJ <22500212+ynhhoJ@users.noreply.github.com>2026-07-14 05:23:49 +0300
committerGitHub <noreply@github.com>2026-07-13 22:23:49 -0400
commit671cfe49caad5f4b7f209ee8a596cda8a1c7b4a7 (patch)
tree208121e962e543ad3b8277be4f9824dfb9124c28 /frontend/src/utils
parentdfaeb0beb3c441cd42adc432d560fd450af87c14 (diff)
downloaddecky-loader-671cfe49caad5f4b7f209ee8a596cda8a1c7b4a7.tar.gz
decky-loader-671cfe49caad5f4b7f209ee8a596cda8a1c7b4a7.zip
feat: Add plugins version in logs (#871)
Diffstat (limited to 'frontend/src/utils')
-rw-r--r--frontend/src/utils/pluginHelpers.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/frontend/src/utils/pluginHelpers.ts b/frontend/src/utils/pluginHelpers.ts
new file mode 100644
index 00000000..a23f801e
--- /dev/null
+++ b/frontend/src/utils/pluginHelpers.ts
@@ -0,0 +1,14 @@
+/**
+ * Returns a formatted display name for a plugin with version if available
+ * @param name - The plugin name
+ * @param version - The optional plugin version
+ *
+ * @returns Formatted string like "PluginName (v1.2.3)" or just "PluginName" if version is undefined
+ */
+export function getPluginDisplayName(name: string, version?: string): string {
+ if (version) {
+ return `${name} (v${version})`;
+ }
+
+ return name;
+}