Compare commits

..

1 Commits

Author SHA1 Message Date
dependabot[bot]
5006b60b13 Bump css-loader from 6.7.3 to 6.8.1
Bumps [css-loader](https://github.com/webpack-contrib/css-loader) from 6.7.3 to 6.8.1.
- [Release notes](https://github.com/webpack-contrib/css-loader/releases)
- [Changelog](https://github.com/webpack-contrib/css-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/css-loader/compare/v6.7.3...v6.8.1)

---
updated-dependencies:
- dependency-name: css-loader
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-15 04:59:00 +00:00
11 changed files with 31 additions and 95 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -772,7 +772,10 @@ export class BaseTerminalTabComponent<P extends BaseTerminalProfile> extends Bas
}) })
this.attachSessionHandler(this.session.closed$, () => { this.attachSessionHandler(this.session.closed$, () => {
this.onSessionClosed(destroyOnSessionClose) const behavior = this.profile.behaviorOnSessionEnd
if (destroyOnSessionClose || behavior === 'close' || behavior === 'auto' && this.isSessionExplicitlyTerminated()) {
this.destroy()
}
}) })
this.attachSessionHandler(this.session.destroyed$, () => { this.attachSessionHandler(this.session.destroyed$, () => {
@@ -785,23 +788,6 @@ 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 * Method called when session is destroyed. Set the session to null
*/ */

View File

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

View File

@@ -101,10 +101,6 @@ export class TerminalHotkeyProvider extends HotkeyProvider {
id: 'reconnect-tab', id: 'reconnect-tab',
name: this.translate.instant('Reconnect current tab (Serial/Telnet/SSH)'), 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() } constructor (private translate: TranslateService) { super() }

View File

@@ -99,15 +99,6 @@ export class ReconnectContextMenu extends TabContextMenuItemProvider {
async getItems (tab: BaseTabComponent): Promise<MenuItemOptions[]> { async getItems (tab: BaseTabComponent): Promise<MenuItemOptions[]> {
if (tab instanceof ConnectableTerminalTabComponent) { if (tab instanceof ConnectableTerminalTabComponent) {
return [ return [
{
label: this.translate.instant('Disconnect'),
click: (): void => {
setTimeout(() => {
tab.disconnect()
this.notifications.notice(this.translate.instant('Disconnect'))
})
},
},
{ {
label: this.translate.instant('Reconnect'), label: this.translate.instant('Reconnect'),
click: (): void => { 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" resolved "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz"
integrity sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4= integrity sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=
css-loader@^6.7.3: css-loader@^6.8.1:
version "6.7.3" version "6.8.1"
resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-6.7.3.tgz#1e8799f3ccc5874fdd55461af51137fcc5befbcd" resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-6.8.1.tgz#0f8f52699f60f5e679eab4ec0fcd68b8e8a50a88"
integrity sha512-qhOH1KlBMnZP8FzRO6YCH9UHXQhVMcEGLyNdb7Hv2cpcmJbW0YrddO+tG1ab5nT41KpHIYGsbeHqxB9xPu1pKQ== integrity sha512-xDAXtEVGlD0gJ07iclwWVkLoZOpEvAWaSyf6W18S2pOC//K8+qUDIx8IIT3D+HjnmkJPQeesOPv5aiUaJsCM2g==
dependencies: dependencies:
icss-utils "^5.1.0" icss-utils "^5.1.0"
postcss "^8.4.19" postcss "^8.4.21"
postcss-modules-extract-imports "^3.0.0" postcss-modules-extract-imports "^3.0.0"
postcss-modules-local-by-default "^4.0.0" postcss-modules-local-by-default "^4.0.3"
postcss-modules-scope "^3.0.0" postcss-modules-scope "^3.0.0"
postcss-modules-values "^4.0.0" postcss-modules-values "^4.0.0"
postcss-value-parser "^4.2.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" resolved "https://registry.yarnpkg.com/nan/-/nan-2.17.0.tgz#c0150a2368a182f033e9aa5195ec76ea41a199cb"
integrity sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ== integrity sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==
nanoid@^3.3.4: nanoid@^3.3.6:
version "3.3.4" version "3.3.6"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c"
integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw== integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==
natural-compare-lite@^1.4.0: natural-compare-lite@^1.4.0:
version "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" resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz#cda1f047c0ae80c97dbe28c3e76a43b88025741d"
integrity sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw== integrity sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==
postcss-modules-local-by-default@^4.0.0: postcss-modules-local-by-default@^4.0.3:
version "4.0.0" version "4.0.3"
resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.0.tgz#ebbb54fae1598eecfdf691a02b3ff3b390a5a51c" resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.3.tgz#b08eb4f083050708998ba2c6061b50c2870ca524"
integrity sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ== integrity sha512-2/u2zraspoACtrbFRnTijMiQtb4GW4BvatjaG/bCjYQo8kLTdevCUlwuBHx2sCnSyrI3x3qj4ZK1j5LQBgzmwA==
dependencies: dependencies:
icss-utils "^5.0.0" icss-utils "^5.0.0"
postcss-selector-parser "^6.0.2" postcss-selector-parser "^6.0.2"
@@ -6856,22 +6856,17 @@ postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4:
cssesc "^3.0.0" cssesc "^3.0.0"
util-deprecate "^1.0.2" util-deprecate "^1.0.2"
postcss-value-parser@^4.1.0: postcss-value-parser@^4.1.0, postcss-value-parser@^4.2.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" version "4.2.0"
resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514" resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514"
integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==
postcss@^8.4.19: postcss@^8.4.21:
version "8.4.21" version "8.4.24"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.21.tgz#c639b719a57efc3187b13a1d765675485f4134f4" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.24.tgz#f714dba9b2284be3cc07dbd2fc57ee4dc972d2df"
integrity sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg== integrity sha512-M0RzbcI0sO/XJNucsGjvWU9ERWxb/ytp1w6dKtxTKgixdtQDq4rmx/g8W1hnaheq9jgwL/oyEdH5Bc4WwJKMqg==
dependencies: dependencies:
nanoid "^3.3.4" nanoid "^3.3.6"
picocolors "^1.0.0" picocolors "^1.0.0"
source-map-js "^1.0.2" source-map-js "^1.0.2"