mirror of
https://iceshrimp.dev/blueb/Chuckya-fe-standalone.git
synced 2026-01-11 13:33:21 -08:00
Merge commit '899eac1a92' into glitch-soc/merge-upstream
Conflicts: - `app/javascript/packs/admin.jsx`: Changes split in `app/javascript/core/admin.js` and `app/javascript/flavours/glitch/packs/admin.jsx`.
This commit is contained in:
commit
c2f0ea415e
10 changed files with 43 additions and 37 deletions
|
|
@ -57,11 +57,11 @@ function loaded() {
|
|||
return messageFormat.format(values);
|
||||
};
|
||||
|
||||
[].forEach.call(document.querySelectorAll('.emojify'), (content) => {
|
||||
document.querySelectorAll('.emojify').forEach((content) => {
|
||||
content.innerHTML = emojify(content.innerHTML);
|
||||
});
|
||||
|
||||
[].forEach.call(document.querySelectorAll('time.formatted'), (content) => {
|
||||
document.querySelectorAll('time.formatted').forEach((content) => {
|
||||
const datetime = new Date(content.getAttribute('datetime'));
|
||||
const formattedDate = dateTimeFormat.format(datetime);
|
||||
|
||||
|
|
@ -78,7 +78,7 @@ function loaded() {
|
|||
};
|
||||
const todayFormat = new IntlMessageFormat(localeData['relative_format.today'] || 'Today at {time}', locale);
|
||||
|
||||
[].forEach.call(document.querySelectorAll('time.relative-formatted'), (content) => {
|
||||
document.querySelectorAll('time.relative-formatted').forEach((content) => {
|
||||
const datetime = new Date(content.getAttribute('datetime'));
|
||||
|
||||
let formattedContent;
|
||||
|
|
@ -95,7 +95,7 @@ function loaded() {
|
|||
content.textContent = formattedContent;
|
||||
});
|
||||
|
||||
[].forEach.call(document.querySelectorAll('time.time-ago'), (content) => {
|
||||
document.querySelectorAll('time.time-ago').forEach((content) => {
|
||||
const datetime = new Date(content.getAttribute('datetime'));
|
||||
const now = new Date();
|
||||
|
||||
|
|
@ -112,8 +112,8 @@ function loaded() {
|
|||
if (reactComponents.length > 0) {
|
||||
import(/* webpackChunkName: "containers/media_container" */ '../mastodon/containers/media_container')
|
||||
.then(({ default: MediaContainer }) => {
|
||||
[].forEach.call(reactComponents, (component) => {
|
||||
[].forEach.call(component.children, (child) => {
|
||||
reactComponents.forEach((component) => {
|
||||
Array.from(component.children).forEach((child) => {
|
||||
component.removeChild(child);
|
||||
});
|
||||
});
|
||||
|
|
@ -169,7 +169,7 @@ function loaded() {
|
|||
return false;
|
||||
});
|
||||
|
||||
[].forEach.call(document.querySelectorAll('.status__content__spoiler-link'), (spoilerLink) => {
|
||||
document.querySelectorAll('.status__content__spoiler-link').forEach((spoilerLink) => {
|
||||
const statusEl = spoilerLink.parentNode.parentNode;
|
||||
const message = (statusEl.dataset.spoiler === 'expanded') ? (localeData['status.show_less'] || 'Show less') : (localeData['status.show_more'] || 'Show more');
|
||||
spoilerLink.textContent = (new IntlMessageFormat(message, locale)).format();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue