Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
lgl
SmartVillages2
Commits
82c6dd5e
Commit
82c6dd5e
authored
Dec 01, 2025
by
Matthias Betz
Browse files
fix conversion component remembering file
parent
906e6d49
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/upload.vue
View file @
82c6dd5e
...
@@ -9,13 +9,13 @@
...
@@ -9,13 +9,13 @@
</VcsLabel>
</VcsLabel>
</v-col>
</v-col>
<v-col>
<v-col>
<VcsFileInput
id=
"fileInput"
type=
"file"
@
change=
"onFileSelected"
accept=
".ifc"
/>
<VcsFileInput
id=
"fileInput"
type=
"file"
@
change=
"onFileSelected"
accept=
".ifc"
v-show=
"true"
/>
</v-col>
</v-col>
</v-row>
</v-row>
<v-row
no-gutters
class=
"justify-center"
>
<v-row
no-gutters
class=
"justify-center"
>
</v-row>
</v-row>
<v-row
no-gutters
class=
"justify-center"
>
<v-row
no-gutters
class=
"justify-center"
>
<VcsFormButton
id=
"convertBtn"
@
click=
"convert()"
:disabled=
"disable"
>
Konvertieren
</VcsFormButton>
<VcsFormButton
id=
"convertBtn"
@
click=
"convert()"
:disabled=
"disable"
>
{{
disable
?
"
Konvertierung läuft
"
:
"
Konvertieren
"
}}
</VcsFormButton>
</v-row>
</v-row>
</v-container>
</v-container>
</v-card>
</v-card>
...
@@ -90,20 +90,18 @@ export default {
...
@@ -90,20 +90,18 @@ export default {
});
// returns a promise
});
// returns a promise
let
filename
=
pluginState
.
file
.
name
.
replace
(
/
\.[^/
.
]
+$/
,
""
)
+
"
.glb
"
;
let
filename
=
pluginState
.
file
.
name
.
replace
(
/
\.[^/
.
]
+$/
,
""
)
+
"
.glb
"
;
disable
.
value
=
true
;
disable
.
value
=
true
;
const
convertBtn
=
document
.
getElementById
(
"
convertBtn
"
);
convertBtn
.
innerHTML
=
"
Konvertierung läuft
"
;
req
.
then
(
function
(
res
)
{
req
.
then
(
function
(
res
)
{
disable
.
value
=
false
;
disable
.
value
=
false
;
convertBtn
.
innerHTML
=
"
Konvertieren
"
;
emit
(
'
close
'
);
const
geolocationString
=
res
.
headers
.
get
(
'
X-geolocation
'
);
if
(
geolocationString
)
{
const
geolocation
=
JSON
.
parse
(
geolocationString
);
pluginState
.
geolocations
[
filename
]
=
geolocation
;
}
if
(
res
.
ok
)
{
if
(
res
.
ok
)
{
pluginState
.
file
=
undefined
;
// status code was 200-299
// status code was 200-299
emit
(
'
close
'
);
const
geolocationString
=
res
.
headers
.
get
(
'
X-geolocation
'
);
if
(
geolocationString
)
{
const
geolocation
=
JSON
.
parse
(
geolocationString
);
pluginState
.
geolocations
[
filename
]
=
geolocation
;
}
let
message
=
"
Datei erfolgreich konvertiert.
"
;
let
message
=
"
Datei erfolgreich konvertiert.
"
;
let
timeout
=
5000
;
let
timeout
=
5000
;
if
(
geolocationString
)
{
if
(
geolocationString
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment