-
Notifications
You must be signed in to change notification settings - Fork 2
Fix/oxlint #299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Fix/oxlint #299
Changes from all commits
Commits
Show all changes
91 commits
Select commit
Hold shift + click to select a range
650e9d6
geode_objects
MaxNumerique 46caa8d
Merge branch 'next' of https://github.com/Geode-solutions/OpenGeodeWe…
MaxNumerique 31cfb88
Merge branch 'next' of https://github.com/Geode-solutions/OpenGeodeWe…
MaxNumerique 60c69bd
fix(oxlint): integration of oxlint
MaxNumerique 7eacd29
composables
MaxNumerique 789bc12
plugins & stores
MaxNumerique 45305d1
Merge branch 'next' of https://github.com/Geode-solutions/OpenGeodeWe…
MaxNumerique a404dfe
Apply prepare changes
MaxNumerique 0c116bd
viewer store oxlinted
MaxNumerique d45fb9e
Merge branch 'fix/oxlint' of https://github.com/Geode-solutions/OpenG…
MaxNumerique f140aae
Apply prepare changes
MaxNumerique d7786eb
utils folder and wiewer store
MaxNumerique 450fc27
Merge branch 'fix/oxlint' of https://github.com/Geode-solutions/OpenG…
MaxNumerique 195fc24
Apply prepare changes
MaxNumerique c6548e5
internal stores, utils, integration tests
MaxNumerique cfd3c51
Merge branch 'fix/oxlint' of https://github.com/Geode-solutions/OpenG…
MaxNumerique 950d19b
Merge branch 'next' of https://github.com/Geode-solutions/OpenGeodeWe…
MaxNumerique 48a7e3d
Apply prepare changes
MaxNumerique 989c31b
tests units fixes
MaxNumerique d0faa4d
Merge branch 'fix/oxlint' of https://github.com/Geode-solutions/OpenG…
MaxNumerique fa883b9
utils/local refacto
MaxNumerique d988946
Apply prepare changes
MaxNumerique a6ef126
infra
MaxNumerique 57d13b1
revert
MaxNumerique eb81c28
revert revert
MaxNumerique 0375f05
hybrid_viewer vtk imports
MaxNumerique 7bee1e7
rm oxlint flag
MaxNumerique 0b80111
merge from next viewer and hybrid
MaxNumerique d1997a5
merge from next viewer and hybrid
MaxNumerique 3a0a7d1
Apply prepare changes
MaxNumerique e3eab62
unit tests for components
MaxNumerique 9a57e2c
Merge branch 'fix/oxlint' of https://github.com/Geode-solutions/OpenG…
MaxNumerique 1316a90
Apply prepare changes
MaxNumerique e752282
components unit tests
MaxNumerique 2e79f53
Merge branch 'fix/oxlint' of https://github.com/Geode-solutions/OpenG…
MaxNumerique 9894fbc
Apply prepare changes
MaxNumerique bfe0b70
composables unit tests
MaxNumerique 2c7fb40
Merge branch 'fix/oxlint' of https://github.com/Geode-solutions/OpenG…
MaxNumerique c337d10
unit plugins stores utils
MaxNumerique 0c7e76f
local refacto
MaxNumerique 058db29
integration test 1
MaxNumerique 3a70688
Merge branch 'next' of https://github.com/Geode-solutions/OpenGeodeWe…
MaxNumerique 0bc42a0
Apply prepare changes
MaxNumerique 6f26ad5
Merge branch 'next' of https://github.com/Geode-solutions/OpenGeodeWe…
MaxNumerique 38068c5
hybrid_viewer
MaxNumerique 91e5dd7
Merge branch 'fix/oxlint' of https://github.com/Geode-solutions/OpenG…
MaxNumerique a1f4552
Apply prepare changes
MaxNumerique 89c5ca2
components
MaxNumerique 9ae149b
Merge branch 'fix/oxlint' of https://github.com/Geode-solutions/OpenG…
MaxNumerique 978157b
internal stores
MaxNumerique 24a721a
Merge branch 'next' of https://github.com/Geode-solutions/OpenGeodeWe…
MaxNumerique ebba8df
Apply prepare changes
MaxNumerique 89e5c8c
colormap components fixed
MaxNumerique 0ed543f
Merge branch 'fix/oxlint' of https://github.com/Geode-solutions/OpenG…
MaxNumerique 953ccb3
internal stores
MaxNumerique 0055aea
integration tests, internal stores
MaxNumerique 711ff2e
unit tests
MaxNumerique 7909304
Merge branch 'next' of https://github.com/Geode-solutions/OpenGeodeWe…
MaxNumerique a30cce9
Apply prepare changes
MaxNumerique c08dd75
new oxlint config. tests inc
MaxNumerique 7bff6bb
Merge branch 'fix/oxlint' of https://github.com/Geode-solutions/OpenG…
MaxNumerique beebf2e
Apply prepare changes
MaxNumerique daa77ab
new tests with oxlint version
MaxNumerique 5cff582
Merge branch 'fix/oxlint' of https://github.com/Geode-solutions/OpenG…
MaxNumerique 617f4ab
Apply prepare changes
MaxNumerique b398248
undefined rule
MaxNumerique 6945786
Merge branch 'fix/oxlint' of https://github.com/Geode-solutions/OpenG…
MaxNumerique c3a64bd
Apply prepare changes
MaxNumerique 0ea15a4
1_000, id-length > 3, vitest hooks, test_name
MaxNumerique df3e254
Merge branch 'fix/oxlint' of https://github.com/Geode-solutions/OpenG…
MaxNumerique 73eb677
Merge branch 'next' of https://github.com/Geode-solutions/OpenGeodeWe…
MaxNumerique fb22f8b
Apply prepare changes
MaxNumerique 7bef883
app_mode export, Geode test
MaxNumerique e539c02
Merge branch 'fix/oxlint' of https://github.com/Geode-solutions/OpenG…
MaxNumerique 581e218
colormap list elements
MaxNumerique f82eed8
refacto pini calls in utils file. refacto Viewer test.
MaxNumerique e97d4b6
Apply prepare changes
MaxNumerique 6e9329d
imports sort for unit tests. infra, viewer tests restored
MaxNumerique 25d4898
imports sort for unit tests. infra, viewer tests restored
MaxNumerique c717010
Merge branch 'fix/oxlint' of https://github.com/Geode-solutions/OpenG…
MaxNumerique 9994955
Apply prepare changes
MaxNumerique dd375b9
runMicroservices, clientToconnect
MaxNumerique 93a5992
Merge branch 'fix/oxlint' of https://github.com/Geode-solutions/OpenG…
MaxNumerique a59d7cc
Apply prepare changes
MaxNumerique 9bdf478
viewer
MaxNumerique 44b5833
Merge branch 'fix/oxlint' of https://github.com/Geode-solutions/OpenG…
MaxNumerique 6b5741f
Apply prepare changes
MaxNumerique 5a7d791
viewer
MaxNumerique d6fdaec
Merge branch 'fix/oxlint' of https://github.com/Geode-solutions/OpenG…
MaxNumerique 5209e5d
last changes
MaxNumerique eacdddd
Apply prepare changes
MaxNumerique File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| // oxlint-disable-next-line import/no-commonjs | ||
| module.exports = { | ||
| root: true, | ||
| env: { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,28 +1,28 @@ | ||
| <script setup> | ||
| import DragAndDrop from "@ogw_front/components/DragAndDrop" | ||
| import schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json" | ||
| import { upload_file } from "@ogw_front/utils/upload_file" | ||
| import DragAndDrop from "@ogw_front/components/DragAndDrop" | ||
|
|
||
| const schema = schemas.opengeodeweb_back.upload_file | ||
|
|
||
| const emit = defineEmits(["files_uploaded", "decrement_step", "reset_values"]) | ||
|
|
||
| const props = defineProps({ | ||
| const { multiple, accept, files, auto_upload, mini } = defineProps({ | ||
| multiple: { type: Boolean, required: true }, | ||
| accept: { type: String, required: true }, | ||
| files: { type: Array, required: false, default: [] }, | ||
| auto_upload: { type: Boolean, required: false, default: false }, | ||
| mini: { type: Boolean, required: false, default: false }, | ||
| }) | ||
|
|
||
| const internal_files = ref(props.files) | ||
| const internal_files = ref(files) | ||
| const loading = ref(false) | ||
| const files_uploaded = ref(false) | ||
|
|
||
| const toggle_loading = useToggle(loading) | ||
|
|
||
| function processSelectedFiles(files) { | ||
| if (props.multiple) { | ||
| if (multiple) { | ||
| internal_files.value = [...internal_files.value, ...files] | ||
| } else { | ||
| internal_files.value = [files[0]] | ||
|
|
@@ -39,42 +39,25 @@ | |
|
|
||
| async function upload_files() { | ||
| toggle_loading() | ||
| var promise_array = [] | ||
| for (const file of internal_files.value) { | ||
| const promise = new Promise((resolve, reject) => { | ||
| upload_file( | ||
| { route: schema.$id, file }, | ||
| { | ||
| request_error_function: () => { | ||
| reject() | ||
| }, | ||
| response_function: () => { | ||
| resolve() | ||
| }, | ||
| response_error_function: () => { | ||
| reject() | ||
| }, | ||
| }, | ||
| ) | ||
| }) | ||
| promise_array.push(promise) | ||
| } | ||
| const promise_array = internal_files.value.map((file) => | ||
| upload_file({ route: schema.$id, file }), | ||
| ) | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Supprime l'enrobagee des promesses redondantes puisque upload_file en retourne déjà une. |
||
| await Promise.all(promise_array) | ||
| files_uploaded.value = true | ||
| emit("files_uploaded", internal_files.value) | ||
|
|
||
| toggle_loading() | ||
| } | ||
|
|
||
| if (props.files.length) { | ||
| internal_files.value = props.files | ||
| if (props.auto_upload) { | ||
| if (files.length > 0) { | ||
| internal_files.value = files | ||
| if (auto_upload) { | ||
| upload_files() | ||
| } | ||
| } | ||
|
|
||
| watch( | ||
| () => props.files, | ||
| () => files, | ||
| (newVal) => { | ||
| internal_files.value = newVal | ||
| }, | ||
|
|
@@ -83,16 +66,16 @@ | |
|
|
||
| watch(internal_files, (value) => { | ||
| files_uploaded.value = false | ||
| if (props.auto_upload && value.length > 0) { | ||
| if (auto_upload && value.length > 0) { | ||
| upload_files() | ||
| } | ||
| }) | ||
| </script> | ||
|
|
||
| <template> | ||
| <DragAndDrop | ||
| :multiple="props.multiple" | ||
| :accept="props.accept" | ||
| :multiple="multiple" | ||
| :accept="accept" | ||
| :loading="loading" | ||
| :show-extensions="false" | ||
| @files-selected="processSelectedFiles" | ||
|
|
@@ -124,7 +107,7 @@ | |
| </v-sheet> | ||
| </v-card-text> | ||
|
|
||
| <v-card-actions v-if="!props.auto_upload && internal_files.length"> | ||
| <v-card-actions v-if="!auto_upload && internal_files.length > 0"> | ||
| <v-btn | ||
| color="primary" | ||
| variant="elevated" | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renommage de la ref interne pour éviter la confusion avec la prop