Compare commits

..

58 Commits

Author SHA1 Message Date
Eugene
6d3a71840b Revert "Cross Compile linux armhf/arm64 artifacts" 2023-06-26 16:27:51 +02:00
Eugene
a7ca0fb1a3 Merge pull request #8613 from Jai-JAP/master 2023-06-26 16:27:47 +02:00
Jai A P
a07e7ddf16 Update build-linux.mjs 2023-06-25 08:55:10 +05:30
Jai A P
86948d1eeb Update build.yml 2023-06-25 08:51:57 +05:30
Jai A P
75a3439f4d Update build.yml 2023-06-25 08:00:27 +05:30
Jai A P
1b1c0688a0 Update build.yml 2023-06-25 07:54:55 +05:30
Jai A P
7b9af38701 Update build.yml 2023-06-25 00:48:33 +05:30
Jai A P
c28a087b4c Update HACKING.md 2023-06-25 00:46:11 +05:30
Jai A P
61f6399926 Merge branch 'Eugeny:master' into master 2023-06-24 16:48:55 +05:30
Jai A P
629c17afc5 Update build.yml 2023-06-24 16:48:21 +05:30
Jai A P
f2871decda Update build.yml 2023-06-24 16:26:25 +05:30
Jai A P
130d22a00c Update build.yml 2023-06-24 16:13:04 +05:30
Jai A P
d9e659e8a9 Update build.yml 2023-06-24 15:42:29 +05:30
Jai A P
556299ce74 Update build.yml 2023-06-24 15:39:07 +05:30
Jai A P
eeca05aded Update build.yml 2023-06-24 15:37:48 +05:30
Jai A P
4f06e5392a Update build.yml 2023-06-24 15:30:10 +05:30
Jai A P
5232e08b3e Update build.yml 2023-06-24 15:29:04 +05:30
Jai A P
2fb7d120cc Update build.yml 2023-06-24 15:10:26 +05:30
Jai A P
4b9769b5f9 Update build.yml 2023-06-24 15:09:49 +05:30
Jai A P
89b48f10ea Update build.yml 2023-06-24 15:05:00 +05:30
Eugene
d6d6ec39c8 Merge pull request #8612 from qyecst/patch-1 2023-06-24 00:00:24 +02:00
qyecst
1579356d54 Update settingsTabBody.component.ts
increase the value of max-width to avoid shadowing the font size in the Settings (Settings - Appearance - Font).
2023-06-24 03:27:37 +08:00
Jai A P
e771570934 Update build.yml 2023-06-24 00:10:30 +05:30
Jai A P
b0fc7710c7 Update build.yml 2023-06-23 23:57:11 +05:30
Jai A P
f60966b689 Update build.yml 2023-06-23 23:46:22 +05:30
Jai A P
c8ef4543c3 Update build.yml 2023-06-23 23:31:03 +05:30
Jai A P
f56c1bbfd4 Update build.yml 2023-06-23 23:11:19 +05:30
Jai A P
4a23aceb2d Update vars.mjs 2023-06-23 22:02:51 +05:30
Jai A P
cbabc1c829 Update build.yml 2023-06-23 21:40:30 +05:30
Jai A P
b1ac07e16e Update build.yml 2023-06-23 21:16:12 +05:30
Jai A P
2f82fb06b1 Update build.yml 2023-06-21 23:59:14 +05:30
Jai A P
75a3e89b1f Update build.yml 2023-06-21 23:46:00 +05:30
Jai A P
d10926bf46 Update build.yml 2023-06-21 23:36:59 +05:30
Jai A P
a53feb3215 Update build.yml 2023-06-21 23:26:57 +05:30
Jai A P
018a9940d1 Update build.yml 2023-06-21 23:18:04 +05:30
Jai A P
9a3f1a68c6 Update build.yml 2023-06-21 23:05:21 +05:30
Jai A P
23fba79173 Update build.yml 2023-06-21 22:59:15 +05:30
Jai A P
549954d49f Update build.yml 2023-06-21 22:42:29 +05:30
Jai A P
816468214f Update sentry-upload.mjs 2023-06-21 22:25:31 +05:30
Jai A P
f6d406e0da Update webpack.config.main.mjs 2023-06-21 22:24:43 +05:30
Jai A P
6bbe3b82dd Update pty.ts 2023-06-21 22:23:12 +05:30
Jai A P
07497ac869 Update package.json 2023-06-21 22:22:38 +05:30
Jai A P
3dc85936d9 Update build.yml 2023-06-21 21:50:54 +05:30
Jai A P
b5a6606895 Update build.yml 2023-06-19 14:12:46 +05:30
Jai A P
ef195c406b Update build.yml 2023-06-19 14:03:50 +05:30
Jai A P
5d2e4582f1 Update build.yml 2023-06-19 13:57:58 +05:30
Jai A P
682f1a9b9e Update build.yml 2023-06-19 13:53:22 +05:30
Jai A P
f373cd958c Update build.yml 2023-06-19 13:46:26 +05:30
Jai A P
40c5659315 Update build.yml 2023-06-19 13:39:48 +05:30
Jai A P
a8b84d158f Update build.yml 2023-06-19 13:34:31 +05:30
Jai A P
4d9486e6c1 Update build.yml 2023-06-19 13:19:21 +05:30
Eugene Pankov
60a63d9c65 lint 2023-06-16 18:08:37 +02:00
Eugene
5e673106e9 Merge pull request #8589 from Clem-Fern/feat#6518 2023-06-16 18:08:11 +02:00
Clem
27c8b920ea refactoring Eugeny/tabby#8589 (shouldTabBeDestroyedOnSessionClose) 2023-06-16 16:23:30 +02:00
Eugene Pankov
bc8ac12aef fixed #8588 - hide hidden profiles in the "new profile" selector 2023-06-16 16:12:43 +02:00
Clem Fern
7f2340e701 feat: add disconnect tab hotkey 2023-06-15 21:34:41 +02:00
Clem Fern
b0350b6a35 feat: Eugeny/tabby#6518 add disconnect tab context menu item 2023-06-15 21:17:58 +02:00
Clem Fern
cea5cc73ff ref: Eugeny/tabby/pull#8416 2023-06-15 21:07:24 +02:00
11 changed files with 95 additions and 31 deletions

View File

@@ -37,7 +37,7 @@
"core-js": "^3.31.0",
"core-js-pure": "^3.21.1",
"cross-env": "7.0.3",
"css-loader": "^6.8.1",
"css-loader": "^6.7.3",
"deep-equal": "2.0.5",
"electron": "22.3.1",
"electron-builder": "^24.0.0-alpha.1",

View File

@@ -23,6 +23,7 @@ hotkeys:
duplicate-tab: []
restart-tab: []
reconnect-tab: []
disconnect-tab: []
explode-tab:
- 'Ctrl-Shift-.'
combine-tabs:

View File

@@ -40,6 +40,7 @@ hotkeys:
duplicate-tab: []
restart-tab: []
reconnect-tab: []
disconnect-tab: []
explode-tab:
- '⌘-Shift-.'
combine-tabs:

View File

@@ -24,6 +24,7 @@ hotkeys:
duplicate-tab: []
restart-tab: []
reconnect-tab: []
disconnect-tab: []
explode-tab:
- 'Ctrl-Shift-.'
combine-tabs:

View File

@@ -59,7 +59,8 @@ export class ProfilesSettingsTabComponent extends BaseComponent {
async newProfile (base?: PartialProfile<Profile>): Promise<void> {
if (!base) {
const profiles = [...this.templateProfiles, ...this.builtinProfiles, ...this.profiles]
let profiles = [...this.templateProfiles, ...this.builtinProfiles, ...this.profiles]
profiles = profiles.filter(x => !this.isProfileBlacklisted(x))
profiles.sort((a, b) => (a.weight ?? 0) - (b.weight ?? 0))
base = await this.selector.show(
this.translate.instant('Select a base profile to use as a template'),

View File

@@ -9,7 +9,7 @@ import { SettingsTabProvider } from '../api'
:host {
display: block;
padding-bottom: 20px;
max-width: 500px;
max-width: 600px;
}
`],
})

View File

@@ -772,10 +772,7 @@ export class BaseTerminalTabComponent<P extends BaseTerminalProfile> extends Bas
})
this.attachSessionHandler(this.session.closed$, () => {
const behavior = this.profile.behaviorOnSessionEnd
if (destroyOnSessionClose || behavior === 'close' || behavior === 'auto' && this.isSessionExplicitlyTerminated()) {
this.destroy()
}
this.onSessionClosed(destroyOnSessionClose)
})
this.attachSessionHandler(this.session.destroyed$, () => {
@@ -788,6 +785,23 @@ export class BaseTerminalTabComponent<P extends BaseTerminalProfile> extends Bas
})
}
/**
* Method called when session is closed.
*/
protected onSessionClosed (destroyOnSessionClose = false): void {
if (destroyOnSessionClose || this.shouldTabBeDestroyedOnSessionClose()) {
this.destroy()
}
}
/**
* Return true if tab should be destroyed on session closed.
*/
protected shouldTabBeDestroyedOnSessionClose (): boolean {
const behavior = this.profile.behaviorOnSessionEnd
return behavior === 'close' || behavior === 'auto' && this.isSessionExplicitlyTerminated()
}
/**
* Method called when session is destroyed. Set the session to null
*/

View File

@@ -16,13 +16,25 @@ import { GetRecoveryTokenOptions, RecoveryToken } from 'tabby-core'
export abstract class ConnectableTerminalTabComponent<P extends BaseTerminalProfile> extends BaseTerminalTabComponent<P> {
protected reconnectOffered = false
protected isDisconnectedByHand = false
constructor (protected injector: Injector) {
super(injector)
this.subscribeUntilDestroyed(this.hotkeys.hotkey$, hotkey => {
if (this.hasFocus && hotkey === 'reconnect-tab') {
this.reconnect()
if (!this.hasFocus) {
return
}
switch (hotkey) {
case 'reconnect-tab':
this.reconnect()
this.notifications.notice(this.translate.instant('Reconnect'))
break
case 'disconnect-tab':
this.disconnect()
this.notifications.notice(this.translate.instant('Disconnect'))
break
}
})
}
@@ -44,6 +56,7 @@ export abstract class ConnectableTerminalTabComponent<P extends BaseTerminalProf
*/
async initializeSession (): Promise<void> {
this.reconnectOffered = false
this.isDisconnectedByHand = false
}
/**
@@ -53,9 +66,9 @@ export abstract class ConnectableTerminalTabComponent<P extends BaseTerminalProf
super.onSessionDestroyed()
if (this.frontend) {
if (this.profile.behaviorOnSessionEnd === 'reconnect') {
if (this.profile.behaviorOnSessionEnd === 'reconnect' && !this.isDisconnectedByHand) {
this.reconnect()
} else if (this.profile.behaviorOnSessionEnd === 'keep' || this.profile.behaviorOnSessionEnd === 'auto' && !this.isSessionExplicitlyTerminated()) {
} else if (this.profile.behaviorOnSessionEnd === 'keep' || !this.shouldTabBeDestroyedOnSessionClose()) {
this.offerReconnection()
}
}
@@ -77,6 +90,16 @@ export abstract class ConnectableTerminalTabComponent<P extends BaseTerminalProf
}
}
/**
* Return true if tab should be destroyed on session closed.
*/
protected shouldTabBeDestroyedOnSessionClose (): boolean {
if (this.isDisconnectedByHand) {
return false
}
return super.shouldTabBeDestroyedOnSessionClose()
}
async getRecoveryToken (options?: GetRecoveryTokenOptions): Promise<RecoveryToken> {
return {
type: `app:${this.profile.type}-tab`,
@@ -85,6 +108,11 @@ export abstract class ConnectableTerminalTabComponent<P extends BaseTerminalProf
}
}
async disconnect (): Promise<void> {
this.isDisconnectedByHand = true
await this.session?.destroy()
}
async reconnect (): Promise<void> {
this.session?.destroy()
await this.initializeSession()

View File

@@ -101,6 +101,10 @@ export class TerminalHotkeyProvider extends HotkeyProvider {
id: 'reconnect-tab',
name: this.translate.instant('Reconnect current tab (Serial/Telnet/SSH)'),
},
{
id: 'disconnect-tab',
name: this.translate.instant('Disconnect current tab (Serial/Telnet/SSH)'),
},
]
constructor (private translate: TranslateService) { super() }

View File

@@ -99,6 +99,15 @@ export class ReconnectContextMenu extends TabContextMenuItemProvider {
async getItems (tab: BaseTabComponent): Promise<MenuItemOptions[]> {
if (tab instanceof ConnectableTerminalTabComponent) {
return [
{
label: this.translate.instant('Disconnect'),
click: (): void => {
setTimeout(() => {
tab.disconnect()
this.notifications.notice(this.translate.instant('Disconnect'))
})
},
},
{
label: this.translate.instant('Reconnect'),
click: (): void => {

View File

@@ -2587,15 +2587,15 @@ crypto-random-string@^1.0.0:
resolved "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz"
integrity sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=
css-loader@^6.8.1:
version "6.8.1"
resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-6.8.1.tgz#0f8f52699f60f5e679eab4ec0fcd68b8e8a50a88"
integrity sha512-xDAXtEVGlD0gJ07iclwWVkLoZOpEvAWaSyf6W18S2pOC//K8+qUDIx8IIT3D+HjnmkJPQeesOPv5aiUaJsCM2g==
css-loader@^6.7.3:
version "6.7.3"
resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-6.7.3.tgz#1e8799f3ccc5874fdd55461af51137fcc5befbcd"
integrity sha512-qhOH1KlBMnZP8FzRO6YCH9UHXQhVMcEGLyNdb7Hv2cpcmJbW0YrddO+tG1ab5nT41KpHIYGsbeHqxB9xPu1pKQ==
dependencies:
icss-utils "^5.1.0"
postcss "^8.4.21"
postcss "^8.4.19"
postcss-modules-extract-imports "^3.0.0"
postcss-modules-local-by-default "^4.0.3"
postcss-modules-local-by-default "^4.0.0"
postcss-modules-scope "^3.0.0"
postcss-modules-values "^4.0.0"
postcss-value-parser "^4.2.0"
@@ -5876,10 +5876,10 @@ nan@2.17.0, nan@^2.15.0, nan@^2.16.0:
resolved "https://registry.yarnpkg.com/nan/-/nan-2.17.0.tgz#c0150a2368a182f033e9aa5195ec76ea41a199cb"
integrity sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==
nanoid@^3.3.6:
version "3.3.6"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c"
integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==
nanoid@^3.3.4:
version "3.3.4"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab"
integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==
natural-compare-lite@^1.4.0:
version "1.4.0"
@@ -6825,10 +6825,10 @@ postcss-modules-extract-imports@^3.0.0:
resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz#cda1f047c0ae80c97dbe28c3e76a43b88025741d"
integrity sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==
postcss-modules-local-by-default@^4.0.3:
version "4.0.3"
resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.3.tgz#b08eb4f083050708998ba2c6061b50c2870ca524"
integrity sha512-2/u2zraspoACtrbFRnTijMiQtb4GW4BvatjaG/bCjYQo8kLTdevCUlwuBHx2sCnSyrI3x3qj4ZK1j5LQBgzmwA==
postcss-modules-local-by-default@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.0.tgz#ebbb54fae1598eecfdf691a02b3ff3b390a5a51c"
integrity sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ==
dependencies:
icss-utils "^5.0.0"
postcss-selector-parser "^6.0.2"
@@ -6856,17 +6856,22 @@ postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4:
cssesc "^3.0.0"
util-deprecate "^1.0.2"
postcss-value-parser@^4.1.0, postcss-value-parser@^4.2.0:
postcss-value-parser@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz#443f6a20ced6481a2bda4fa8532a6e55d789a2cb"
integrity sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==
postcss-value-parser@^4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514"
integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==
postcss@^8.4.21:
version "8.4.24"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.24.tgz#f714dba9b2284be3cc07dbd2fc57ee4dc972d2df"
integrity sha512-M0RzbcI0sO/XJNucsGjvWU9ERWxb/ytp1w6dKtxTKgixdtQDq4rmx/g8W1hnaheq9jgwL/oyEdH5Bc4WwJKMqg==
postcss@^8.4.19:
version "8.4.21"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.21.tgz#c639b719a57efc3187b13a1d765675485f4134f4"
integrity sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==
dependencies:
nanoid "^3.3.6"
nanoid "^3.3.4"
picocolors "^1.0.0"
source-map-js "^1.0.2"