Skip to content

Commit

Permalink
Testing data
Browse files Browse the repository at this point in the history
  • Loading branch information
susnux committed Mar 13, 2024
1 parent a23116c commit ccca095
Show file tree
Hide file tree
Showing 5 changed files with 142 additions and 1 deletion.
136 changes: 136 additions & 0 deletions apps/settings/discover.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
[
{
"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": "https://nextcloud.com/c/uploads/2023/01/nextcloud-podcast-featured-image-1024x576.png", "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": "https://nextcloud.com/c/uploads/2023/01/nextcloud-podcast-featured-image-1024x576.png", "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": "https://nextcloud.com/c/uploads/2023/01/nextcloud-podcast-featured-image-1024x576.png", "mime": "image/webp"}
],
"alt": "Amazing wallpaper"
}
}
}
},
{
"type": "post",
"id": "1d41a08e-4aa6-49b3-ad1b-ff2e83bcdc88",
"media": {
"alignment": "center",
"content": {
"en": {
"src": [
{ "src": "https://github.com/nextcloud/firstrunwizard/raw/master/img/Nextcloud.webm", "mime": "video/webm"},
{ "src": "https://github.com/nextcloud/firstrunwizard/raw/master/img/Nextcloud.mp4", "mime": "video/mp4"}
],
"alt": "HUB Update",
"link": "https://example.com/wallpapers"
}
}
}
},
{
"type": "carousel",
"id": "1d41a08e-4aa6-49b3-ad1b-ff2e83bcdf96",
"headline": {
"en": "A carousel",
"de": "Ein Karussel"
},
"content": [
{
"type": "post",
"id": "1d41a08e-4aa6-49b4-ad1b-ff2e83bcdc96",
"headline": {
"en": "One"
},
"text": {
"en": "This is a post without any media."
}
},
{
"type": "post",
"id": "1d41a08e-4aa6-49b5-ad1b-ff2e83bcdc96",
"headline": {
"en": "Two"
},
"text": {
"en": "This is a post without any media."
}
},
{
"type": "post",
"id": "1d41a08e-4aa6-49b6-ad1b-ff2e83bcdc96",
"headline": {
"en": "Three"
},
"text": {
"en": "This is a post without any media."
}
}
]
}
]
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 @@ -129,7 +129,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 ccca095

Please sign in to comment.