diff --git a/src/configuration-component.ts b/src/configuration-component.ts index 1631baa..bf15c69 100644 --- a/src/configuration-component.ts +++ b/src/configuration-component.ts @@ -2,6 +2,7 @@ export class ConfigurationComponent { public readonly element: HTMLFormElement; private readonly script: HTMLDivElement; private readonly repo: HTMLInputElement; + private readonly label: HTMLInputElement; private readonly theme: HTMLSelectElement; constructor() { @@ -30,8 +31,8 @@ export class ConfigurationComponent { -
Choose how Utterances will map blog posts to GitHub issues.
+Choose the mapping between blog posts and GitHub issues.
++ Choose the label that will be assigned to issues created by Utterances. +
+ +
Choose an Utterances theme that matches your blog.
@@ -131,6 +149,8 @@ export class ConfigurationComponent {
this.repo = this.element.querySelector('#repo') as HTMLInputElement;
+ this.label = this.element.querySelector('#label') as HTMLInputElement;
+
this.theme = this.element.querySelector('#theme') as HTMLSelectElement;
const themeStylesheet = document.getElementById('theme-stylesheet') as HTMLLinkElement;
@@ -168,6 +188,7 @@ export class ConfigurationComponent {
this.script.innerHTML = this.makeConfigScript(
this.makeConfigScriptAttribute('repo', this.repo.value === '' ? '[ENTER REPO HERE]' : this.repo.value) + '\n' +
mappingAttr + '\n' +
+ (this.label.value ? this.makeConfigScriptAttribute('label', this.label.value) + '\n' : '') +
this.makeConfigScriptAttribute('theme', this.theme.value) + '\n' +
this.makeConfigScriptAttribute('crossorigin', 'anonymous'));
}
diff --git a/src/github.ts b/src/github.ts
index 0ad152c..9f65cc3 100644
--- a/src/github.ts
+++ b/src/github.ts
@@ -188,8 +188,9 @@ export function loadUser(): Promise