mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 06:43:51 +02:00
Highlight the differences of the updated bio text in Feed 1
This commit is contained in:
@@ -5767,7 +5767,7 @@ speechSynthesis.getVoices();
|
||||
};
|
||||
};
|
||||
|
||||
$app.methods.findSequeces = function (arr) {
|
||||
$app.methods.findSequences = function (arr) {
|
||||
if (arr.length === 0) return [];
|
||||
return arr.reduce(
|
||||
(p, c, i) => {
|
||||
@@ -5792,7 +5792,7 @@ speechSynthesis.getVoices();
|
||||
* @param {*} s2
|
||||
* @param {*} markerStartTag
|
||||
* @param {*} markerEndTag
|
||||
* @returns An array that contains both the string 1 and string 2, which the differences are formated with HTML tags
|
||||
* @returns An array that contains both the string 1 and string 2, which the differences are formatted with HTML tags
|
||||
*/
|
||||
$app.methods.formatDifference = function (
|
||||
s1,
|
||||
@@ -5803,7 +5803,7 @@ speechSynthesis.getVoices();
|
||||
const texts = [s1, s2];
|
||||
const differs = $app.findDifferences(s1, s2);
|
||||
return Object.values(differs)
|
||||
.map((i) => $app.findSequeces(i.map((j) => j.index)))
|
||||
.map((i) => $app.findSequences(i.map((j) => j.index)))
|
||||
.map((i, k) => {
|
||||
let stringBuilder = [];
|
||||
let lastPos = 0;
|
||||
|
||||
@@ -65,9 +65,9 @@ mixin feedTab()
|
||||
i.x-user-status(:class="statusClass(scope.row.status)")
|
||||
span(v-text="scope.row.statusDescription")
|
||||
template(v-else-if="scope.row.type === 'Bio'")
|
||||
template(v-for="(bio,idx) in formatDifference(scope.row.previousBio,scope.row.bio)")
|
||||
template(v-for="(bio,idx) in formatDifference(scope.row.previousBio, scope.row.bio)")
|
||||
pre(v-html="bio" style="font-family:inherit;font-size:12px;white-space:pre-wrap;margin:0 0.5em 0 0")
|
||||
span(v-if="idx===0")
|
||||
span(v-if="idx === 0")
|
||||
i.el-icon-right
|
||||
el-table-column(:label="$t('table.feed.date')" prop="created_at" sortable="custom" width="120")
|
||||
template(v-once #default="scope")
|
||||
|
||||
Reference in New Issue
Block a user