mirror of
https://github.com/cuigh/swirl
synced 2025-01-01 00:32:09 +00:00
52 lines
1.8 KiB
Go
52 lines
1.8 KiB
Go
{{ extends "../_layouts/default" }}
|
|
{{ import "../_modules/form" }}
|
|
|
|
{{ block script() }}
|
|
<script>$(() => new Swirl.Secret.NewPage())</script>
|
|
{{ end }}
|
|
|
|
{{ block body() }}
|
|
<section class="hero is-info">
|
|
<div class="hero-body">
|
|
<div class="container has-text-centered">
|
|
<h1 class="title is-2 is-uppercase">{{ i18n("secret.title") }}</h1>
|
|
<h2 class="subtitle is-5">{{ i18n("secret.description") }}</h2>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="section">
|
|
<h2 class="title">Create secret</h2>
|
|
<hr>
|
|
<form method="post" data-form="ajax-json" data-url="/secret/">
|
|
<div class="field">
|
|
<label class="label">{{ i18n("field.name") }}</label>
|
|
<div class="control">
|
|
<input name="name" class="input" type="text" placeholder="Secret file name" data-v-rule="native" required>
|
|
</div>
|
|
</div>
|
|
<div class="field">
|
|
<label class="label">{{ i18n("field.data") }}</label>
|
|
<div class="control">
|
|
<textarea name="data" class="textarea" rows="12" placeholder="Secret file content" data-v-rule="native" required></textarea>
|
|
</div>
|
|
</div>
|
|
<div class="field">
|
|
{{ yield switch(id="cb-base64", name="base64", label="Base64 encoded") }}
|
|
</div>
|
|
<div class="field">
|
|
<label class="label">{{ i18n("field.label") }}</label>
|
|
{{ yield options(name="label") }}
|
|
</div>
|
|
<div class="field">
|
|
<label class="label">{{ i18n("field.template") }}</label>
|
|
<div class="control">
|
|
{{ yield radio(name="template.name", value="", label="None", checked="") }}
|
|
{{ yield radio(name="template.name", value="golang", label="Golang") }}
|
|
</div>
|
|
<p class="help">Template feature needs Docker API version 1.37+</p>
|
|
</div>
|
|
{{ yield form_submit(url="/secret/") }}
|
|
</form>
|
|
</section>
|
|
{{ end }} |