mirror of
https://github.com/Dvorinka/Containr.git
synced 2026-10-29 08:04:53 +00:00
merge: resolve main into feat/app-demo-polish
This commit is contained in:
commit
38e0bc1802
42 files changed
+4125
-585
No files matched your search
@@ -125,6 +125,7 @@ export function TemplatesPage() {
|
||||
const [editorOpen, setEditorOpen] = useState(false);
|
||||
const [editorJson, setEditorJson] = useState(EMPTY_TEMPLATE_JSON);
|
||||
const [editingTemplate, setEditingTemplate] = useState<TemplateEntity | null>(null);
|
||||
const [editorIsPublic, setEditorIsPublic] = useState(false);
|
||||
const [editorError, setEditorError] = useState<string | null>(null);
|
||||
|
||||
const [categoryFilter, setCategoryFilter] = useState('');
|
||||
@@ -346,6 +347,7 @@ export function TemplatesPage() {
|
||||
const openCreateEditor = () => {
|
||||
setEditingTemplate(null);
|
||||
setEditorJson(EMPTY_TEMPLATE_JSON);
|
||||
setEditorIsPublic(false);
|
||||
setEditorError(null);
|
||||
setEditorOpen(true);
|
||||
};
|
||||
@@ -378,6 +380,7 @@ export function TemplatesPage() {
|
||||
2,
|
||||
),
|
||||
);
|
||||
setEditorIsPublic(template.isPublic);
|
||||
setEditorError(null);
|
||||
setEditorOpen(true);
|
||||
};
|
||||
@@ -402,6 +405,7 @@ export function TemplatesPage() {
|
||||
logo: body.logo ?? '',
|
||||
config: body.config as Record<string, unknown>,
|
||||
variables: Array.isArray(body.variables) ? body.variables : [],
|
||||
isPublic: editorIsPublic,
|
||||
});
|
||||
};
|
||||
|
||||
@@ -571,6 +575,11 @@ export function TemplatesPage() {
|
||||
Mine
|
||||
</span>
|
||||
) : null}
|
||||
{!template.isOfficial && template.isPublic ? (
|
||||
<span className="px-1.5 py-0.5 rounded bg-[var(--info-soft)] text-[var(--info)] text-[10px] font-semibold">
|
||||
Public
|
||||
</span>
|
||||
) : null}
|
||||
</div>
|
||||
<div className="flex items-center gap-2 mt-1">
|
||||
<span
|
||||
@@ -646,6 +655,11 @@ export function TemplatesPage() {
|
||||
Official
|
||||
</span>
|
||||
)}
|
||||
{!selectedDetail.template.isOfficial && selectedDetail.template.isPublic && (
|
||||
<span className="px-2 py-0.5 rounded-full bg-[var(--info-soft)] text-[var(--info)] text-xs font-medium">
|
||||
Public
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
<p className="text-sm text-[var(--text-secondary)] mt-1">{selectedDetail.template.description}</p>
|
||||
</div>
|
||||
@@ -921,9 +935,15 @@ export function TemplatesPage() {
|
||||
</div>
|
||||
) : null}
|
||||
<div className="flex items-center justify-between border-t border-[var(--border-subtle)] px-5 py-3.5">
|
||||
<p className="text-[11px] text-[var(--text-tertiary)]">
|
||||
Saved as a user template — only you (and admins) can edit or delete it.
|
||||
</p>
|
||||
<label className="inline-flex cursor-pointer items-center gap-2 text-[11px] text-[var(--text-secondary)]">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={editorIsPublic}
|
||||
onChange={(e) => setEditorIsPublic(e.target.checked)}
|
||||
className="h-3.5 w-3.5 accent-[var(--accent-primary)]"
|
||||
/>
|
||||
List in the public catalog - anyone browsing this instance can see and deploy it.
|
||||
</label>
|
||||
<div className="flex items-center gap-2">
|
||||
<button
|
||||
type="button"
|
||||
|
||||
Reference in new issue
Block a user