migrate therinaldos.com data
Build & Deploy to DigitalOcean Space / build (push) Failing after 2m38s

This commit is contained in:
2024-05-05 15:50:45 -04:00
commit ef1ff240d4
23182 changed files with 3801898 additions and 0 deletions
@@ -0,0 +1,81 @@
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2022 Robin Appelman <robin@icewind.nl>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OCP\Dashboard\Model;
/**
* Button for a dashboard widget
*
* @since 25.0.0
*/
class WidgetButton {
public const TYPE_NEW = 'new';
public const TYPE_MORE = 'more';
public const TYPE_SETUP = 'setup';
private string $type;
private string $link;
private string $text;
/**
* @param string $type
* @param string $link
* @param string $text
* @since 25.0.0
*/
public function __construct(string $type, string $link, string $text) {
$this->type = $type;
$this->link = $link;
$this->text = $text;
}
/**
* Get the button type, either "new", "more" or "setup"
*
* @return string
* @since 25.0.0
*/
public function getType(): string {
return $this->type;
}
/**
* Get the absolute url the buttons links to
*
* @return string
* @since 25.0.0
*/
public function getLink(): string {
return $this->link;
}
/**
* Get the translated text for the button
*
* @return string
* @since 25.0.0
*/
public function getText(): string {
return $this->text;
}
}
@@ -0,0 +1,168 @@
<?php
declare(strict_types=1);
/**
* @copyright 2021, Julien Veyssier <eneiluj@posteo.net>
*
* @author Julien Veyssier <eneiluj@posteo.net>
* @author Richard Steinmetz <richard@steinmetz.cloud>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OCP\Dashboard\Model;
use JsonSerializable;
/**
* Interface WidgetItem
*
* This class is used by IAPIWidget interface.
* It represents an widget item data that can be provided to clients via the Dashboard API
* @see IAPIWidget::getItems
*
* @since 22.0.0
*
*/
final class WidgetItem implements JsonSerializable {
/** @var string */
private $title = '';
/** @var string */
private $subtitle = '';
/** @var string */
private $link = '';
/** @var string */
private $iconUrl = '';
/** @var string
* Timestamp or ID used by the dashboard API to avoid getting already retrieved items
*/
private $sinceId = '';
/**
* Overlay icon to show in the bottom right corner of {@see $iconUrl}
*
* @since 27.1.0
*/
private string $overlayIconUrl = '';
/**
* WidgetItem constructor
*
* @since 22.0.0
*/
public function __construct(string $title = '',
string $subtitle = '',
string $link = '',
string $iconUrl = '',
string $sinceId = '',
string $overlayIconUrl = '') {
$this->title = $title;
$this->subtitle = $subtitle;
$this->iconUrl = $iconUrl;
$this->link = $link;
$this->sinceId = $sinceId;
$this->overlayIconUrl = $overlayIconUrl;
}
/**
* Get the item title
*
* @since 22.0.0
*
* @return string
*/
public function getTitle(): string {
return $this->title;
}
/**
* Get the item subtitle
*
* @since 22.0.0
*
* @return string
*/
public function getSubtitle(): string {
return $this->subtitle;
}
/**
* Get the item link
*
* @since 22.0.0
*
* @return string
*/
public function getLink(): string {
return $this->link;
}
/**
* Get the item icon URL
* The icon should be a square svg or a jpg/png of at least 44x44px
*
* @since 22.0.0
*
* @return string
*/
public function getIconUrl(): string {
return $this->iconUrl;
}
/**
* Get the item since ID
*
* @since 22.0.0
*
* @return string
*/
public function getSinceId(): string {
return $this->sinceId;
}
/**
* Get the overlay icon url
*
* @since 27.1.0
*
* @return string
*/
public function getOverlayIconUrl(): string {
return $this->overlayIconUrl;
}
/**
* @since 22.0.0
*
* @return array
*/
public function jsonSerialize(): array {
return [
'subtitle' => $this->getSubtitle(),
'title' => $this->getTitle(),
'link' => $this->getLink(),
'iconUrl' => $this->getIconUrl(),
'overlayIconUrl' => $this->getOverlayIconUrl(),
'sinceId' => $this->getSinceId(),
];
}
}
@@ -0,0 +1,100 @@
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2023 Richard Steinmetz <richard@steinmetz.cloud>
*
* @author Richard Steinmetz <richard@steinmetz.cloud>
*
* @license AGPL-3.0-or-later
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OCP\Dashboard\Model;
use JsonSerializable;
use OCP\Dashboard\IAPIWidgetV2;
/**
* Interface WidgetItems
*
* This class is used by {@see IAPIWidgetV2} interface.
* It represents an array of widget items and additional context information that can be provided to clients via the Dashboard API
*
* @see IAPIWidgetV2::getItemsV2
*
* @since 27.1.0
*/
class WidgetItems implements JsonSerializable {
/**
* @param $items WidgetItem[]
*
* @since 27.1.0
*/
public function __construct(
private array $items = [],
private string $emptyContentMessage = '',
private string $halfEmptyContentMessage = '',
) {
}
/**
* Items to render in the widgets
*
* @since 27.1.0
*
* @return WidgetItem[]
*/
public function getItems(): array {
return $this->items;
}
/**
* The "half" empty content message to show above the list of items.
*
* A non-empty string enables this feature.
* An empty string hides the message and disables this feature.
*
* @since 27.1.0
*/
public function getEmptyContentMessage(): string {
return $this->emptyContentMessage;
}
/**
* The empty content message to show in case of no items at all
*
* @since 27.1.0
*/
public function getHalfEmptyContentMessage(): string {
return $this->halfEmptyContentMessage;
}
/**
* @since 27.1.0
*/
public function jsonSerialize(): array {
$items = array_map(static function (WidgetItem $item) {
return $item->jsonSerialize();
}, $this->getItems());
return [
'items' => $items,
'emptyContentMessage' => $this->getEmptyContentMessage(),
'halfEmptyContentMessage' => $this->getHalfEmptyContentMessage(),
];
}
}
@@ -0,0 +1,61 @@
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2022 Robin Appelman <robin@icewind.nl>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OCP\Dashboard\Model;
/**
* Option for displaying a widget
*
* @since 25.0.0
*/
class WidgetOptions {
private bool $roundItemIcons;
/**
* @param bool $roundItemIcons
* @since 25.0.0
*/
public function __construct(bool $roundItemIcons) {
$this->roundItemIcons = $roundItemIcons;
}
/**
* Get the default set of options
*
* @return WidgetOptions
* @since 25.0.0
*/
public static function getDefault(): WidgetOptions {
return new WidgetOptions(false);
}
/**
* Whether the clients should render icons for widget items as round icons
*
* @return bool
* @since 25.0.0
*/
public function withRoundItemIcons(): bool {
return $this->roundItemIcons;
}
}