mirror of
https://github.com/penpot/penpot.git
synced 2025-01-06 14:50:20 -05:00
✨ Add autosaved versions warning
This commit is contained in:
parent
553b9eb4bb
commit
c68a0d3967
4 changed files with 48 additions and 1 deletions
|
@ -31,6 +31,8 @@
|
|||
(def versions
|
||||
(l/derived :workspace-versions st/state))
|
||||
|
||||
(def versions-stored-days 7)
|
||||
|
||||
(defn group-snapshots
|
||||
[data]
|
||||
(->> (concat
|
||||
|
@ -388,4 +390,14 @@
|
|||
:on-restore-snapshot handle-restore-version-snapshot
|
||||
:on-pin-snapshot handle-pin-version}]
|
||||
|
||||
nil))])])]))
|
||||
nil))])
|
||||
|
||||
[:div {:class (stl/css :autosave-warning)}
|
||||
[:div {:class (stl/css :autosave-warning-text)}
|
||||
(tr "workspace.versions.warning.text" versions-stored-days)]
|
||||
|
||||
[:div {:class (stl/css :autosave-warning-subtext)}
|
||||
[:> i18n/tr-html*
|
||||
{:tag-name "div"
|
||||
:content (tr "workspace.versions.warning.subtext"
|
||||
"mailto:support@penpot.app")}]]]])]))
|
||||
|
|
|
@ -230,3 +230,24 @@
|
|||
.version-snapshot-menu-btn {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.autosave-warning {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: $s-8;
|
||||
padding: $s-16;
|
||||
}
|
||||
|
||||
.autosave-warning-text {
|
||||
color: var(--color-foreground-primary);
|
||||
font-size: $fs-12;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.autosave-warning-subtext {
|
||||
color: var(--color-foreground-secondary);
|
||||
font-size: $fs-12;
|
||||
a {
|
||||
color: var(--color-accent-primary);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6560,6 +6560,13 @@ msgstr "Loading..."
|
|||
msgid "workspace.versions.restore-warning"
|
||||
msgstr "Do you want to restore this version?"
|
||||
|
||||
msgid "workspace.versions.warning.text"
|
||||
msgstr "Autosaved versions will be kept for %s days."
|
||||
|
||||
#, markdown
|
||||
msgid "workspace.versions.warning.subtext"
|
||||
msgstr "If you'd like to increase this limit, write to us at [support@penpot.app](%s)"
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar/versions.cljs:207
|
||||
msgid "workspace.versions.snapshot-menu"
|
||||
msgstr "Open snapshot menu"
|
||||
|
|
|
@ -6555,6 +6555,13 @@ msgstr "Cargando..."
|
|||
msgid "workspace.versions.restore-warning"
|
||||
msgstr "¿Quieres restaurar esta versión?"
|
||||
|
||||
msgid "workspace.versions.warning.text"
|
||||
msgstr "Los autoguardados duran %s días."
|
||||
|
||||
#, markdown
|
||||
msgid "workspace.versions.warning.subtext"
|
||||
msgstr "Si quieres aumentar este límite, contáctanos en [support@penpot.app](%s)"
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar/versions.cljs:207
|
||||
msgid "workspace.versions.snapshot-menu"
|
||||
msgstr "Abrir menu de versiones"
|
||||
|
|
Loading…
Reference in a new issue