diff --git a/app/components/Loading.vue b/app/components/Loading.vue
index b389e407..b3d4c733 100644
--- a/app/components/Loading.vue
+++ b/app/components/Loading.vue
@@ -44,7 +44,7 @@ onUnmounted(() => {
-
diff --git a/app/components/Loading/EcoMessages.vue b/app/components/Loading/EcoMessages.vue
index 73e46bfb..59bc193b 100644
--- a/app/components/Loading/EcoMessages.vue
+++ b/app/components/Loading/EcoMessages.vue
@@ -40,18 +40,18 @@ onUnmounted(() => {
-
+
-
+
-
+
STARTING UP
@@ -35,7 +34,17 @@ const { logo } = defineProps({
diff --git a/app/components/Loading/Progress.vue b/app/components/Loading/Progress.vue
index e4b4c9c7..85921c36 100644
--- a/app/components/Loading/Progress.vue
+++ b/app/components/Loading/Progress.vue
@@ -15,7 +15,7 @@ const { progress } = defineProps({
rounded
bg-color="white"
bg-opacity="0.15"
- class="custom-progress-glow mt-8"
+ class="custom-progress-glow mt-4 mt-sm-8"
/>
diff --git a/app/components/Viewer/ObjectTree/Base/Controls.vue b/app/components/Viewer/ObjectTree/Base/Controls.vue
index 1ad9d0dd..4a6f49d7 100644
--- a/app/components/Viewer/ObjectTree/Base/Controls.vue
+++ b/app/components/Viewer/ObjectTree/Base/Controls.vue
@@ -2,14 +2,15 @@
import ActionButton from "@ogw_front/components/ActionButton.vue";
import SearchBar from "@ogw_front/components/SearchBar.vue";
-const { search, sortType, filterOptions, availableFilterOptions } = defineProps({
+const { search, sortType, filterOptions, availableFilterOptions, isCollapsed } = defineProps({
search: { type: String, required: true },
sortType: { type: String, required: true },
filterOptions: { type: Object, required: true },
availableFilterOptions: { type: Array, required: true },
+ isCollapsed: { type: Boolean, required: false, default: false },
});
-const emit = defineEmits(["update:search", "toggle-sort", "collapse-all"]);
+const emit = defineEmits(["update:search", "toggle-sort", "collapse-all", "expand-all"]);
const showSearch = ref(false);
@@ -98,6 +99,7 @@ watch(
+
diff --git a/app/components/Viewer/ObjectTree/Base/TreeRow.vue b/app/components/Viewer/ObjectTree/Base/TreeRow.vue
index 7ce1fd8e..d83ff1a4 100644
--- a/app/components/Viewer/ObjectTree/Base/TreeRow.vue
+++ b/app/components/Viewer/ObjectTree/Base/TreeRow.vue
@@ -34,10 +34,10 @@ const INDENT_STEP = 16;
v-if="selection.selectable"
:icon="
getIndeterminate(item.raw)
- ? 'mdi-eye-minus'
+ ? 'mdi-eye-minus-outline'
: isSelected(item.raw)
? 'mdi-eye'
- : 'mdi-eye-off'
+ : 'mdi-eye-off-outline'
"
variant="text"
density="compact"
diff --git a/app/components/Viewer/ObjectTree/Views/GlobalObjects.vue b/app/components/Viewer/ObjectTree/Views/GlobalObjects.vue
index aae3c2e6..5818eb89 100644
--- a/app/components/Viewer/ObjectTree/Views/GlobalObjects.vue
+++ b/app/components/Viewer/ObjectTree/Views/GlobalObjects.vue
@@ -99,6 +99,20 @@ function handleHoverLeave({ item }) {
}
onHoverLeave(actualItem.id);
}
+
+function expandAll() {
+ const allIds = [];
+ function traverse(itemsList) {
+ for (const item of itemsList) {
+ if (item.children && item.children.length > 0) {
+ allIds.push(item.id);
+ traverse(item.children);
+ }
+ }
+ }
+ traverse(treeviewStore.items);
+ opened.value = allIds;
+}
@@ -108,8 +122,10 @@ function handleHoverLeave({ item }) {
:sort-type="sortType"
:filter-options="filterOptions"
:available-filter-options="availableFilterOptions"
+ :is-collapsed="opened.length === 0"
@toggle-sort="toggleSort"
@collapse-all="opened = []"
+ @expand-all="expandAll"
/>
0) {
+ allIds.push(item.id);
+ traverse(item.children);
+ }
+ }
+ }
+ traverse(itemsForTreeView.value);
+ opened.value = allIds;
+}
@@ -118,8 +132,10 @@ function handleHoverLeave() {
:sort-type="sortType"
:filter-options="filterOptions"
:available-filter-options="availableFilterOptions"
+ :is-collapsed="opened.length === 0"
@toggle-sort="toggleSort"
@collapse-all="opened = []"
+ @expand-all="expandAll"
/>
diff --git a/app/composables/virtual_tree.js b/app/composables/virtual_tree.js
index 458e99ee..dc5cc42f 100644
--- a/app/composables/virtual_tree.js
+++ b/app/composables/virtual_tree.js
@@ -112,10 +112,6 @@ export function useVirtualTree(propsIn, emit) {
: (item[actualItemProps.value.title] || "").toLowerCase().includes(lowerSearch) ||
String(id).toLowerCase().includes(lowerSearch);
- if (!hasChildren && !matches) {
- continue;
- }
-
if (hasChildren) {
const subtree = [];
flattenTree(children, depth + 1, subtree);
@@ -127,10 +123,15 @@ export function useVirtualTree(propsIn, emit) {
raw: item,
id,
depth,
- isOpen: true,
+ isOpen,
isLeaf: false,
});
- result.push(...subtree);
+ if (isOpen) {
+ result.push(...subtree);
+ }
+ continue;
+ }
+ if (!matches) {
continue;
}
}
@@ -150,8 +151,29 @@ export function useVirtualTree(propsIn, emit) {
return result;
}
+ function traverse(itemsList, allIds) {
+ for (const item of itemsList) {
+ const children = item[actualItemProps.value.children];
+ if (children && children.length > 0) {
+ allIds.push(item[actualItemProps.value.value]);
+ traverse(children, allIds);
+ }
+ }
+ }
+
const displayItems = computed(() => flattenTree(props.value.items || []));
+ watch(
+ () => props.value.search,
+ (newSearch, oldSearch) => {
+ if (newSearch && !oldSearch) {
+ const allIds = [];
+ traverse(props.value.items || [], allIds);
+ emit("update:opened", [...new Set([...(props.value.opened || []), ...allIds])]);
+ }
+ },
+ );
+
return {
actualItemProps,
actualSelection,
diff --git a/app/stores/treeview.js b/app/stores/treeview.js
index 7300df77..353d6acd 100644
--- a/app/stores/treeview.js
+++ b/app/stores/treeview.js
@@ -216,6 +216,24 @@ export const useTreeviewStore = defineStore("treeview", () => {
};
}
+ function renameItem(id, newName) {
+ for (const group of items.value) {
+ const child = group.children.find((childItem) => childItem.id === id);
+ if (child) {
+ child.title = newName;
+ const options = { numeric: true, sensitivity: "base" };
+ group.children.sort((childA, childB) =>
+ childA.title.localeCompare(childB.title, undefined, options),
+ );
+ break;
+ }
+ }
+ const view = opened_views.value.find((openedView) => openedView.id === id);
+ if (view) {
+ view.title = newName;
+ }
+ }
+
return {
items,
selection,
@@ -226,6 +244,7 @@ export const useTreeviewStore = defineStore("treeview", () => {
rowHeights,
addItem,
removeItem,
+ renameItem,
displayAdditionalTree,
closeView,
moveView,