mirror of
https://github.com/Eugeny/tabby.git
synced 2024-09-11 13:13:59 +03:00
dropped slug
This commit is contained in:
parent
566aa83fa9
commit
e4b7693685
@ -18,7 +18,6 @@
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@types/deep-equal": "^1.0.0",
|
||||
"@types/slug": "^0.9.1",
|
||||
"ansi-colors": "^4.1.1",
|
||||
"dataurl": "0.1.0",
|
||||
"deep-equal": "1.1.0",
|
||||
@ -26,7 +25,7 @@
|
||||
"mz": "^2.6.0",
|
||||
"ps-node": "^0.1.6",
|
||||
"runes": "^0.4.2",
|
||||
"slug": "^2.0.0",
|
||||
"slugify": "^1.4.0",
|
||||
"uuid": "^7.0.1",
|
||||
"xterm": "^4.5.0-beta.9",
|
||||
"xterm-addon-fit": "^0.4.0-beta2",
|
||||
|
@ -11,7 +11,7 @@ h3.mb-3 Shell
|
||||
)
|
||||
option(
|
||||
*ngFor='let profile of profiles',
|
||||
[ngValue]='slug(profile.name).toLowerCase()'
|
||||
[ngValue]='slugify(profile.name).toLowerCase()'
|
||||
) {{profile.name}}
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import slug from 'slug'
|
||||
import slugify from 'slugify'
|
||||
import { Component } from '@angular/core'
|
||||
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
|
||||
import { Subscription } from 'rxjs'
|
||||
@ -17,7 +17,7 @@ export class ShellSettingsTabComponent {
|
||||
Platform = Platform
|
||||
isConPTYAvailable: boolean
|
||||
isConPTYStable: boolean
|
||||
slug = slug
|
||||
slugify = slugify
|
||||
private configSubscription: Subscription
|
||||
|
||||
constructor (
|
||||
|
@ -1,4 +1,4 @@
|
||||
import slug from 'slug'
|
||||
import slugify from 'slugify'
|
||||
import { Injectable } from '@angular/core'
|
||||
import { HotkeyDescription, HotkeyProvider } from 'terminus-core'
|
||||
import { TerminalService } from './services/terminal.service'
|
||||
@ -78,7 +78,7 @@ export class TerminalHotkeyProvider extends HotkeyProvider {
|
||||
return [
|
||||
...this.hotkeys,
|
||||
...profiles.map(profile => ({
|
||||
id: `profile.${slug(profile.name).toLowerCase()}`,
|
||||
id: `profile.${slugify(profile.name).toLowerCase()}`,
|
||||
name: `New tab: ${profile.name}`,
|
||||
})),
|
||||
]
|
||||
|
@ -1,5 +1,5 @@
|
||||
import * as fs from 'mz/fs'
|
||||
import slug from 'slug'
|
||||
import slugify from 'slugify'
|
||||
|
||||
import { NgModule } from '@angular/core'
|
||||
import { BrowserModule } from '@angular/platform-browser'
|
||||
@ -182,7 +182,7 @@ export default class TerminalModule { // eslint-disable-line @typescript-eslint/
|
||||
}
|
||||
if (hotkey.startsWith('profile.')) {
|
||||
const profiles = await terminal.getProfiles()
|
||||
const profile = profiles.find(x => slug(x.name).toLowerCase() === hotkey.split('.')[1])
|
||||
const profile = profiles.find(x => slugify(x.name).toLowerCase() === hotkey.split('.')[1])
|
||||
if (profile) {
|
||||
terminal.openTabWithOptions(profile.sessionOptions)
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import * as fs from 'mz/fs'
|
||||
import slug from 'slug'
|
||||
import slugify from 'slugify'
|
||||
import { Observable, AsyncSubject } from 'rxjs'
|
||||
import { Injectable, Inject } from '@angular/core'
|
||||
import { AppService, Logger, LogService, ConfigService, SplitTabComponent } from 'terminus-core'
|
||||
@ -54,7 +54,7 @@ export class TerminalService {
|
||||
async openTab (profile?: Profile, cwd?: string|null, pause?: boolean): Promise<TerminalTabComponent> {
|
||||
if (!profile) {
|
||||
const profiles = await this.getProfiles(true)
|
||||
profile = profiles.find(x => slug(x.name).toLowerCase() === this.config.store.terminal.profile) || profiles[0]
|
||||
profile = profiles.find(x => slugify(x.name).toLowerCase() === this.config.store.terminal.profile) || profiles[0]
|
||||
}
|
||||
|
||||
cwd = cwd || profile.sessionOptions.cwd
|
||||
|
@ -1,5 +1,5 @@
|
||||
import * as fs from 'mz/fs'
|
||||
import slug from 'slug'
|
||||
import slugify from 'slugify'
|
||||
import { Injectable } from '@angular/core'
|
||||
import { HostAppService, Platform } from 'terminus-core'
|
||||
|
||||
@ -24,7 +24,7 @@ export class POSIXShellsProvider extends ShellProvider {
|
||||
.map(x => x.trim())
|
||||
.filter(x => x && !x.startsWith('#'))
|
||||
.map(x => ({
|
||||
id: slug(x),
|
||||
id: slugify(x),
|
||||
name: x.split('/')[2],
|
||||
command: x,
|
||||
args: ['-l'],
|
||||
|
@ -1,5 +1,5 @@
|
||||
import * as fs from 'mz/fs'
|
||||
import slug from 'slug'
|
||||
import slugify from 'slugify'
|
||||
|
||||
import { Injectable } from '@angular/core'
|
||||
import { HostAppService, Platform, isWindowsBuild, WIN_BUILD_WSL_EXE_DISTRO_FLAG } from 'terminus-core'
|
||||
@ -90,7 +90,7 @@ export class WSLShellProvider extends ShellProvider {
|
||||
}
|
||||
const name = childKey.DistributionName.value
|
||||
const shell: Shell = {
|
||||
id: `wsl-${slug(name)}`,
|
||||
id: `wsl-${slugify(name)}`,
|
||||
name: `WSL / ${name}`,
|
||||
command: wslPath,
|
||||
args: ['-d', name],
|
||||
|
@ -7,11 +7,6 @@
|
||||
resolved "https://registry.yarnpkg.com/@types/deep-equal/-/deep-equal-1.0.1.tgz#71cfabb247c22bcc16d536111f50c0ed12476b03"
|
||||
integrity sha512-mMUu4nWHLBlHtxXY17Fg6+ucS/MnndyOWyOe7MmwkoMYxvfQU2ajtRaEvqSUv+aVkMqH/C0NCI8UoVfRNQ10yg==
|
||||
|
||||
"@types/slug@^0.9.1":
|
||||
version "0.9.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/slug/-/slug-0.9.1.tgz#16dbf8b77d73e0a09ce51a96400878f33806ab32"
|
||||
integrity sha512-zR/u8WFQ4/6uCIikjI00a5uB084XjgEGNRAvM4a1BL39Bw9yEiDQFiPS2DgJ8lPDkR2Qd/vZ26dCR9XqlKbDqQ==
|
||||
|
||||
ansi-colors@^4.1.1:
|
||||
version "4.1.1"
|
||||
resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348"
|
||||
@ -193,12 +188,10 @@ runes@^0.4.2:
|
||||
resolved "https://registry.yarnpkg.com/runes/-/runes-0.4.3.tgz#32f7738844bc767b65cc68171528e3373c7bb355"
|
||||
integrity sha512-K6p9y4ZyL9wPzA+PMDloNQPfoDGTiFYDvdlXznyGKgD10BJpcAosvATKrExRKOrNLgD8E7Um7WGW0lxsnOuNLg==
|
||||
|
||||
slug@^2.0.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/slug/-/slug-2.1.0.tgz#293f8d53de7e55c15871846fd1bc36114841a8c7"
|
||||
integrity sha512-Q4foEgcE7E8UB/BFg4kEzFUICoppzsbbfRjrdKiOM4Z4EFZF5tdn6amkgeaGur3kI4lMWP2BoMv7XJcKZvLg9Q==
|
||||
dependencies:
|
||||
unicode ">= 0.3.1"
|
||||
slugify@^1.4.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/slugify/-/slugify-1.4.0.tgz#c9557c653c54b0c7f7a8e786ef3431add676d2cb"
|
||||
integrity sha512-FtLNsMGBSRB/0JOE2A0fxlqjI6fJsgHGS13iTuVT28kViI4JjUiNqp/vyis0ZXYcMnpR3fzGNkv+6vRlI2GwdQ==
|
||||
|
||||
table-parser@^0.1.3:
|
||||
version "0.1.3"
|
||||
@ -226,11 +219,6 @@ tiny-inflate@^1.0.2:
|
||||
resolved "https://registry.yarnpkg.com/tiny-inflate/-/tiny-inflate-1.0.2.tgz#93d9decffc8805bd57eae4310f0b745e9b6fb3a7"
|
||||
integrity sha1-k9nez/yIBb1X6uQxDwt0Xptvs6c=
|
||||
|
||||
"unicode@>= 0.3.1":
|
||||
version "11.0.1"
|
||||
resolved "https://registry.yarnpkg.com/unicode/-/unicode-11.0.1.tgz#735bd422ec75cf28d396eb224d535d168d5f1db6"
|
||||
integrity sha512-+cHtykLb+eF1yrSLWTwcYBrqJkTfX7Quoyg7Juhe6uylF43ZbMdxMuSHNYlnyLT8T7POAvavgBthzUF9AIaQvQ==
|
||||
|
||||
uuid@^7.0.1:
|
||||
version "7.0.1"
|
||||
resolved "https://registry.yarnpkg.com/uuid/-/uuid-7.0.1.tgz#95ed6ff3d8c881cbf85f0f05cc3915ef994818ef"
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "es2015",
|
||||
"target": "es2017",
|
||||
"target": "es2016",
|
||||
"moduleResolution": "node",
|
||||
"noImplicitAny": false,
|
||||
"removeComments": false,
|
||||
|
Loading…
Reference in New Issue
Block a user