Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
Wiki
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MDM Lab
Wiki
Commits
81115b97
Commit
81115b97
authored
1 year ago
by
Remi PLANEL
Browse files
Options
Downloads
Patches
Plain Diff
Quick fix to make wiki works. Api molstar-pdbe-plugin changed
parent
a37bab97
No related branches found
No related tags found
1 merge request
!14
Add all pdbs
Pipeline
#112942
failed
1 year ago
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
components/content/MolstarPdbePlugin.vue
+23
-7
23 additions, 7 deletions
components/content/MolstarPdbePlugin.vue
with
23 additions
and
7 deletions
components/content/MolstarPdbePlugin.vue
+
23
−
7
View file @
81115b97
...
@@ -3,19 +3,35 @@ import { withTrailingSlash, withLeadingSlash, joinURL } from 'ufo'
...
@@ -3,19 +3,35 @@ import { withTrailingSlash, withLeadingSlash, joinURL } from 'ufo'
import
{
useRuntimeConfig
,
computed
}
from
'
#imports
'
import
{
useRuntimeConfig
,
computed
}
from
'
#imports
'
export
interface
Props
{
export
interface
Props
{
height
?:
number
height
?:
number
dataUrls
:
string
[]
dataUrls
?:
string
[]
dataUrl
?:
string
}
}
// const selectedPdb = ref('')
// const selectedPdb = ref('')
const
refinedDataUrls
=
computed
(()
=>
{
const
refinedDataUrls
=
computed
(()
=>
{
return
props
.
dataUrls
.
map
((
dataUrl
)
=>
{
if
(
dataUrl
?.
startsWith
(
'
/
'
)
&&
!
dataUrl
.
startsWith
(
'
//
'
))
{
function
refinedUrl
(
url
:
string
)
{
if
(
url
?.
startsWith
(
'
/
'
)
&&
!
url
.
startsWith
(
'
//
'
))
{
const
_base
=
withLeadingSlash
(
withTrailingSlash
(
useRuntimeConfig
().
app
.
baseURL
))
const
_base
=
withLeadingSlash
(
withTrailingSlash
(
useRuntimeConfig
().
app
.
baseURL
))
if
(
_base
!==
'
/
'
&&
!
dataU
rl
.
startsWith
(
_base
))
{
if
(
_base
!==
'
/
'
&&
!
u
rl
.
startsWith
(
_base
))
{
return
joinURL
(
_base
,
dataU
rl
)
return
joinURL
(
_base
,
u
rl
)
}
}
}
}
return
dataUrl
return
url
})
}
let
urls
:
string
[]
=
[]
if
(
props
?.
dataUrls
&&
props
?.
dataUrls
?.
length
>
0
)
{
urls
=
[...
props
.
dataUrls
.
map
((
dataUrl
)
=>
{
return
refinedUrl
(
dataUrl
)
})]
}
if
(
props
?.
dataUrl
)
{
urls
=
[...
urls
,
refinedUrl
(
props
.
dataUrl
)]
}
return
urls
})
})
// const selectedPdb = ref(refinedDataUrls.value?.length > 0 ? refinedDataUrls.value[0] : null)
// const selectedPdb = ref(refinedDataUrls.value?.length > 0 ? refinedDataUrls.value[0] : null)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment