added user panel token and folder needed for webgui pr (#3141)

This commit is contained in:
Micah Acinapura
2024-04-16 08:15:03 +02:00
committed by GitHub
parent f14bb06852
commit cfb400e7b8
3 changed files with 7 additions and 0 deletions
+3
View File
@@ -33,6 +33,9 @@ asset.onInitialize(function()
local directories = openspace.propertyValue("Modules.WebGui.Directories")
directories[#directories + 1] = "frontend"
directories[#directories + 1] = frontend .. "frontend"
--Add user directory for webpanels
directories[#directories + 1] = "webpanels"
directories[#directories + 1] = openspace.absPath("${USER_PANELS}")
openspace.setPropertyValueSingle("Modules.WebGui.Directories", directories)
openspace.setPropertyValueSingle("Modules.WebGui.DefaultEndpoint", "frontend")
+1
View File
@@ -101,6 +101,7 @@ Paths = {
USER_ASSETS = "${USER}/data/assets",
USER_PROFILES = "${USER}/data/profiles",
USER_CONFIG = "${USER}/config",
USER_PANELS = "${USER}/webpanels",
FONTS = "${DATA}/fonts",
TASKS = "${DATA}/tasks",
-- If the the 'OPENSPACE_SYNC' environment variable is defined on the system, use that
+3
View File
@@ -897,6 +897,9 @@ void OpenSpaceEngine::createUserDirectoriesIfNecessary() {
if (!std::filesystem::exists(absPath("${USER_CONFIG}"))) {
std::filesystem::create_directories(absPath("${USER_CONFIG}"));
}
if (!std::filesystem::is_directory(absPath("${USER_PANELS}"))) {
std::filesystem::create_directories(absPath("${USER_PANELS}"));
}
}
void OpenSpaceEngine::runGlobalCustomizationScripts() {