forked from mirror/pixelfed
commit
89e39ff699
|
@ -9,6 +9,8 @@
|
|||
- Added UI Settings modal and fixed height media previews setting ([f2467e71](https://github.com/pixelfed/pixelfed/commit/f2467e71))
|
||||
- Set max-width of 1440px for larger screens ([af68872a](https://github.com/pixelfed/pixelfed/commit/af68872a))
|
||||
- Add link to sidebar profile card ([85964510](https://github.com/pixelfed/pixelfed/commit/85964510))
|
||||
- Improved search bar, now resolves (and imports) remote accounts and posts, including webfinger addresses ([c8a667f2](https://github.com/pixelfed/pixelfed/commit/c8a667f2))
|
||||
- Added user facing changelog at `/i/web/whats-new` ([e61dc66a](https://github.com/pixelfed/pixelfed/commit/e61dc66a))
|
||||
|
||||
### Configuration
|
||||
- Enable network timeline by default ([b95aec12](https://github.com/pixelfed/pixelfed/commit/b95aec12))
|
||||
|
@ -95,6 +97,7 @@
|
|||
- Updated ApiV1Controller, fix home timeline entities. ([6fc0dcb3](https://github.com/pixelfed/pixelfed/commit/6fc0dcb3))
|
||||
- Updated ApiV1Controller, fix favourites endpoints ([d6d99385](https://github.com/pixelfed/pixelfed/commit/d6d99385))
|
||||
- Updated ApiV1Controller, fix reblogs endpoints ([de42d84c](https://github.com/pixelfed/pixelfed/commit/de42d84c))
|
||||
- Updated SearchApiV2Service, resolve remote queries. ([c8a667f2](https://github.com/pixelfed/pixelfed/commit/c8a667f2))
|
||||
- ([](https://github.com/pixelfed/pixelfed/commit/))
|
||||
|
||||
## [v0.11.1 (2021-09-07)](https://github.com/pixelfed/pixelfed/compare/v0.11.0...v0.11.1)
|
||||
|
|
|
@ -28,12 +28,14 @@ class SearchApiV2Service
|
|||
protected function run($query)
|
||||
{
|
||||
$this->query = $query;
|
||||
$q = urldecode($query->input('q'));
|
||||
|
||||
if($query->has('resolve') &&
|
||||
$query->resolve == true &&
|
||||
Helpers::validateUrl(urldecode($query->input('q')))
|
||||
( Str::startsWith($q, 'https://') ||
|
||||
Str::substrCount($q, '@') == 2)
|
||||
) {
|
||||
return $this->resolve();
|
||||
return $this->resolveQuery();
|
||||
}
|
||||
|
||||
if($query->has('type')) {
|
||||
|
@ -77,16 +79,6 @@ class SearchApiV2Service
|
|||
];
|
||||
}
|
||||
|
||||
protected function resolve()
|
||||
{
|
||||
$query = urldecode($this->query->input('q'));
|
||||
if(Str::startsWith($query, '@') == true) {
|
||||
return WebfingerService::lookup($this->query->input('q'));
|
||||
} else if (Str::startsWith($query, 'https://') == true) {
|
||||
return $this->resolveQuery();
|
||||
}
|
||||
}
|
||||
|
||||
protected function accounts()
|
||||
{
|
||||
$user = request()->user();
|
||||
|
@ -163,11 +155,79 @@ class SearchApiV2Service
|
|||
return $this->resolveLocalProfile();
|
||||
}
|
||||
} else {
|
||||
return [
|
||||
$default = [
|
||||
'accounts' => [],
|
||||
'hashtags' => [],
|
||||
'statuses' => []
|
||||
'statuses' => [],
|
||||
];
|
||||
if(!Helpers::validateUrl($query) && strpos($query, '@') == -1) {
|
||||
return $default;
|
||||
}
|
||||
|
||||
if(Str::substrCount($query, '@') == 2) {
|
||||
try {
|
||||
$res = WebfingerService::lookup($query);
|
||||
} catch (\Exception $e) {
|
||||
return $default;
|
||||
}
|
||||
if($res && isset($res['id'])) {
|
||||
$default['accounts'][] = $res;
|
||||
return $default;
|
||||
} else {
|
||||
return $default;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
$res = ActivityPubFetchService::get($query);
|
||||
if($res) {
|
||||
$json = json_decode($res, true);
|
||||
|
||||
if(!$json || !isset($json['@context']) || !isset($json['type']) || !in_array($json['type'], ['Note', 'Person'])) {
|
||||
return [
|
||||
'accounts' => [],
|
||||
'hashtags' => [],
|
||||
'statuses' => [],
|
||||
];
|
||||
}
|
||||
|
||||
switch($json['type']) {
|
||||
case 'Note':
|
||||
$obj = Helpers::statusFetch($query);
|
||||
if(!$obj) {
|
||||
return $default;
|
||||
}
|
||||
$default['statuses'][] = StatusService::get($obj['id']);
|
||||
return $default;
|
||||
break;
|
||||
|
||||
case 'Person':
|
||||
$obj = Helpers::profileFetch($query);
|
||||
if(!$obj) {
|
||||
return $default;
|
||||
}
|
||||
$default['accounts'][] = AccountService::get($obj['id']);
|
||||
return $default;
|
||||
break;
|
||||
|
||||
default:
|
||||
return [
|
||||
'accounts' => [],
|
||||
'hashtags' => [],
|
||||
'statuses' => [],
|
||||
];
|
||||
break;
|
||||
}
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
return [
|
||||
'accounts' => [],
|
||||
'hashtags' => [],
|
||||
'statuses' => [],
|
||||
];
|
||||
}
|
||||
|
||||
return $default;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
@font-face{font-family:IBM Plex Sans;font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/zYXgKVElMYYaJe8bpLHnCwDKhdzeFaxOedfTDw.woff2) format("woff2");unicode-range:U+0460-052f,U+1c80-1c88,U+20b4,U+2de0-2dff,U+a640-a69f,U+fe2e-fe2f}@font-face{font-family:IBM Plex Sans;font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/zYXgKVElMYYaJe8bpLHnCwDKhdXeFaxOedfTDw.woff2) format("woff2");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-family:IBM Plex Sans;font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/zYXgKVElMYYaJe8bpLHnCwDKhdLeFaxOedfTDw.woff2) format("woff2");unicode-range:U+0370-03ff}@font-face{font-family:IBM Plex Sans;font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/zYXgKVElMYYaJe8bpLHnCwDKhd7eFaxOedfTDw.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01a0-01a1,U+01af-01b0,U+1ea0-1ef9,U+20ab}@font-face{font-family:IBM Plex Sans;font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/zYXgKVElMYYaJe8bpLHnCwDKhd_eFaxOedfTDw.woff2) format("woff2");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-family:IBM Plex Sans;font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/zYXgKVElMYYaJe8bpLHnCwDKhdHeFaxOedc.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-family:IBM Plex Sans;font-style:normal;font-weight:600;font-display:swap;src:url(/fonts/zYX9KVElMYYaJe8bpLHnCwDKjQ76AIxsdP3pBmtF8A.woff2) format("woff2");unicode-range:U+0460-052f,U+1c80-1c88,U+20b4,U+2de0-2dff,U+a640-a69f,U+fe2e-fe2f}@font-face{font-family:IBM Plex Sans;font-style:normal;font-weight:600;font-display:swap;src:url(/fonts/zYX9KVElMYYaJe8bpLHnCwDKjQ76AIVsdP3pBmtF8A.woff2) format("woff2");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-family:IBM Plex Sans;font-style:normal;font-weight:600;font-display:swap;src:url(/fonts/zYX9KVElMYYaJe8bpLHnCwDKjQ76AIJsdP3pBmtF8A.woff2) format("woff2");unicode-range:U+0370-03ff}@font-face{font-family:IBM Plex Sans;font-style:normal;font-weight:600;font-display:swap;src:url(/fonts/zYX9KVElMYYaJe8bpLHnCwDKjQ76AI5sdP3pBmtF8A.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01a0-01a1,U+01af-01b0,U+1ea0-1ef9,U+20ab}@font-face{font-family:IBM Plex Sans;font-style:normal;font-weight:600;font-display:swap;src:url(/fonts/zYX9KVElMYYaJe8bpLHnCwDKjQ76AI9sdP3pBmtF8A.woff2) format("woff2");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-family:IBM Plex Sans;font-style:normal;font-weight:600;font-display:swap;src:url(/fonts/zYX9KVElMYYaJe8bpLHnCwDKjQ76AIFsdP3pBms.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}body{background:#f3f4f6;font-family:IBM Plex Sans,sans-serif}.primary{color:#3b82f6}.web-wrapper{margin-bottom:10rem}.jumbotron{border-radius:18px}.doc-body p:last-child{margin-bottom:0}.sticky-top{z-index:2}.container-fluid{max-width:1440px!important}.text-lighter{color:#94a3b8!important}.badge-primary{background-color:#3b82f6}
|
||||
@font-face{font-family:IBM Plex Sans;font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/zYXgKVElMYYaJe8bpLHnCwDKhdzeFaxOedfTDw.woff2) format("woff2");unicode-range:U+0460-052f,U+1c80-1c88,U+20b4,U+2de0-2dff,U+a640-a69f,U+fe2e-fe2f}@font-face{font-family:IBM Plex Sans;font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/zYXgKVElMYYaJe8bpLHnCwDKhdXeFaxOedfTDw.woff2) format("woff2");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-family:IBM Plex Sans;font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/zYXgKVElMYYaJe8bpLHnCwDKhdLeFaxOedfTDw.woff2) format("woff2");unicode-range:U+0370-03ff}@font-face{font-family:IBM Plex Sans;font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/zYXgKVElMYYaJe8bpLHnCwDKhd7eFaxOedfTDw.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01a0-01a1,U+01af-01b0,U+1ea0-1ef9,U+20ab}@font-face{font-family:IBM Plex Sans;font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/zYXgKVElMYYaJe8bpLHnCwDKhd_eFaxOedfTDw.woff2) format("woff2");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-family:IBM Plex Sans;font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/zYXgKVElMYYaJe8bpLHnCwDKhdHeFaxOedc.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-family:IBM Plex Sans;font-style:normal;font-weight:600;font-display:swap;src:url(/fonts/zYX9KVElMYYaJe8bpLHnCwDKjQ76AIxsdP3pBmtF8A.woff2) format("woff2");unicode-range:U+0460-052f,U+1c80-1c88,U+20b4,U+2de0-2dff,U+a640-a69f,U+fe2e-fe2f}@font-face{font-family:IBM Plex Sans;font-style:normal;font-weight:600;font-display:swap;src:url(/fonts/zYX9KVElMYYaJe8bpLHnCwDKjQ76AIVsdP3pBmtF8A.woff2) format("woff2");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-family:IBM Plex Sans;font-style:normal;font-weight:600;font-display:swap;src:url(/fonts/zYX9KVElMYYaJe8bpLHnCwDKjQ76AIJsdP3pBmtF8A.woff2) format("woff2");unicode-range:U+0370-03ff}@font-face{font-family:IBM Plex Sans;font-style:normal;font-weight:600;font-display:swap;src:url(/fonts/zYX9KVElMYYaJe8bpLHnCwDKjQ76AI5sdP3pBmtF8A.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01a0-01a1,U+01af-01b0,U+1ea0-1ef9,U+20ab}@font-face{font-family:IBM Plex Sans;font-style:normal;font-weight:600;font-display:swap;src:url(/fonts/zYX9KVElMYYaJe8bpLHnCwDKjQ76AI9sdP3pBmtF8A.woff2) format("woff2");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-family:IBM Plex Sans;font-style:normal;font-weight:600;font-display:swap;src:url(/fonts/zYX9KVElMYYaJe8bpLHnCwDKjQ76AIFsdP3pBms.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}body{background:#f3f4f6;font-family:IBM Plex Sans,sans-serif}.primary{color:#3b82f6}.web-wrapper{margin-bottom:10rem}.jumbotron{border-radius:18px}.doc-body p:last-child{margin-bottom:0}.sticky-top{z-index:2}.container-fluid{max-width:1440px!important}.text-lighter{color:#94a3b8!important}.badge-primary,.btn-primary.primary{background-color:#3b82f6}.btn-primary.primary{color:#fff!important}
|
File diff suppressed because one or more lines are too long
|
@ -7,7 +7,7 @@
|
|||
"/css/app.css": "/css/app.css?id=70554ace925b5a7ecef2",
|
||||
"/css/appdark.css": "/css/appdark.css?id=ccdcd84f1087f89bd7b2",
|
||||
"/css/admin.css": "/css/admin.css?id=8884d2f48c1dd491ba04",
|
||||
"/css/spa.css": "/css/spa.css?id=4abe75b0841d0902a219",
|
||||
"/css/spa.css": "/css/spa.css?id=17b8f53a08fabe27812c",
|
||||
"/css/landing.css": "/css/landing.css?id=b6a06b969dd1c3c274e6",
|
||||
"/js/collectioncompose.js": "/js/collectioncompose.js?id=684458578e59365b9b7f",
|
||||
"/js/collections.js": "/js/collections.js?id=0d1fc5ad7d4a47a8adbb",
|
||||
|
@ -24,7 +24,7 @@
|
|||
"/js/rempos.js": "/js/rempos.js?id=2ef46b249c6390aa4ef8",
|
||||
"/js/rempro.js": "/js/rempro.js?id=3971b84aef886204d286",
|
||||
"/js/search.js": "/js/search.js?id=dc888b173463dc3894ba",
|
||||
"/js/spa.js": "/js/spa.js?id=0e24ee1b59e7850be935",
|
||||
"/js/spa.js": "/js/spa.js?id=d4fdd49acd9ad25e055c",
|
||||
"/js/status.js": "/js/status.js?id=49fd7ac5b254220021f9",
|
||||
"/js/stories.js": "/js/stories.js?id=f882708d5f00b4738dd7",
|
||||
"/js/story-compose.js": "/js/story-compose.js?id=0f9d2f7ce5e63ef14c6a",
|
||||
|
|
Loading…
Reference in New Issue