updates
This commit is contained in:
parent
faf0de39a7
commit
3e084899a7
3 changed files with 15 additions and 18 deletions
|
|
@ -10,3 +10,4 @@
|
|||
## 2026-01-19
|
||||
- Hid staging directory, install strategy, and post-install script controls from non-admins to keep panel defaults enforced for customers.
|
||||
- Added the Steam Workshop mod picker, including search-backed UI, JSON state handling, and refreshed styling so customers can select mods without touching raw ID lists.
|
||||
- Pointed the Workshop search endpoint at whichever panel script rendered the page so AJAX searches work in both the main panel and the customer Game Monitor.
|
||||
|
|
|
|||
|
|
@ -47,12 +47,8 @@ $currentAdapterName = $adapterOptions[$formConfig['adapter_key']] ?? strtoupper(
|
|||
<span><?php echo htmlspecialchars($lang['label_staging_dir']); ?></span>
|
||||
<input type="text" name="workshop[staging_dir]" value="<?php echo $stagingDir; ?>" placeholder="/home/ogp_agent/workshop-staging" />
|
||||
</label>
|
||||
<?php else: ?>
|
||||
<label>
|
||||
<span><?php echo htmlspecialchars($lang['label_staging_dir']); ?></span>
|
||||
<input type="text" value="<?php echo $stagingDir; ?>" disabled />
|
||||
<small><?php echo htmlspecialchars($lang['hint_admin_only']); ?></small>
|
||||
</label>
|
||||
<?php endif; ?>
|
||||
<?php if (!$isAdmin): ?>
|
||||
<input type="hidden" name="workshop[staging_dir]" value="<?php echo $stagingDir; ?>" />
|
||||
<?php endif; ?>
|
||||
|
||||
|
|
@ -65,11 +61,8 @@ $currentAdapterName = $adapterOptions[$formConfig['adapter_key']] ?? strtoupper(
|
|||
<option value="staging" <?php echo $installStrategy === 'staging' ? 'selected' : ''; ?>><?php echo htmlspecialchars($lang['install_staging']); ?></option>
|
||||
</select>
|
||||
</label>
|
||||
<?php else: ?>
|
||||
<label>
|
||||
<span><?php echo htmlspecialchars($lang['label_install_strategy']); ?></span>
|
||||
<input type="text" value="<?php echo htmlspecialchars($lang['install_' . $installStrategy] ?? $installStrategy); ?>" disabled />
|
||||
</label>
|
||||
<?php endif; ?>
|
||||
<?php if (!$isAdmin): ?>
|
||||
<input type="hidden" name="workshop[install_strategy]" value="<?php echo htmlspecialchars($installStrategy); ?>" />
|
||||
<?php endif; ?>
|
||||
|
||||
|
|
@ -86,12 +79,8 @@ $currentAdapterName = $adapterOptions[$formConfig['adapter_key']] ?? strtoupper(
|
|||
<span><?php echo htmlspecialchars($lang['label_post_install_script']); ?></span>
|
||||
<input type="text" name="workshop[post_install_script]" value="<?php echo $postInstall; ?>" placeholder="/home/ogp_agent/scripts/workshop-hook.sh" />
|
||||
</label>
|
||||
<?php else: ?>
|
||||
<label>
|
||||
<span><?php echo htmlspecialchars($lang['label_post_install_script']); ?></span>
|
||||
<input type="text" value="<?php echo $postInstall; ?>" disabled />
|
||||
<small><?php echo htmlspecialchars($lang['hint_admin_only']); ?></small>
|
||||
</label>
|
||||
<?php endif; ?>
|
||||
<?php if (!$isAdmin): ?>
|
||||
<input type="hidden" name="workshop[post_install_script]" value="<?php echo $postInstall; ?>" />
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,14 @@ declare(strict_types=1);
|
|||
/** @var array $home */
|
||||
/** @var int $homeId */
|
||||
$homeId = (int)($home['home_id'] ?? 0);
|
||||
$endpoint = sprintf('?m=steam_workshop&p=main&action=search&home_id=%d', $homeId);
|
||||
$scriptPath = (string)($_SERVER['PHP_SELF'] ?? '/index.php');
|
||||
if ($scriptPath === '') {
|
||||
$scriptPath = '/index.php';
|
||||
}
|
||||
if ($scriptPath[0] !== '/') {
|
||||
$scriptPath = '/' . ltrim($scriptPath, '/');
|
||||
}
|
||||
$endpoint = sprintf('%s?m=steam_workshop&p=main&action=search&home_id=%d', $scriptPath, $homeId);
|
||||
$initialItems = [];
|
||||
foreach ($config['workshop_items'] ?? [] as $item) {
|
||||
if (!is_array($item)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue