aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2022-08-10 20:55:14 -0500
committerFurkan Sahin <furkan-dev@proton.me>2022-08-10 20:55:14 -0500
commit9beca9162322656d063398993967a418eef3e700 (patch)
tree718ee7f7e60c6a8413c9b16221de3c8475d4c0d2 /src
parente42dd9a4fc99cd4ec3d6f96279271c8c6df38466 (diff)
`style`: Update buttons
Use `label` with `input` directly vs `UploadButton.svelte`.
Diffstat (limited to 'src')
-rw-r--r--src/components/FileUploads.svelte93
1 files changed, 34 insertions, 59 deletions
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 -->