Skip to content

Commit

Permalink
polish (#214951)
Browse files Browse the repository at this point in the history
  • Loading branch information
sandy081 committed Jun 12, 2024
1 parent 51d5981 commit 594154c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
.profiles-editor .contents-container .profile-copy-from-container {
display: flex;
align-items: center;
margin: 0px 0px 20px 36px;
margin: 0px 0px 15px 36px;
}

.profiles-editor .contents-container .profile-copy-from-container > .profile-copy-from-label {
Expand Down Expand Up @@ -211,12 +211,11 @@
}

.profiles-editor .contents-container .profile-tree-item-container {
display: flex;
display: grid;
align-items: center;
}

.profiles-editor .contents-container .profile-tree-item-container.existing-profile-resource-type-container {
display: grid;
grid-template-columns: repeat(1, 1fr) 150px 100px;
}

Expand All @@ -236,28 +235,28 @@
align-items: center;
}

.profiles-editor .contents-container .profile-tree-item-container.profile-resource-child-container > .profile-tree-item-actions-container {
width: 100px;
.profiles-editor .contents-container .profile-content-tree-header.new-profile {
grid-template-columns: 30px repeat(2, 1fr) 100px;
}

.profiles-editor .contents-container .profile-tree-item-container.new-profile-resource-type-container > .profile-resource-type-label-container {
width: 170px;
.profiles-editor .contents-container .profile-tree-item-container.new-profile-resource-type-container {
grid-template-columns: repeat(2, 1fr) 100px;
}

.profiles-editor .contents-container .profile-tree-item-container.new-profile-resource-type-container > .profile-select-container {
.profiles-editor .contents-container .profile-tree-item-container.new-profile-resource-type-container .profile-select-container {
width: 170px;
}

.profiles-editor .contents-container .profile-tree-item-container.profile-resource-child-container {
grid-template-columns: repeat(1, 1fr) 100px;
}

.profiles-editor .contents-container .profile-tree-item-container .profile-resource-type-description {
margin-left: 10px;
font-size: 0.9em;
opacity: 0.7;
}

.profiles-editor .contents-container .profile-tree-item-container.profile-resource-child-container > .monaco-icon-label {
flex: 1
}

.profiles-editor .contents-container .profile-tree-item-container .profile-tree-item-actions-container {
justify-content: center;
}
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,8 @@ class ProfileWidget extends Disposable {
}

render(profileElement: AbstractUserDataProfileElement): void {
this.resourcesTree.setInput(profileElement);

const disposables = new DisposableStore();
this._profileElement.value = { element: profileElement, dispose: () => disposables.dispose() };

Expand All @@ -716,7 +718,6 @@ class ProfileWidget extends Disposable {
this.profileTitle.classList.toggle('hide', !profile?.isDefault);
this.nameInput.element.classList.toggle('hide', !!profile?.isDefault);

this.resourcesTree.setInput(profileElement);
disposables.add(profileElement.onDidChange(e => {
if (e.flags || e.copyFrom || e.copyFlags || e.disabled) {
const viewState = this.resourcesTree.getViewState();
Expand Down Expand Up @@ -797,7 +798,8 @@ class ProfileWidget extends Disposable {
this.iconElement.className = ThemeIcon.asClassName(ThemeIcon.fromId(DEFAULT_ICON.id));
}
if (profileElement instanceof NewProfileElement) {
this.contentsTreeHeader.classList.add('hide');
this.contentsTreeHeader.classList.add('new-profile');
this.inheritLabelElement.textContent = localize('options', "Options");
this.useAsDefaultProfileContainer.classList.add('hide');
this.copyFromContainer.classList.remove('hide');
this.copyFromOptions = this.getCopyFromOptions();
Expand All @@ -814,7 +816,7 @@ class ProfileWidget extends Disposable {
this.copyFromSelectBox.setEnabled(false);
}
} else if (profileElement instanceof UserDataProfileElement) {
this.contentsTreeHeader.classList.remove('hide');
this.contentsTreeHeader.classList.remove('new-profile');
this.inheritLabelElement.textContent = profileElement.profile.isDefault ? '' : localize('default profile', "Use Default Profile");
this.useAsDefaultProfileContainer.classList.remove('hide');
this.useAsDefaultProfileCheckbox.checked = profileElement.isNewWindowProfile;
Expand Down

0 comments on commit 594154c

Please sign in to comment.