"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tabby-electron/src/services/platform.service.ts" between
tabby-1.0.181.tar.gz and tabby-1.0.183.tar.gz

About: Tabby is a modern cross-platform terminal emulator, SSH and serial client.

platform.service.ts  (tabby-1.0.181):platform.service.ts  (tabby-1.0.183)
skipping to change at line 112 skipping to change at line 112
async loadConfig (): Promise<string> { async loadConfig (): Promise<string> {
if (fsSync.existsSync(this.configPath)) { if (fsSync.existsSync(this.configPath)) {
return fs.readFile(this.configPath, 'utf8') return fs.readFile(this.configPath, 'utf8')
} else { } else {
return '' return ''
} }
} }
async saveConfig (content: string): Promise<void> { async saveConfig (content: string): Promise<void> {
this.hostApp.saveConfig(content) await this.hostApp.saveConfig(content)
} }
getConfigPath (): string|null { getConfigPath (): string|null {
return this.configPath return this.configPath
} }
showItemInFolder (p: string): void { showItemInFolder (p: string): void {
this.electron.shell.showItemInFolder(p) this.electron.shell.showItemInFolder(p)
} }
skipping to change at line 141 skipping to change at line 141
getOSRelease (): string { getOSRelease (): string {
return os.release() return os.release()
} }
getAppVersion (): string { getAppVersion (): string {
return this.electron.app.getVersion() return this.electron.app.getVersion()
} }
async listFonts (): Promise<string[]> { async listFonts (): Promise<string[]> {
if (this.hostApp.platform === Platform.Windows || this.hostApp.platform === Platform.macOS) { if (this.hostApp.platform === Platform.Windows || this.hostApp.platform === Platform.macOS) {
let fonts = await new Promise<any[]>((resolve) => fontManager.findFo nts({}, resolve)) let fonts = await new Promise<any[]>(resolve => fontManager.getAvail ableFonts(resolve))
fonts = fonts.map(x => x.family.trim()) fonts = fonts.map(x => x.family.trim())
return fonts return fonts
} }
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
if (this.hostApp.platform === Platform.Linux) { if (this.hostApp.platform === Platform.Linux) {
const stdout = (await execFile('fc-list', [':spacing=mono']))[0] const stdout = (await execFile('fc-list', [':spacing=mono']))[0]
const fonts = stdout.toString() const fonts = stdout.toString()
.split('\n') .split('\n')
.filter(x => !!x) .filter(x => !!x)
.map(x => x.split(':')[1].trim()) .map(x => x.split(':')[1].trim())
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)