From 3f2a2bbc040b41b517df1192f27697ed66037b5d Mon Sep 17 00:00:00 2001
From: AAGaming <aa@mail.catvibers.me>
Date: Wed, 29 Jun 2022 12:25:50 -0400
Subject: fix installing plugins

---
 frontend/src/components/store/Store.tsx | 3 +++
 1 file changed, 3 insertions(+)

(limited to 'frontend/src/components/store/Store.tsx')

diff --git a/frontend/src/components/store/Store.tsx b/frontend/src/components/store/Store.tsx
index 4890cb9d..e317096f 100644
--- a/frontend/src/components/store/Store.tsx
+++ b/frontend/src/components/store/Store.tsx
@@ -19,6 +19,8 @@ export interface StorePlugin {
 
 export async function installFromURL(url: string) {
   const formData = new FormData();
+  const splitURL = url.split('/');
+  formData.append('name', splitURL[splitURL.length - 1].replace('.zip', ''));
   formData.append('artifact', url);
   await fetch('http://localhost:1337/browser/install_plugin', {
     method: 'POST',
@@ -28,6 +30,7 @@ export async function installFromURL(url: string) {
 
 export async function requestPluginInstall(plugin: StorePlugin, selectedVer: StorePluginVersion) {
   const formData = new FormData();
+  formData.append('name', plugin.name);
   formData.append('artifact', `https://cdn.tzatzikiweeb.moe/file/steam-deck-homebrew/versions/${selectedVer.hash}.zip`);
   formData.append('version', selectedVer.name);
   formData.append('hash', selectedVer.hash);
-- 
cgit v1.2.3

