style: add file/folder icon and modify some style in visualization part

This commit is contained in:
Chen, Tai-Lin committed 2024-07-23 18:30:57 +08:00
1 parent 8d0a210f0e
commit d8c0ee4b20
3 files changed
+57 -47

No files matched your search

+15 -1
View File
@@ -20,7 +20,21 @@ function nodeClass() {
</script>
<template>
<a href="#" :class="nodeClass()">{{ node.discovered ? node.name : '???' }}</a>
<a href="#" :class="nodeClass()">
<font-awesome-icon
v-if="node.type === 'folder'"
:icon="['far', 'folder']"
class="text-text-primary size-8"
/>
<font-awesome-icon
v-else
:icon="['far', 'file']"
class="text-text-primary size-8"
/>
<br />
{{ node.discovered ? node.name : '???' }}
{{ node.name === '' && node.discovered ? '/' : '' }}
</a>
<ul :class="nodeClass()" v-if="node.children && node.children.length > 0">
<li :class="nodeClass()" v-for="child in node.children" :key="child.path">
<FileNode :node="child" :pwd="pwd" />
+10 -18
View File
@@ -48,14 +48,14 @@ const sessionStore = useSession()
position: absolute;
top: 0;
right: 50%;
border-top: 1px solid #00ff00;
border-top: 2px solid #00ff00;
width: 50%;
height: 20px;
}
.tree li::after {
right: auto;
left: 50%;
border-left: 1px solid #00ff00;
border-left: 2px solid #00ff00;
}
.tree li:only-child::after,
@@ -73,7 +73,7 @@ const sessionStore = useSession()
}
.tree li:last-child::before {
border-right: 1px solid #00ff00;
border-right: 2px solid #00ff00;
border-radius: 0 5px 0 0;
-webkit-border-radius: 0 5px 0 0;
-moz-border-radius: 0 5px 0 0;
@@ -89,7 +89,7 @@ const sessionStore = useSession()
position: absolute;
top: 0;
left: 50%;
border-left: 1px solid #00ff00;
border-left: 2px solid #00ff00;
width: 0;
height: 20px;
}
@@ -100,7 +100,7 @@ const sessionStore = useSession()
text-decoration: none;
color: #ffffff;
font-family: arial, verdana, tahoma;
font-size: 11px;
font-size: 12px;
display: inline-block;
border-radius: 5px;
@@ -112,18 +112,10 @@ const sessionStore = useSession()
-moz-transition: all 0.5s;
}
a.discovered {
background: #526b4e;
color: #000;
border: 1px solid #94a0b4;
}
ul.discovered,
li.discovered {
border-color: #94a0b4;
}
a.pwd {
box-shadow: 0 0 40px rgba(255, 255, 0, 20);
.tree li a.pwd {
border: 3px solid #00ff00;
background: #008080;
font-weight: bold;
font-size: 13px;
}
</style>
+32 -28
View File
@@ -3,28 +3,30 @@ import { library } from '@fortawesome/fontawesome-svg-core'
/* import specific icons */
import {
faBars,
faArrowLeft,
faList,
faGear,
faTriangleExclamation,
faExpand,
faTerminal,
faArrowRotateLeft,
faArrowRightFromBracket,
faArrowRight,
faArrowRightFromBracket,
faArrowRotateLeft,
faBars,
faBug,
faCircleExclamation,
faMap,
faTrophy,
faFileInvoice,
faEnvelope,
faExpand,
faFileInvoice,
faGear,
faList,
faMap,
faPlay,
faTerminal,
faTriangleExclamation,
faTrophy,
} from '@fortawesome/free-solid-svg-icons'
import {
faLightbulb,
faCircleQuestion,
faCircleRight,
faFile,
faFolder,
faLightbulb,
} from '@fortawesome/free-regular-svg-icons'
import {
faFacebook,
@@ -34,27 +36,29 @@ import {
/* add icons to the library */
library.add(
faBars,
faArrowLeft,
faList,
faGear,
faTriangleExclamation,
faExpand,
faTerminal,
faArrowRotateLeft,
faArrowRightFromBracket,
faArrowRight,
faArrowRightFromBracket,
faArrowRotateLeft,
faBars,
faBug,
faMap,
faTrophy,
faCircleExclamation,
faLightbulb,
faEnvelope,
faExpand,
faFileInvoice,
faGear,
faList,
faMap,
faPlay,
faTerminal,
faTriangleExclamation,
faTrophy,
faCircleQuestion,
faCircleRight,
faGithub,
faGoogle,
faFileInvoice,
faFile,
faFolder,
faLightbulb,
faFacebook,
faEnvelope,
faPlay
faGithub,
faGoogle
)