feat(steam_workshop): production rewrite with full admin profile page and server settings
- module.php: bump db_version to 2; full v2 schema in install_queries[0]; ALTER TABLE migration in install_queries[2] adding 11 new profile columns plus server_workshop_settings table
- WorkshopRepository: expand saveProfile() with all new fields (steam_app_id, steamcmd_login_mode, steamcmd_path, mod_separator, copy_keys, key paths, pre/post scripts, validation_notes); add nullOrStr helper; add server settings CRUD (getServerSettings, saveServerSettings, recordUpdateResult, setUpdateQueued, listQueuedUpdateHomes); update insertOrUpdateMod with custom_folder; update listAllEnabledMods to select new columns
- WorkshopProfileController: full extractProfileData() with all new fields; validateProfileData with folder template check
- views/admin/profile_form.php: full rewrite – all required fields (steam_app_id, workshop_app_id, login mode, SteamCMD path, OS, cache path, install path, folder naming dropdown, launch params, mod separator, copy method, copy keys with JS show/hide, key paths, pre/per-mod/post bash scripts with DayZ example, validation notes, config file template)
- views/admin/profiles.php: updated list view columns (App IDs, Login, Method)
- WorkshopInstaller.php: full rewrite with %var% template support (+ legacy {var} compat); buildTemplateVars() resolves all 14 variables; pre/post script execution; triggerSteamCmdDownload uses new profile fields; copyKeys helper
- WorkshopModController: add save_settings and queue_update POST actions; handleModsPage loads serverSettings + allProfiles
- views/user_workshop_mods.php: full rewrite – server settings form (enable, profile selector, update mode, restart behavior), update status grid (status/error/time/success time), queue update button, mod table with custom_folder column and toggle/order auto-submit
- lang/en_US.php: ~80 new string keys for all v2 fields
- steam_workshop.css: new v2 styles (3-col grid, script textarea, status grid, server settings card, badges)"
Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/e7f0d80d-f775-4794-adbd-cf48b55bc9c1
Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
This commit is contained in:
parent
199b398543
commit
69f415ad86
10 changed files with 1334 additions and 312 deletions
|
|
@ -199,5 +199,102 @@ return [
|
|||
'error_mod_not_found' => 'Mod or profile not found.',
|
||||
'error_toggle_failed' => 'Failed to update mod status.',
|
||||
'error_order_failed' => 'Failed to update load order.',
|
||||
|
||||
// -------------------------------------------------------
|
||||
// New v2 labels
|
||||
// -------------------------------------------------------
|
||||
|
||||
// Admin profile form – new fields
|
||||
'config_steamcmd_note' => 'Workshop mods are downloaded using SteamCMD: +workshop_download_item <App ID> <Mod ID>. Configure the paths and scripts below to control how mods are installed for servers of this game type.',
|
||||
'config_label_enabled' => 'Profile enabled',
|
||||
'config_hint_game_key' => 'Short identifier matching the game XML key, e.g. dayz_linux',
|
||||
'config_hint_app_id' => 'The App ID used with +workshop_download_item, e.g. 221100 for DayZ',
|
||||
'config_hint_launch_tpl' => 'Complete launch parameter string appended to server start. Each mod folder is joined with the separator above.',
|
||||
'profile_section_basic' => 'Basic identification',
|
||||
'profile_section_steam' => 'Steam & SteamCMD settings',
|
||||
'profile_section_paths' => 'Download & install paths',
|
||||
'profile_section_folder' => 'Mod folder naming',
|
||||
'profile_section_launch' => 'Launch parameters',
|
||||
'profile_section_scripts' => 'Bash scripts',
|
||||
'profile_section_flags' => 'Options & validation',
|
||||
'profile_label_game_name' => 'Game display name',
|
||||
'profile_label_steam_app_id' => 'Steam App ID',
|
||||
'profile_hint_steam_app_id' => 'The Steam game App ID (e.g. 221100 for DayZ). Used when Steam login is required.',
|
||||
'config_label_app_id' => 'Workshop App ID',
|
||||
'config_hint_app_id' => 'The App ID used with +workshop_download_item, e.g. 221100 for DayZ',
|
||||
'profile_label_steamcmd_path' => 'SteamCMD path on agent',
|
||||
'profile_hint_steamcmd_path' => 'Full path to steamcmd.sh on the remote agent. Leave blank to use the agent default (/home/gameserver/steamcmd/steamcmd.sh).',
|
||||
'profile_label_steam_login_required'=> 'Steam login required (game is not free / requires ownership)',
|
||||
'profile_label_steamcmd_login_mode' => 'SteamCMD login mode',
|
||||
'profile_hint_steamcmd_login_mode' => 'Use anonymous for free Workshop mods. Use configured account for games requiring ownership.',
|
||||
'profile_label_os' => 'Supported OS',
|
||||
'profile_label_cache_path' => 'Workshop download/cache path',
|
||||
'profile_hint_cache_path' => 'Where SteamCMD stores downloaded mod content on the agent. E.g. /home/gameserver/steamcmd/steamapps/workshop/content/%workshop_app_id%/%workshop_id%',
|
||||
'profile_label_install_path' => 'Server mod install root',
|
||||
'profile_hint_install_path' => 'Base directory inside the server where mods are installed. E.g. %server_path%/mods/%install_name%',
|
||||
'profile_label_folder_format' => 'Folder naming format',
|
||||
'profile_hint_folder_format' => 'How each mod folder is named inside the install root.',
|
||||
'profile_label_folder_name' => 'Custom folder name template',
|
||||
'profile_hint_folder_name' => 'Use %workshop_id% or %mod_name%. E.g. @%workshop_id%',
|
||||
'profile_label_mod_launch_param' => 'Mod launch parameter format',
|
||||
'profile_hint_mod_launch_param' => 'How the full mod list is passed to the server start command. E.g. -mod=%mods%',
|
||||
'profile_label_mod_separator' => 'Mod separator',
|
||||
'profile_hint_mod_separator' => 'Character used to join multiple mod folder names in the launch parameter.',
|
||||
'profile_label_launch_tpl' => 'Full launch parameter template (optional)',
|
||||
'profile_label_copy_method' => 'Copy method',
|
||||
'profile_label_copy_keys' => 'Copy mod keys (*.bikey) to server keys directory',
|
||||
'profile_label_key_source' => 'Key source path',
|
||||
'profile_hint_key_source' => 'Path inside the mod cache where key files live. E.g. %source_path%/keys',
|
||||
'profile_label_key_dest' => 'Key destination path',
|
||||
'profile_hint_key_dest' => 'Where keys are copied on the server. E.g. %server_path%/keys',
|
||||
'profile_label_pre_script' => 'Pre-update bash script',
|
||||
'profile_hint_pre_script' => 'Runs once before any mod is downloaded/installed. Variables: %home_id% %server_path% %workshop_app_id%',
|
||||
'profile_label_install_script' => 'Per-mod install bash script',
|
||||
'profile_hint_install_script' => 'Runs once for each mod. All template variables listed above are available.',
|
||||
'profile_label_post_script' => 'Post-update bash script',
|
||||
'profile_hint_post_script' => 'Runs once after all mods have been installed. Variables: %home_id% %server_path% %workshop_app_id%',
|
||||
'profile_label_requires_restart' => 'Server restart required after mod install or update',
|
||||
'profile_label_validation_notes' => 'Validation notes / help text (shown to server owners)',
|
||||
'profile_label_config_tpl' => 'Config file template (optional)',
|
||||
'profile_template_vars' => 'Variables: %home_id% %server_path% %steam_app_id% %workshop_app_id% %workshop_id% %mod_name% %install_name% %download_path% %source_path% %target_path% %keys_source_path% %keys_target_path% %steamcmd_path%',
|
||||
'profile_template_vars_heading' => 'Template variables:',
|
||||
'profile_scripts_order' => 'Execution order:',
|
||||
'profile_scripts_per_mod' => 'repeated for each mod',
|
||||
'profile_script_example_toggle' => 'Show DayZ-style example',
|
||||
'profile_col_app_ids' => 'App IDs',
|
||||
'profile_col_login' => 'Login',
|
||||
'profile_col_steam' => 'Steam',
|
||||
'profile_col_workshop' => 'Workshop',
|
||||
'profile_badge_login_required' => 'Login req.',
|
||||
'profile_col_game' => 'Game',
|
||||
'profile_col_key' => 'Game Key',
|
||||
'profile_col_method' => 'Install Method',
|
||||
'profile_col_restart' => 'Restart?',
|
||||
'profile_col_status' => 'Status',
|
||||
'error_folder_template_required' => 'Custom folder name template is required when format is set to custom.',
|
||||
|
||||
// Server-level settings (user/server page)
|
||||
'heading_server_settings' => 'Workshop Settings for this server',
|
||||
'label_workshop_enabled' => 'Enable Workshop for this server',
|
||||
'label_select_profile' => 'Workshop game profile',
|
||||
'label_auto_detect' => 'Auto-detect from game type',
|
||||
'label_update_mode' => 'Update mode',
|
||||
'label_restart_behavior' => 'Restart behavior',
|
||||
'update_mode_manual' => 'Manual only',
|
||||
'update_mode_scheduled' => 'Scheduled',
|
||||
'update_mode_on_restart' => 'Before server restart',
|
||||
'restart_behavior_none' => 'No restart',
|
||||
'restart_behavior_queue' => 'Queue restart',
|
||||
'restart_behavior_stop' => 'Stop / Update / Start',
|
||||
'btn_queue_update' => 'Queue manual update',
|
||||
'label_last_update_status' => 'Last update status',
|
||||
'label_last_update_time' => 'Last update time',
|
||||
'label_last_success_time' => 'Last successful update',
|
||||
'label_last_update_error' => 'Last error',
|
||||
'update_queued_notice' => 'A manual update is queued and will run on the next scheduler cycle.',
|
||||
'settings_saved' => 'Workshop settings saved.',
|
||||
'update_queued' => 'Manual update queued. It will run on the next scheduler cycle.',
|
||||
'col_mod_folder' => 'Install folder',
|
||||
'label_admin_notes' => 'Admin notes:',
|
||||
];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue