pl-api: detect hollo and fix sign in

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
nicole mikołajczyk
2025-07-08 01:19:05 +02:00
parent 3eefa83c1d
commit 9d6275c73c
6 changed files with 23 additions and 8 deletions

View File

@ -317,7 +317,12 @@ const instanceV1Schema = coerceObject({
const instanceSchema = v.pipe(
v.any(),
v.transform((data: any) => {
// Detect GoToSocial
// Detect Hollo
if (data.source_url === 'https://github.com/fedify-dev/hollo') {
data.version = `0.0.0 (compatible; Hollo ${data.version})`;
}
// Detect GoToSocial
if (typeof data.configuration?.accounts?.allow_custom_css === 'boolean') {
data.version = `0.0.0 (compatible; GoToSocial ${data.version})`;
}

View File

@ -40,6 +40,14 @@ const FRIENDICA = 'Friendica';
*/
const GOTOSOCIAL = 'GoToSocial';
/**
* Hollo, federated single-user microblogging software.
*
* @category Software
* @see {@link https://docs.hollo.social/}
*/
const HOLLO = 'Hollo';
/**
* Iceshrimp, yet another Misskey fork.
*
@ -1820,6 +1828,7 @@ export {
FIREFISH,
FRIENDICA,
GOTOSOCIAL,
HOLLO,
ICESHRIMP,
ICESHRIMP_NET,
MASTODON,

View File

@ -1,6 +1,6 @@
{
"name": "pl-api",
"version": "1.0.0-rc.83",
"version": "1.0.0-rc.84",
"type": "module",
"homepage": "https://codeberg.org/mkljczk/pl-fe/src/branch/develop/packages/pl-api",
"repository": {

View File

@ -105,7 +105,7 @@
"multiselect-react-dropdown": "^2.0.25",
"mutative": "^1.1.0",
"path-browserify": "^1.0.1",
"pl-api": "^1.0.0-rc.83",
"pl-api": "^1.0.0-rc.84",
"postcss": "^8.5.3",
"process": "^0.11.10",
"punycode": "^2.1.1",

View File

@ -1,4 +1,4 @@
import { getFeatures, ICESHRIMP_NET, PLEROMA, TOKI, type Instance } from 'pl-api';
import { getFeatures, HOLLO, ICESHRIMP_NET, PLEROMA, TOKI, type Instance } from 'pl-api';
import type { RootState } from 'pl-fe/store';
@ -27,6 +27,7 @@ const getInstanceScopes = (instance: Instance, admin: boolean = true) => {
if (admin) {
switch (v.software) {
case HOLLO:
case ICESHRIMP_NET:
break;
case PLEROMA:

View File

@ -6875,10 +6875,10 @@ pkg-dir@^4.1.0:
dependencies:
find-up "^4.0.0"
pl-api@^1.0.0-rc.83:
version "1.0.0-rc.83"
resolved "https://registry.yarnpkg.com/pl-api/-/pl-api-1.0.0-rc.83.tgz#a2c68416a355be97cae11f93e709f2169c9afab8"
integrity sha512-40JgV1G88lBoqVhh5JxnXgMGbXBuGVS6sVsugLbnbXuLyB5FyUXK6/JhfvH3koT7bwQdXwu1EgtpAuuukAom6w==
pl-api@^1.0.0-rc.84:
version "1.0.0-rc.84"
resolved "https://registry.yarnpkg.com/pl-api/-/pl-api-1.0.0-rc.84.tgz#3bb2a3befee692159ecae80b10a6fd5fd01705fa"
integrity sha512-8STLCsVEqNynFUoXTECpzPbpdsyEQXJcgdSWLXQA/KghQeFAUfVMzCY8v6BEK2N5CmG+qFGDmCxiWaFlwchP3g==
dependencies:
blurhash "^2.0.5"
http-link-header "^1.1.3"