Skip to content

Commit

Permalink
Testing data
Browse files Browse the repository at this point in the history
  • Loading branch information
susnux committed Mar 12, 2024
1 parent d13205e commit d03ab07
Show file tree
Hide file tree
Showing 5 changed files with 102 additions and 1 deletion.
96 changes: 96 additions & 0 deletions apps/settings/discover.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
[
{
"type": "post",
"id": "1d41a08e-4aa6-49b3-ad1b-ff2e83bcdc85",
"headline": {
"en": "Amazing wallpapers",
"de": "Bezaubernde Hintergründe"
},
"text": {
"en": "This are the most amazing wallpaers that you can possible have. Get them now!",
"de": "Die wohl beeindruckensten Hintergründe die man haben kann. Hol sie dir jetzt!"
},
"link": "https://example.com/wallpapers",
"media": {
"alignment": "end",
"content": {
"en": {
"src": [
{ "src": "/apps/settings/img/a.webp", "mime": "image/webp"}
],
"alt": "Amazing wallpaper"
}
}
}
},
{
"type": "post",
"id": "1d41a08e-4aa6-49b3-ad1b-ff2e83bcdc86",
"headline": {
"en": "Amazing wallpapers 2",
"de": "Bezaubernde Hintergründe"
},
"text": {
"en": "This are the most amazing wallpaers that you can possible have. Get them now!",
"de": "Die wohl beeindruckensten Hintergründe die man haben kann. Hol sie dir jetzt!"
},
"link": "https://example.com/wallpapers",
"media": {
"alignment": "start",
"content": {
"en": {
"src": [
{ "src": "/apps/settings/img/a.webp", "mime": "image/webp"}
],
"alt": "Amazing wallpaper"
}
}
}
},
{
"type": "post",
"id": "1d41a08e-4aa6-49b3-ad1b-ff2e83bcdc96",
"headline": {
"en": "Text only",
"de": "Nur Text"
},
"text": {
"en": "This is a post without any media.",
"de": "Dies is ein Post ohne jegliche multimediale Elemente."
},
"link": "https://example.com/text-only"
},
{
"type": "post",
"id": "1d41a08e-4aa6-49b3-ad1b-ff2e83bcdc87",
"link": "https://example.com/wallpapers",
"media": {
"alignment": "center",
"content": {
"en": {
"src": [
{ "src": "/apps/settings/img/a.webp", "mime": "image/webp"}
],
"alt": "Amazing wallpaper"
}
}
}
},
{
"type": "post",
"id": "1d41a08e-4aa6-49b3-ad1b-ff2e83bcdc88",
"media": {
"alignment": "center",
"content": {
"en": {
"src": [
{ "src": "/apps/settings/img/nextcloudHub.webm", "mime": "video/webm"},
{ "src": "/apps/settings/img/nextcloudHub.mp4", "mime": "video/mp4"}
],
"alt": "HUB Update",
"link": "https://example.com/wallpapers"
}
}
}
}
]
Binary file added apps/settings/img/a.webp
Binary file not shown.
Binary file added apps/settings/img/nextcloudHub.mp4
Binary file not shown.
Binary file added apps/settings/img/nextcloudHub.webm
Binary file not shown.
7 changes: 6 additions & 1 deletion apps/settings/lib/Controller/AppSettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,12 @@ public function viewApps(): TemplateResponse {
* @NoCSRFRequired
*/
public function getAppDiscoverJSON(): JSONResponse {
$data = $this->discoverFetcher->get();
// $data = $this->discoverFetcher->get();

// TODO REMOVE JUST FOR TESTING
$file = file_get_contents(__DIR__ . '/../../discover.json');
$data = json_decode($file);
// END TODO
return new JSONResponse($data);
}

Expand Down

0 comments on commit d03ab07

Please sign in to comment.