Skip to content

Commit 5338e46

Browse files
committed
fix: more ux
1 parent a88558b commit 5338e46

2 files changed

Lines changed: 39 additions & 24 deletions

File tree

core/src/server/static/index.html

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -777,38 +777,29 @@ <h2>Changes to the Cookie Policy</h2>
777777
<button @click="mergeSelectedFiles" v-if="selectedFiles.length > 1" style="margin-left: 0;">Merge
778778
selected files</button>
779779
<ul>
780-
<li v-for="(file, fileIndex) in banks[selectedBank].files" :key="fileIndex"
781-
draggable="true"
782-
@dragstart="handleDragStart($event, fileIndex)"
783-
@dragend="handleDragEnd"
784-
@dragover.prevent="handleDragOver($event, fileIndex)"
785-
@dragleave="handleDragLeave"
786-
@drop="handleDrop($event, fileIndex)"
787-
@mousedown="handleMouseDown(fileIndex)"
788-
@mouseup="handleMouseUp(fileIndex)"
789-
:class="{
780+
<li v-for="(file, fileIndex) in banks[selectedBank].files" :key="fileIndex" draggable="true"
781+
@dragstart="handleDragStart($event, fileIndex)" @dragend="handleDragEnd"
782+
@dragover.prevent="handleDragOver($event, fileIndex)" @dragleave="handleDragLeave"
783+
@drop="handleDrop($event, fileIndex)" @mousedown="handleMouseDown(fileIndex)"
784+
@mouseup="handleMouseUp(fileIndex)" :class="{
790785
'selected': isSelected(fileIndex),
791786
'selected_on':isSelectedAndOpen(fileIndex),
792787
'dragging': draggedIndex === fileIndex,
793788
'drag-over': dragOverIndex === fileIndex && draggedIndex !== fileIndex
794-
}"
795-
:data-file-number="fileIndex + 1">
789+
}" :data-file-number="fileIndex + 1">
796790
<!-- checkbox on left -->
797-
<input type="checkbox"
798-
@click.stop="toggleFileSelection(fileIndex)"
799-
@mousedown.stop
800-
@mouseup.stop
801-
:checked="isSelected(fileIndex)"
802-
class="file-checkbox">
791+
<input type="checkbox" @click.stop="toggleFileSelection(fileIndex)" @mousedown.stop
792+
@mouseup.stop :checked="isSelected(fileIndex)" class="file-checkbox">
803793
<span class="file-name">{{ file.Filename }}</span>
804794
<i v-if="isSelectedAndOpen(fileIndex)" class="fas fa-eye"></i>
805795
</li>
806796
</ul>
807797
</div>
808798

809-
<div class="file-details-backdrop" v-if="selectedFile!=null && !disconnected" @click="selectedFile=null"></div>
799+
<div class="file-details-backdrop" v-if="selectedFile!=null && !disconnected"
800+
@click="selectedFile=null"></div>
810801
<div class="file-details" v-if="selectedFile!=null && !disconnected" @click.stop>
811-
<p style="margin-top:0; padding-top: 0.5rem; padding-bottom: 0; margin-bottom: 0;
802+
<p style="margin-top:0; margin-bottom: 0;
812803
text-align: left;"><strong>{{ banks[selectedBank].files[selectedFile].Filename }}</strong> ({{
813804
banks[selectedBank].files[selectedFile].SliceStart.length }} slices,
814805
{{humanizeDuration((banks[selectedBank].files[selectedFile].Duration).toFixed(5)*1000)}})

core/src/server/static/style.css

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,15 @@ body {
3636
border-radius: 2em;
3737
border-color: var(--header-footer-background);
3838
border-style: solid;
39-
box-shadow: var(--highlight-color) 12px 12px 2px 1px;
39+
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
4040
background: var(--background-color);
41-
padding: 1em;
41+
padding: 2em;
42+
max-width: 90vw;
43+
max-height: 90vh;
44+
}
45+
46+
#dialog-settings::backdrop {
47+
background: rgba(0, 0, 0, 0.7);
4248
}
4349

4450
#app {
@@ -166,15 +172,22 @@ a:hover {
166172
top: 50%;
167173
left: 50%;
168174
transform: translate(-50%, -50%);
169-
border: 3px solid var(--highlight-color-border);
175+
border: 4px solid var(--highlight-color-border);
170176
border-radius: 10px;
171177
padding: 2em;
172178
background: var(--background-color);
173179
z-index: 1000;
174180
max-width: 90vw;
175181
max-height: 90vh;
176182
overflow-y: auto;
177-
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
183+
box-shadow: 0 4px 20px var(--shadow-color)
184+
}
185+
186+
.file-details>p:nth-child(1)>strong {
187+
background: var(--highlight-color-border);
188+
border-radius: 1em;
189+
padding: 1em;
190+
display: inline-block;
178191
}
179192

180193
.file-details-backdrop {
@@ -320,6 +333,17 @@ button:hover {
320333
color: white;
321334
}
322335

336+
#downloadZipButton {
337+
background-color: var(--highlight-color-border);
338+
color: black;
339+
font-weight: bold;
340+
}
341+
342+
#downloadZipButton:hover {
343+
background-color: var(--highlight-color-border);
344+
opacity: 0.8;
345+
}
346+
323347
.footer-item {
324348
margin-bottom: 0.25rem;
325349
margin-top: 0.25rem;

0 commit comments

Comments
 (0)