Skip to content

Commit c5097c0

Browse files
authored
Merge pull request #497 from Geode-solutions/feat/Vuetify4
feat(Vuetify4): new version of Vuetify https://github.com/Geode-solut…
2 parents bbbc2c3 + 6f8766e commit c5097c0

21 files changed

Lines changed: 135 additions & 59 deletions

File tree

‎app/assets/css/main.css‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.v-card-title.text-caption {
2+
font-size: 0.75rem !important;
3+
line-height: 1.25rem !important;
4+
}
5+
6+
.v-card-title.text-subtitle-2 {
7+
font-size: 0.875rem !important;
8+
line-height: 1.375rem !important;
9+
}
10+
11+
.v-card-title.text-subtitle-1 {
12+
font-size: 1rem !important;
13+
line-height: 1.5rem !important;
14+
}
15+
16+
.v-card-title.text-body-2 {
17+
font-size: 0.875rem !important;
18+
line-height: 1.25rem !important;
19+
}
20+
21+
.v-card-title.text-body-1 {
22+
font-size: 1rem !important;
23+
line-height: 1.5rem !important;
24+
}

‎app/components/ClippingPlanes.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const {
3939
selectedDatasetIds,
4040
allItems,
4141
hybridViewerStore,
42-
debouncedApply: () => debouncedApply(),
42+
debouncedApply: (...args) => debouncedApply?.(...args),
4343
});
4444
4545
async function applyClippingPlanes() {

‎app/components/Viewer/Generic/Model/ModelStyleCard.vue‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -90,33 +90,33 @@ const modelVisibility = computed({
9090
},
9191
});
9292
93-
const modelComponentsActiveColoring = computed({
94-
get: () => dataStyleStore.getModelActiveColoring(modelId.value),
95-
set: async (coloringType) => {
93+
const modelComponentsColor = computed({
94+
get: () => dataStyleStore.getModelColor(modelId.value),
95+
set: async (color) => {
9696
await dataStyleStore.mutateStyle(modelId.value, {
97-
coloring: { active: coloringType },
97+
coloring: { constant: color },
9898
});
9999
await dataStyleStore.setModelComponentsColor(
100100
modelId.value,
101101
selection.value,
102-
dataStyleStore.getModelColor(modelId.value),
103-
coloringType,
102+
color,
103+
dataStyleStore.getModelActiveColoring(modelId.value),
104104
);
105105
hybridViewerStore.remoteRender();
106106
},
107107
});
108108
109-
const modelComponentsColor = computed({
110-
get: () => dataStyleStore.getModelColor(modelId.value),
111-
set: async (color) => {
109+
const modelComponentsActiveColoring = computed({
110+
get: () => dataStyleStore.getModelActiveColoring(modelId.value),
111+
set: async (coloringType) => {
112112
await dataStyleStore.mutateStyle(modelId.value, {
113-
coloring: { constant: color },
113+
coloring: { active: coloringType },
114114
});
115115
await dataStyleStore.setModelComponentsColor(
116116
modelId.value,
117117
selection.value,
118-
color,
119-
dataStyleStore.getModelActiveColoring(modelId.value),
118+
dataStyleStore.getModelColor(modelId.value),
119+
coloringType,
120120
);
121121
hybridViewerStore.remoteRender();
122122
},

‎app/components/Viewer/ObjectTree/Base/CommonTreeView.vue‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ const { virtualScrollRef, stickyHeader, handleScroll, scrollToIndex, getScrollIn
5454
actualItemProps,
5555
);
5656
57-
const lastActiveIndex = ref(-1);
5857
const focusedIndex = ref(-1);
58+
const lastActiveIndex = ref(-1);
5959
6060
function handleItemClick(item, index, event) {
6161
if (index !== undefined) {
@@ -110,6 +110,8 @@ const { handleKeyDown } = useTreeKeyboardNav(
110110
scrollToIndex,
111111
toggleOpen,
112112
handleItemClick,
113+
getScrollInfo,
114+
focusedIndex,
113115
);
114116
</script>
115117

‎app/components/Viewer/ObjectTree/Box.vue‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,5 +177,7 @@ watch(
177177
background-color: rgba(255, 255, 255, 0.05);
178178
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
179179
flex-shrink: 0;
180+
font-size: 0.875rem !important;
181+
line-height: 1.25rem !important;
180182
}
181183
</style>

‎app/composables/clipping_planes_widget.js‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -210,11 +210,10 @@ function useClippingPlanesWidget({
210210
maxDistance = localRenderWindow.getRenderer().getActiveCamera().getDistance();
211211
}
212212
}
213+
213214
function initLocalWidget(container) {
214215
cleanupLocalWidget();
215-
container.addEventListener("wheel", (event) => event.stopPropagation(), {
216-
passive: true,
217-
});
216+
container.addEventListener("wheel", (event) => event.stopPropagation(), { passive: true });
218217
localRenderWindow = vtkGenericRenderWindow({
219218
background: [0, 0, 0, 0],
220219
listenWindowResize: false,
@@ -223,16 +222,13 @@ function useClippingPlanesWidget({
223222
const camera = localRenderWindow.getRenderer().getActiveCamera();
224223
camera.onModified(() => limitCameraZoomOut(camera));
225224
const canvas = localRenderWindow.getApiSpecificRenderWindow().getCanvas();
226-
Object.assign(canvas.style, {
227-
width: "100%",
228-
height: "100%",
229-
background: "transparent",
230-
});
225+
Object.assign(canvas.style, { width: "100%", height: "100%", background: "transparent" });
231226
localRenderWindow.resize();
232227
widgetManager = vtkWidgetManager();
233228
widgetManager.setRenderer(localRenderWindow.getRenderer());
234229
updateWidgetPlacement();
235230
}
231+
236232
function isFromWidget() {
237233
return fromWidget;
238234
}

‎app/composables/tree_keyboard_nav.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ export function useTreeKeyboardNav(
2323
toggleOpen,
2424
handleItemClick,
2525
getScrollInfo,
26+
externalFocusedIndex,
2627
) {
27-
const focusedIndex = ref(-1);
28+
const focusedIndex = externalFocusedIndex || ref(-1);
2829

2930
function findParentIndex(item, currentIndex) {
3031
for (let index = currentIndex - 1; index >= 0; index -= 1) {

‎app/stores/data.js‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,13 +196,16 @@ export const useDataStore = defineStore("data", () => {
196196
await model_components_db.where("id").equals(modelId).delete();
197197
await database.model_components_relation.where("id").equals(modelId).delete();
198198
}
199+
199200
async function deleteItem(id) {
200201
await data_db.delete(id);
201202
await deleteModelComponents(id);
202203
}
204+
203205
async function updateItem(id, changes) {
204206
await data_db.update(id, changes);
205207
}
208+
206209
async function getAllModelComponentsViewerIds(modelId) {
207210
const components = await model_components_db.where("id").equals(modelId).toArray();
208211
return components.map((component) => Math.trunc(Number(component.viewer_id)));
@@ -224,11 +227,13 @@ export const useDataStore = defineStore("data", () => {
224227
modelComponentsRelations,
225228
};
226229
}
230+
227231
async function clear() {
228232
await data_db.clear();
229233
await model_components_db.clear();
230234
await model_components_relation_db.clear();
231235
}
236+
232237
async function importStores(snapshot) {
233238
await clear();
234239
await model_components_db.bulkPut(snapshot.modelComponents);

‎app/utils/extension.js‎

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ async function uploadExtension(file) {
1313
const appStore = useAppStore();
1414
await appStore.upload(file);
1515
}
16+
1617
function runExtensions() {
1718
const appStore = useAppStore();
1819
const { projectFolderPath } = appStore;
@@ -29,6 +30,22 @@ function runExtensions() {
2930
params,
3031
});
3132
}
33+
34+
function downloadExtension({ url, extensionFileName }) {
35+
const appStore = useAppStore();
36+
const { PROJECT: projectName } = useRuntimeConfig().public;
37+
const schema = opengeodeweb_front_schemas.api.microservice.extensions.download;
38+
const params = {
39+
projectName,
40+
url,
41+
extensionFileName,
42+
};
43+
return appStore.request({
44+
schema,
45+
params,
46+
});
47+
}
48+
3249
async function registerRunningExtensions() {
3350
const appStore = useAppStore();
3451
const infraStore = useInfraStore();
@@ -55,28 +72,17 @@ async function registerRunningExtensions() {
5572
}),
5673
);
5774
}
75+
5876
async function importExtensionFile(file) {
5977
await uploadExtension(file);
6078
return registerRunningExtensions();
6179
}
62-
function downloadExtension({ url, extensionFileName }) {
63-
const appStore = useAppStore();
64-
const { PROJECT: projectName } = useRuntimeConfig().public;
65-
const schema = opengeodeweb_front_schemas.api.microservice.extensions.download;
66-
const params = {
67-
projectName,
68-
url,
69-
extensionFileName,
70-
};
71-
return appStore.request({
72-
schema,
73-
params,
74-
});
75-
}
80+
7681
async function importExtensionURL(url) {
7782
await downloadExtension(url);
7883
return registerRunningExtensions();
7984
}
85+
8086
async function unloadExtension(extensionId) {
8187
const appStore = useAppStore();
8288
console.log("[ExtensionManager] Unloading extension:", extensionId);
@@ -101,6 +107,7 @@ async function unloadExtension(extensionId) {
101107
console.log("[ExtensionManager] Extension unloaded:", extensionId);
102108
return true;
103109
}
110+
104111
function killExtension(extensionId) {
105112
const appStore = useAppStore();
106113
const { projectFolderPath } = appStore;

‎app/utils/import_workflow.js‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,14 @@ async function importFile(filename, geode_object_type) {
6969
});
7070
return importItem(response);
7171
}
72+
7273
async function importWorkflow(files) {
7374
const chunk_size = 5;
7475
const chunks = [];
7576
for (let i = 0; i < files.length; i += chunk_size) {
7677
chunks.push(files.slice(i, i + chunk_size));
7778
}
79+
7880
const results = [];
7981
async function processChunk(chunkIndex) {
8082
if (chunkIndex >= chunks.length) {
@@ -92,10 +94,9 @@ async function importWorkflow(files) {
9294
hybridViewerStore.remoteRender();
9395
return results;
9496
}
97+
9598
async function importWorkflowFromSnapshot(items) {
96-
console.log("[importWorkflowFromSnapshot] start", {
97-
count: items?.length,
98-
});
99+
console.log("[importWorkflowFromSnapshot] start", { count: items?.length });
99100
const hybridViewerStore = useHybridViewerStore();
100101
const chunk_size = 5;
101102
const chunks = [];

0 commit comments

Comments
 (0)