Skip to content

Commit 8385ec7

Browse files
committed
Cleanup more filemanager design
1 parent caca6cf commit 8385ec7

File tree

3 files changed

+30
-13
lines changed

3 files changed

+30
-13
lines changed

resources/assets/scripts/components/server/components/filemanager/FileContextMenu.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ export default Vue.component('file-context-menu', {
2525
</div>
2626
<div class="action">Copy</div>
2727
</div>
28+
<div class="context-row">
29+
<div class="icon">
30+
<icon name="download" class="h-4"/>
31+
</div>
32+
<div class="action">Download</div>
33+
</div>
2834
</div>
2935
<div>
3036
<div class="context-row">
@@ -41,12 +47,6 @@ export default Vue.component('file-context-menu', {
4147
</div>
4248
</div>
4349
<div>
44-
<div class="context-row">
45-
<div class="icon">
46-
<icon name="download" class="h-4"/>
47-
</div>
48-
<div class="action">Download</div>
49-
</div>
5050
<div class="context-row danger">
5151
<div class="icon">
5252
<icon name="delete" class="h-4"/>

resources/assets/styles/components/filemanager.css

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,15 @@
3131
}
3232

3333
.context-menu {
34-
@apply .absolute .bg-white .py-2 .border .rounded .text-neutral-800 .text-sm .cursor-pointer;
34+
@apply .absolute .bg-white .py-2 .border .border-neutral-300 .shadow-lg .rounded .text-neutral-600 .text-sm .cursor-pointer;
3535

3636
& > div:not(:last-of-type) {
37-
@apply .border-b .border-neutral-50 .pb-2 .mb-2;
37+
@apply .border-b .border-neutral-100 .pb-2 .mb-2;
3838
}
3939

4040
& .context-row {
41-
@apply .flex .flex-row .items-center .py-2 .px-8 .border-t .border-b .border-transparent;
41+
@apply .flex .flex-row .items-center .py-2 .px-8 .mx-2 .rounded;
42+
transition: background-color 50ms linear;
4243

4344
& > .icon {
4445
@apply .flex-none;
@@ -53,11 +54,16 @@
5354
}
5455

5556
&:hover {
56-
@apply .bg-neutral-50 .border-t .border-b .border-neutral-100;
57+
@apply .bg-neutral-50 .text-neutral-800;
5758
}
5859

59-
&.danger:hover {
60-
@apply .bg-red-50 .border-t .border-b .border-red-100;
60+
&.danger {
61+
@apply .border .border-transparent;
62+
transition: border 50ms linear;
63+
64+
&:hover {
65+
@apply .bg-red-50 .border-red-100;
66+
}
6167
}
6268

6369
}

resources/assets/styles/components/navigation.css

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,25 @@
6969
transition: border-left-color 250ms linear, color 250ms linear;
7070
@apply .block .px-4 .py-3 .border-l-3 .border-neutral-100 .no-underline .text-neutral-400 .font-medium;
7171

72-
&:hover, &.router-link-exact-active {
72+
&:hover, &.router-link-exact-active, &.router-link-active {
7373
@apply .text-neutral-800;
7474
}
7575

7676
&.router-link-exact-active, &.router-link-active {
7777
@apply .border-primary-500 .cursor-default;
7878
}
7979
}
80+
81+
/**
82+
* Because of how the router works the first sidebar link is always active
83+
* since that is the container for all of the server things. Override the
84+
* style for active links if its the first one and not an exact route match.
85+
*/
86+
&:first-of-type > a {
87+
&.router-link-active:not(.router-link-exact-active) {
88+
@apply .border-neutral-100 .text-neutral-400 .cursor-pointer;
89+
}
90+
}
8091
}
8192
}
8293
}

0 commit comments

Comments
 (0)