diff --git a/tags.html b/tags.html
index b09000a4a9a..dd4cee7deab 100644
--- a/tags.html
+++ b/tags.html
@@ -21,11 +21,19 @@
{{ family.Family }}
@@ -84,6 +96,7 @@
Google Fonts Tagger
ready: false,
isEdited: false,
commit: "refs/heads/main",
+ newTag: "",
newFamily: '',
newWeight: '',
CurrentCategory: "/Expressive/Calm",
@@ -116,7 +129,7 @@ Google Fonts Tagger
},
CurrentCategory(newCategory) {
this.updateURL();
- }
+ },
},
created() {
this.loadCSV();
@@ -144,14 +157,14 @@ Google Fonts Tagger
uniqueFamilies() {
return Array.from(new Set(this.Families.map((family) => family.Family)));
},
- sortedCategories() {
- return Array.from(this.Categories).sort();
- }
},
methods: {
+ sortedCategories() {
+ return Array.from(this.Categories).sort();
+ },
updateURL() {
const url = new URL(window.location);
- if (this.commit) {
+ if (this.commit && this.commit !== "refs/heads/main") {
url.searchParams.set('commit', this.commit);
} else {
url.searchParams.delete('commit');
@@ -230,6 +243,12 @@ Google Fonts Tagger
familyStyle(Family) {
return `font-family: "${Family.Family}", "Adobe NotDef"; font-size: 32pt;`
},
+ AddTag() {
+ this.isEdited = true;
+ this.Categories.add(this.newTag);
+ this.history.push(`+ Tag added "${this.newTag}"`);
+ this.CurrentCategory = this.newTag;
+ },
AddFamily() {
this.isEdited = true;
let newFamily = { Weight: this.newWeight, Family: this.newFamily, "Group/Tag": this.CurrentCategory }