From 855a7bbe149952ee0789b957853a73442af5c2f2 Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Sun, 15 Aug 2021 13:47:56 +0200 Subject: [PATCH] include platform arch in github issues --- tabby-core/src/services/homeBase.service.ts | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/tabby-core/src/services/homeBase.service.ts b/tabby-core/src/services/homeBase.service.ts index f4b384d1..05235bce 100644 --- a/tabby-core/src/services/homeBase.service.ts +++ b/tabby-core/src/services/homeBase.service.ts @@ -2,7 +2,7 @@ import { Injectable, Inject } from '@angular/core' import * as mixpanel from 'mixpanel' import { v4 as uuidv4 } from 'uuid' import { ConfigService } from './config.service' -import { PlatformService, BOOTSTRAP_DATA, BootstrapData } from '../api' +import { PlatformService, BOOTSTRAP_DATA, BootstrapData, HostAppService } from '../api' @Injectable({ providedIn: 'root' }) export class HomeBaseService { @@ -13,6 +13,7 @@ export class HomeBaseService { private constructor ( private config: ConfigService, private platform: PlatformService, + private hostApp: HostAppService, @Inject(BOOTSTRAP_DATA) private bootstrapData: BootstrapData, ) { this.appVersion = platform.getAppVersion() @@ -28,20 +29,11 @@ export class HomeBaseService { reportBug (): void { let body = `Version: ${this.appVersion}\n` - body += `Platform: ${process.platform} ${this.platform.getOSRelease()}\n` - const label = { - aix: 'OS: IBM AIX', - android: 'OS: Android', - darwin: 'OS: macOS', - freebsd: 'OS: FreeBSD', - linux: 'OS: Linux', - openbsd: 'OS: OpenBSD', - sunos: 'OS: Solaris', - win32: 'OS: Windows', - }[process.platform] + body += `Platform: ${this.hostApp.platform} ${process.arch} ${this.platform.getOSRelease()}\n` const plugins = this.bootstrapData.installedPlugins.filter(x => !x.isBuiltin).map(x => x.name) - body += `Plugins: ${plugins.join(', ') || 'none'}\n\n` - this.platform.openExternal(`https://github.com/Eugeny/tabby/issues/new?body=${encodeURIComponent(body)}&labels=${label}`) + body += `Plugins: ${plugins.join(', ') || 'none'}\n` + body += `Frontend: ${this.config.store.terminal?.frontend}\n\n` + this.platform.openExternal(`https://github.com/Eugeny/tabby/issues/new?body=${encodeURIComponent(body)}`) } enableAnalytics (): void {