@axium/client 0.44.0 → 0.44.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/Icon.svelte CHANGED
@@ -15,6 +15,7 @@
15
15
  width: var(--size, 1em);
16
16
  height: var(--size, 1em);
17
17
  display: inline-block;
18
+ flex-shrink: 0;
18
19
  fill: var(--fill, hsl(var(--hue) 0 var(--fg-light)));
19
20
  user-select: none;
20
21
  }
package/lib/Secret.svelte CHANGED
@@ -20,9 +20,7 @@
20
20
  let dialog = $state<HTMLDialogElement>(),
21
21
  saved = $state(false);
22
22
 
23
- const source = $derived<SecretStore | null>(saved ? 'file' : info.source),
24
- store = $derived<SecretStore>(source ?? (info.editable ? 'file' : 'systemd')),
25
- name = $derived(store == 'systemd' ? 'axium.' + info.id : info.id);
23
+ const source = $derived<SecretStore | null>(saved ? info.store : info.source);
26
24
 
27
25
  async function submit(data: Record<string, FormDataEntryValue>) {
28
26
  await save!(String(data.value));
@@ -32,9 +30,12 @@
32
30
  </script>
33
31
 
34
32
  <span class={['Secret', !source && 'unset']}>
35
- <Icon i={store == 'systemd' ? 'lock-keyhole' : 'file-lock'} title={text(`Secret.${source ?? 'unset'}`, { id: info.id })} />
36
- <code>{name}</code>
37
- <ClipboardCopy value={name} />
33
+ <Icon
34
+ i={(source ?? info.store) == 'systemd' ? 'lock-keyhole' : 'file-lock'}
35
+ title={text(`Secret.${source ?? 'unset'}`, { id: info.id })}
36
+ />
37
+ <code>{info.id}</code>
38
+ <ClipboardCopy value={info.id} />
38
39
  {#if save && info.editable}
39
40
  <button type="button" title={text(source ? 'Secret.replace' : 'Secret.add')} onclick={() => dialog?.showModal()}>
40
41
  <Icon i="pencil" />
@@ -213,7 +213,7 @@
213
213
  <div class={['ZodInput', noLabel && 'no-label']}>
214
214
  {@render labelFor(id)}
215
215
  <Secret
216
- info={secrets?.()?.[path] ?? { id: path, source: null, editable: true }}
216
+ info={secrets?.()?.[path] ?? { id: path, source: null, store: 'file', editable: true }}
217
217
  label={labelText}
218
218
  save={readonly ? undefined : saveSecret}
219
219
  minLength={schema.minLength}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axium/client",
3
- "version": "0.44.0",
3
+ "version": "0.44.2",
4
4
  "author": "James Prevett <jp@jamespre.dev>",
5
5
  "funding": {
6
6
  "type": "individual",