mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-19 19:26:21 +00:00
feat: indicar que se puede publicar el sitio #13178
This commit is contained in:
parent
b9a609d07a
commit
282501c845
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
|
||||
|
|
|
@ -364,6 +364,7 @@ en:
|
|||
building: "Your site is building, refresh this page in <time datetime=\"PT%{seconds}S\">%{average_time}</time>."
|
||||
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 find all the different ways 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'
|
||||
|
|
|
@ -369,6 +369,7 @@ es:
|
|||
building: "Tu sitio se está publicando, recargá esta página en <time datetime=\"PT%{seconds}S\">%{average_time}</time>."
|
||||
not_published_yet: "Tu sitio se está publicando por primera vez, por favor espera hasta un minuto..."
|
||||
available: "¡Tu sitio está disponible! Cliqueá aquí para encontrar todas las formas en que podés 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