Split `local-visibility-post` feature into `@pleroma` and `@akkoma` variants

Co-authored-by: Lim Chee Aun <cheeaun@gmail.com>
pull/657/head
Stefano Pigozzi 2024-09-07 03:14:50 +02:00
rodzic 1aff56a6bd
commit 33d6edda38
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 5ADA3868646C3FC0
2 zmienionych plików z 5 dodań i 3 usunięć

Wyświetl plik

@ -1169,7 +1169,7 @@ function Compose({
<option value="public">
<Trans>Public</Trans>
</option>
{supports('@pleroma/local-visibility-post') &&
{(supports('@pleroma/local-visibility-post') || supports('@akkoma/local-visibility-post')) &&
<option value="local">
<Trans>Local</Trans>
</option>

Wyświetl plik

@ -7,7 +7,8 @@ import { getCurrentInstance } from './store-utils';
// Non-semver(?) UA string detection
const containPixelfed = /pixelfed/i;
const notContainPixelfed = /^(?!.*pixelfed).*$/i;
const containAnyOma = /(?:pler|akk)oma/i
const containPleroma = /pleroma/i;
const containAkkoma = /akkoma/i;
const platformFeatures = {
'@mastodon/lists': notContainPixelfed,
'@mastodon/filters': notContainPixelfed,
@ -21,7 +22,8 @@ const platformFeatures = {
'@pixelfed/trending': containPixelfed,
'@pixelfed/home-include-reblogs': containPixelfed,
'@pixelfed/global-feed': containPixelfed,
'@pleroma/local-visibility-post': containAnyOma,
'@pleroma/local-visibility-post': containPleroma,
'@akkoma/local-visibility-post': containAkkoma,
};
const supportsCache = {};