Skip to content

Commit

Permalink
fixup! Testing data
Browse files Browse the repository at this point in the history
Signed-off-by: Ferdinand Thiessen <[email protected]>
  • Loading branch information
susnux committed Mar 14, 2024
1 parent e68f277 commit c4d1d97
Show file tree
Hide file tree
Showing 2 changed files with 206 additions and 1 deletion.
200 changes: 200 additions & 0 deletions apps/settings/discover.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
[
{
"type": "post",
"id": "1d41a08e-4aa6-49b3-ad1b-ff2e83bcdc85",
"headline": {
"en": "Amazing wallpapers",
"de": "Bezaubernde Hintergründe"
},
"text": {
"en": "This are the most amazing wallpapers 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-4ca6-49b3-ad1b-ff2e83bcdf96",
"headline": {
"en": "Another carousel",
"de": "Ein weiteres Karussel"
},
"content": [
{
"type": "post",
"id": "f-4aa6-49b4-ad1b-fe2e83bcdc96",
"media": {
"alignment": "center",
"content": {
"en": {
"src": {
"src": "https://nextcloud.com/c/uploads/2023/12/featured-image-owncloud-to-nextcloud-migration-1024x576.png",
"mime": "image/webp"
},
"alt": "ooo"
}
}
}
},
{
"type": "post",
"id": "d-4aa6-49b4-ad1b-fe2e83bcdc96",
"media": {
"alignment": "center",
"content": {
"en": {
"src": {
"src": "https://nextcloud.com/c/uploads/2023/11/owncloud-nextcloud-kiteworks-migration-tools-1024x576.png",
"mime": "image/webp"
},
"alt": "ooo"
}
}
}
},
{
"type": "post",
"id": "e-4aa6-49b4-ad1b-fe2e83bcdc96",
"headline": {
"en": "A big day for the Nextcloud community"
},
"text": {
"en": "Earlier today, our founder Frank Karlitschek accepted the honorary SFS Award for ongoing contribution to the mission of Free Software. The award is a highlight of the 20th annual SFSCON dedicated to promotion and implementation of FOSS in Europe and beyond. Image source: NOI Techpark"
},
"media": {
"alignment": "start",
"content": {
"en": {
"src": {
"src": "https://nextcloud.com/c/uploads/2023/11/frank-karlitschek-nextcloud-award-european-sfs-community-864x576.jpeg",
"mime": "image/webp"
},
"alt": "ooo"
}
}
}
}
]
},
{
"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."
}
}
]
}
]
7 changes: 6 additions & 1 deletion apps/settings/lib/Controller/AppSettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,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 c4d1d97

Please sign in to comment.