From: Marc Foley Date: Thu, 17 Jul 2025 15:27:24 +0000 (+0100) Subject: further development X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c9810b0d2fe2a4b1123166f0138f6f9d7ffc8f1;p=thirdparty%2Fgoogle%2Ffonts.git further development --- diff --git a/tagger2/AddTags.js b/tagger2/AddTags.js index 678b8ea30..259eb0291 100644 --- a/tagger2/AddTags.js +++ b/tagger2/AddTags.js @@ -1,74 +1,135 @@ export default { - schema: { - categories: ["a", "b", "c"], - lowTag: { - filters: [], - score: 10 - }, - highTag: { - filters: [], - score: 100 - } - }, +// schema: { +// categories: ["a", "b", "c"], +// lowTag: { +// filters: [], +// score: 10 +// }, +// highTag: { +// filters: [], +// score: 100 +// } +// }, props: ["categories"], data: function() { return { currentCategories: [], - currentAxis: "", - currentPosition: 0, - currentOp: "", - currentScore: 0, - filters: [], + lowTag: { + filters: [], + score: 0 + }, + highTag: { + filters: [], + score: 0 + }, + currentLowAxis: "", + currentLowPosition: 0, + currentLowOp: "", + currentLowScore: 0, + currentHighAxis: "", + currentHighPosition: 0, + currentHighOp: "", + currentHighScore: 0, } }, methods: { addFilter() { - this.filters.push( + this.lowTag.filters.push( + { + axis: this.currentLowAxis, + op: this.currentLowOp, + value: this.currentLowPosition, + score: this.currentLowScore + } + ); + this.highTag.filters.push( { - axis: this.currentAxis, - op: this.currentOp, - value: this.currentPosition, - score: this.currentScore + axis: this.currentHighAxis, + op: this.currentHighOp, + value: this.currentHighPosition, + score: this.currentHighScore } - ) + ); + this.currentLowAxis = ""; + this.currentLowPosition = 0; + this.currentLowOp = ""; + this.currentHighAxis = ""; + this.currentHighPosition = 0; + this.currentHighOp = ""; }, addTags() { const filterSet = { categories: this.currentCategories, - filters: this.filters + lowTag: this.lowTag, + highTag: this.highTag }; + filterSet.lowTag.score = this.currentLowScore; + filterSet.highTag.score = this.currentHighScore; this.$emit('tags-added', filterSet); - this.filters = []; + this.currentCategories = []; + this.lowTag = { filters: [], score: 0 }; + this.highTag = { filters: [], score: 0 }; + this.currentLowAxis = ""; + this.currentLowPosition = 0; + this.currentLowOp = ""; + this.currentLowScore = 0; + this.currentHighAxis = ""; + this.currentHighPosition = 0; + this.currentHighOp = ""; + this.currentHighScore = 0; } }, template: `

Add Tags

-

Category

+
+

Categories

-
- - - +
+ + + + +

High Tag:

+ Score: + +
+ + + -

Current Filters

+

Low Tag

+
    +
  • + {{ filter.axis }} {{ filter.op }} {{ filter.value }} + +
  • +
+

High Tag

    -
  • +
  • {{ filter.axis }} {{ filter.op }} {{ filter.value }} - +
diff --git a/tagger2/TagsByCategories.js b/tagger2/TagsByCategories.js index 38ab87395..2654089bb 100644 --- a/tagger2/TagsByCategories.js +++ b/tagger2/TagsByCategories.js @@ -48,7 +48,7 @@ export default { {{ category }} -
+
diff --git a/tagger2/TagsByFont.js b/tagger2/TagsByFont.js index 4844b4dab..22d5c67ea 100644 --- a/tagger2/TagsByFont.js +++ b/tagger2/TagsByFont.js @@ -29,7 +29,7 @@ export default {
    -
  • +
  • {{ tag.tagName }} diff --git a/tagger2/index.html b/tagger2/index.html index ed2662741..5c278011f 100644 --- a/tagger2/index.html +++ b/tagger2/index.html @@ -28,7 +28,7 @@