From: Marc Foley Date: Thu, 5 Sep 2024 10:03:03 +0000 (+0100) Subject: tags.html: Add history panel X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F8135%2Fhead;p=thirdparty%2Fgoogle%2Ffonts.git tags.html: Add history panel --- diff --git a/.ci/tags.html b/.ci/tags.html index 20965b6d69..feae5bab9e 100644 --- a/.ci/tags.html +++ b/.ci/tags.html @@ -31,14 +31,22 @@ -
- +
+
+ +
+

{{ item }}

+
+
+

No changes

+
+
-
Edited
+
@@ -46,7 +54,7 @@ {{ family.Family }}
- +
@@ -91,6 +99,7 @@ ["Tamil", "மனிதக் குடும்பத்தினைச் சேர்ந்த யாவரதும் உள்ளார்ந்த"], ]), FamilyScripts: new Map(), + history: [], }; }, created() { @@ -115,8 +124,9 @@ familyPangram(family) { return this.Pangrams.get(this.FamilyScripts.get(family.Family)); }, - edited() { + edited(family) { this.isEdited = true; + this.history.push(`* ${family.Family},${family["Group/Tag"]},${family.Weight}`); }, parseUnicode(str) { let ranges = str.split(","); @@ -180,11 +190,15 @@ }, AddFamily() { this.isEdited = true; - this.Families.push({ Weight: this.newWeight, Family: this.newFamily, "Group/Tag": this.CurrentCategory }); + let newFamily = { Weight: this.newWeight, Family: this.newFamily, "Group/Tag": this.CurrentCategory } + this.Families.push(newFamily); + + this.history.push(`+ ${newFamily.Family},${newFamily["Group/Tag"]},${newFamily.Weight}`); }, removeFamily(Family) { this.isEdited = true; - this.Families = this.Families.filter((t) => t !== Family) + this.Families = this.Families.filter((t) => t !== Family); + this.history.push(`- ${Family.Family},${Family["Group/Tag"]},${Family.Weight}`); }, saveCSV() { this.Families = this.Families.filter((t) => t.Family !== "");