Skip to content

Commit

Permalink
Remove Upgrade Block (#754)
Browse files Browse the repository at this point in the history
* Remove Upgrade Block

* Translations
  • Loading branch information
rob-gordon authored Nov 8, 2024
1 parent b0b1452 commit cb6022a
Show file tree
Hide file tree
Showing 17 changed files with 8 additions and 185 deletions.
49 changes: 0 additions & 49 deletions app/src/components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,44 +20,6 @@ const Layout = memo(({ children }: { children: ReactNode }) => {
let [showBanner, message, messageType] = getShowBannerAndMessage();
const isEditorView = useIsEditorView();

// Check if we're in maintenance window
const maintenanceStart = new Date("2024-11-08T00:00:00-05:00");
const maintenanceEnd = new Date("2024-11-08T01:00:00-05:00");
const now = new Date();
const isMaintenanceWindow = now >= maintenanceStart && now < maintenanceEnd;

if (isMaintenanceWindow) {
return (
<Dialog.Root open>
<Dialog.Portal>
<Overlay />
<Content className="grid gap-6 max-w-md p-8">
<div className="grid gap-4">
<Wrench className="mx-auto" size={32} weight="duotone" />
<Dialog.Title className="text-2xl font-bold">
<Trans>Scheduled Maintenance</Trans>
</Dialog.Title>
</div>
<Dialog.Description className="grid gap-4">
<p className="leading-normal text-wrap-pretty">
<Trans>
We are currently performing a database upgrade to improve our
service.
</Trans>
</p>
<p className="text-sm text-gray-600 dark:text-gray-400 leading-normal text-wrap-pretty">
<Trans>
The service will be back online at 1:00 AM Eastern Time. Thank
you for your patience.
</Trans>
</p>
</Dialog.Description>
</Content>
</Dialog.Portal>
</Dialog.Root>
);
}

// Don't show banner if it's been dismissed or if in fullscreen
showBanner = showBanner && !bannerDismissed;

Expand Down Expand Up @@ -105,17 +67,6 @@ Layout.displayName = "Layout";
export default Layout;

function getShowBannerAndMessage(): [boolean, string, "error" | "info"] {
// Database migration banner
const migrationDate = new Date("2024-11-08T00:00:00-05:00"); // Midnight Eastern Time
const now = new Date();
if (now < migrationDate) {
return [
true,
t`Scheduled database maintenance will occur on Friday, November 8th at 12:00 AM Eastern Time. Services may be temporarily unavailable during this period.`,
"info",
];
}

const hash = window.location.hash;
if (hash.startsWith("#message=")) {
return [true, decodeURIComponent(hash.slice("#message=".length)), "info"];
Expand Down
2 changes: 1 addition & 1 deletion app/src/locales/de/messages.js

Large diffs are not rendered by default.

16 changes: 0 additions & 16 deletions app/src/locales/de/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -1321,14 +1321,6 @@ msgstr "In Datei speichern"
msgid "Save your Work"
msgstr "Speichern Sie Ihre Arbeit"

#: src/components/Layout.tsx:38
msgid "Scheduled Maintenance"
msgstr "Geplante Wartung"

#: src/components/Layout.tsx:114
msgid "Scheduled database maintenance will occur on Friday, November 8th at 12:00 AM Eastern Time. Services may be temporarily unavailable during this period."
msgstr "Geplante Datenbankwartung wird am Freitag, den 8. November um 12:00 Uhr Eastern Time stattfinden. Während dieser Zeit können die Dienste vorübergehend nicht verfügbar sein."

#: src/components/Checkout.tsx:182
msgid "Secure payment"
msgstr "Sichere Zahlung"
Expand Down Expand Up @@ -1542,10 +1534,6 @@ msgstr "Der Trennzeichen, das verwendet wird, um mehrere Zielknoten zu trennen"
msgid "The possible shapes are:"
msgstr "Die möglichen Formen sind:"

#: src/components/Layout.tsx:49
msgid "The service will be back online at 1:00 AM Eastern Time. Thank you for your patience."
msgstr "Der Service wird um 1:00 Uhr Eastern Time wieder online sein. Vielen Dank für Ihre Geduld."

#: src/components/Tabs/EditorTabList.tsx:38
#: src/components/Tabs/EditorTabList.tsx:39
#: src/components/Tabs/EditorTabList.tsx:49
Expand Down Expand Up @@ -1796,10 +1784,6 @@ msgstr "Wasserzeichenfreie Diagramme"
msgid "Watermarks"
msgstr "Wasserzeichen"

#: src/components/Layout.tsx:43
msgid "We are currently performing a database upgrade to improve our service."
msgstr "Wir führen derzeit ein Datenbank-Upgrade durch, um unseren Service zu verbessern."

#: src/lib/getDefaultText.ts:4
msgid "Welcome to Flowchart Fun"
msgstr "Willkommen bei Flowchart Spaß"
Expand Down
2 changes: 1 addition & 1 deletion app/src/locales/en/messages.js

Large diffs are not rendered by default.

16 changes: 0 additions & 16 deletions app/src/locales/en/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -1321,14 +1321,6 @@ msgstr "Save to File"
msgid "Save your Work"
msgstr "Save your Work"

#: src/components/Layout.tsx:38
msgid "Scheduled Maintenance"
msgstr "Scheduled Maintenance"

#: src/components/Layout.tsx:114
msgid "Scheduled database maintenance will occur on Friday, November 8th at 12:00 AM Eastern Time. Services may be temporarily unavailable during this period."
msgstr "Scheduled database maintenance will occur on Friday, November 8th at 12:00 AM Eastern Time. Services may be temporarily unavailable during this period."

#: src/components/Checkout.tsx:182
msgid "Secure payment"
msgstr "Secure payment"
Expand Down Expand Up @@ -1542,10 +1534,6 @@ msgstr "The delimiter used to separate multiple target nodes"
msgid "The possible shapes are:"
msgstr "The possible shapes are:"

#: src/components/Layout.tsx:49
msgid "The service will be back online at 1:00 AM Eastern Time. Thank you for your patience."
msgstr "The service will be back online at 1:00 AM Eastern Time. Thank you for your patience."

#: src/components/Tabs/EditorTabList.tsx:38
#: src/components/Tabs/EditorTabList.tsx:39
#: src/components/Tabs/EditorTabList.tsx:49
Expand Down Expand Up @@ -1796,10 +1784,6 @@ msgstr "Watermark-Free Diagrams"
msgid "Watermarks"
msgstr "Watermarks"

#: src/components/Layout.tsx:43
msgid "We are currently performing a database upgrade to improve our service."
msgstr "We are currently performing a database upgrade to improve our service."

#: src/lib/getDefaultText.ts:4
msgid "Welcome to Flowchart Fun"
msgstr "Welcome to Flowchart Fun"
Expand Down
2 changes: 1 addition & 1 deletion app/src/locales/es/messages.js

Large diffs are not rendered by default.

16 changes: 0 additions & 16 deletions app/src/locales/es/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -1321,14 +1321,6 @@ msgstr "Guardar en archivo"
msgid "Save your Work"
msgstr "Guarda tu trabajo"

#: src/components/Layout.tsx:38
msgid "Scheduled Maintenance"
msgstr "Mantenimiento programado"

#: src/components/Layout.tsx:114
msgid "Scheduled database maintenance will occur on Friday, November 8th at 12:00 AM Eastern Time. Services may be temporarily unavailable during this period."
msgstr "El mantenimiento programado de la base de datos se llevará a cabo el viernes 8 de noviembre a las 12:00 AM hora del este. Los servicios pueden estar temporalmente no disponibles durante este período."

#: src/components/Checkout.tsx:182
msgid "Secure payment"
msgstr "Pago seguro"
Expand Down Expand Up @@ -1542,10 +1534,6 @@ msgstr "El delimitador utilizado para separar múltiples nodos de destino"
msgid "The possible shapes are:"
msgstr "Las formas posibles son:"

#: src/components/Layout.tsx:49
msgid "The service will be back online at 1:00 AM Eastern Time. Thank you for your patience."
msgstr "El servicio estará de vuelta en línea a la 1:00 AM hora del este. Gracias por su paciencia."

#: src/components/Tabs/EditorTabList.tsx:38
#: src/components/Tabs/EditorTabList.tsx:39
#: src/components/Tabs/EditorTabList.tsx:49
Expand Down Expand Up @@ -1796,10 +1784,6 @@ msgstr "Diagramas sin marca de agua"
msgid "Watermarks"
msgstr "Marcas de agua"

#: src/components/Layout.tsx:43
msgid "We are currently performing a database upgrade to improve our service."
msgstr "Actualmente estamos realizando una actualización de la base de datos para mejorar nuestro servicio."

#: src/lib/getDefaultText.ts:4
msgid "Welcome to Flowchart Fun"
msgstr "Bienvenido a Flowchart Divertido"
Expand Down
2 changes: 1 addition & 1 deletion app/src/locales/fr/messages.js

Large diffs are not rendered by default.

16 changes: 0 additions & 16 deletions app/src/locales/fr/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -1321,14 +1321,6 @@ msgstr "Enregistrer dans un fichier"
msgid "Save your Work"
msgstr "Enregistrer votre travail"

#: src/components/Layout.tsx:38
msgid "Scheduled Maintenance"
msgstr "Maintenance planifiée"

#: src/components/Layout.tsx:114
msgid "Scheduled database maintenance will occur on Friday, November 8th at 12:00 AM Eastern Time. Services may be temporarily unavailable during this period."
msgstr "Une maintenance planifiée de la base de données aura lieu le vendredi 8 novembre à 12h00 heure de l'Est. Les services peuvent être temporairement indisponibles pendant cette période."

#: src/components/Checkout.tsx:182
msgid "Secure payment"
msgstr "Paiement sécurisé"
Expand Down Expand Up @@ -1542,10 +1534,6 @@ msgstr "Le délimiteur utilisé pour séparer plusieurs nœuds cibles"
msgid "The possible shapes are:"
msgstr "Les formes possibles sont :"

#: src/components/Layout.tsx:49
msgid "The service will be back online at 1:00 AM Eastern Time. Thank you for your patience."
msgstr "Le service sera de nouveau en ligne à 1h00 heure de l'Est. Merci de votre patience."

#: src/components/Tabs/EditorTabList.tsx:38
#: src/components/Tabs/EditorTabList.tsx:39
#: src/components/Tabs/EditorTabList.tsx:49
Expand Down Expand Up @@ -1796,10 +1784,6 @@ msgstr "Diagrammes sans filigrane"
msgid "Watermarks"
msgstr "Filigranes"

#: src/components/Layout.tsx:43
msgid "We are currently performing a database upgrade to improve our service."
msgstr "Nous effectuons actuellement une mise à niveau de la base de données pour améliorer notre service."

#: src/lib/getDefaultText.ts:4
msgid "Welcome to Flowchart Fun"
msgstr "Bienvenue dans Flowchart Fun"
Expand Down
2 changes: 1 addition & 1 deletion app/src/locales/hi/messages.js

Large diffs are not rendered by default.

16 changes: 0 additions & 16 deletions app/src/locales/hi/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -1321,14 +1321,6 @@ msgstr "फाइल में सेव करें"
msgid "Save your Work"
msgstr "अपनी कार्यवाही सुरक्षित करें"

#: src/components/Layout.tsx:38
msgid "Scheduled Maintenance"
msgstr "निर्धारित रखरखाव"

#: src/components/Layout.tsx:114
msgid "Scheduled database maintenance will occur on Friday, November 8th at 12:00 AM Eastern Time. Services may be temporarily unavailable during this period."
msgstr "निर्धारित डेटाबेस रखरखाव शुक्रवार, 8 नवंबर को 12:00 बजे पूर्वी समय पर होगा। इस अवधि के दौरान सेवाएं अस्थायी रूप से अनुपलब्ध हो सकती हैं।"

#: src/components/Checkout.tsx:182
msgid "Secure payment"
msgstr "सुरक्षित भुगतान"
Expand Down Expand Up @@ -1542,10 +1534,6 @@ msgstr "कई लक्ष्य नोड्स को अलग करने
msgid "The possible shapes are:"
msgstr "संभव आकृतियाँ हैं:"

#: src/components/Layout.tsx:49
msgid "The service will be back online at 1:00 AM Eastern Time. Thank you for your patience."
msgstr "सेवा 1:00 बजे पूर्वी समय पर ऑनलाइन वापस होगी। आपके धैर्य के लिए धन्यवाद।"

#: src/components/Tabs/EditorTabList.tsx:38
#: src/components/Tabs/EditorTabList.tsx:39
#: src/components/Tabs/EditorTabList.tsx:49
Expand Down Expand Up @@ -1796,10 +1784,6 @@ msgstr "वॉटरमार्क-मुक्त आरेख"
msgid "Watermarks"
msgstr "वॉटरमार्क"

#: src/components/Layout.tsx:43
msgid "We are currently performing a database upgrade to improve our service."
msgstr "हम वर्तमान में हमारी सेवा को बेहतर बनाने के लिए डेटाबेस अपग्रेड कर रहे हैं।"

#: src/lib/getDefaultText.ts:4
msgid "Welcome to Flowchart Fun"
msgstr "फ्लोचार्ट फन में आपका स्वागत है"
Expand Down
2 changes: 1 addition & 1 deletion app/src/locales/ko/messages.js

Large diffs are not rendered by default.

16 changes: 0 additions & 16 deletions app/src/locales/ko/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -1321,14 +1321,6 @@ msgstr "파일에 저장하기"
msgid "Save your Work"
msgstr "작업 저장"

#: src/components/Layout.tsx:38
msgid "Scheduled Maintenance"
msgstr "예정된 유지보수"

#: src/components/Layout.tsx:114
msgid "Scheduled database maintenance will occur on Friday, November 8th at 12:00 AM Eastern Time. Services may be temporarily unavailable during this period."
msgstr "예정된 데이터베이스 유지보수는 11월 8일 금요일 오전 12시 미국 동부 시간에 진행될 예정입니다. 이 기간 동안 일시적으로 서비스를 이용할 수 없을 수 있습니다."

#: src/components/Checkout.tsx:182
msgid "Secure payment"
msgstr "안전한 결제"
Expand Down Expand Up @@ -1542,10 +1534,6 @@ msgstr "여러 개의 목표 노드를 구분하기 위해 사용되는 구분
msgid "The possible shapes are:"
msgstr "가능한 모양은 다음과 같습니다:"

#: src/components/Layout.tsx:49
msgid "The service will be back online at 1:00 AM Eastern Time. Thank you for your patience."
msgstr "서비스는 미국 동부 시간 오전 1시에 다시 온라인으로 돌아올 예정입니다. 이용에 불편을 드려 죄송합니다."

#: src/components/Tabs/EditorTabList.tsx:38
#: src/components/Tabs/EditorTabList.tsx:39
#: src/components/Tabs/EditorTabList.tsx:49
Expand Down Expand Up @@ -1796,10 +1784,6 @@ msgstr "워터마크 없는 다이어그램"
msgid "Watermarks"
msgstr "물감"

#: src/components/Layout.tsx:43
msgid "We are currently performing a database upgrade to improve our service."
msgstr "현재 우리는 서비스를 개선하기 위해 데이터베이스 업그레이드를 진행 중입니다."

#: src/lib/getDefaultText.ts:4
msgid "Welcome to Flowchart Fun"
msgstr "Flowchart Fun에 오신 것을 환영합니다"
Expand Down
2 changes: 1 addition & 1 deletion app/src/locales/pt-br/messages.js

Large diffs are not rendered by default.

16 changes: 0 additions & 16 deletions app/src/locales/pt-br/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -1321,14 +1321,6 @@ msgstr "Salvar para Arquivo"
msgid "Save your Work"
msgstr "Salve seu trabalho"

#: src/components/Layout.tsx:38
msgid "Scheduled Maintenance"
msgstr "Manutenção agendada"

#: src/components/Layout.tsx:114
msgid "Scheduled database maintenance will occur on Friday, November 8th at 12:00 AM Eastern Time. Services may be temporarily unavailable during this period."
msgstr "A manutenção agendada do banco de dados ocorrerá na sexta-feira, 8 de novembro, às 12h, horário do leste. Os serviços podem ficar temporariamente indisponíveis durante este período."

#: src/components/Checkout.tsx:182
msgid "Secure payment"
msgstr "Pagamento seguro"
Expand Down Expand Up @@ -1542,10 +1534,6 @@ msgstr "O delimitador usado para separar vários nós de destino"
msgid "The possible shapes are:"
msgstr "As formas possíveis são:"

#: src/components/Layout.tsx:49
msgid "The service will be back online at 1:00 AM Eastern Time. Thank you for your patience."
msgstr "O serviço estará de volta online às 1h, horário do leste. Agradecemos sua paciência."

#: src/components/Tabs/EditorTabList.tsx:38
#: src/components/Tabs/EditorTabList.tsx:39
#: src/components/Tabs/EditorTabList.tsx:49
Expand Down Expand Up @@ -1796,10 +1784,6 @@ msgstr "Diagramas sem marca d'água"
msgid "Watermarks"
msgstr "Marca d'água"

#: src/components/Layout.tsx:43
msgid "We are currently performing a database upgrade to improve our service."
msgstr "Atualmente, estamos realizando uma atualização do banco de dados para melhorar nosso serviço."

#: src/lib/getDefaultText.ts:4
msgid "Welcome to Flowchart Fun"
msgstr "Bem-vindo ao Flowchart Fun"
Expand Down
2 changes: 1 addition & 1 deletion app/src/locales/zh/messages.js

Large diffs are not rendered by default.

16 changes: 0 additions & 16 deletions app/src/locales/zh/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -1321,14 +1321,6 @@ msgstr "保存到文件"
msgid "Save your Work"
msgstr "保存您的工作"

#: src/components/Layout.tsx:38
msgid "Scheduled Maintenance"
msgstr "计划维护"

#: src/components/Layout.tsx:114
msgid "Scheduled database maintenance will occur on Friday, November 8th at 12:00 AM Eastern Time. Services may be temporarily unavailable during this period."
msgstr "计划的数据库维护将于11月8日星期五上午12:00东部时间进行。在此期间,服务可能暂时不可用。"

#: src/components/Checkout.tsx:182
msgid "Secure payment"
msgstr "安全付款"
Expand Down Expand Up @@ -1542,10 +1534,6 @@ msgstr "用于分隔多个目标节点的分隔符"
msgid "The possible shapes are:"
msgstr "可能的形状是:"

#: src/components/Layout.tsx:49
msgid "The service will be back online at 1:00 AM Eastern Time. Thank you for your patience."
msgstr "服务将在东部时间上午1:00恢复在线。感谢您的耐心等待。"

#: src/components/Tabs/EditorTabList.tsx:38
#: src/components/Tabs/EditorTabList.tsx:39
#: src/components/Tabs/EditorTabList.tsx:49
Expand Down Expand Up @@ -1796,10 +1784,6 @@ msgstr "无水印图表"
msgid "Watermarks"
msgstr "水印"

#: src/components/Layout.tsx:43
msgid "We are currently performing a database upgrade to improve our service."
msgstr "我们目前正在进行数据库升级,以改善我们的服务。"

#: src/lib/getDefaultText.ts:4
msgid "Welcome to Flowchart Fun"
msgstr "欢迎来到流程图乐趣"
Expand Down

0 comments on commit cb6022a

Please sign in to comment.