0
0
Fork 0

Drop glitch-style account bio fields

Upstream's implementation has been merged a while ago and is the preferred
way to set fields, as it is the only one compatible with upstream and is
more user-friendly.

This commit deletes the legacy glitch-soc FrontMatter functionality in order
to clean up the code and make it easier to maintain.
This commit is contained in:
Thibaut Girka 2018-07-31 11:44:12 +02:00 committed by ThibG
parent c4bec9263c
commit 88b593a63f
5 changed files with 7 additions and 583 deletions

View file

@ -3,8 +3,6 @@
const { length } = require('stringz');
const { delegate } = require('rails-ujs');
import { processBio } from 'flavours/glitch/util/bio_metadata';
delegate(document, '.account_display_name', 'input', ({ target }) => {
const nameCounter = document.querySelector('.name-counter');
@ -17,8 +15,7 @@ delegate(document, '.account_note', 'input', ({ target }) => {
const noteCounter = document.querySelector('.note-counter');
if (noteCounter) {
const noteWithoutMetadata = processBio(target.value).text;
noteCounter.textContent = 500 - length(noteWithoutMetadata);
noteCounter.textContent = 500 - length(target.value);
}
});