mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-17 10:56:24 +00:00
feat: indicar que se puede publicar el sitio #13178
This commit is contained in:
parent
29f4c7a847
commit
7e8bcc55a1
4 changed files with 11 additions and 0 deletions
|
@ -40,6 +40,13 @@ class Site
|
|||
def not_published_yet?
|
||||
build_stats.jekyll.where(status: true).count.zero?
|
||||
end
|
||||
|
||||
# Hubo cambios desde la última publicación?
|
||||
#
|
||||
# @return [Boolean]
|
||||
def awaiting_publication?
|
||||
updated_at > (build_stats.jekyll.where(status: true).last&.created_at || updated_at)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
- link = nil
|
||||
- if site.not_published_yet?
|
||||
- message = t('.not_published_yet')
|
||||
- elsif site.awaiting_publication?
|
||||
- message = t('.awaiting_publication')
|
||||
- if site.building?
|
||||
- if site.average_publication_time_calculable?
|
||||
- average_building_time = site.average_publication_time
|
||||
|
|
|
@ -365,6 +365,7 @@ en:
|
|||
building: "Your site is building, please wait <time datetime=\"PT%{seconds}S\">%{average_time}</time> to refresh this page..."
|
||||
not_published_yet: "Your site is being published for the first time, please wait up to 1 minute..."
|
||||
available: "Your site is available! Click here to visit it."
|
||||
awaiting_publication: "There are unpublished changes. Click the button below and wait a moment to find them on your site."
|
||||
index:
|
||||
title: 'My Sites'
|
||||
pull: 'Upgrade'
|
||||
|
|
|
@ -370,6 +370,7 @@ es:
|
|||
building: "Tu sitio se está publicando, por favor espera <time datetime=\"PT%{seconds}S\">%{average_time}</time> para recargar esta página..."
|
||||
not_published_yet: "Tu sitio se está publicando por primera vez, por favor espera hasta un minuto..."
|
||||
available: "¡Tu sitio está disponible! Cliquea aquí para visitarlo."
|
||||
awaiting_publication: "Hay cambios sin publicar, cliqueá el botón debajo y espera un momento para encontrarlos en tu sitio."
|
||||
index:
|
||||
title: 'Mis sitios'
|
||||
pull: 'Actualizar'
|
||||
|
|
Loading…
Reference in a new issue