Skip to content

Commit

Permalink
Merge pull request #64 from Geode-solutions/revert-62-fix/clean_pages
Browse files Browse the repository at this point in the history
Revert "fix(pages): clean unused pages in app"
  • Loading branch information
JulienChampagnol authored Oct 30, 2024
2 parents 4a6afe1 + 4c8c58f commit 36e8928
Show file tree
Hide file tree
Showing 9 changed files with 250 additions and 105 deletions.
52 changes: 0 additions & 52 deletions components/NewProject.vue

This file was deleted.

51 changes: 0 additions & 51 deletions components/OpenProject.vue

This file was deleted.

95 changes: 93 additions & 2 deletions components/SideBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,91 @@
</template>
</v-tooltip>

<NewProject :show_dialog="newproject" @close="newproject = false" />
<OpenProject :show_dialog="openproject" @close="openproject = false" />
<v-dialog
v-model="newproject"
max-width="800px"
radius="20px"
class="text-center"
>
<v-sheet border="md">
<v-card color="#3c9983">
<v-card-title>
<h3 class="mt-4">New Project</h3>
</v-card-title>
<v-card-text>
<v-container>
<v-row>
<v-col>
<v-text-field label="Project Name" required></v-text-field>
</v-col>
</v-row>
</v-container>
</v-card-text>
<v-card-actions justify-center>
<v-btn
variant="outlined"
color="white"
text
@click="newproject = false"
class="ml-8 mb-4"
>Close</v-btn
>
<v-btn
variant="outlined"
class="mb-4"
color="white"
text
@click="newproject = false"
>Create</v-btn
>
</v-card-actions>
</v-card>
</v-sheet>
</v-dialog>
<v-dialog v-model="openproject" max-width="800px" class="text-center">
<v-sheet border="md">
<v-card color="#3c9983">
<v-card-title>
<h3 class="mt-4">Open Project</h3>
</v-card-title>
<v-card-text>
<v-container>
<v-row>
<v-col>
<v-file-input label="Open Project" required></v-file-input>
</v-col>
</v-row>
</v-container>
</v-card-text>
<v-card-actions justify-center>
<v-btn
variant="outlined"
color="white"
text
@click="openproject = false"
class="ml-8 mb-4"
>Close</v-btn
>
<v-btn
variant="outlined"
class="mb-4"
color="white"
text
@click="openproject = false"
>Load</v-btn
>
</v-card-actions>
</v-card>
</v-sheet>
</v-dialog>
</v-navigation-drawer>
</template>

<script setup>
const drawer = ref(true);
const newproject = ref(false);
const openproject = ref(false);
const router = useRouter();
const items = ref([
{
Expand All @@ -63,6 +139,21 @@ const items = ref([
icon: "mdi-folder-outline",
click: () => (openproject.value = true),
},
{
title: "Supperposition",
icon: "mdi-layers",
click: () => navigateTo("/supperposition"),
},
{
title: "Download",
icon: "mdi-upload",
click: () => navigateTo("/download"),
},
{
title: "Settings",
icon: "mdi-cog",
click: () => navigateTo("/settings"),
},
]);
let draggedItem = null;
Expand Down
27 changes: 27 additions & 0 deletions pages/TreeObject.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<template>
<v-container>
<v-row>
<v-col>
<v-treeview
v-model:selected="treeviewStore.selection"
:items="treeviewStore.items"
:select-strategy="treeviewStore.selectionType"
return-object
selectable
class="transparent-treeview"
></v-treeview>
</v-col>
</v-row>
</v-container>
</template>

<style scoped>
.transparent-treeview {
background-color: transparent;
color: white;
}
</style>

<script setup>
const treeviewStore = useTreeviewStore();
</script>
1 change: 1 addition & 0 deletions pages/download.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<template></template>
1 change: 1 addition & 0 deletions pages/extensions.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<template></template>
1 change: 1 addition & 0 deletions pages/new-project.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<template></template>
1 change: 1 addition & 0 deletions pages/settings.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<template></template>
126 changes: 126 additions & 0 deletions pages/supperposition.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
<template>
<StepImport class="mr-12" />
</template>

<script setup>
import _ from "lodash";
import FileSelector from "@geode/opengeodeweb-front/components/FileSelector.vue";
import MissingFilesSelector from "@geode/opengeodeweb-front/components/MissingFilesSelector.vue";
import ObjectSelector from "@geode/opengeodeweb-front/components/ObjectSelector.vue";
import ImportFile from "@/components/ImportFile.vue";
const geode_store = use_geode_store();
const viewer_store = use_viewer_store();
geode_store.$patch({ is_running: true });
viewer_store.$patch({ is_running: true });
const files = ref([]);
const input_geode_object = ref("");
const additional_files = ref([]);
const stepper_tree = reactive({
current_step_index: ref(0),
files,
input_geode_object,
steps: [
{
step_title: "Please select a file to convert",
component: {
component_name: shallowRef(FileSelector),
component_options: {
multiple: true,
},
},
chips: computed(() => {
return files.value.map((file) => file.name);
}),
},
{
step_title: "Confirm the data type",
component: {
component_name: shallowRef(ObjectSelector),
component_options: {
filenames: computed(() => {
return files.value.map((file) => file.name);
}),
},
},
chips: computed(() => {
if (input_geode_object.value === "") {
return [];
} else {
return [input_geode_object.value];
}
}),
},
{
step_title: "Please select additionnal files",
component: {
component_name: shallowRef(MissingFilesSelector),
component_options: {
multiple: true,
input_geode_object,
filenames: computed(() => {
return files.value.map((file) => file.name);
}),
},
},
chips: computed(() => {
return additional_files.value.map(
(additional_file) => additional_file.name
);
}),
},
{
step_title: "Import your file(s)",
component: {
component_name: shallowRef(ImportFile),
component_options: {
input_geode_object,
filenames: computed(() => {
return files.value.map((file) => file.name);
}),
},
},
chips: computed(() => {
const output_params = computed(() => {
return [files.value.map((file) => file.name), input_geode_object, additional_files.value.map((file) => file.name)];
});
if (_.isEmpty(output_params)) {
return [];
} else {
const array = [];
for (const property in output_params.value) {
if (output_params.value[property].value !== "") {
array.push(output_params.value[property].value);
}
}
return array;
}
}),
},
],
});
const schema = {
"$id": "/ping",
"methods": ["POST"],
"type": "object",
"properties": {
},
"required": [],
"additionalProperties": false
}
const schema2 = {
"$id": "/",
"methods": ["POST"],
"type": "object",
"properties": {
},
"required": [],
"additionalProperties": false
}
await api_fetch({ schema: schema2, params: {} });
provide("stepper_tree", stepper_tree);
</script>

0 comments on commit 36e8928

Please sign in to comment.