-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added omboarding and changelog flows, added labels to quickaccess ico…
…ns, added bulk install edgeapp icons
- Loading branch information
1 parent
f9c8298
commit 16f84e7
Showing
34 changed files
with
1,737 additions
and
501 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+455 KB
src/public/assets/img/changelog-assets/screenshot_2024-11-01_13.50.49.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+468 KB
src/public/assets/img/changelog-assets/screenshot_2024-11-01_14.01.33.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.39 MB
src/public/assets/img/changelog-assets/screenshot_2024-11-02_10.28.39.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.63 MB
src/public/assets/img/changelog-assets/screenshot_2024-11-02_21.19.15.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+254 KB
src/public/assets/img/changelog-assets/screenshot_2024-11-02_21.58.39.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.14 MB
src/public/assets/img/hello-assets/screenshot_2024-11-02_10.32.08.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.06 MB
src/public/assets/img/hello-assets/screenshot_2024-11-02_10.35.23.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
namespace App\Attribute; | ||
|
||
#[\Attribute(\Attribute::TARGET_METHOD)] | ||
class RunMiddleware | ||
{ | ||
public function __construct( | ||
public string $name | ||
) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
|
||
namespace App\Controller; | ||
|
||
use App\Helper\DashboardHelper; | ||
use App\Repository\OptionRepository; | ||
use App\Entity\Option; | ||
|
||
use Symfony\Component\HttpFoundation\Response; | ||
use Symfony\Component\HttpFoundation\RedirectResponse; | ||
|
||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | ||
|
||
// Use in controllers: | ||
abstract class BaseController extends AbstractController | ||
{ | ||
|
||
protected DashboardHelper $dashboardHelper; | ||
|
||
public function __construct(DashboardHelper $dashboardHelper) | ||
{ | ||
$this->dashboardHelper = $dashboardHelper; | ||
} | ||
|
||
public function checkChangelogRedirect(): ?Response | ||
{ | ||
$current_system_changelog_version = $this->dashboardHelper->getSystemChangelogVersion(); | ||
|
||
$last_seen_changelog_version = $this->dashboardHelper->getOptionValue('LAST_SEEN_CHANGELOG_VERSION') ?? '0'; | ||
|
||
if ($current_system_changelog_version != $last_seen_changelog_version) { | ||
$this->dashboardHelper->setOptionValue('LAST_SEEN_CHANGELOG_VERSION', $current_system_changelog_version); | ||
return $this->redirectToRoute('changelog-version', ['version' => $current_system_changelog_version]); | ||
} | ||
|
||
return null; | ||
} | ||
|
||
public function checkOnboardingRedirect(): ?Response | ||
{ | ||
$onboarding_completed = $this->dashboardHelper->getOptionValue('ONBOARDING_COMPLETED') ?? 'no'; | ||
|
||
if ($onboarding_completed == 'no') { | ||
$onboarding_completed = 'yes'; | ||
$this->dashboardHelper->setOptionValue('ONBOARDING_COMPLETED', $onboarding_completed); | ||
return $this->redirectToRoute('hello'); | ||
} | ||
|
||
return null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
<?php | ||
|
||
namespace App\Controller; | ||
|
||
use App\Controller\BaseController; | ||
use App\Attribute\RunMiddleware; | ||
use App\Entity\Task; | ||
use App\Helper\BackupsHelper; | ||
use App\Helper\DashboardHelper; | ||
use App\Helper\EdgeAppsHelper; | ||
use App\Helper\StorageHelper; | ||
use App\Helper\SystemHelper; | ||
use App\Repository\TaskRepository; | ||
use App\Repository\OptionRepository; | ||
use Symfony\Component\HttpFoundation\Response; | ||
use Symfony\Component\Routing\Annotation\Route; | ||
use Symfony\Component\Security\Http\Attribute\IsGranted; | ||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | ||
|
||
|
||
#[IsGranted('IS_AUTHENTICATED_FULLY')] | ||
class ChangelogController extends AbstractController | ||
{ | ||
private TaskRepository $taskRepository; | ||
private OptionRepository $optionRepository; | ||
private SystemHelper $systemHelper; | ||
private EdgeAppsHelper $edgeAppsHelper; | ||
private StorageHelper $storageHelper; | ||
private BackupsHelper $backupsHelper; | ||
protected DashboardHelper $dashboardHelper; | ||
|
||
public function __construct( | ||
TaskRepository $taskRepository, | ||
OptionRepository $optionRepository, | ||
SystemHelper $systemHelper, | ||
EdgeAppsHelper $edgeAppsHelper, | ||
StorageHelper $storageHelper, | ||
DashboardHelper $dashboardHelper, | ||
BackupsHelper $backupsHelper | ||
) { | ||
$this->taskRepository = $taskRepository; | ||
$this->optionRepository = $optionRepository; | ||
$this->systemHelper = $systemHelper; | ||
$this->edgeAppsHelper = $edgeAppsHelper; | ||
$this->storageHelper = $storageHelper; | ||
$this->dashboardHelper = $dashboardHelper; | ||
$this->backupsHelper = $backupsHelper; | ||
} | ||
|
||
#[Route('/changelog', name: 'latest-change-log')] | ||
public function hello(): Response | ||
{ | ||
|
||
$target_version = $this->dashboardHelper->getSystemChangelogVersion(); | ||
|
||
# If LAST_SEEN_CHANGELOG_VERSION is not set, redirect to the changelog page. | ||
|
||
return $this->render('changelog/' . $target_version . '.html.twig', [ | ||
// 'controller_title' => 'Dashboard', | ||
// 'controller_subtitle' => 'Welcome back!', | ||
// 'container_system_uptime' => $this->getSystemUptimeContainerVar(), | ||
// 'container_working_edgeapps' => $this->getWorkingEdgeAppsContainerVars(), | ||
// 'container_storage_summary' => $this->getStorageSummaryContainerVars(), | ||
// 'container_backups_last_run' => $this->getLastBackupRunContainerVar(), | ||
// 'container_actions_overview' => $this->getActionsOverviewContainerVars(), | ||
// 'container_apps_quickaccess' => $this->getQuickEdgeAppsAccessContainerVars(), | ||
'target_version' => $target_version, | ||
'dashboard_settings' => $this->dashboardHelper->getSettings(), | ||
]); | ||
} | ||
|
||
#[Route('/changelog/{version}', name: 'changelog-version')] | ||
public function changelog_version(string $version): Response | ||
{ | ||
return $this->render('changelog/' . $version . '.html.twig', [ | ||
// 'controller_title' => 'Dashboard', | ||
// 'controller_subtitle' => 'Welcome back!', | ||
// 'container_system_uptime' => $this->getSystemUptimeContainerVar(), | ||
// 'container_working_edgeapps' => $this->getWorkingEdgeAppsContainerVars(), | ||
// 'container_storage_summary' => $this->getStorageSummaryContainerVars(), | ||
// 'container_backups_last_run' => $this->getLastBackupRunContainerVar(), | ||
// 'container_actions_overview' => $this->getActionsOverviewContainerVars(), | ||
// 'container_apps_quickaccess' => $this->getQuickEdgeAppsAccessContainerVars(), | ||
'target_version' => $version, | ||
'dashboard_settings' => $this->dashboardHelper->getSettings(), | ||
]); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.