Skip to content

Commit

Permalink
Settings: Improve Data Sources tab
Browse files Browse the repository at this point in the history
  • Loading branch information
stefandesu committed Nov 22, 2024
1 parent 7acfab7 commit 0256c23
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/components/RegistryInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
</span>
</span>
<span
v-if="registry.has.auth"
v-if="registry.has.auth && showAuth"
style="margin-left: 5px;">
<span
v-if="registry.isAuthorizedFor({
Expand Down Expand Up @@ -110,6 +110,10 @@ export default {
type: Boolean,
default: true,
},
showAuth: {
type: Boolean,
default: true,
},
inline: {
type: Boolean,
default: false,
Expand Down
12 changes: 10 additions & 2 deletions src/components/TheSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
<div
v-for="(registry, index) in config.registries.filter(registry => $jskos.mappingRegistryIsStored(registry))"
:key="`settingsModal-mapping-registries-${index}`"
class="settingsModal-mapping-registry"
class="settingsModal-mapping-registry selectable"
:class="{'selected-registry': $jskos.compareFast(registry, currentRegistry)}">
<b-form-checkbox
v-model="showRegistry[registry.uri]"
Expand All @@ -134,8 +134,14 @@
<b-form-checkbox
v-if="registry.has.mappings !== false"
v-model="showRegistry[registry.uri]" />
<b-form-checkbox
v-else
style="filter: opacity(50%);"
:checked="true"
:disabled="registry.has.mappings === false" />
<registry-info
:registry="registry"
:show-auth="false"
class="settings-sources" />
</div>
</tab>
Expand Down Expand Up @@ -862,7 +868,7 @@ p {
justify-content: center;
align-items: center;
}
.settingsModal-mapping-registry:hover {
.settingsModal-mapping-registry.selectable:hover {
background-color: @color-background-secondary;
cursor: pointer;
}
Expand All @@ -871,6 +877,8 @@ p {
flex: none;
margin-left: 5px;
margin-right: -5px;
margin-top: 5px;
align-self: flex-start;
}
// Last Child: Registry Info
.settingsModal-mapping-registry > div:last-child {
Expand Down

0 comments on commit 0256c23

Please sign in to comment.