diff --git a/CHANGELOG.md b/CHANGELOG.md index 38f443d8e2..68707ffa51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,11 +5,13 @@ All notable changes to this project will be documented in this file. ## 2.5.23 ## Fixed -* Minor graphical annoyances with List View. -* Parser specific inputs not being validated. + +- Minor graphical annoyances with List View. +- Parser specific inputs not being validated. ### Changed -* Placeholders are now OS specific for parser specific inputs. + +- Placeholders are now OS specific for parser specific inputs. ## 2.5.22 diff --git a/src/lang/en-US/langStrings.json b/src/lang/en-US/langStrings.json index 16112928f0..61c4c33e3f 100644 --- a/src/lang/en-US/langStrings.json +++ b/src/lang/en-US/langStrings.json @@ -101,8 +101,7 @@ }, "manualParser": { "manifestsInputTitle": "Manifests Directory", - "manifestsInputPlaceholder": - { + "manifestsInputPlaceholder": { "Windows_NT": "C:\\path\\to\\your\\manifests\\", "Darwin": "/path/to/your/manifests/", "Linux": "/path/to/your/manifests/" @@ -113,8 +112,7 @@ }, "epicParser": { "manifestsInputTitle": "Epic Manifests Directory Override", - "manifestsInputPlaceholder": - { + "manifestsInputPlaceholder": { "Windows_NT": "C:\\path\\to\\your\\manifests\\", "Darwin": "/path/to/your/manifests/", "Linux": "/path/to/your/manifests/" @@ -130,8 +128,7 @@ "legendaryParser": { "launcherModeInputTitle": "Launch games via Legendary for online services", "legendaryInstalledFileTitle": "Legendary installed.json Path Override", - "legendaryInstalledFilePlaceholder": - { + "legendaryInstalledFilePlaceholder": { "Windows_NT": "C:\\path\\to\\legendary\\installed.json", "Darwin": "/path/to/legendary/installed.json", "Linux": "/path/to/legendary/installed.json" diff --git a/src/lib/parsers/itch-io.parser.ts b/src/lib/parsers/itch-io.parser.ts index 3c68e8035e..1303384332 100644 --- a/src/lib/parsers/itch-io.parser.ts +++ b/src/lib/parsers/itch-io.parser.ts @@ -23,7 +23,8 @@ export class ItchIoParser implements GenericParser { }, itchIoWindowsOnLinuxInstallDriveRedirect: { label: this.lang.itchIoWindowsOnLinuxInstallDriveRedirectTitle, - placeholder: this.lang.itchIoWindowsOnLinuxInstallDriveRedirectPlaceholder, + placeholder: + this.lang.itchIoWindowsOnLinuxInstallDriveRedirectPlaceholder, inputType: "dir", info: this.lang.docs__md.input.join(""), }, diff --git a/src/lib/parsers/manual.parser.ts b/src/lib/parsers/manual.parser.ts index dd92740c51..90150a0a63 100644 --- a/src/lib/parsers/manual.parser.ts +++ b/src/lib/parsers/manual.parser.ts @@ -5,7 +5,6 @@ import * as fs from "fs-extra"; import * as path from "path"; import * as os from "os"; - export class ManualParser implements GenericParser { private get lang() { return APP.lang.manualParser; @@ -72,4 +71,4 @@ export class ManualParser implements GenericParser { return undefined; }); } -} \ No newline at end of file +} diff --git a/src/models/language.model.ts b/src/models/language.model.ts index 054b4d357f..726affd0f3 100644 --- a/src/models/language.model.ts +++ b/src/models/language.model.ts @@ -117,7 +117,7 @@ export interface languageStruct { }; battleNetParser: { battleExeOverrideTitle: string; - battleExeOverridePlaceholder: {[key: string]: string}; + battleExeOverridePlaceholder: { [key: string]: string }; docs__md: { self: string[]; input: string[]; @@ -129,7 +129,7 @@ export interface languageStruct { }; UWPParser: { UWPDirTitle: string; - UWPDirPlaceholder: {[key: string]: string}; + UWPDirPlaceholder: { [key: string]: string }; UWPLauncherModeTitle: string; docs__md: { self: string[]; @@ -142,9 +142,9 @@ export interface languageStruct { }; itchIoParser: { itchIoAppDataOverrideTitle: string; - itchIoAppDataOverridePlaceholder: {[key: string]: string}; + itchIoAppDataOverridePlaceholder: { [key: string]: string }; itchIoWindowsOnLinuxInstallDriveRedirectTitle: string; - itchIoWindowsOnLinuxInstallDriveRedirectPlaceholder: string; + itchIoWindowsOnLinuxInstallDriveRedirectPlaceholder: string; docs__md: { self: string[]; input: string[]; @@ -159,7 +159,7 @@ export interface languageStruct { }; eaDesktopParser: { eaGamesDirTitle: string; - eaGamesDirPlaceholder: {[key: string]: string}; + eaGamesDirPlaceholder: { [key: string]: string }; eaLauncherModeTitle: string; docs__md: { self: string[]; @@ -173,7 +173,7 @@ export interface languageStruct { }; amazonGamesParser: { exeOverrideTitle: string; - exeOverridePlaceholder: {[key: string]: string}; + exeOverridePlaceholder: { [key: string]: string }; launcherModeInputTitle: string; docs__md: { self: string[]; @@ -188,7 +188,7 @@ export interface languageStruct { }; manualParser: { manifestsInputTitle: string; - manifestsInputPlaceholder: {[key: string]: string}; + manifestsInputPlaceholder: { [key: string]: string }; docs__md: { self: string[]; input: string[]; @@ -199,7 +199,7 @@ export interface languageStruct { }; epicParser: { manifestsInputTitle: string; - manifestsInputPlaceholder: {[key: string]: string}; + manifestsInputPlaceholder: { [key: string]: string }; launcherModeInputTitle: string; docs__md: { self: string[]; @@ -215,9 +215,9 @@ export interface languageStruct { legendaryParser: { launcherModeInputTitle: string; legendaryExeOverrideTitle: string; - legendaryExeOverridePlaceholder: {[key: string]: string}; + legendaryExeOverridePlaceholder: { [key: string]: string }; legendaryInstalledFileTitle: string; - legendaryInstalledFilePlaceholder: {[key: string]: string}; + legendaryInstalledFilePlaceholder: { [key: string]: string }; docs__md: { self: string[]; input: string[]; @@ -229,7 +229,7 @@ export interface languageStruct { }; uplayParser: { uplayDirTitle: string; - uplayDirPlaceholder: {[key: string]: string}; + uplayDirPlaceholder: { [key: string]: string }; launcherModeInputTitle: string; docs__md: { self: string[]; @@ -245,7 +245,7 @@ export interface languageStruct { }; gogParser: { galaxyExeOverrideTitle: string; - galaxyExeOverridePlaceholder: {[key: string]: string}; + galaxyExeOverridePlaceholder: { [key: string]: string }; launcherModeInputTitle: string; parseLinkedExecsTitle: string; parseRegistryEntries: string; diff --git a/src/models/parser.model.ts b/src/models/parser.model.ts index 796086b0c8..28e4e34b9b 100644 --- a/src/models/parser.model.ts +++ b/src/models/parser.model.ts @@ -51,7 +51,7 @@ export interface ParserInputField { placeholder?: string; inputType: "text" | "path" | "dir" | "toggle" | "multiselect"; allowedValues?: SelectItem[]; - initialValue?: string[]|string; + initialValue?: string[] | string; hidden?: boolean; required?: boolean; info?: string; diff --git a/src/renderer/components/ng-bubbles.component.ts b/src/renderer/components/ng-bubbles.component.ts index ca0fa50aea..c84df80882 100644 --- a/src/renderer/components/ng-bubbles.component.ts +++ b/src/renderer/components/ng-bubbles.component.ts @@ -87,13 +87,18 @@ export class NgBubblesComponent implements ControlValueAccessor { if (this.addable && !this.editing[index]) { this.editing[index] = true; this.addables[index] = this.items[index]; - const self=this; - setTimeout(()=> { - const inputEl = document.querySelector(".editable") as HTMLTextAreaElement; - const len = self.addables[index].length - self.setInnerHtml(inputEl,self.addables[index], {start: len, end: len}) + const self = this; + setTimeout(() => { + const inputEl = document.querySelector( + ".editable", + ) as HTMLTextAreaElement; + const len = self.addables[index].length; + self.setInnerHtml(inputEl, self.addables[index], { + start: len, + end: len, + }); inputEl.focus(); - }, 100) + }, 100); } } @@ -117,10 +122,10 @@ export class NgBubblesComponent implements ControlValueAccessor { } private transferChangeBubble(index: number) { - if(this.addables[index]) { - this.changeItem(this.addables[index], index) - this.addables[index]=""; - this.editing[index]=false; + if (this.addables[index]) { + this.changeItem(this.addables[index], index); + this.addables[index] = ""; + this.editing[index] = false; } else { this.removeItem(index); } @@ -128,19 +133,16 @@ export class NgBubblesComponent implements ControlValueAccessor { } handleChangeKeypress(event: KeyboardEvent, index: number) { - if ( - event.key === "Enter" - ) { + if (event.key === "Enter") { event.preventDefault(); this.transferChangeBubble(index); - if(index == this.items.length - 1) { + if (index == this.items.length - 1) { this.addLiveItem(); } - } - else if (event.key === "Backspace" && this.addables[index] == "") { + } else if (event.key === "Backspace" && this.addables[index] == "") { event.preventDefault(); this.transferChangeBubble(index); - this.makeLiveItem(index-1); + this.makeLiveItem(index - 1); } } @@ -164,22 +166,18 @@ export class NgBubblesComponent implements ControlValueAccessor { this.changeRef.detectChanges(); } handleKeypress(event: KeyboardEvent) { - if ( - event.key === "Enter" - ) { + if (event.key === "Enter") { event.preventDefault(); - const goToNew = !!this.addableValue + const goToNew = !!this.addableValue; this.transferBubble(); - if(goToNew) { - this.addLiveItem() + if (goToNew) { + this.addLiveItem(); } - } - else if(event.key === "Backspace" && this.addableValue == "") { + } else if (event.key === "Backspace" && this.addableValue == "") { event.preventDefault(); this.transferBubble(); - this.makeLiveItem(this.items.length-1); + this.makeLiveItem(this.items.length - 1); } - } handleBlur() { this.transferBubble(); @@ -188,7 +186,7 @@ export class NgBubblesComponent implements ControlValueAccessor { addItem(item: string) { this.items.push(item); this.editing.push(false); - this.addables.push("") + this.addables.push(""); this.onChange(this.items); this.onTouched(); } @@ -208,8 +206,8 @@ export class NgBubblesComponent implements ControlValueAccessor { writeValue(value: string[]) { this.items = value; const len = value ? value.length : 0; - this.editing = Array(len).map(x=>false); - this.addables = Array(len).map(x=>""); + this.editing = Array(len).map((x) => false); + this.addables = Array(len).map((x) => ""); this.onChange(this.items); this.changeRef.detectChanges(); this.onTouched(); diff --git a/src/renderer/services/parsers.service.ts b/src/renderer/services/parsers.service.ts index 7d3a8689d5..dab1f4ea86 100644 --- a/src/renderer/services/parsers.service.ts +++ b/src/renderer/services/parsers.service.ts @@ -367,8 +367,10 @@ export class ParsersService { validate(key: string, data: any, options?: any) { switch (key) { - case "parserType": - return parserInfo.availableParsers.includes(data) ? null : this.lang.validationErrors.parserType__md; + case "parserType": + return parserInfo.availableParsers.includes(data) + ? null + : this.lang.validationErrors.parserType__md; case "configTitle": return data ? null : this.lang.validationErrors.configTitle__md; case "parserId": @@ -419,7 +421,9 @@ export class ParsersService { isDir, ) ? null - : isDir ? this.lang.validationErrors.genericDir__md : this.lang.validationErrors.genericPath__md; + : isDir + ? this.lang.validationErrors.genericDir__md + : this.lang.validationErrors.genericPath__md; } return null; } diff --git a/src/renderer/styles/ng-bubbles.component.scss b/src/renderer/styles/ng-bubbles.component.scss index f136efffea..53371151c5 100644 --- a/src/renderer/styles/ng-bubbles.component.scss +++ b/src/renderer/styles/ng-bubbles.component.scss @@ -33,9 +33,10 @@ .delete { margin-left: 0.25em; } - .editable,.editablePlus { + .editable, + .editablePlus { display: flex; - min-width:10px; + min-width: 10px; height: 20px; cursor: white; } diff --git a/src/renderer/styles/preview.component.scss b/src/renderer/styles/preview.component.scss index db5c93aa56..456bf11ac4 100644 --- a/src/renderer/styles/preview.component.scss +++ b/src/renderer/styles/preview.component.scss @@ -686,7 +686,8 @@ } } &.header > .infoField { - &:hover,&.sortBy { + &:hover, + &.sortBy { background-color: var( --color-ng-select-option-background-hover );