mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
59 lines
3.1 KiB
PHTML
59 lines
3.1 KiB
PHTML
<?php
|
|
$isUpgrade = $isUpgrade ?? false;
|
|
$defaultSecretKey = $defaultSecretKey ?? '';
|
|
$secretKeyValue = htmlspecialchars((string) $defaultSecretKey, ENT_QUOTES, 'UTF-8');
|
|
?>
|
|
<div class="step-layout" data-step="2">
|
|
<div class="stack-xl">
|
|
<div class="stack-xxxs">
|
|
<h1 class="typography-title-s text-neutral-primary">Secure your app</h1>
|
|
<p class="typography-text-m-400 text-neutral-secondary">
|
|
<?php echo $isUpgrade ? 'Review your existing secret key or generate a new one.' : 'Your server\'s private secret key for encryption. Generate a random secure key, or provide your own.'; ?>
|
|
</p>
|
|
</div>
|
|
|
|
<div class="stack-xl">
|
|
<div class="inline-alert inline-alert--warning">
|
|
<div class="inline-alert-content">
|
|
<div class="inline-alert-icon" aria-hidden="true">
|
|
<?php include __DIR__ . '/../../icons/warning.svg'; ?>
|
|
</div>
|
|
<div class="inline-alert-text">
|
|
<div class="inline-alert-title typography-text-m-500 text-warning">Save your key</div>
|
|
<div class="inline-alert-description typography-text-m-400 text-neutral-primary">You won't be able to see this key again. Copy it somewhere safe before continuing.</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="input-row">
|
|
<div class="input-group stack-xs">
|
|
<label for="secret-key" class="label-text typography-text-m-500 text-neutral-secondary">Secret API key</label>
|
|
<div class="input-action">
|
|
<input
|
|
type="text"
|
|
id="secret-key"
|
|
name="secretKey"
|
|
class="input-action-input typography-text-m-400 text-neutral-primary"
|
|
value="<?php echo $secretKeyValue; ?>"
|
|
minlength="1"
|
|
maxlength="64"
|
|
>
|
|
<div class="input-action-buttons">
|
|
<span class="tooltip-wrapper" data-tooltip-default="Copy" data-tooltip-success="Copied">
|
|
<button type="button" class="input-icon-button" aria-label="Copy secret key" aria-describedby="copy-tooltip" data-copy-target="secret-key">
|
|
<?php include __DIR__ . '/../../icons/copy.svg'; ?>
|
|
</button>
|
|
<span id="copy-tooltip" class="tooltip typography-text-m-400 text-on-invert" role="tooltip">Copy</span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<button type="button" class="icon-button" aria-label="Regenerate secret key" data-regenerate-target="secret-key">
|
|
<?php include __DIR__ . '/../../icons/refresh.svg'; ?>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|