Compare commits

...

72 Commits

Author SHA1 Message Date
qbism 5eeb7066f2 Merge pull request 'develop' (#12) from AkkomaGang/akkoma-fe:develop into develop
Reviewed-on: #12
2023-08-05 03:02:36 +00:00
FloatingGhost 3b4208ea41 debounce emoji searching 2023-08-04 16:48:13 +01:00
floatingghost 856324fa26 Merge pull request 'Make favicon next to post username use Still-Image functionality' (#327) from Mergan/pleroma-fe:still-image-instance-favicon into develop
Reviewed-on: AkkomaGang/akkoma-fe#327
2023-08-04 15:09:56 +00:00
floatingghost 5a9322d2c7 Merge pull request 'StillImage: Improved animated image detection' (#335) from yukijoou/akkoma-fe:still-image-better-gif-detection into develop
Reviewed-on: AkkomaGang/akkoma-fe#335
2023-08-04 15:09:32 +00:00
Weblate b52bfbcba0 Merge branch 'origin/develop' into Weblate. 2023-08-04 14:56:22 +00:00
floatingghost 2b05a738c9 Merge pull request 'Add replying info for redraft' (#332) from xarvos/pleroma-fe:fix-reply-redraft into develop
Reviewed-on: AkkomaGang/akkoma-fe#332
2023-08-04 14:56:20 +00:00
Weblate fa5d31b793 Merge branch 'origin/develop' into Weblate. 2023-08-04 14:54:38 +00:00
tusooa 29cfdcbbcd Add load more to blocks/mutes 2023-08-04 15:54:04 +01:00
Weblate 5174b95918 Translated using Weblate (Greek)
Currently translated at 15.4% (162 of 1046 strings)

Added translation using Weblate (Greek)

Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: getimiskon <getimiskon@disroot.org>
Translate-URL: http://translate.akkoma.dev/projects/akkoma/pleroma-fe/el/
Translation: Pleroma fe/pleroma-fe
2023-08-04 13:34:26 +00:00
Weblate 56528206b8 Translated using Weblate (Portuguese)
Currently translated at 62.7% (656 of 1046 strings)

Co-authored-by: Jonathan Soares <jontix@murena.io>
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.akkoma.dev/projects/akkoma/pleroma-fe/pt/
Translation: Pleroma fe/pleroma-fe
2023-08-04 13:34:26 +00:00
Weblate 590380c084 Translated using Weblate (Thai)
Currently translated at 1.7% (18 of 1046 strings)

Added translation using Weblate (Thai)

Co-authored-by: Chanakan Mungtin <chanakan5591@chanakancloud.net>
Co-authored-by: Pongsatorn Paewsoongnern <akkoma@miraiverse.me>
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.akkoma.dev/projects/akkoma/pleroma-fe/th/
Translation: Pleroma fe/pleroma-fe
2023-08-04 13:34:26 +00:00
Weblate dfcbb3c1ec Translated using Weblate (Ukrainian)
Currently translated at 100.0% (1046 of 1046 strings)

Co-authored-by: Denys Nykula <vegan@libre.net.ua>
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.akkoma.dev/projects/akkoma/pleroma-fe/uk/
Translation: Pleroma fe/pleroma-fe
2023-08-04 13:34:26 +00:00
Weblate 9b01c31283 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (1046 of 1046 strings)

Co-authored-by: Poesty Li <poesty7450@gmail.com>
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.akkoma.dev/projects/akkoma/pleroma-fe/zh_Hans/
Translation: Pleroma fe/pleroma-fe
2023-08-04 13:34:26 +00:00
Weblate 6be003b2f8 Translated using Weblate (French)
Currently translated at 98.3% (1029 of 1046 strings)

Co-authored-by: Thomate <thomas@burdick.fr>
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.akkoma.dev/projects/akkoma/pleroma-fe/fr/
Translation: Pleroma fe/pleroma-fe
2023-08-04 13:34:26 +00:00
Weblate cc302fb0e2 Translated using Weblate (Japanese (ja_EASY))
Currently translated at 72.3% (757 of 1046 strings)

Translated using Weblate (Japanese (ja_EASY))

Currently translated at 71.9% (753 of 1046 strings)

Co-authored-by: Hikaru Shinagawa <hikali.47041@gmail.com>
Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: kazari <6c577a54-aac9-482a-955e-745c858445e3@simplelogin.com>
Translate-URL: http://translate.akkoma.dev/projects/akkoma/pleroma-fe/ja_EASY/
Translation: Pleroma fe/pleroma-fe
2023-08-04 13:34:26 +00:00
Weblate c4e768f977 Translated using Weblate (Indonesian)
Currently translated at 67.8% (710 of 1046 strings)

Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: Yonle <yonle@lecturify.net>
Translate-URL: http://translate.akkoma.dev/projects/akkoma/pleroma-fe/id/
Translation: Pleroma fe/pleroma-fe
2023-08-04 13:34:26 +00:00
Weblate d8a7217335 Translated using Weblate (Turkish)
Currently translated at 9.7% (102 of 1046 strings)

Co-authored-by: Hasan Yıldız <hasanyildiz0@yaani.com>
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.akkoma.dev/projects/akkoma/pleroma-fe/tr/
Translation: Pleroma fe/pleroma-fe
2023-08-04 13:34:26 +00:00
floatingghost 35d10ab9ff Merge pull request 'components: Honour 'prefers reduced motion' setting in many components' (#333) from yukijoou/akkoma-fe:fix-reduced-motion into develop
Reviewed-on: AkkomaGang/akkoma-fe#333
2023-08-04 13:34:23 +00:00
Yuki Joou 43d0a24547 StillImage: Improved animated image detection
This patch makes StillImage's animation detection return early in cases
where we can't detect the mimetype of the image. It also sets the image
as animated in those cases if the user agent wants reduced motion.

As reduced motion is an accessibility setting, I think it's best to use
a "better safe than sorry" approach, it's better to accidentally mark
something as animated that isn't than to have unblocked animations.
2023-08-03 16:34:28 +02:00
Yuki Joou 51ebe643d5 components: Honour 'prefers reduced motion' setting in many components
This helps accessibility for motion-sensitive people such as myself, and
can improve battery life in "battery saving" mode on most devices
2023-08-03 14:45:02 +02:00
Ngô Ngọc Đức Huy 7c14e1a5bd
Add replying info for redraft 2023-08-02 08:40:19 +07:00
David 0da0e2c814 Make favicon next to post username use Still-Image functionality 2023-07-24 01:08:11 -07:00
floatingghost af97dd7484 Merge pull request 'docs: Update Pleroma references to Akkoma' (#318) from norm/pleroma-fe:update-docs into develop
Reviewed-on: AkkomaGang/akkoma-fe#318
2023-07-21 19:44:25 +00:00
floatingghost 28bf597443 Merge pull request '[workaround] fix: emoji picker not scrollable on ios' (#323) from SukinoVerse/akkoma-fe:fix/emoji-picker-not-scrollable-ios into develop
Reviewed-on: AkkomaGang/akkoma-fe#323
2023-07-21 19:43:14 +00:00
floatingghost a249baea8c Merge pull request 'Make emoji reactions use Still-Image functionality' (#326) from Mergan/pleroma-fe:still-image-emoji-reactions into develop
Reviewed-on: AkkomaGang/akkoma-fe#326
2023-07-21 19:42:41 +00:00
floatingghost a4e82f7886 Merge pull request '[feat] Support prefers-reduced-motion disabling auto-play of animated images (#324)' (#325) from Mergan/pleroma-fe:support-prefers-reduced-motion into develop
Reviewed-on: AkkomaGang/akkoma-fe#325
2023-07-21 19:37:43 +00:00
David 32dc55b07c Make emoji reactions use Still-Image functionality 2023-07-20 17:20:54 -07:00
David 91eab22d77 Simplified and fixed and/or oopsie 2023-07-20 17:18:59 -07:00
David e2125c57d6 Turn on by default 2023-07-20 16:26:52 -07:00
David e0a6418e91 Add prefers-reduced-motion support 2023-07-20 16:14:36 -07:00
SukinoVERSΞ 14ed359c33 fix: emoji picker not scrollable on ios 2023-07-11 22:16:37 +07:00
Norm 2d387e2eb4
update more images 2023-05-26 23:02:38 -04:00
Norm 57f70371a9
use better example emoji 2023-05-26 22:59:55 -04:00
Norm 8feffbcdf6
docs: Update Pleroma references to Akkoma 2023-05-26 22:49:29 -04:00
FloatingGhost 42ffce97d6 Merge remote-tracking branch 'origin/translations' into dm-privacy 2023-05-23 13:47:14 +01:00
FloatingGhost 2f479c670f Add DM settings 2023-05-23 13:46:59 +01:00
Weblate ee6e7026ab Merge branch 'origin/develop' into Weblate. 2023-05-23 11:38:58 +00:00
floatingghost 17c05a5ca2 Merge pull request 'paper theme: more contrast and fix setting tab hover' (#314) from denys/akkoma-fe:cool-paper-theme into develop
Reviewed-on: AkkomaGang/akkoma-fe#314
2023-05-23 11:38:57 +00:00
Weblate 42896c2abf Merge branch 'origin/develop' into Weblate. 2023-05-23 11:38:30 +00:00
floatingghost ecb6be2152 Merge pull request 'fix unfinished post being sent when scrolling' (#312) from denys/akkoma-fe:accidental-mobile-posts into develop
Reviewed-on: AkkomaGang/akkoma-fe#312
2023-05-23 11:38:28 +00:00
Weblate 6c92983af6 Merge branch 'origin/develop' into Weblate. 2023-05-23 11:37:26 +00:00
floatingghost 9e4985e225 Merge pull request 'fix apply theme button without page refresh' (#309) from denys/akkoma-fe:fix-apply-theme into develop
Reviewed-on: AkkomaGang/akkoma-fe#309
2023-05-23 11:37:24 +00:00
Weblate 60ff715aff Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (1042 of 1042 strings)

Co-authored-by: Poesty Li <poesty7450@gmail.com>
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.akkoma.dev/projects/akkoma/pleroma-fe/zh_Hans/
Translation: Pleroma fe/pleroma-fe
2023-05-21 20:58:06 +00:00
Weblate 04bcf7d804 Translated using Weblate (Polish)
Currently translated at 66.1% (689 of 1042 strings)

Co-authored-by: Jeder <jeder@jeder.pl>
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.akkoma.dev/projects/akkoma/pleroma-fe/pl/
Translation: Pleroma fe/pleroma-fe
2023-05-21 20:58:06 +00:00
Weblate 5fa305c58c Translated using Weblate (Japanese (ja_EASY))
Currently translated at 72.0% (751 of 1042 strings)

Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: kazari <6c577a54-aac9-482a-955e-745c858445e3@simplelogin.com>
Translate-URL: http://translate.akkoma.dev/projects/akkoma/pleroma-fe/ja_EASY/
Translation: Pleroma fe/pleroma-fe
2023-05-21 20:58:06 +00:00
Weblate a2ceb89d5e Translated using Weblate (Turkish)
Currently translated at 4.0% (42 of 1042 strings)

Added translation using Weblate (Turkish)

Co-authored-by: Hasan Yıldız <hasanyildiz0@yaani.com>
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.akkoma.dev/projects/akkoma/pleroma-fe/tr/
Translation: Pleroma fe/pleroma-fe
2023-05-21 20:58:06 +00:00
Denys Nykula 6b3b55455d paper theme: more contrast and fix setting tab hover 2023-05-18 23:05:19 +03:00
Denys Nykula 8c6ccc321d fix unfinished post being sent when scrolling 2023-05-15 03:11:07 +03:00
floatingghost 596ae7e377 Merge pull request 'fix dropdown-item-icon and form controls using missing variables' (#307) from denys/akkoma-fe:missing-sass-vars into develop
Reviewed-on: AkkomaGang/akkoma-fe#307
2023-05-08 15:29:58 +00:00
floatingghost 0d22a22a10 Merge pull request 'order bubble after public in sidebar like in other two menus' (#306) from denys/akkoma-fe:consistent-bubble-order into develop
Reviewed-on: AkkomaGang/akkoma-fe#306
2023-05-08 15:28:54 +00:00
Denys Nykula 2a76be56e7 fix apply theme button without page refresh 2023-05-01 20:54:18 +03:00
Denys Nykula 661a98d38d order bubble after public in sidebar like in other two menus 2023-05-01 20:53:29 +03:00
Denys Nykula 94d640f9f1 fix dropdown-item-icon and form controls using missing variables 2023-05-01 20:50:31 +03:00
Weblate 1f943ce8a5 Merge branch 'origin/develop' into Weblate. 2023-04-14 16:43:42 +00:00
FloatingGhost c540764408 ensure we only fetch reports when we're an admin
Ref #288
2023-04-14 17:43:05 +01:00
Weblate a4dfdc0853 Merge branch 'origin/develop' into Weblate. 2023-04-14 16:30:56 +00:00
floatingghost ddea499a36 Merge pull request 'Fix edits and redrafts being erased by drafts' (#297) from solidsanek/pleroma-fe:drafts-edit-redraft-fix into develop
Reviewed-on: AkkomaGang/akkoma-fe#297
2023-04-14 16:30:55 +00:00
solidsanek db33fe8ee2 Drafts: Fix drafts erasing edits and redrafts 2023-04-09 11:02:13 +02:00
Weblate f1bf22436d Translated using Weblate (Portuguese)
Currently translated at 62.8% (655 of 1042 strings)

Co-authored-by: cel <8cbv6di5@duck.com>
Translate-URL: http://translate.akkoma.dev/projects/akkoma/pleroma-fe/pt/
Translation: Pleroma fe/pleroma-fe
2023-04-05 18:57:45 +00:00
Weblate 459c73ec02 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (1041 of 1041 strings)

Translated using Weblate (Chinese (Simplified))

Currently translated at 99.9% (1040 of 1041 strings)

Translated using Weblate (Chinese (Simplified))

Currently translated at 99.9% (1040 of 1041 strings)

Translated using Weblate (Chinese (Simplified))

Currently translated at 99.9% (1039 of 1040 strings)

Co-authored-by: Poesty Li <poesty7450@gmail.com>
Co-authored-by: SevicheCC <sevicheee@outlook.com>
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.akkoma.dev/projects/akkoma/pleroma-fe/zh_Hans/
Translation: Pleroma fe/pleroma-fe
2023-04-05 18:57:45 +00:00
Weblate 2acf1e5c59 Translated using Weblate (Ukrainian)
Currently translated at 87.2% (908 of 1041 strings)

Co-authored-by: Denys Nykula <vegan@libre.net.ua>
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.akkoma.dev/projects/akkoma/pleroma-fe/uk/
Translation: Pleroma fe/pleroma-fe
2023-04-05 18:57:45 +00:00
Weblate 33c4459744 Translated using Weblate (French)
Currently translated at 98.5% (1027 of 1042 strings)

Translated using Weblate (French)

Currently translated at 98.3% (1024 of 1041 strings)

Translated using Weblate (French)

Currently translated at 96.9% (1002 of 1033 strings)

Co-authored-by: Thomate <thomas@burdick.fr>
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.akkoma.dev/projects/akkoma/pleroma-fe/fr/
Translation: Pleroma fe/pleroma-fe
2023-04-05 18:57:45 +00:00
Weblate b00487e51f Translated using Weblate (Japanese (ja_EASY))
Currently translated at 71.6% (747 of 1042 strings)

Translated using Weblate (Japanese (ja_EASY))

Currently translated at 71.6% (747 of 1042 strings)

Translated using Weblate (Japanese (ja_EASY))

Currently translated at 54.1% (564 of 1042 strings)

Co-authored-by: Hikaru Shinagawa <hikali.47041@gmail.com>
Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: kazari <6c577a54-aac9-482a-955e-745c858445e3@simplelogin.com>
Translate-URL: http://translate.akkoma.dev/projects/akkoma/pleroma-fe/ja_EASY/
Translation: Pleroma fe/pleroma-fe
2023-04-05 18:57:45 +00:00
Weblate 1e1cab643c Translated using Weblate (Dutch)
Currently translated at 99.7% (1038 of 1041 strings)

Co-authored-by: Fristi <fristi@subcon.town>
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.akkoma.dev/projects/akkoma/pleroma-fe/nl/
Translation: Pleroma fe/pleroma-fe
2023-04-05 18:57:45 +00:00
Weblate 8d3219a6d2 Translated using Weblate (Indonesian)
Currently translated at 65.4% (676 of 1033 strings)

Translated using Weblate (Indonesian)

Currently translated at 65.4% (676 of 1033 strings)

Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: t1 <taaa@fedora.email>
Translate-URL: http://translate.akkoma.dev/projects/akkoma/pleroma-fe/id/
Translation: Pleroma fe/pleroma-fe
2023-04-05 18:57:45 +00:00
Weblate ec9753758f Translated using Weblate (Spanish)
Currently translated at 90.8% (938 of 1033 strings)

Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: taretka <info@tarteka.net>
Translate-URL: http://translate.akkoma.dev/projects/akkoma/pleroma-fe/es/
Translation: Pleroma fe/pleroma-fe
2023-04-05 18:57:45 +00:00
Weblate 97ff4a7241 Translated using Weblate (German)
Currently translated at 99.5% (1036 of 1041 strings)

Co-authored-by: Johann <johann@qwertqwefsday.eu>
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.akkoma.dev/projects/akkoma/pleroma-fe/de/
Translation: Pleroma fe/pleroma-fe
2023-04-05 18:57:45 +00:00
FloatingGhost 14cedc5ed1 don't crash if `class` isn't a list 2023-04-01 07:55:47 +01:00
floatingghost 5911777aa2 Merge pull request 'Fix floating point error for poll expiry' (#294) from xarvos/pleroma-fe:fix-poll-expire into develop
Reviewed-on: AkkomaGang/akkoma-fe#294
2023-03-30 09:49:38 +00:00
Ngô Ngọc Đức Huy 47fc082fb9
Fix floating point error for poll expiry
Previous code multiply with 0.001 before multiplication which leads to a
floating point error.  By changing it to division by 1000 after
multiplication this is avoided.
2023-03-24 20:48:02 +07:00
FloatingGhost 7e1b1e79f4 simplify timeline vibility checks 2023-03-18 20:22:47 +00:00
FloatingGhost b92b2f74a4 add timeline visibility setting parsing 2023-03-18 20:01:05 +00:00
16 changed files with 127 additions and 45 deletions

View File

@ -7,7 +7,7 @@ import {
faStickyNote,
faSmileBeam
} from '@fortawesome/free-solid-svg-icons'
import { trim, escapeRegExp, startCase } from 'lodash'
import { trim, escapeRegExp, startCase, debounce } from 'lodash'
library.add(
faBoxOpen,
@ -42,6 +42,9 @@ const EmojiPicker = {
EmojiGrid
},
methods: {
debouncedSearch: debounce(function (e) {
this.keyword = e.target.value
}, 500),
onStickerUploaded (e) {
this.$emit('sticker-uploaded', e)
},
@ -85,17 +88,6 @@ const EmojiPicker = {
activeGroupView () {
return this.showingStickers ? '' : this.activeGroup
},
stickersAvailable () {
if (this.$store.state.instance.stickers) {
return this.$store.state.instance.stickers.length > 0
}
return 0
},
filteredEmoji () {
return this.filterByKeyword(
this.$store.state.instance.customEmoji || []
)
},
emojis () {
const recentEmojis = this.$store.getters.recentEmojis
const standardEmojis = this.$store.state.instance.emoji || []

View File

@ -44,11 +44,10 @@
>
<div class="emoji-search">
<input
v-model="keyword"
type="text"
class="form-control"
:placeholder="$t('emoji.search_emoji')"
@input="$event.target.composing = false"
@input="debouncedSearch"
>
</div>
<EmojiGrid

View File

@ -136,18 +136,26 @@ const ExtraButtons = {
},
doRedraftStatus () {
this.$store.dispatch('fetchStatusSource', { id: this.status.id })
.then(data => this.$store.dispatch('openPostStatusModal', {
isRedraft: true,
statusId: this.status.id,
subject: data.spoiler_text,
statusText: data.text,
statusIsSensitive: this.status.nsfw,
statusPoll: this.status.poll,
statusFiles: [...this.status.attachments],
statusScope: this.status.visibility,
statusLanguage: this.status.language,
statusContentType: data.content_type
}))
.then(data => {
let repliedUserId = this.status.in_reply_to_user_id;
let repliedUser = this.status.attentions.filter(user =>
user.id === repliedUserId);
this.$store.dispatch('openPostStatusModal', {
isRedraft: true,
attentions: this.status.attentions,
statusId: this.status.id,
subject: data.spoiler_text,
statusText: data.text,
statusIsSensitive: this.status.nsfw,
statusPoll: this.status.poll,
statusFiles: [...this.status.attachments],
statusScope: this.status.visibility,
statusLanguage: this.status.language,
statusContentType: data.content_type,
replyTo: this.status.in_reply_to_status_id,
repliedUser: repliedUser
})
})
this.doDeleteStatus()
},
showRedraftStatusConfirmDialog () {

View File

@ -55,6 +55,9 @@
.interactive {
.svg-inline--fa {
@media (prefers-reduced-motion: reduce) {
animation: unset;
}
animation-duration: 0.6s;
}

View File

@ -1,9 +1,13 @@
<template>
<div class="list">
<div
class="list"
role="list"
>
<div
v-for="item in items"
:key="getKey(item)"
class="list-item"
role="listitem"
>
<slot
name="item"

View File

@ -157,6 +157,9 @@
box-shadow: var(--panelShadow);
transition-property: transform;
transition-duration: 0.25s;
@media (prefers-reduced-motion: reduce) {
transition: unset;
}
transform: translateX(0);
z-index: 1001;
-webkit-overflow-scrolling: touch;

View File

@ -74,6 +74,9 @@
.interactive {
.svg-inline--fa {
@media (prefers-reduced-motion: reduce) {
animation: unset;
}
animation-duration: 0.6s;
}

View File

@ -10,17 +10,20 @@ import SelectableList from 'src/components/selectable_list/selectable_list.vue'
import ProgressButton from 'src/components/progress_button/progress_button.vue'
import withSubscription from 'src/components/../hocs/with_subscription/with_subscription'
import Checkbox from 'src/components/checkbox/checkbox.vue'
import withLoadMore from 'src/components/../hocs/with_load_more/with_load_more'
const BlockList = withSubscription({
const BlockList = withLoadMore({
fetch: (props, $store) => $store.dispatch('fetchBlocks'),
select: (props, $store) => get($store.state.users.currentUser, 'blockIds', []),
childPropName: 'items'
childPropName: 'items',
destroy: () => {}
})(SelectableList)
const MuteList = withSubscription({
const MuteList = withLoadMore({
fetch: (props, $store) => $store.dispatch('fetchMutes'),
select: (props, $store) => get($store.state.users.currentUser, 'muteIds', []),
childPropName: 'items'
childPropName: 'items',
destroy: () => {}
})(SelectableList)
const DomainMuteList = withSubscription({

View File

@ -268,6 +268,10 @@
.side-drawer {
overflow-x: hidden;
transition-timing-function: cubic-bezier(0, 1, 0.5, 1);
@media (prefers-reduced-motion: reduce) {
transition-timing-function: unset;
transition: unset;
}
transition: 0.35s;
transition-property: transform;
margin: 0 0 0 -100px;

View File

@ -20,6 +20,7 @@ import generateProfileLink from 'src/services/user_profile_link_generator/user_p
import { highlightClass, highlightStyle } from '../../services/user_highlighter/user_highlighter.js'
import { muteWordHits } from '../../services/status_parser/status_parser.js'
import { unescape, uniqBy } from 'lodash'
import StillImage from '../still-image/still-image.vue'
import { library } from '@fortawesome/fontawesome-svg-core'
import {
@ -117,7 +118,8 @@ const Status = {
RichContent,
MentionLink,
MentionsLine,
QuoteButton
QuoteButton,
StillImage
},
props: [
'statusoid',

View File

@ -174,12 +174,12 @@
>
@{{ status.user.screen_name_ui }}
</router-link>
<img
<StillImage
v-if="!!(status.user && status.user.favicon)"
class="status-favicon"
:src="status.user.favicon"
:title="faviconAlt(status)"
>
/>
</span>
</div>

View File

@ -17,6 +17,9 @@
.emoji:hover {
transform: scale(1.4);
@media (prefers-reduced-motion: reduce) {
transition: unset;
}
transition: 0.05s;
}

View File

@ -39,12 +39,25 @@ const StillImage = {
this.imageLoadError && this.imageLoadError()
},
detectAnimation (image) {
// If there are no file extensions, the mimetype isn't set, and no mediaproxy is available, we can't figure out
// the mimetype of the image.
const hasFileExtension = this.src.split('/').pop().includes('.') // TODO: Better check?
const mediaProxyAvailable = this.$store.state.instance.mediaProxyAvailable
if (!hasFileExtension && this.mimetype === undefined && !mediaProxyAvailable) {
// It's a bit aggressive to assume all images we can't find the mimetype of is animated, but necessary for
// people in need of reduced motion accessibility. As such, we'll consider those images animated if the user
// agent is set to prefer reduced motion. Otherwise, it'll just be used as an early exit.
if (window.matchMedia('(prefers-reduced-motion: reduce)').matches)
this.isAnimated = true
return
}
if (this.mimetype === 'image/gif' || this.src.endsWith('.gif')) {
this.isAnimated = true
return
}
// harmless CORS errors without-- clean console with
if (!this.$store.state.instance.mediaProxyAvailable) return
if (!mediaProxyAvailable) return
// Animated JPEGs?
if (!(this.src.endsWith('.webp') || this.src.endsWith('.png'))) return
// Browser Cache should ensure image doesn't get loaded twice if cache exists

View File

@ -62,6 +62,9 @@
border-top-right-radius: 0;
border-top-left-radius: 0;
transform: translateY(-100%);
@media (prefers-reduced-motion: reduce) {
transition: unset;
}
transition: transform 100ms;
}
@ -89,6 +92,9 @@
svg {
margin-left: 0.6em;
@media (prefers-reduced-motion: reduce) {
transition: unset;
}
transition: transform 100ms;
}

View File

@ -199,21 +199,28 @@ export const mutations = {
})
},
saveBlockIds (state, blockIds) {
state.currentUser.blockIds = blockIds
console.log("ADDING BLOCK IDS", blockIds);
state.currentUser.blockIds = uniq(concat(state.currentUser.blockIds || [], blockIds))
},
addBlockId (state, blockId) {
if (state.currentUser.blockIds.indexOf(blockId) === -1) {
state.currentUser.blockIds.push(blockId)
}
},
setBlockIdsMaxId (state, blockIdsMaxId) {
state.currentUser.blockIdsMaxId = blockIdsMaxId
},
saveMuteIds (state, muteIds) {
state.currentUser.muteIds = muteIds
state.currentUser.muteIds = uniq(concat(state.currentUser.muteIds || [], muteIds))
},
addMuteId (state, muteId) {
if (state.currentUser.muteIds.indexOf(muteId) === -1) {
state.currentUser.muteIds.push(muteId)
}
},
setMuteIdsMaxId (state, muteIdsMaxId) {
state.currentUser.muteIdsMaxId = muteIdsMaxId
},
updateMascot (state, mascotUrl) {
state.currentUser.mascot = mascotUrl
},
@ -330,10 +337,21 @@ const users = {
.then((relationships) => store.commit('updateUserRelationship', relationships))
}
},
fetchBlocks (store) {
return store.rootState.api.backendInteractor.fetchBlocks()
fetchBlocks (store, args) {
const { reset } = args || {}
const maxId = store.state.currentUser.blockIdsMaxId
return store.rootState.api.backendInteractor.fetchBlocks({ maxId })
.then((blocks) => {
store.commit('saveBlockIds', map(blocks, 'id'))
if (reset) {
store.commit('saveBlockIds', map(blocks, 'id'))
} else {
map(blocks, 'id').map(id => store.commit('addBlockId', id))
}
if (blocks.length) {
store.commit('setBlockIdsMaxId', last(blocks).id)
}
store.commit('addNewUsers', blocks)
return blocks
})
@ -353,10 +371,22 @@ const users = {
unblockUsers (store, ids = []) {
return Promise.all(ids.map(id => unblockUser(store, id)))
},
fetchMutes (store) {
return store.rootState.api.backendInteractor.fetchMutes()
fetchMutes (store, args) {
const { reset } = args || {}
const maxId = store.state.currentUser.muteIdsMaxId
return store.rootState.api.backendInteractor.fetchMutes({ maxId })
.then((mutes) => {
store.commit('saveMuteIds', map(mutes, 'id'))
if (reset) {
store.commit('saveMuteIds', map(mutes, 'id'))
} else {
map(mutes, 'id').map(id => store.commit('addMuteId', id))
}
if (mutes.length) {
store.commit('setMuteIdsMaxId', last(mutes).id)
}
store.commit('addNewUsers', mutes)
return mutes
})

View File

@ -1166,8 +1166,13 @@ const generateMfaBackupCodes = ({ credentials }) => {
}).then((data) => data.json())
}
const fetchMutes = ({ credentials }) => {
return promisedRequest({ url: MASTODON_USER_MUTES_URL, credentials })
const fetchMutes = ({ maxId, credentials }) => {
const query = new URLSearchParams({ with_relationships: true })
if (maxId) {
query.append('max_id', maxId)
}
return promisedRequest({ url: `${MASTODON_USER_MUTES_URL}?${query.toString()}`, credentials })
.then((users) => users.map(parseUser))
}
@ -1213,8 +1218,12 @@ const unsubscribeUser = ({ id, credentials }) => {
return promisedRequest({ url: MASTODON_UNSUBSCRIBE_USER(id), credentials, method: 'POST' })
}
const fetchBlocks = ({ credentials }) => {
return promisedRequest({ url: MASTODON_USER_BLOCKS_URL, credentials })
const fetchBlocks = ({ maxId, credentials }) => {
const query = new URLSearchParams({ with_relationships: true })
if (maxId) {
query.append('max_id', maxId)
}
return promisedRequest({ url: `${MASTODON_USER_BLOCKS_URL}?${query.toString()}`, credentials })
.then((users) => users.map(parseUser))
}