diff --git a/CHANGELOG.md b/CHANGELOG.md index 49ec550cdd..01c588b599 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Greentext now has separate color slot for it - Removed the use of with_move parameters when fetching notifications - Push notifications now are the same as normal notfication, and are localized. +- Updated Notification Settings to match new BE API ### Fixed - Weird bug related to post being sent seemingly after pasting with keyboard (hopefully) @@ -31,6 +32,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Add colons to the emoji alt text, to make them copyable - Add better visual indication for drag-and-drop for files - When disabling attachments, the placeholder links now show an icon and the description instead of just IMAGE or VIDEO etc +- Remove unnecessary options for 'automatic loading when loading older' and 'reply previews' ### Fixed - Custom Emoji will display in poll options now. diff --git a/src/components/mobile_nav/mobile_nav.js b/src/components/mobile_nav/mobile_nav.js index 4613d090fa..b2b5d2645a 100644 --- a/src/components/mobile_nav/mobile_nav.js +++ b/src/components/mobile_nav/mobile_nav.js @@ -69,7 +69,7 @@ const MobileNav = { this.$refs.notifications.markAsSeen() }, onScroll ({ target: { scrollTop, clientHeight, scrollHeight } }) { - if (this.$store.getters.mergedConfig.autoLoad && scrollTop + clientHeight >= scrollHeight) { + if (scrollTop + clientHeight >= scrollHeight) { this.$refs.notifications.fetchOlderNotifications() } } diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index 1c0accacdf..6bceed9089 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -27,6 +27,11 @@ const buildMentionsString = ({ user, attentions = [] }, currentUser) => { return mentions.length > 0 ? mentions.join(' ') + ' ' : '' } +// Converts a string with px to a number like '2px' -> 2 +const pxStringToNumber = (str) => { + return Number(str.substring(0, str.length - 2)) +} + const PostStatusForm = { props: [ 'replyTo', @@ -423,7 +428,7 @@ const PostStatusForm = { * scroll is different for `Window` and `Element`s */ const bottomBottomPaddingStr = window.getComputedStyle(bottomRef)['padding-bottom'] - const bottomBottomPadding = Number(bottomBottomPaddingStr.substring(0, bottomBottomPaddingStr.length - 2)) + const bottomBottomPadding = pxStringToNumber(bottomBottomPaddingStr) const scrollerRef = this.$el.closest('.sidebar-scroller') || this.$el.closest('.post-form-modal-view') || @@ -432,10 +437,12 @@ const PostStatusForm = { // Getting info about padding we have to account for, removing 'px' part const topPaddingStr = window.getComputedStyle(target)['padding-top'] const bottomPaddingStr = window.getComputedStyle(target)['padding-bottom'] - const topPadding = Number(topPaddingStr.substring(0, topPaddingStr.length - 2)) - const bottomPadding = Number(bottomPaddingStr.substring(0, bottomPaddingStr.length - 2)) + const topPadding = pxStringToNumber(topPaddingStr) + const bottomPadding = pxStringToNumber(bottomPaddingStr) const vertPadding = topPadding + bottomPadding + const oldHeight = pxStringToNumber(target.style.height) + /* Explanation: * * https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeight @@ -464,8 +471,13 @@ const PostStatusForm = { // BEGIN content size update target.style.height = 'auto' - const heightWithoutPadding = target.scrollHeight - vertPadding - const newHeight = this.maxHeight ? Math.min(heightWithoutPadding, this.maxHeight) : heightWithoutPadding + const heightWithoutPadding = Math.floor(target.scrollHeight - vertPadding) + let newHeight = this.maxHeight ? Math.min(heightWithoutPadding, this.maxHeight) : heightWithoutPadding + // This is a bit of a hack to combat target.scrollHeight being different on every other input + // on some browsers for whatever reason. Don't change the height if difference is 1px or less. + if (Math.abs(newHeight - oldHeight) <= 1) { + newHeight = oldHeight + } target.style.height = `${newHeight}px` this.$emit('resize', newHeight) // END content size update diff --git a/src/components/react_button/react_button.js b/src/components/react_button/react_button.js index f0931446f2..abcf04555c 100644 --- a/src/components/react_button/react_button.js +++ b/src/components/react_button/react_button.js @@ -28,7 +28,10 @@ const ReactButton = { }, emojis () { if (this.filterWord !== '') { - return this.$store.state.instance.emoji.filter(emoji => emoji.displayText.includes(this.filterWord)) + const filterWordLowercase = this.filterWord.toLowerCase() + return this.$store.state.instance.emoji.filter(emoji => + emoji.displayText.toLowerCase().includes(filterWordLowercase) + ) } return this.$store.state.instance.emoji || [] }, diff --git a/src/components/settings_modal/tabs/general_tab.vue b/src/components/settings_modal/tabs/general_tab.vue index f89c0480af..7f06d0bd3a 100644 --- a/src/components/settings_modal/tabs/general_tab.vue +++ b/src/components/settings_modal/tabs/general_tab.vue @@ -53,16 +53,6 @@ -
  • - - {{ $t('settings.autoload') }} - -
  • -
  • - - {{ $t('settings.reply_link_preview') }} - -
  • {{ $t('settings.emoji_reactions_on_timeline') }} diff --git a/src/components/settings_modal/tabs/notifications_tab.vue b/src/components/settings_modal/tabs/notifications_tab.vue index b7a3cb370d..86eed3f5df 100644 --- a/src/components/settings_modal/tabs/notifications_tab.vue +++ b/src/components/settings_modal/tabs/notifications_tab.vue @@ -2,38 +2,18 @@

    {{ $t('settings.notification_setting_filters') }}

    -
    - {{ $t('settings.notification_setting') }} -
      -
    • - - {{ $t('settings.notification_setting_follows') }} - -
    • -
    • - - {{ $t('settings.notification_setting_followers') }} - -
    • -
    • - - {{ $t('settings.notification_setting_non_follows') }} - -
    • -
    • - - {{ $t('settings.notification_setting_non_followers') }} - -
    • -
    -
    +

    + + {{ $t('settings.notification_setting_block_from_strangers') }} + +

    {{ $t('settings.notification_setting_privacy') }}

    - - {{ $t('settings.notification_setting_privacy_option') }} + + {{ $t('settings.notification_setting_hide_notification_contents') }}

    diff --git a/src/components/timeline/timeline.js b/src/components/timeline/timeline.js index bac73022c7..a829bd02c9 100644 --- a/src/components/timeline/timeline.js +++ b/src/components/timeline/timeline.js @@ -148,7 +148,6 @@ const Timeline = { const bodyBRect = document.body.getBoundingClientRect() const height = Math.max(bodyBRect.height, -(bodyBRect.y)) if (this.timeline.loading === false && - this.$store.getters.mergedConfig.autoLoad && this.$el.offsetHeight > 0 && (window.innerHeight + window.pageYOffset) >= (height - 750)) { this.fetchOlderStatuses() diff --git a/src/i18n/ar.json b/src/i18n/ar.json index 8bba2b97e9..a475d29107 100644 --- a/src/i18n/ar.json +++ b/src/i18n/ar.json @@ -73,7 +73,6 @@ "settings": { "attachmentRadius": "المُرفَقات", "attachments": "المُرفَقات", - "autoload": "", "avatar": "الصورة الرمزية", "avatarAltRadius": "الصور الرمزية (الإشعارات)", "avatarRadius": "الصور الرمزية", @@ -147,7 +146,6 @@ "profile_tab": "الملف الشخصي", "radii_help": "", "replies_in_timeline": "الردود على الخيط الزمني", - "reply_link_preview": "", "reply_visibility_all": "عرض كافة الردود", "reply_visibility_following": "", "reply_visibility_self": "", diff --git a/src/i18n/ca.json b/src/i18n/ca.json index 42d7745cc5..c91fc073bd 100644 --- a/src/i18n/ca.json +++ b/src/i18n/ca.json @@ -73,7 +73,6 @@ "settings": { "attachmentRadius": "Adjunts", "attachments": "Adjunts", - "autoload": "Recarrega automàticament en arribar a sota de tot.", "avatar": "Avatar", "avatarAltRadius": "Avatars en les notificacions", "avatarRadius": "Avatars", @@ -145,7 +144,6 @@ "profile_tab": "Perfil", "radii_help": "Configura l'arrodoniment de les vores (en píxels)", "replies_in_timeline": "Replies in timeline", - "reply_link_preview": "Mostra el missatge citat en passar el ratolí per sobre de l'enllaç de resposta", "reply_visibility_all": "Mostra totes les respostes", "reply_visibility_following": "Mostra només les respostes a entrades meves o d'usuàries que jo segueixo", "reply_visibility_self": "Mostra només les respostes a entrades meves", diff --git a/src/i18n/cs.json b/src/i18n/cs.json index 42e7556754..4e8cbcda09 100644 --- a/src/i18n/cs.json +++ b/src/i18n/cs.json @@ -112,7 +112,6 @@ "app_name": "Název aplikace", "attachmentRadius": "Přílohy", "attachments": "Přílohy", - "autoload": "Povolit automatické načítání při rolování dolů", "avatar": "Avatar", "avatarAltRadius": "Avatary (oznámení)", "avatarRadius": "Avatary", @@ -206,7 +205,6 @@ "profile_tab": "Profil", "radii_help": "Nastavit zakulacení rohů rozhraní (v pixelech)", "replies_in_timeline": "Odpovědi v časové ose", - "reply_link_preview": "Povolit náhledy odkazu pro odpověď při přejetí myši", "reply_visibility_all": "Zobrazit všechny odpovědi", "reply_visibility_following": "Zobrazit pouze odpovědi směřované na mě nebo uživatele, které sleduji", "reply_visibility_self": "Zobrazit pouze odpovědi směřované na mě", diff --git a/src/i18n/de.json b/src/i18n/de.json index a44e58cb65..6179147e5c 100644 --- a/src/i18n/de.json +++ b/src/i18n/de.json @@ -131,7 +131,6 @@ "settings": { "attachmentRadius": "Anhänge", "attachments": "Anhänge", - "autoload": "Aktiviere automatisches Laden von älteren Beiträgen beim scrollen", "avatar": "Avatar", "avatarAltRadius": "Avatare (Benachrichtigungen)", "avatarRadius": "Avatare", @@ -225,7 +224,6 @@ "profile_tab": "Profil", "radii_help": "Kantenrundung (in Pixel) der Oberfläche anpassen", "replies_in_timeline": "Antworten in der Zeitleiste", - "reply_link_preview": "Antwortlink-Vorschau beim Überfahren mit der Maus aktivieren", "reply_visibility_all": "Alle Antworten zeigen", "reply_visibility_following": "Zeige nur Antworten an mich oder an Benutzer, denen ich folge", "reply_visibility_self": "Nur Antworten an mich anzeigen", @@ -401,8 +399,6 @@ "changed_email": "Email Adresse erfolgreich geändert!", "change_email_error": "Es trat ein Problem auf beim Versuch, deine Email Adresse zu ändern.", "change_email": "Ändere Email", - "notification_setting_non_followers": "Nutzer, die dir nicht folgen", - "notification_setting_followers": "Nutzer, die dir folgen", "import_blocks_from_a_csv_file": "Importiere Blocks von einer CSV Datei", "accent": "Akzent" }, diff --git a/src/i18n/en.json b/src/i18n/en.json index cbd1e49b32..7ba3972bc4 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -265,7 +265,6 @@ "allow_following_move": "Allow auto-follow when following account moves", "attachmentRadius": "Attachments", "attachments": "Attachments", - "autoload": "Enable automatic loading when scrolled to the bottom", "avatar": "Avatar", "avatarAltRadius": "Avatars (Notifications)", "avatarRadius": "Avatars", @@ -385,7 +384,6 @@ "profile_tab": "Profile", "radii_help": "Set up interface edge rounding (in pixels)", "replies_in_timeline": "Replies in timeline", - "reply_link_preview": "Enable reply-link preview on mouse hover", "reply_visibility_all": "Show all replies", "reply_visibility_following": "Only show replies directed at me or users I'm following", "reply_visibility_self": "Only show replies directed at me", @@ -435,13 +433,9 @@ "greentext": "Meme arrows", "notifications": "Notifications", "notification_setting_filters": "Filters", - "notification_setting": "Receive notifications from:", - "notification_setting_follows": "Users you follow", - "notification_setting_non_follows": "Users you do not follow", - "notification_setting_followers": "Users who follow you", - "notification_setting_non_followers": "Users who do not follow you", + "notification_setting_block_from_strangers": "Block notifications from users who you do not follow", "notification_setting_privacy": "Privacy", - "notification_setting_privacy_option": "Hide the sender and contents of push notifications", + "notification_setting_hide_notification_contents": "Hide the sender and contents of push notifications", "notification_mutes": "To stop receiving notifications from a specific user, use a mute.", "notification_blocks": "Blocking a user stops all notifications as well as unsubscribes them.", "enable_web_push_notifications": "Enable web push notifications", diff --git a/src/i18n/eo.json b/src/i18n/eo.json index 6c5b3a745e..fb11587273 100644 --- a/src/i18n/eo.json +++ b/src/i18n/eo.json @@ -109,7 +109,6 @@ "app_name": "Nomo de aplikaĵo", "attachmentRadius": "Kunsendaĵoj", "attachments": "Kunsendaĵoj", - "autoload": "Ŝalti memfaran enlegadon ĉe subo de paĝo", "avatar": "Profilbildo", "avatarAltRadius": "Profilbildoj (sciigoj)", "avatarRadius": "Profilbildoj", @@ -203,7 +202,6 @@ "profile_tab": "Profilo", "radii_help": "Agordi fasadan rondigon de randoj (bildere)", "replies_in_timeline": "Respondoj en tempolinio", - "reply_link_preview": "Ŝalti respond-ligilan antaŭvidon dum musa ŝvebo", "reply_visibility_all": "Montri ĉiujn respondojn", "reply_visibility_following": "Montri nur respondojn por mi aŭ miaj abonatoj", "reply_visibility_self": "Montri nur respondojn por mi", diff --git a/src/i18n/es.json b/src/i18n/es.json index 931d4c6486..3f313eb329 100644 --- a/src/i18n/es.json +++ b/src/i18n/es.json @@ -203,7 +203,6 @@ }, "attachmentRadius": "Adjuntos", "attachments": "Adjuntos", - "autoload": "Habilitar carga automática al llegar al final de la página", "avatar": "Avatar", "avatarAltRadius": "Avatares (Notificaciones)", "avatarRadius": "Avatares", @@ -307,7 +306,6 @@ "profile_tab": "Perfil", "radii_help": "Establezca el redondeo de las esquinas de la interfaz (en píxeles)", "replies_in_timeline": "Réplicas en la línea temporal", - "reply_link_preview": "Activar la previsualización del enlace de responder al pasar el ratón por encima", "reply_visibility_all": "Mostrar todas las réplicas", "reply_visibility_following": "Solo mostrar réplicas para mí o usuarios a los que sigo", "reply_visibility_self": "Solo mostrar réplicas para mí", @@ -344,11 +342,6 @@ "true": "sí" }, "notifications": "Notificaciones", - "notification_setting": "Recibir notificaciones de:", - "notification_setting_follows": "Usuarios que sigues", - "notification_setting_non_follows": "Usuarios que no sigues", - "notification_setting_followers": "Usuarios que te siguen", - "notification_setting_non_followers": "Usuarios que no te siguen", "notification_mutes": "Para dejar de recibir notificaciones de un usuario específico, siléncialo.", "notification_blocks": "El bloqueo de un usuario detiene todas las notificaciones y también las cancela.", "enable_web_push_notifications": "Habilitar las notificiaciones en el navegador", diff --git a/src/i18n/et.json b/src/i18n/et.json index b5ae4275ef..97e835da3a 100644 --- a/src/i18n/et.json +++ b/src/i18n/et.json @@ -116,7 +116,6 @@ }, "settings": { "attachments": "Manused", - "autoload": "Luba ajajoone automaatne uuendamine kui ajajoon on põhja keritud", "avatar": "Profiilipilt", "bio": "Bio", "current_avatar": "Sinu praegune profiilipilt", @@ -130,7 +129,6 @@ "nsfw_clickthrough": "Peida tööks-mittesobivad(NSFW) manuste hiireklõpsu taha", "profile_background": "Profiilitaust", "profile_banner": "Profiilibänner", - "reply_link_preview": "Luba algpostituse kuvamine vastustes", "set_new_avatar": "Vali uus profiilipilt", "set_new_profile_background": "Vali uus profiilitaust", "set_new_profile_banner": "Vali uus profiilibänner", @@ -304,14 +302,9 @@ "enable_web_push_notifications": "Luba veebipõhised push-teated", "notification_blocks": "Kasutaja blokeerimisel ei tule neilt enam teateid ning nendele teilt ka mitte.", "notification_setting_privacy_option": "Peida saatja ning sisu push-teadetelt", - "notification_setting": "Saa teateid nendelt:", "notifications": "Teated", "notification_mutes": "Kui soovid mõnelt kasutajalt mitte teateid saada, kasuta vaigistust.", "notification_setting_privacy": "Privaatsus", - "notification_setting_non_followers": "Kasutajatelt, kes sind ei jälgi", - "notification_setting_followers": "Kasutajatelt, kes jälgivad sind", - "notification_setting_non_follows": "Kasutajatelt, keda sa ei jälgi", - "notification_setting_follows": "Kasutajatelt, keda jälgid", "notification_setting_filters": "Filtrid", "greentext": "Meemi nooled", "fun": "Naljad", diff --git a/src/i18n/eu.json b/src/i18n/eu.json index 1c75bf7543..295a767fd8 100644 --- a/src/i18n/eu.json +++ b/src/i18n/eu.json @@ -203,7 +203,6 @@ }, "attachmentRadius": "Eranskinak", "attachments": "Eranskinak", - "autoload": "Gaitu karga automatikoa beheraino mugitzean", "avatar": "Avatarra", "avatarAltRadius": "Avatarra (Aipamenak)", "avatarRadius": "Avatarrak", @@ -307,7 +306,6 @@ "profile_tab": "Profila", "radii_help": "Konfiguratu interfazearen ertzen biribiltzea (pixeletan)", "replies_in_timeline": "Denbora-lerroko erantzunak", - "reply_link_preview": "Gaitu erantzun-estekaren aurrebista arratoiarekin", "reply_visibility_all": "Erakutsi erantzun guztiak", "reply_visibility_following": "Erakutsi bakarrik niri zuzendutako edo nik jarraitutako erabiltzaileen erantzunak", "reply_visibility_self": "Erakutsi bakarrik niri zuzendutako erantzunak", @@ -344,11 +342,6 @@ "true": "bai" }, "notifications": "Jakinarazpenak", - "notification_setting": "Jaso pertsona honen jakinarazpenak:", - "notification_setting_follows": "Jarraitutako erabiltzaileak", - "notification_setting_non_follows": "Jarraitzen ez dituzun erabiltzaileak", - "notification_setting_followers": "Zu jarraitzen zaituzten erabiltzaileak", - "notification_setting_non_followers": "Zu jarraitzen ez zaituzten erabiltzaileak", "notification_mutes": "Erabiltzaile jakin baten jakinarazpenak jasotzeari uzteko, isilarazi ezazu.", "notification_blocks": "Erabiltzaile bat blokeatzeak jakinarazpen guztiak gelditzen ditu eta harpidetza ezeztatu.", "enable_web_push_notifications": "Gaitu web jakinarazpenak", @@ -639,4 +632,4 @@ "password_reset_required": "Pasahitza berrezarri behar duzu saioa hasteko.", "password_reset_required_but_mailer_is_disabled": "Pasahitza berrezarri behar duzu, baina pasahitza berrezartzeko aukera desgaituta dago. Mesedez, jarri harremanetan instantziaren administratzailearekin." } -} \ No newline at end of file +} diff --git a/src/i18n/fi.json b/src/i18n/fi.json index 3e63377f3e..6170303f13 100644 --- a/src/i18n/fi.json +++ b/src/i18n/fi.json @@ -163,7 +163,6 @@ "settings": { "attachmentRadius": "Liitteet", "attachments": "Liitteet", - "autoload": "Lataa vanhempia viestejä automaattisesti ruudun pohjalla", "avatar": "Profiilikuva", "avatarAltRadius": "Profiilikuvat (ilmoitukset)", "avatarRadius": "Profiilikuvat", @@ -250,7 +249,6 @@ "profile_tab": "Profiili", "radii_help": "Aseta reunojen pyöristys (pikseleinä)", "replies_in_timeline": "Keskustelut aikajanalla", - "reply_link_preview": "Keskusteluiden vastauslinkkien esikatselu", "reply_visibility_all": "Näytä kaikki vastaukset", "reply_visibility_following": "Näytä vain vastaukset minulle tai seuraamilleni käyttäjille", "reply_visibility_self": "Näytä vain vastaukset minulle", @@ -284,7 +282,6 @@ "show_moderator_badge": "Näytä Moderaattori-merkki profiilissani", "useStreamingApi": "Vastaanota viestiejä ja ilmoituksia reaaliajassa", "notification_setting_filters": "Suodattimet", - "notification_setting": "Vastaanota ilmoituksia seuraavista:", "notification_setting_privacy_option": "Piilota lähettäjä ja sisältö sovelluksen ulkopuolisista ilmoituksista", "enable_web_push_notifications": "Ota käyttöön sovelluksen ulkopuoliset ilmoitukset", "app_name": "Sovelluksen nimi", @@ -490,10 +487,6 @@ "pad_emoji": "Välistä emojit välilyönneillä lisätessäsi niitä valitsimesta", "mutes_tab": "Mykistykset", "new_email": "Uusi sähköpostiosoite", - "notification_setting_follows": "Käyttäjät joita seuraat", - "notification_setting_non_follows": "Käyttäjät joita et seuraa", - "notification_setting_followers": "Käyttäjät jotka seuraavat sinua", - "notification_setting_non_followers": "Käyttäjät jotka eivät seuraa sinua", "notification_setting_privacy": "Yksityisyys", "notification_mutes": "Jos et halua ilmoituksia joltain käyttäjältä, käytä mykistystä.", "notification_blocks": "Estäminen pysäyttää kaikki ilmoitukset käyttäjältä ja poistaa seurauksen.", diff --git a/src/i18n/fr.json b/src/i18n/fr.json index 31b69a0f88..ac653058da 100644 --- a/src/i18n/fr.json +++ b/src/i18n/fr.json @@ -182,7 +182,6 @@ }, "attachmentRadius": "Pièces jointes", "attachments": "Pièces jointes", - "autoload": "Charger la suite automatiquement une fois le bas de la page atteint", "avatar": "Avatar", "avatarAltRadius": "Avatars (Notifications)", "avatarRadius": "Avatars", @@ -282,7 +281,6 @@ "profile_tab": "Profil", "radii_help": "Vous pouvez ici choisir le niveau d'arrondi des angles de l'interface (en pixels)", "replies_in_timeline": "Réponses au journal", - "reply_link_preview": "Afficher un aperçu lors du survol de liens vers une réponse", "reply_visibility_all": "Montrer toutes les réponses", "reply_visibility_following": "Afficher uniquement les réponses adressées à moi ou aux personnes que je suis", "reply_visibility_self": "Afficher uniquement les réponses adressées à moi", @@ -319,11 +317,6 @@ "true": "oui" }, "notifications": "Notifications", - "notification_setting": "Reçevoir les notifications de :", - "notification_setting_follows": "Utilisateurs que vous suivez", - "notification_setting_non_follows": "Utilisateurs que vous ne suivez pas", - "notification_setting_followers": "Utilisateurs qui vous suivent", - "notification_setting_non_followers": "Utilisateurs qui ne vous suivent pas", "notification_mutes": "Pour stopper la récéption de notifications d'un utilisateur particulier, utilisez un masquage.", "notification_blocks": "Bloquer un utilisateur stoppe toute notification et se désabonne de lui.", "enable_web_push_notifications": "Activer les notifications de push web", diff --git a/src/i18n/ga.json b/src/i18n/ga.json index 7a10ba405f..74a48bfcac 100644 --- a/src/i18n/ga.json +++ b/src/i18n/ga.json @@ -73,7 +73,6 @@ "settings": { "attachmentRadius": "Ceangaltáin", "attachments": "Ceangaltáin", - "autoload": "Cumasaigh luchtú uathoibríoch nuair a scrollaítear go bun", "avatar": "Phictúir phrófíle", "avatarAltRadius": "Phictúirí phrófíle (Fograí)", "avatarRadius": "Phictúirí phrófíle", @@ -147,7 +146,6 @@ "profile_tab": "Próifíl", "radii_help": "Cruinniú imeall comhéadan a chumrú (i bpicteilíní)", "replies_in_timeline": "Freagraí sa amlíne", - "reply_link_preview": "Cumasaigh réamhamharc nasc freagartha ar chlár na luiche", "reply_visibility_all": "Taispeáin gach freagra", "reply_visibility_following": "Taispeáin freagraí amháin atá dírithe ar mise nó ar úsáideoirí atá mé ag leanúint", "reply_visibility_self": "Taispeáin freagraí amháin atá dírithe ar mise", diff --git a/src/i18n/he.json b/src/i18n/he.json index 1c034960d6..b1c9da6948 100644 --- a/src/i18n/he.json +++ b/src/i18n/he.json @@ -140,7 +140,6 @@ "app_name": "שם האפליקציה", "attachmentRadius": "צירופים", "attachments": "צירופים", - "autoload": "החל טעינה אוטומטית בגלילה לתחתית הדף", "avatar": "תמונת פרופיל", "avatarAltRadius": "תמונות פרופיל (התראות)", "avatarRadius": "תמונות פרופיל", @@ -240,7 +239,6 @@ "profile_tab": "פרופיל", "radii_help": "קבע מראש עיגול פינות לממשק (בפיקסלים)", "replies_in_timeline": "תגובות בציר הזמן", - "reply_link_preview": "החל תצוגה מקדימה של לינק-תגובה בעת ריחוף עם העכבר", "reply_visibility_all": "הראה את כל התגובות", "reply_visibility_following": "הראה תגובות שמופנות אליי או לעקובים שלי בלבד", "reply_visibility_self": "הראה תגובות שמופנות אליי בלבד", diff --git a/src/i18n/hu.json b/src/i18n/hu.json index e98fdc44a6..4135580037 100644 --- a/src/i18n/hu.json +++ b/src/i18n/hu.json @@ -38,7 +38,6 @@ }, "settings": { "attachments": "Csatolmányok", - "autoload": "Autoatikus betöltés engedélyezése lap aljára görgetéskor", "avatar": "Avatár", "bio": "Bio", "current_avatar": "Jelenlegi avatár", @@ -52,7 +51,6 @@ "nsfw_clickthrough": "NSFW átkattintási tartalom elrejtésének engedélyezése", "profile_background": "Profil háttérkép", "profile_banner": "Profil Banner", - "reply_link_preview": "Válasz-link előzetes mutatása egér rátételkor", "set_new_avatar": "Új avatár", "set_new_profile_background": "Új profil háttér beállítása", "set_new_profile_banner": "Új profil banner", diff --git a/src/i18n/it.json b/src/i18n/it.json index 24520c0909..b933378108 100644 --- a/src/i18n/it.json +++ b/src/i18n/it.json @@ -53,7 +53,6 @@ }, "settings": { "attachments": "Allegati", - "autoload": "Abilita caricamento automatico quando raggiungi il fondo pagina", "avatar": "Icona utente", "bio": "Introduzione", "current_avatar": "La tua icona attuale", @@ -67,7 +66,6 @@ "nsfw_clickthrough": "Fai click per visualizzare gli allegati offuscati", "profile_background": "Sfondo della tua pagina", "profile_banner": "Stendardo del tuo profilo", - "reply_link_preview": "Visualizza le risposte al passaggio del cursore", "set_new_avatar": "Scegli una nuova icona", "set_new_profile_background": "Scegli un nuovo sfondo per la tua pagina", "set_new_profile_banner": "Scegli un nuovo stendardo per il tuo profilo", @@ -338,11 +336,6 @@ "notification_mutes": "Per non ricevere notifiche da uno specifico utente, zittiscilo.", "notification_setting_privacy_option": "Nascondi mittente e contenuti delle notifiche push", "notification_setting_privacy": "Privacy", - "notification_setting_followers": "Utenti che ti seguono", - "notification_setting_non_followers": "Utenti che non ti seguono", - "notification_setting_non_follows": "Utenti che non segui", - "notification_setting_follows": "Utenti che segui", - "notification_setting": "Ricevi notifiche da:", "notification_setting_filters": "Filtri", "notifications": "Notifiche", "greentext": "Frecce da meme", diff --git a/src/i18n/ja_easy.json b/src/i18n/ja_easy.json index 978e43b30c..1a1a1a9dcd 100644 --- a/src/i18n/ja_easy.json +++ b/src/i18n/ja_easy.json @@ -234,7 +234,6 @@ }, "attachmentRadius": "ファイル", "attachments": "ファイル", - "autoload": "したにスクロールしたとき、じどうてきによみこむ。", "avatar": "アバター", "avatarAltRadius": "つうちのアバター", "avatarRadius": "アバター", @@ -343,7 +342,6 @@ "profile_tab": "プロフィール", "radii_help": "インターフェースのまるさをせっていする。", "replies_in_timeline": "タイムラインのリプライ", - "reply_link_preview": "カーソルをかさねたとき、リプライのプレビューをみる", "reply_visibility_all": "すべてのリプライをみる", "reply_visibility_following": "わたしにあてられたリプライと、フォローしているひとからのリプライをみる", "reply_visibility_self": "わたしにあてられたリプライをみる", @@ -382,11 +380,6 @@ "fun": "おたのしみ", "greentext": "ミームやじるし", "notifications": "つうち", - "notification_setting": "つうちをうけとる:", - "notification_setting_follows": "あなたがフォローしているひとから", - "notification_setting_non_follows": "あなたがフォローしていないひとから", - "notification_setting_followers": "あなたをフォローしているひとから", - "notification_setting_non_followers": "あなたをフォローしていないひとから", "notification_mutes": "あるユーザーからのつうちをとめるには、ミュートしてください。", "notification_blocks": "ブロックしているユーザーからのつうちは、すべてとまります。", "enable_web_push_notifications": "ウェブプッシュつうちをゆるす", diff --git a/src/i18n/ja_pedantic.json b/src/i18n/ja_pedantic.json index 2ca7dca81d..07fea45d51 100644 --- a/src/i18n/ja_pedantic.json +++ b/src/i18n/ja_pedantic.json @@ -203,7 +203,6 @@ }, "attachmentRadius": "ファイル", "attachments": "ファイル", - "autoload": "下にスクロールしたとき、自動的に読み込む。", "avatar": "アバター", "avatarAltRadius": "通知のアバター", "avatarRadius": "アバター", @@ -308,7 +307,6 @@ "profile_tab": "プロフィール", "radii_help": "インターフェースの丸さを設定する。", "replies_in_timeline": "タイムラインのリプライ", - "reply_link_preview": "カーソルを重ねたとき、リプライのプレビューを見る", "reply_visibility_all": "すべてのリプライを見る", "reply_visibility_following": "私に宛てられたリプライと、フォローしている人からのリプライを見る", "reply_visibility_self": "私に宛てられたリプライを見る", @@ -345,11 +343,6 @@ "true": "はい" }, "notifications": "通知", - "notification_setting": "通知を受け取る:", - "notification_setting_follows": "あなたがフォローしているユーザーから", - "notification_setting_non_follows": "あなたがフォローしていないユーザーから", - "notification_setting_followers": "あなたをフォローしているユーザーから", - "notification_setting_non_followers": "あなたをフォローしていないユーザーから", "notification_mutes": "特定のユーザーからの通知を止めるには、ミュートしてください。", "notification_blocks": "ブロックしているユーザーからの通知は、すべて止まります。", "enable_web_push_notifications": "ウェブプッシュ通知を許可する", diff --git a/src/i18n/ko.json b/src/i18n/ko.json index 402a354c9a..0968949b39 100644 --- a/src/i18n/ko.json +++ b/src/i18n/ko.json @@ -90,7 +90,6 @@ "settings": { "attachmentRadius": "첨부물", "attachments": "첨부물", - "autoload": "최하단에 도착하면 자동으로 로드 활성화", "avatar": "아바타", "avatarAltRadius": "아바타 (알림)", "avatarRadius": "아바타", @@ -172,7 +171,6 @@ "profile_tab": "프로필", "radii_help": "인터페이스 모서리 둥글기 (픽셀 단위)", "replies_in_timeline": "답글을 타임라인에", - "reply_link_preview": "마우스를 올려서 답글 링크 미리보기 활성화", "reply_visibility_all": "모든 답글 보기", "reply_visibility_following": "나에게 직접 오는 답글이나 내가 팔로우 중인 사람에게서 오는 답글만 표시", "reply_visibility_self": "나에게 직접 전송 된 답글만 보이기", diff --git a/src/i18n/nb.json b/src/i18n/nb.json index 248b05bca2..b9669a351f 100644 --- a/src/i18n/nb.json +++ b/src/i18n/nb.json @@ -193,7 +193,6 @@ }, "attachmentRadius": "Vedlegg", "attachments": "Vedlegg", - "autoload": "Automatisk lasting når du blar ned til bunnen", "avatar": "Profilbilde", "avatarAltRadius": "Profilbilde (Varslinger)", "avatarRadius": "Profilbilde", @@ -293,7 +292,6 @@ "profile_tab": "Profil", "radii_help": "Bestem hvor runde hjørnene i brukergrensesnittet skal være (i piksler)", "replies_in_timeline": "Svar på tidslinje", - "reply_link_preview": "Vis en forhåndsvisning når du holder musen over svar til en status", "reply_visibility_all": "Vis alle svar", "reply_visibility_following": "Vis bare svar som er til meg eller folk jeg følger", "reply_visibility_self": "Vis bare svar som er til meg", @@ -330,11 +328,6 @@ "true": "ja" }, "notifications": "Varsler", - "notification_setting": "Motta varsler i fra:", - "notification_setting_follows": "Brukere du følger", - "notification_setting_non_follows": "Brukere du ikke følger", - "notification_setting_followers": "Brukere som følger deg", - "notification_setting_non_followers": "Brukere som ikke følger deg", "notification_mutes": "For å stoppe å motta varsler i fra en spesifikk bruker, kan du dempe dem.", "notification_blocks": "Hvis du blokkerer en bruker vil det stoppe alle varsler og i tilleg få dem til å slutte å følge deg", "enable_web_push_notifications": "Skru på pushnotifikasjoner i nettlesere", diff --git a/src/i18n/nl.json b/src/i18n/nl.json index bf270f87d8..e7509f12fb 100644 --- a/src/i18n/nl.json +++ b/src/i18n/nl.json @@ -136,7 +136,6 @@ "settings": { "attachmentRadius": "Bijlages", "attachments": "Bijlages", - "autoload": "Automatisch laden inschakelen wanneer tot de bodem gescrold wordt", "avatar": "Avatar", "avatarAltRadius": "Avatars (Meldingen)", "avatarRadius": "Avatars", @@ -217,7 +216,6 @@ "profile_tab": "Profiel", "radii_help": "Stel afronding van hoeken in de interface in (in pixels)", "replies_in_timeline": "Antwoorden in tijdlijn", - "reply_link_preview": "Antwoord-link weergave inschakelen bij aanwijzen met muisaanwijzer", "reply_visibility_all": "Alle antwoorden tonen", "reply_visibility_following": "Enkel antwoorden tonen die aan mij of gevolgde gebruikers gericht zijn", "reply_visibility_self": "Enkel antwoorden tonen die aan mij gericht zijn", @@ -390,9 +388,6 @@ "link": "een leuke kleine link" } }, - "notification_setting_follows": "Gebruikers die je volgt", - "notification_setting_non_follows": "Gebruikers die je niet volgt", - "notification_setting_followers": "Gebruikers die je volgen", "notification_setting_privacy": "Privacy", "notification_setting_privacy_option": "Verberg de afzender en inhoud van push meldingen", "notification_mutes": "Om niet langer meldingen te ontvangen van een specifieke gebruiker, kun je deze negeren.", @@ -460,7 +455,6 @@ "upload_a_photo": "Upload een foto", "fun": "Plezier", "greentext": "Meme pijlen", - "notification_setting": "Ontvang meldingen van:", "block_export_button": "Exporteer je geblokkeerde gebruikers naar een csv bestand", "block_import_error": "Fout bij importeren blokkades", "discoverable": "Sta toe dat dit account ontdekt kan worden in zoekresultaten en andere diensten", @@ -469,7 +463,6 @@ "hide_follows_description": "Niet tonen wie ik volg", "show_moderator_badge": "Moderators badge tonen in mijn profiel", "notification_setting_filters": "Filters", - "notification_setting_non_followers": "Gebruikers die je niet volgen", "notification_blocks": "Door een gebruiker te blokkeren, ontvang je geen meldingen meer van de gebruiker en wordt je abonnement op de gebruiker opgeheven.", "version": { "frontend_version": "Frontend Versie", diff --git a/src/i18n/oc.json b/src/i18n/oc.json index 680ad6dd02..24001d4aae 100644 --- a/src/i18n/oc.json +++ b/src/i18n/oc.json @@ -152,7 +152,6 @@ "app_name": "Nom de l’aplicacion", "attachmentRadius": "Pèças juntas", "attachments": "Pèças juntas", - "autoload": "Activar lo cargament automatic un còp arribat al cap de la pagina", "avatar": "Avatar", "avatarAltRadius": "Avatars (Notificacions)", "avatarRadius": "Avatars", @@ -252,7 +251,6 @@ "profile_tab": "Perfil", "radii_help": "Configurar los caires arredondits de l’interfàcia (en pixèls)", "replies_in_timeline": "Responsas del flux", - "reply_link_preview": "Activar l’apercebut en passar la mirga", "reply_visibility_all": "Mostrar totas las responsas", "reply_visibility_following": "Mostrar pas que las responsas que me son destinada a ieu o un utilizaire que seguissi", "reply_visibility_self": "Mostrar pas que las responsas que me son destinadas", @@ -288,11 +286,6 @@ "true": "òc" }, "notifications": "Notificacions", - "notification_setting": "Recebre las notificacions de :", - "notification_setting_follows": "Utilizaires que seguissètz", - "notification_setting_non_follows": "Utilizaires que seguissètz pas", - "notification_setting_followers": "Utilizaires que vos seguisson", - "notification_setting_non_followers": "Utilizaires que vos seguisson pas", "notification_mutes": "Per recebre pas mai d’un utilizaire en particular, botatz-lo en silenci.", "notification_blocks": "Blocar un utilizaire arrèsta totas las notificacions tan coma quitar de los seguir.", "enable_web_push_notifications": "Activar las notificacions web push", @@ -550,4 +543,4 @@ "people_talking": "{count} personas ne parlan", "no_results": "Cap de resultats" } -} \ No newline at end of file +} diff --git a/src/i18n/pl.json b/src/i18n/pl.json index 61e0931873..930f355569 100644 --- a/src/i18n/pl.json +++ b/src/i18n/pl.json @@ -249,7 +249,6 @@ "allow_following_move": "Zezwalaj na automatyczną obserwację gdy obserwowane konto migruje", "attachmentRadius": "Załączniki", "attachments": "Załączniki", - "autoload": "Włącz automatyczne ładowanie po przewinięciu do końca strony", "avatar": "Awatar", "avatarAltRadius": "Awatary (powiadomienia)", "avatarRadius": "Awatary", @@ -362,7 +361,6 @@ "profile_tab": "Profil", "radii_help": "Ustaw zaokrąglenie krawędzi interfejsu (w pikselach)", "replies_in_timeline": "Odpowiedzi na osi czasu", - "reply_link_preview": "Włącz dymek z podglądem postu po najechaniu na znak odpowiedzi", "reply_visibility_all": "Pokazuj wszystkie odpowiedzi", "reply_visibility_following": "Pokazuj tylko odpowiedzi skierowane do mnie i osób które obserwuję", "reply_visibility_self": "Pokazuj tylko odpowiedzi skierowane do mnie", @@ -405,11 +403,6 @@ "fun": "Zabawa", "greentext": "Memiczne strzałki", "notifications": "Powiadomienia", - "notification_setting": "Otrzymuj powiadomienia od:", - "notification_setting_follows": "Ludzi których obserwujesz", - "notification_setting_non_follows": "Ludzi których nie obserwujesz", - "notification_setting_followers": "Ludzi którzy obserwują ciebie", - "notification_setting_non_followers": "Ludzi którzy nie obserwują ciebie", "notification_mutes": "By przestać otrzymywać powiadomienia od jednego użytkownika, wycisz go.", "notification_blocks": "Blokowanie uzytkownika zatrzymuje wszystkie powiadomienia i odsubskrybowuje go.", "enable_web_push_notifications": "Włącz powiadomienia push", diff --git a/src/i18n/pt.json b/src/i18n/pt.json index 41a3448380..1b8694d989 100644 --- a/src/i18n/pt.json +++ b/src/i18n/pt.json @@ -109,7 +109,6 @@ "app_name": "Nome do aplicativo", "attachmentRadius": "Anexos", "attachments": "Anexos", - "autoload": "Habilitar carregamento automático quando a rolagem chegar ao fim.", "avatar": "Avatar", "avatarAltRadius": "Avatares (Notificações)", "avatarRadius": "Avatares", @@ -203,7 +202,6 @@ "profile_tab": "Perfil", "radii_help": "Arredondar arestas da interface (em pixel)", "replies_in_timeline": "Respostas na linha do tempo", - "reply_link_preview": "Habilitar a pré-visualização de de respostas ao passar o mouse.", "reply_visibility_all": "Mostrar todas as respostas", "reply_visibility_following": "Só mostrar respostas direcionadas a mim ou a usuários que sigo", "reply_visibility_self": "Só mostrar respostas direcionadas a mim", diff --git a/src/i18n/ro.json b/src/i18n/ro.json index 3cee264fb5..d800a8d432 100644 --- a/src/i18n/ro.json +++ b/src/i18n/ro.json @@ -38,7 +38,6 @@ }, "settings": { "attachments": "Atașamente", - "autoload": "Permite încărcarea automată când scrolat la capăt", "avatar": "Avatar", "bio": "Bio", "current_avatar": "Avatarul curent", @@ -52,7 +51,6 @@ "nsfw_clickthrough": "Permite ascunderea al atașamentelor NSFW", "profile_background": "Fundalul de profil", "profile_banner": "Banner de profil", - "reply_link_preview": "Permite previzualizarea linkului de răspuns la planarea de mouse", "set_new_avatar": "Setează avatar nou", "set_new_profile_background": "Setează fundal nou", "set_new_profile_banner": "Setează banner nou la profil", diff --git a/src/i18n/ru.json b/src/i18n/ru.json index 08f05d18ee..df17293543 100644 --- a/src/i18n/ru.json +++ b/src/i18n/ru.json @@ -124,7 +124,6 @@ }, "attachmentRadius": "Прикреплённые файлы", "attachments": "Вложения", - "autoload": "Включить автоматическую загрузку при прокрутке вниз", "avatar": "Аватар", "avatarAltRadius": "Аватары в уведомлениях", "avatarRadius": "Аватары", @@ -211,7 +210,6 @@ "profile_tab": "Профиль", "radii_help": "Скругление углов элементов интерфейса (в пикселях)", "replies_in_timeline": "Ответы в ленте", - "reply_link_preview": "Включить предварительный просмотр ответа при наведении мыши", "reply_visibility_all": "Показывать все ответы", "reply_visibility_following": "Показывать только ответы мне или тех на кого я подписан", "reply_visibility_self": "Показывать только ответы мне", @@ -350,12 +348,8 @@ "link": "ссылка" } }, - "notification_setting_non_followers": "Не читающие вас", "allow_following_move": "Разрешить автоматически читать новый аккаунт при перемещении на другой сервер", - "hide_user_stats": "Не показывать статистику пользователей (например количество читателей)", - "notification_setting_followers": "Читающие вас", - "notification_setting_follows": "Читаемые вами", - "notification_setting_non_follows": "Не читаемые вами" + "hide_user_stats": "Не показывать статистику пользователей (например количество читателей)" }, "timeline": { "collapse": "Свернуть", diff --git a/src/i18n/te.json b/src/i18n/te.json index 6022349d38..bb68d29e47 100644 --- a/src/i18n/te.json +++ b/src/i18n/te.json @@ -83,7 +83,6 @@ "settings.app_name": "అనువర్తన పేరు", "settings.attachmentRadius": "జోడింపులు", "settings.attachments": "జోడింపులు", - "settings.autoload": "క్రిందికి స్క్రోల్ చేయబడినప్పుడు స్వయంచాలక లోడింగ్ని ప్రారంభించు", "settings.avatar": "అవతారం", "settings.avatarAltRadius": "అవతారాలు (ప్రకటనలు)", "settings.avatarRadius": "అవతారాలు", @@ -178,7 +177,6 @@ "settings.profile_tab": "Profile", "settings.radii_help": "Set up interface edge rounding (in pixels)", "settings.replies_in_timeline": "Replies in timeline", - "settings.reply_link_preview": "Enable reply-link preview on mouse hover", "settings.reply_visibility_all": "Show all replies", "settings.reply_visibility_following": "Only show replies directed at me or users I'm following", "settings.reply_visibility_self": "Only show replies directed at me", diff --git a/src/i18n/zh.json b/src/i18n/zh.json index 7e620bdf7e..24b799df50 100644 --- a/src/i18n/zh.json +++ b/src/i18n/zh.json @@ -199,7 +199,6 @@ }, "attachmentRadius": "附件", "attachments": "附件", - "autoload": "启用滚动到底部时的自动加载", "avatar": "头像", "avatarAltRadius": "头像(通知)", "avatarRadius": "头像", @@ -299,7 +298,6 @@ "profile_tab": "个人资料", "radii_help": "设置界面边缘的圆角 (单位:像素)", "replies_in_timeline": "时间线中的回复", - "reply_link_preview": "启用鼠标悬停时预览回复链接", "reply_visibility_all": "显示所有回复", "reply_visibility_following": "只显示发送给我的回复/发送给我关注的用户的回复", "reply_visibility_self": "只显示发送给我的回复", @@ -336,11 +334,6 @@ "true": "是" }, "notifications": "通知", - "notification_setting": "通知来源:", - "notification_setting_follows": "你所关注的用户", - "notification_setting_non_follows": "你没有关注的用户", - "notification_setting_followers": "关注你的用户", - "notification_setting_non_followers": "没有关注你的用户", "notification_mutes": "要停止收到某个指定的用户的通知,请使用隐藏功能。", "notification_blocks": "拉黑一个用户会停掉所有他的通知,等同于取消关注。", "enable_web_push_notifications": "启用 web 推送通知", diff --git a/src/modules/config.js b/src/modules/config.js index 17047ff69c..b5aff75e81 100644 --- a/src/modules/config.js +++ b/src/modules/config.js @@ -31,9 +31,7 @@ export const defaultState = { preloadImage: true, loopVideo: true, loopVideoSilentOnly: true, - autoLoad: true, streaming: false, - hoverPreview: true, emojiReactionsOnTimeline: true, autohideFloatingPostButton: false, pauseOnUnfocused: true, diff --git a/src/services/theme_data/pleromafe.js b/src/services/theme_data/pleromafe.js index b58ca9be3b..7ed8579757 100644 --- a/src/services/theme_data/pleromafe.js +++ b/src/services/theme_data/pleromafe.js @@ -675,23 +675,22 @@ export const SLOT_INHERITANCE = { depends: ['bg'] }, - chatMessage: { - depends: ['chatBg'] - }, - chatMessageIncomingBg: { - depends: ['chatMessage'], - layer: 'chatMessage' + depends: ['chatBg'] }, chatMessageIncomingText: { depends: ['text'], - layer: 'text' + layer: 'chatMessage', + variant: 'chatMessageIncomingBg', + textColor: true }, chatMessageIncomingLink: { depends: ['link'], - layer: 'link' + layer: 'chatMessage', + variant: 'chatMessageIncomingBg', + textColor: 'preserve' }, chatMessageIncomingBorder: { @@ -701,22 +700,27 @@ export const SLOT_INHERITANCE = { }, chatMessageOutgoingBg: { - depends: ['chatMessage'], + depends: ['chatMessageIncomingBg'], color: (mod, chatMessage) => brightness(5 * mod, chatMessage).rgb }, chatMessageOutgoingText: { depends: ['text'], - layer: 'text' + layer: 'chatMessage', + variant: 'chatMessageOutgoingBg', + textColor: true }, chatMessageOutgoingLink: { depends: ['link'], - layer: 'link' + layer: 'chatMessage', + variant: 'chatMessageOutgoingBg', + textColor: 'preserve' }, chatMessageOutgoingBorder: { - depends: ['chatMessage'], - opacity: 'chatMessage' + depends: ['chatMessageOutgoingBg'], + opacity: 'border', + color: (mod, border) => brightness(2 * mod, border).rgb } } diff --git a/src/services/theme_data/theme_data.service.js b/src/services/theme_data/theme_data.service.js index dd87e3cffe..b619f8108d 100644 --- a/src/services/theme_data/theme_data.service.js +++ b/src/services/theme_data/theme_data.service.js @@ -128,14 +128,17 @@ export const topoSort = ( while (unprocessed.length > 0) { step(unprocessed.pop()) } - return output.sort((a, b) => { + + // The index thing is to make sorting stable on browsers + // where Array.sort() isn't stable + return output.map((data, index) => ({ data, index })).sort(({ data: a, index: ai }, { data: b, index: bi }) => { const depsA = getDeps(a, inheritance).length const depsB = getDeps(b, inheritance).length - if (depsA === depsB || (depsB !== 0 && depsA !== 0)) return 0 + if (depsA === depsB || (depsB !== 0 && depsA !== 0)) return ai - bi if (depsA === 0 && depsB !== 0) return -1 if (depsB === 0 && depsA !== 0) return 1 - }) + }).map(({ data }) => data) } const expandSlotValue = (value) => {