Restructure project folders and remove obsolete files
All checks were successful
Deploy Spot / deploy (push) Successful in 34s

This commit is contained in:
2026-05-30 01:32:20 +02:00
parent c2685a2731
commit 034d02f042
65 changed files with 382 additions and 2165 deletions

View File

@@ -45,21 +45,6 @@ class Spot extends Main
const MAIN_PAGE = 'index';
const DIST_FOLDER = '../dist/';
const MUTATING_ACTIONS = array(
'add_post',
'subscribe',
'unsubscribe',
'update_project',
'upload',
'add_comment',
'add_position',
'admin_set',
'admin_create',
'admin_delete',
'build_geojson'
);
private Project $oProject;
private Media $oMedia;
private User $oUser;
@@ -179,14 +164,7 @@ class Spot extends Main
);
}
public function getAppMainPage() {
//Cache Page List
$asPages = array_diff($this->asMasks, array('email.update', 'email.confirmation'));
if(!$this->oUser->checkUserClearance(User::CLEARANCE_ADMIN)) {
$asPages = array_diff($asPages, array('admin', 'upload'));
}
public function getAppMainPage(string $sCsrfToken='') {
return parent::getMainPage(
array(
'projects' => $this->oProject->getProjects(),
@@ -200,7 +178,7 @@ class Spot extends Main
'hash_sep' => '-',
'title' => self::PROJECT_NAME,
'default_page' => 'project',
'csrf_token' => $this->getCsrfToken()
'csrf_token' => $sCsrfToken
)
),
self::MAIN_PAGE,
@@ -212,15 +190,14 @@ class Spot extends Main
'instances' => [
'entrypoint' => $this->getAppEntryPoints()
]
),
$asPages
)
);
}
private function getAppEntryPoints() {
return array_map(
function($sFileName) {return ['filename' => self::addTimestampToFilePath($sFileName)];},
json_decode(file_get_contents(self::DIST_FOLDER.'entrypoints.json'), true)['entrypoints']['app']
json_decode(file_get_contents('assets/entrypoints.json'), true)['entrypoints']['app']
);
}