Skip to content

Commit

Permalink
Disable entrypoint checkbox in Project Files view
Browse files Browse the repository at this point in the history
  • Loading branch information
dotNomad committed Dec 12, 2024
1 parent f62d3d1 commit f9a03ca
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
:checked="checked"
:disabled="disabled"
class="tree-item-checkbox"
:class="{ 'opacity-100': disableOpacity }"
@click="checked ? $emit('uncheck') : $emit('check')"
>
<span class="tree-item-title">{{ title }}</span>
Expand Down Expand Up @@ -77,13 +78,15 @@ interface Props {
indentLevel?: number;
expandable?: boolean;
virtualized?: boolean;
disableOpacity?: boolean;
}
const props = withDefaults(defineProps<Props>(), {
listStyle: "default",
indentLevel: 1,
expandable: false,
virtualized: false,
disableOpacity: false,
});
const slots = defineSlots<{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
:checked="isIncluded"
:disabled="isDisabled"
:list-style="listStyle"
:disable-opacity="isEntrypoint"
:indent-level="file.indent + 1"
:expandable="file.isDir"
:tooltip="tooltip"
Expand Down Expand Up @@ -57,7 +58,9 @@ const fileStore = useFileStore();
const isDisabled = computed((): boolean => {
const source = props.file.reason?.source;
return source === "built-in" || source === "permissions";
return (
isEntrypoint.value || source === "built-in" || source === "permissions"
);
});
const isIncluded = computed((): boolean => {
Expand Down
4 changes: 4 additions & 0 deletions extensions/vscode/webviews/homeView/src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,7 @@ body {
.text-git-conflicting {
color: var(--vscode-gitDecoration-conflictingResourceForeground);
}

.opacity-100 {
opacity: 1;
}

0 comments on commit f9a03ca

Please sign in to comment.