diff --git a/.gitignore b/.gitignore
index 64575404..905c2d8c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
.DS_Store
server/node_modules/
client/node_modules/
+node_modules/
server/dist/
client/dist/
diff --git a/client/src/assets/main.css b/client/src/assets/main.css
index 1d744c5a..5ab8b214 100644
--- a/client/src/assets/main.css
+++ b/client/src/assets/main.css
@@ -221,6 +221,17 @@ button:active {
width: 100%;
}
+.document.item {
+ text-align: center;
+ width: 220px;
+}
+
+.document.item img {
+ width: 64px;
+ height: 64px;
+}
+
+
.document h1 {
font-weight: normal;
font-size: 32px;
diff --git a/client/src/services/ContextMenu.js b/client/src/services/ContextMenu.js
index c2ca283f..a552461f 100644
--- a/client/src/services/ContextMenu.js
+++ b/client/src/services/ContextMenu.js
@@ -8,7 +8,10 @@ let cursorY = 0;
let arrowIcon = "icons/iconoir/regular/nav-arrow-right.svg";
+import { animate } from 'motion'
+
function Show(){
+ console.log("SHOW")
let contextMenu = document.getElementById('context-menu');
contextMenu.style.display = "flex";
contextMenu.style.top = (cursorY + margin) + "px";
@@ -22,6 +25,8 @@ function HideContextMenu(){
function PopulateContext(val){
let children = [];
+
+ let elementNum = 0;
val.forEach(element => {
let contextMenuElement = document.createElement('div');
contextMenuElement.classList.add("context-menu-element");
@@ -64,6 +69,14 @@ function PopulateContext(val){
}
children.push(contextMenuElement);
+
+ animate(contextMenuElement, {
+ opacity: [0, 1],
+ translateY: [20, -2]
+ }, {delay: (elementNum / 2) * 0.1, duration: 0.25}).finished.then(() => {
+
+ });
+ elementNum++;
});
return children;
diff --git a/client/src/services/Tooltip.js b/client/src/services/Tooltip.js
index bfc44baa..46df9af1 100644
--- a/client/src/services/Tooltip.js
+++ b/client/src/services/Tooltip.js
@@ -1,19 +1,42 @@
import { ref } from 'vue';
+import { animate } from 'motion';
let content = ref("");
let margin = 14;
let cursorX = 0;
-let cursorY = 0;
+let cursorY = 0;1
+
+let showed = false;
+let hided = false;
function ShowTooltip(){
let tooltip = document.getElementById('mouse-tooltip');
+
tooltip.style.display = "block";
+
+ if(!showed){
+ animate(tooltip, {
+ opacity: [0, 1],
+ translateY: [20, 0]
+ }, {duration: 0.1, ease: 'ease-out'});
+ showed = true;
+ hided = false;
+ }
}
function HideTooltip(){
let tooltip = document.getElementById('mouse-tooltip');
- tooltip.style.display = "none";
+
+
+ if(!hided){
+ animate(tooltip, {
+ opacity: [1, 0],
+ translateY: [0, 20]
+ }, {duration: 0.1, ease: 'ease-in'}).finished.then(() => tooltip.style.display = "none")
+ hided = true;
+ showed = false;
+ }
}
function AddTooltip(element, val, data = {}){
@@ -22,13 +45,21 @@ function AddTooltip(element, val, data = {}){
function UpdateVisibilityThread(){
let tooltip = document.getElementById('mouse-tooltip');
- let element = document.elementFromPoint(cursorX, cursorY);
- if(element) if(element._dr_tooltip){
- ShowTooltip();
- content.value = element._dr_tooltip.value;
- if(element._dr_tooltip.max_width) tooltip.style.maxWidth = element._dr_tooltip.max_width + "px";
- else tooltip.style.maxWidth = "none";
- } else HideTooltip();
+ let elements = document.elementsFromPoint(cursorX, cursorY);
+
+ let visible = false;
+ for(let i = 0; i < elements.length; i++){
+ let element = elements[i];
+ if(element._dr_tooltip){
+ ShowTooltip();
+ content.value = element._dr_tooltip.value;
+ if(element._dr_tooltip.max_width) tooltip.style.maxWidth = element._dr_tooltip.max_width + "px";
+ else tooltip.style.maxWidth = "none";
+ visible = true;
+ break;
+ }
+ }
+ if(!visible) HideTooltip();
setTimeout(UpdateVisibilityThread, 0);
}
diff --git a/client/src/views/managers/ContextMenuManager.vue b/client/src/views/managers/ContextMenuManager.vue
index 00326c9a..627d44b1 100644
--- a/client/src/views/managers/ContextMenuManager.vue
+++ b/client/src/views/managers/ContextMenuManager.vue
@@ -35,18 +35,18 @@ onMounted(() => {
flex-direction: column;
- background-color: var(--tooltip-background);
-
- -webkit-box-shadow: 0px 0px 5px -2px rgba(0,0,0,0.75);
- -moz-box-shadow: 0px 0px 5px -2px rgba(0,0,0,0.75);
- box-shadow: 0px 0px 5px -2px rgba(0,0,0,0.75);
-
- border: solid 1px var(--color-border);
-
+
.context-menu-element {
+
+ &:last-child {
+ border-width: 1px 1px 1px 1px;
+ }
+ border: solid 1px var(--color-border);
+ border-width: 1px 1px 0px 1px;
padding: 3px 5px 3px 5px;
cursor: default;
user-select: none;
+ background-color: var(--tooltip-background);
transition: background-color 100ms;
display: flex;
align-items: center;
diff --git a/client/src/views/partials/ConceptEntry.vue b/client/src/views/partials/ConceptEntry.vue
new file mode 100644
index 00000000..c62c6622
--- /dev/null
+++ b/client/src/views/partials/ConceptEntry.vue
@@ -0,0 +1,73 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/client/src/views/partials/ConceptList.vue b/client/src/views/partials/ConceptList.vue
index 7e30b488..bc789070 100644
--- a/client/src/views/partials/ConceptList.vue
+++ b/client/src/views/partials/ConceptList.vue
@@ -1,9 +1,11 @@
-
-
-
-
{{ element.name }}
-
+
+