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:
parent
c4bec9263c
commit
88b593a63f
5 changed files with 7 additions and 583 deletions
|
@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue