Compare commits

..

15 Commits

427 changed files with 4443 additions and 51762 deletions

1
.gitattributes vendored Normal file
View File

@ -0,0 +1 @@
*.pdf filter=lfs diff=lfs merge=lfs -text

6
.gitignore vendored
View File

@ -8,4 +8,8 @@ pkg
!.idea/codeStyles/ !.idea/codeStyles/
!.idea/runConfigurations/ !.idea/runConfigurations/
!.idea/inspectionProfiles/ !.idea/inspectionProfiles/
*.iml *.iml
.cache/
compile_commands.json
*.db

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "modules/cpp-libraries"]
path = modules/cpp-libraries
url = ssh://git@192.168.1.101:2222/lukas/cpp-libraries.git

2
.vscode/launch.json vendored
View File

@ -3,7 +3,7 @@
"configurations": [ "configurations": [
{ {
"name": "Debug Server Admin Panel", "name": "Debug Server Admin Panel",
"type": "cppdbg", "type": "lldb",
"request": "launch", "request": "launch",
"program": "${workspaceFolder}/build/lf-server-admin-panel", "program": "${workspaceFolder}/build/lf-server-admin-panel",
"args": [], "args": [],

View File

@ -99,5 +99,6 @@
"typeinfo": "cpp", "typeinfo": "cpp",
"valarray": "cpp", "valarray": "cpp",
"variant": "cpp" "variant": "cpp"
} },
"C_Cpp.errorSquiggles": "disabled"
} }

8
.vscode/tasks.json vendored
View File

@ -9,6 +9,14 @@
"problemMatcher": [ "problemMatcher": [
"$gcc" "$gcc"
] ]
},
{
"label": "build Frontend",
"type": "shell",
"command": "npm run build",
"options": {
"cwd": "frontend"
}
} }
] ]
} }

View File

@ -33,44 +33,32 @@ foreach(file IN LISTS TEMPLATE_FILES)
configure_file("${file}" "${CMAKE_BINARY_DIR}/${rel_path}" COPYONLY) configure_file("${file}" "${CMAKE_BINARY_DIR}/${rel_path}" COPYONLY)
endforeach() endforeach()
add_compile_options(-Wno-deprecated-declarations) include_directories(
add_compile_options(-Wno-deprecated-literal-operator) modules/cpp-libraries/include/
src
# Use Crow from system include (installed via yay -S crow + asio) src/htmx
include_directories(/usr/include src src/htmx src/shadowrun src/database src/login) src/shadowrun
src/database
src/login
)
add_executable(${TARGET_NAME} add_executable(${TARGET_NAME}
# sqlite3
modules/cpp-libraries/src/sqlite3.c
modules/cpp-libraries/src/monocypher.c
src/main.cpp src/main.cpp
src/utils.hpp src/utils.hpp
src/utils.cpp src/utils.cpp
src/htmx/HtmxTable.cpp
src/htmx/HtmxTable.h
src/systemd.cpp src/systemd.cpp
src/systemd.h src/systemd.h
src/json.hpp
src/htmx/HtmxTableRow.cpp
src/htmx/HtmxTableRow.h
src/htmx/HtmxObject.cpp
src/htmx/HtmxObject.h
src/htmx_helper.cpp
src/htmx_helper.h
src/json_settings.cpp src/json_settings.cpp
src/json_settings.h src/json_settings.h
src/json.hpp
src/database/database.cpp src/database/database.cpp
src/database/database.hpp src/database/database.hpp
src/database/sqlite_orm.h
# Shadowrun # Shadowrun
src/shadowrun/HtmxShItemList.cpp
src/shadowrun/HtmxShItemList.hpp
src/shadowrun/HtmxShAttributeList.cpp
src/shadowrun/HtmxShAttributeList.hpp
src/shadowrun/HtmxShCondition.cpp
src/shadowrun/HtmxShCondition.hpp
src/shadowrun/ShadowrunCharacterForm.hpp
src/shadowrun/ShadowrunCharacterForm.cpp
src/shadowrun/ShadowrunApi.cpp src/shadowrun/ShadowrunApi.cpp
src/shadowrun/ShadowrunApi.hpp src/shadowrun/ShadowrunApi.hpp
src/shadowrun/ShadowrunDb.cpp src/shadowrun/ShadowrunDb.cpp
@ -79,12 +67,22 @@ add_executable(${TARGET_NAME}
# login # login
src/login/login.cpp src/login/login.cpp
src/login/login.hpp src/login/login.hpp
src/login/loginDb.cpp
src/login/Session.cpp
src/login/SessionHandler.cpp
) )
# warnings to ignore
target_compile_options(${TARGET_NAME} PRIVATE
$<$<COMPILE_LANGUAGE:CXX>:
-Wno-deprecated-literal-operator
-Wno-deprecated-declarations
>
)
target_compile_definitions(${TARGET_NAME} PRIVATE APPLICATION_NAME="${TARGET_NAME}") target_compile_definitions(${TARGET_NAME} PRIVATE APPLICATION_NAME="${TARGET_NAME}")
target_link_libraries(${TARGET_NAME} pthread sqlite3 sodium) target_link_libraries(${TARGET_NAME} pthread sodium)
# Optional: Print build type at configuration time # Optional: Print build type at configuration time
message(STATUS "Configuring build type: ${CMAKE_BUILD_TYPE}") message(STATUS "Configuring build type: ${CMAKE_BUILD_TYPE}")

View File

@ -15,6 +15,19 @@ run : F5 or Run → Start Debugging
cmake -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON cmake -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
``` ```
## Svelte
Inside the fronend directory
### Install
```
npm install -D @sveltejs/adapter-static
```
### Build
```
npm run build
```
## Make Package ## Make Package
1. tar the source files to make it cleaner 1. tar the source files to make it cleaner
@ -26,4 +39,11 @@ tar czf pkg/lf-server-admin-panel-0.1.1.tar.gz src/ static/ templates/ lf-server
``` ```
makepkg -f makepkg -f
``` ```
## Database
### Attributes
| Character Id | Attribute | Value |
###

3
assets/settings.json Normal file
View File

@ -0,0 +1,3 @@
{
"httpPort" : 3010
}

BIN
assets/shadowrun/Shadowrun-4E-Corebook-full.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p1.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p10.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p100.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p101.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p102.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p103.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p104.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p105.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p106.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p107.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p108.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p109.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p11.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p110.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p111.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p112.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p113.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p114.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p115.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p116.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p117.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p118.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p119.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p12.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p120.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p121.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p122.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p123.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p124.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p125.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p126.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p127.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p128.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p129.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p13.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p130.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p131.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p132.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p133.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p134.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p135.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p136.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p137.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p138.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p139.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p14.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p140.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p141.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p142.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p143.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p144.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p145.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p146.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p147.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p148.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p149.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p15.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p150.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p151.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p152.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p153.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p154.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p155.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p156.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p157.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p158.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p159.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p16.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p160.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p161.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p162.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p163.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p164.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p165.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p166.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p167.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p168.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p169.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p17.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p170.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p171.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p172.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p173.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p174.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p175.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p176.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p177.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p178.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/shadowrun/Shadowrun-4E-Corebook-p179.pdf (Stored with Git LFS) Normal file

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More