From 9beca9162322656d063398993967a418eef3e700 Mon Sep 17 00:00:00 2001
From: Furkan Sahin <furkan-dev@proton.me>
Date: Wed, 10 Aug 2022 20:55:14 -0500
Subject: `style`: Update buttons

Use `label` with `input` directly vs  `UploadButton.svelte`.
---
 src/components/FileUploads.svelte | 93 ++++++++++++++-------------------------
 1 file changed, 34 insertions(+), 59 deletions(-)

(limited to 'src/components/FileUploads.svelte')

diff --git a/src/components/FileUploads.svelte b/src/components/FileUploads.svelte
index d36e1d7..4632748 100644
--- a/src/components/FileUploads.svelte
+++ b/src/components/FileUploads.svelte
@@ -138,81 +138,56 @@
   }
 </script>
 
-<div class="flex grid m-10 grid-cols-2 gap-2">
-  <Card
-    title="Peer Teacher"
-    desc="Upload one or more Peer Teacher schedule txt files"
-  >
-    <UploadButton
-      accept="text/plain"
-      multiple={true}
-      bind:files={ptSchedules}
-    />
-  </Card>
-
-  <Card
-    title="Labs"
-    desc="Upload one or more Labs as json file. Acquired from Howdy"
-  >
-    <UploadButton
-      color="btn-success"
-      accept="application/json"
-      multiple={true}
-      bind:files={labSchedule}
-    />
-  </Card>
-
-  <Card
-    title="Data Base"
-    desc="Upload the json database file to continue working"
-  >
+<div class="flex grid m-10 grid-cols-2 gap-2 w-[70%] ">
+  <Card title="Data Base" desc="">
     <UploadButton
       color="btn-info"
       accept="application/json"
       multiple={true}
       bind:files={dbFile}
     />
-  </Card>
-
-  <Card
-    title="Export DB"
-    desc="Download the json database file to save your work. Remember to save it on the cloud somewhere!"
-  >
     <button class="btn btn-warning" on:click={exportDB}>Download</button>
-  </Card>
-
-  <Card
-    title="Export to Local Storage"
-    desc="Save current DB to local storage. Local storage db should only be used for testing purposes to avoid data anomalies"
-  >
-    <button class="btn btn-warning" on:click={exportDB2LocalStorage}
+    <button class="btn btn-ghost" on:click={exportDB2LocalStorage}
       >LocalStorage</button
     >
   </Card>
 
-  <Card
-    title="Upload PTs from Questionnairre"
-    desc="Gather all data from the questionnairre results. Should be in CSV format"
-  >
-    <UploadButton
-      color="btn-info"
-      accept="text/csv"
-      multiple={false}
-      bind:files={questionnaire_file}
-    />
+  <Card title="Peer Teachers" desc="">
+    <label class="btn btn-info">
+      Schedules
+      <input type="file" accept="text/plain" bind:files={ptSchedules} hidden />
+    </label>
+    <label class="btn btn-secondary">
+      Straw Poll
+      <input
+        type="file"
+        accept="text/csv"
+        bind:files={officehoursFiles}
+        hidden
+      />
+    </label>
+    <label class="btn btn-error">
+      Questionnaire
+      <input
+        type="file"
+        accept="text/csv"
+        bind:files={questionnaire_file}
+        hidden
+      />
+    </label>
   </Card>
 
   <Card
-    title="Office Hours"
-    desc="Upload the office hours output file for it to be parsed. Currently we accept a CSV file representation of a Strawpoll output"
+    title="Labs"
+    desc="Upload one or more Labs as json file. Acquired from Howdy"
   >
     <UploadButton
-      color="btn-warn"
-      accept="text/csv"
-      multiple={false}
-      bind:files={officehoursFiles}
-    /></Card
-  >
+      color="btn-success"
+      accept="application/json"
+      multiple={true}
+      bind:files={labSchedule}
+    />
+  </Card>
 </div>
 
 <!-- https://github.com/saadeghi/daisyui/issues/221 -->
-- 
cgit v1.2.3

