@v1ct0rbr/minivault-web 0.6.1 → 0.6.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.
@@ -535,7 +535,7 @@ function H({ dbInfo: e, isLoading: t, error: n, label: r, compact: i = !1 }) {
535
535
  function U({ backup: e, onClose: t }) {
536
536
  let n = A(), r = T(), i = () => {
537
537
  n.mutate({ id: e.id });
538
- }, a = n.isPending;
538
+ }, a = n.isPending, o = e.backupType === "STORAGE";
539
539
  return /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("div", { className: "modal-backdrop show" }), /* @__PURE__ */ p("div", {
540
540
  className: "modal show d-block",
541
541
  tabIndex: -1,
@@ -571,15 +571,19 @@ function U({ backup: e, onClose: t }) {
571
571
  /* @__PURE__ */ m("div", {
572
572
  className: "modal-body",
573
573
  children: [
574
- /* @__PURE__ */ m("p", {
574
+ /* @__PURE__ */ p("p", {
575
575
  className: "text-muted small mb-3",
576
- children: [
576
+ children: o ? /* @__PURE__ */ m(f, { children: [
577
+ "O snapshot ",
578
+ /* @__PURE__ */ p("code", { children: e.filename }),
579
+ " será aplicado na pasta de storage de origem configurada no servidor."
580
+ ] }) : /* @__PURE__ */ m(f, { children: [
577
581
  "O arquivo ",
578
582
  /* @__PURE__ */ p("code", { children: e.filename }),
579
583
  " será aplicado no banco configurado abaixo."
580
- ]
584
+ ] })
581
585
  }),
582
- /* @__PURE__ */ p(H, {
586
+ !o && /* @__PURE__ */ p(H, {
583
587
  label: "Banco de destino",
584
588
  dbInfo: r.data,
585
589
  isLoading: r.isLoading,
@@ -613,7 +617,7 @@ function U({ backup: e, onClose: t }) {
613
617
  type: "button",
614
618
  className: "btn btn-primary",
615
619
  onClick: i,
616
- disabled: a || !r.data?.configured,
620
+ disabled: a || !o && !r.data?.configured,
617
621
  children: [a && /* @__PURE__ */ p(f, { children: /* @__PURE__ */ p("span", {
618
622
  className: "spinner-border spinner-border-sm me-2",
619
623
  "aria-hidden": !0
@@ -857,8 +861,8 @@ function G() {
857
861
  /* @__PURE__ */ p("button", {
858
862
  type: "button",
859
863
  className: "btn btn-sm btn-outline-primary me-1",
860
- title: "Baixar",
861
- disabled: y.isPending,
864
+ title: e.backupType === "STORAGE" ? "Backup de storage é restaurado no servidor" : "Baixar",
865
+ disabled: e.backupType === "STORAGE" || y.isPending,
862
866
  onClick: () => y.mutate({
863
867
  id: e.id,
864
868
  filename: e.filename
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@v1ct0rbr/minivault-web",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "description": "Módulo independente de gerenciamento de backups (minivault). Consumível como pacote npm em qualquer app React. Cliente do minivault REST API (acesso tipicamente via proxy autenticado).",
5
5
  "author": "Victor Queiroga (https://www.linkedin.com/in/victor-queiroga)",
6
6
  "license": "MIT",