ajout heimdall

This commit is contained in:
2025-01-01 11:24:01 +01:00
parent f8be42e486
commit c52f60fca9
1477 changed files with 15692 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
<?php namespace App\SupportedApps\PhotoPrism;
class PhotoPrism extends \App\SupportedApps implements \App\EnhancedApps {
public $config;
//protected $login_first = true; // Uncomment if api requests need to be authed first
//protected $method = 'POST'; // Uncomment if requests to the API should be set by POST
function __construct() {
//$this->jar = new \GuzzleHttp\Cookie\CookieJar; // Uncomment if cookies need to be set
}
public function test()
{
$test = parent::appTest($this->url('api/v1/config'));
echo $test->status;
}
public function livestats()
{
$status = 'inactive';
$res = parent::execute($this->url('api/v1/config'));
$details = json_decode($res->getBody(), True);
$data = [];
if($details) {
$data['photos'] = number_format($details['count']['photos']) ?? 0;
$data['videos'] = number_format($details['count']['videos']) ?? 0;
}
return parent::getLiveStats($status, $data);
}
public function url($endpoint)
{
$api_url = parent::normaliseurl($this->config->url).$endpoint;
return $api_url;
}
}

View File

@@ -0,0 +1,10 @@
{
"appid": "f60f5b25d59c397989e3cd374f81cdd7710a4fca",
"name": "PhotoPrism",
"website": "https://photoprism.org/",
"license": "GNU General Public License v3.0 only",
"description": "PhotoPrism is a server-based application for browsing, organizing and sharing your personal photo collection. It makes use of the latest technologies to automatically tag and find pictures without getting in your way. Say goodbye to solutions that force you to upload your visual memories to the cloud.",
"enhanced": true,
"tile_background": "light",
"icon": "photoprism.png"
}

View File

@@ -0,0 +1,10 @@
<h2>{{ __('app.apps.config') }} ({{ __('app.optional') }}) @include('items.enable')</h2>
<div class="items">
<div class="input">
<label>{{ strtoupper(__('app.url')) }}</label>
{!! Form::text('config[override_url]', null, array('placeholder' => __('app.apps.override'), 'id' => 'override_url', 'class' => 'form-control')) !!}
</div>
<div class="input">
<button style="margin-top: 32px;" class="btn test" id="test_config">Test</button>
</div>
</div>

View File

@@ -0,0 +1,10 @@
<ul class="livestats">
<li>
<span class="title">Photos</span>
<strong>{!! $photos !!}</strong>
</li>
<li>
<span class="title">Videos</span>
<strong>{!! $videos !!}</strong>
</li>
</ul>

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB