|
2 | 2 |
|
3 | 3 | <script lang="ts"> |
4 | 4 | import CloseIcon from '@nasa-jpl/stellar/icons/close.svg?component'; |
| 5 | + import UploadIcon from '@nasa-jpl/stellar/icons/upload.svg?component'; |
5 | 6 | import { plan } from '../stores/plan'; |
6 | 7 | import { resourceTypes, simulationDatasetId } from '../stores/simulation'; |
7 | 8 | import type { User } from '../types/app'; |
|
10 | 11 | import effects from '../utilities/effects'; |
11 | 12 | import { permissionHandler } from '../utilities/permissionHandler'; |
12 | 13 | import { featurePermissions } from '../utilities/permissions'; |
| 14 | + import { tooltip } from '../utilities/tooltip'; |
13 | 15 | import ResourceListPrefix from './ResourceListPrefix.svelte'; |
14 | 16 | import TimelineItemList from './TimelineItemList.svelte'; |
| 17 | + import Input from './form/Input.svelte'; |
15 | 18 |
|
16 | 19 | export let user: User | null; |
17 | 20 |
|
|
71 | 74 | <button class="close-upload" type="button" on:click={onHideUpload}> |
72 | 75 | <CloseIcon /> |
73 | 76 | </button> |
74 | | - <div class="upload-rows"> |
75 | | - <label for="file">Resources File</label> |
| 77 | + <Input layout="stacked"> |
| 78 | + <label for="file">Resource File</label> |
76 | 79 | <input |
77 | 80 | class="w-100" |
78 | 81 | name="file" |
|
85 | 88 | permissionError: uploadPermissionError, |
86 | 89 | }} |
87 | 90 | /> |
| 91 | + </Input> |
| 92 | + <div class="use-simulation"> |
88 | 93 | <label class="st-typography-body timeline-item-list-filter-option-label" for="simulation-association"> |
89 | 94 | Use selected simulation |
90 | 95 | </label> |
|
117 | 122 | hasPermission: hasUploadPermission, |
118 | 123 | permissionError: uploadPermissionError, |
119 | 124 | }} |
| 125 | + use:tooltip={{ content: 'Upload Resources' }} |
120 | 126 | > |
121 | | - Upload Resources |
| 127 | + <UploadIcon /> |
122 | 128 | </button> |
123 | 129 | </div> |
124 | 130 | <ResourceListPrefix {item} /> |
|
137 | 143 | display: none; |
138 | 144 | } |
139 | 145 |
|
140 | | - .upload-container :global(.upload-rows) { |
141 | | - column-gap: 8px; |
| 146 | + .upload-container { |
142 | 147 | display: grid; |
143 | | - grid-template-columns: max-content auto; |
144 | | - justify-content: space-between; |
145 | 148 | row-gap: 8px; |
146 | 149 | } |
147 | 150 |
|
148 | | - .st-button { |
149 | | - gap: 4px; |
150 | | - height: 20px; |
151 | | - } |
152 | | -
|
153 | | - .upload-container :global(.simulation-checkbox) { |
| 151 | + .upload-container .use-simulation { |
| 152 | + column-gap: 8px; |
| 153 | + display: grid; |
| 154 | + grid-template-columns: max-content auto; |
| 155 | + justify-content: space-between; |
154 | 156 | justify-self: left; |
155 | 157 | margin: 0; |
| 158 | + width: 100%; |
156 | 159 | } |
157 | 160 |
|
158 | 161 | .upload-container :global(.upload-button-container) { |
159 | 162 | display: flex; |
160 | 163 | flex-flow: row-reverse; |
161 | | - margin-top: 8px; |
162 | 164 | } |
163 | 165 |
|
164 | 166 | .upload-container :global(.close-upload) { |
|
0 commit comments