diff --git a/.all-contributorsrc b/.all-contributorsrc
index 7e0e6a56..ad6235d8 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -673,6 +673,15 @@
"contributions": [
"code"
]
+ },
+ {
+ "login": "artu-ole",
+ "name": "artu-ole",
+ "avatar_url": "https://avatars.githubusercontent.com/u/15938416?v=4",
+ "profile": "https://github.com/artu-ole",
+ "contributions": [
+ "code"
+ ]
}
],
"contributorsPerLine": 7,
diff --git a/README.it-IT.md b/README.it-IT.md
index b84d32d2..d7734555 100644
--- a/README.it-IT.md
+++ b/README.it-IT.md
@@ -243,6 +243,7 @@ Grazie a queste persone meravigliose ([emoji key](https://allcontributors.org/do
 Matheus Castello ๐ป |
 Jai A P ๐ฆ |
 Richard Yu ๐ป |
+  artu-ole ๐ป |
diff --git a/README.ko-KR.md b/README.ko-KR.md
index 9e3f9ef9..96538c40 100644
--- a/README.ko-KR.md
+++ b/README.ko-KR.md
@@ -237,6 +237,7 @@ Pull requests and plugins are welcome!
 Matheus Castello ๐ป |
 Jai A P ๐ฆ |
 Richard Yu ๐ป |
+  artu-ole ๐ป |
diff --git a/README.md b/README.md
index ba2efb24..a341e0ef 100644
--- a/README.md
+++ b/README.md
@@ -242,6 +242,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
 Matheus Castello ๐ป |
 Jai A P ๐ฆ |
 Richard Yu ๐ป |
+  artu-ole ๐ป |
diff --git a/README.ru-RU.md b/README.ru-RU.md
index 5ed27cf0..9d29ca15 100644
--- a/README.ru-RU.md
+++ b/README.ru-RU.md
@@ -243,6 +243,7 @@ Pull-ะทะฐะฟัะพัั ะธ ะฟะปะฐะณะธะฝั ะฟัะธะฒะตัััะฒััััั!
 Matheus Castello ๐ป |
 Jai A P ๐ฆ |
 Richard Yu ๐ป |
+  artu-ole ๐ป |
diff --git a/README.zh-CN.md b/README.zh-CN.md
index c460e2cf..2a67611c 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -242,6 +242,7 @@
 Matheus Castello ๐ป |
 Jai A P ๐ฆ |
 Richard Yu ๐ป |
+  artu-ole ๐ป |
diff --git a/tabby-settings/src/components/profilesSettingsTab.component.pug b/tabby-settings/src/components/profilesSettingsTab.component.pug
index 6062a050..29199c5e 100644
--- a/tabby-settings/src/components/profilesSettingsTab.component.pug
+++ b/tabby-settings/src/components/profilesSettingsTab.component.pug
@@ -36,7 +36,7 @@ ul.nav-tabs(ngbNav, #nav='ngbNav')
ng-container(*ngFor='let group of profileGroups')
ng-container(*ngIf='isGroupVisible(group)')
.list-group-item.list-group-item-action.d-flex.align-items-center(
- (click)='group.collapsed = !group.collapsed'
+ (click)='toggleGroupCollapse(group)'
)
.fa.fa-fw.fa-chevron-right(*ngIf='group.collapsed')
.fa.fa-fw.fa-chevron-down(*ngIf='!group.collapsed')
diff --git a/tabby-settings/src/components/profilesSettingsTab.component.ts b/tabby-settings/src/components/profilesSettingsTab.component.ts
index 33405328..a910a831 100644
--- a/tabby-settings/src/components/profilesSettingsTab.component.ts
+++ b/tabby-settings/src/components/profilesSettingsTab.component.ts
@@ -143,6 +143,7 @@ export class ProfilesSettingsTabComponent extends BaseComponent {
refresh (): void {
this.profiles = this.config.store.profiles
this.profileGroups = []
+ const profileGroupCollapsed = JSON.parse(window.localStorage.profileGroupCollapsed ?? '{}')
for (const profile of this.profiles) {
let group = this.profileGroups.find(x => x.name === profile.group)
@@ -151,7 +152,7 @@ export class ProfilesSettingsTabComponent extends BaseComponent {
name: profile.group,
profiles: [],
editable: true,
- collapsed: false,
+ collapsed: profileGroupCollapsed[profile.group ?? ''] ?? false,
}
this.profileGroups.push(group)
}
@@ -160,12 +161,14 @@ export class ProfilesSettingsTabComponent extends BaseComponent {
this.profileGroups.sort((a, b) => a.name?.localeCompare(b.name ?? '') ?? -1)
- this.profileGroups.push({
+ const builtIn = {
name: this.translate.instant('Built-in'),
profiles: this.builtinProfiles,
editable: false,
collapsed: false,
- })
+ }
+ builtIn.collapsed = profileGroupCollapsed[builtIn.name ?? ''] ?? false
+ this.profileGroups.push(builtIn)
}
async editGroup (group: ProfileGroup): Promise {
@@ -246,6 +249,13 @@ export class ProfilesSettingsTabComponent extends BaseComponent {
}[this.profilesService.providerForProfile(profile)?.id ?? ''] ?? 'warning'
}
+ toggleGroupCollapse (group: ProfileGroup): void {
+ group.collapsed = !group.collapsed
+ const profileGroupCollapsed = JSON.parse(window.localStorage.profileGroupCollapsed ?? '{}')
+ profileGroupCollapsed[group.name ?? ''] = group.collapsed
+ window.localStorage.profileGroupCollapsed = JSON.stringify(profileGroupCollapsed)
+ }
+
async editDefaults (provider: ProfileProvider): Promise {
const modal = this.ngbModal.open(
EditProfileModalComponent,
diff --git a/tabby-ssh/src/components/sftpPanel.component.ts b/tabby-ssh/src/components/sftpPanel.component.ts
index f9591686..5a792d4a 100644
--- a/tabby-ssh/src/components/sftpPanel.component.ts
+++ b/tabby-ssh/src/components/sftpPanel.component.ts
@@ -113,8 +113,11 @@ export class SFTPPanelComponent {
const modal = this.ngbModal.open(SFTPCreateDirectoryModalComponent)
const directoryName = await modal.result
if (directoryName !== '') {
- this.sftp.mkdir(path.join(this.path, directoryName)).finally(() => {
+ this.sftp.mkdir(path.join(this.path, directoryName)).then(() => {
+ this.notifications.notice('The directory was created successfully')
this.navigate(path.join(this.path, directoryName))
+ }).catch(() => {
+ this.notifications.error('The directory could not be created')
})
}
}
@@ -125,7 +128,11 @@ export class SFTPPanelComponent {
}
async uploadOne (transfer: FileUpload): Promise {
+ const savedPath = this.path
await this.sftp.upload(path.join(this.path, transfer.getName()), transfer)
+ if (this.path === savedPath) {
+ await this.navigate(this.path)
+ }
}
async download (itemPath: string, mode: number, size: number): Promise {
diff --git a/tabby-ssh/src/session/sftp.ts b/tabby-ssh/src/session/sftp.ts
index 1e60ad8b..b85a41a5 100644
--- a/tabby-ssh/src/session/sftp.ts
+++ b/tabby-ssh/src/session/sftp.ts
@@ -12,7 +12,6 @@ import type { FileEntry, Stats } from 'ssh2-streams'
export interface SFTPFile {
name: string
fullPath: string
- directory: string
isDirectory: boolean
isSymlink: boolean
mode: number
@@ -104,7 +103,6 @@ export class SFTPSession {
const stats = await wrapPromise(this.zone, promisify(f => this.sftp.stat(p, f))())
return {
name: posixPath.basename(p),
- directory: posixPath.dirname(p),
fullPath: p,
isDirectory: stats.isDirectory(),
isSymlink: stats.isSymbolicLink(),
@@ -188,7 +186,6 @@ export class SFTPSession {
return {
fullPath: p,
name: posixPath.basename(p),
- directory: posixPath.dirname(p),
isDirectory: (entry.attrs.mode & C.S_IFDIR) === C.S_IFDIR,
isSymlink: (entry.attrs.mode & C.S_IFLNK) === C.S_IFLNK,
mode: entry.attrs.mode,