From 5d84898691bd15a174dea9ab3959cd917d3277d5 Mon Sep 17 00:00:00 2001 From: Thomas Weber Date: Sat, 11 Dec 2021 22:16:58 -0600 Subject: [PATCH] Show message when project does not contain cloud variables --- src/locales/en.json | 4 ++++ src/p4/PackagerOptions.svelte | 31 +++++++++++++++++-------------- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/src/locales/en.json b/src/locales/en.json index 49cf8a3..aa11524 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -268,6 +268,10 @@ "string": "Cloud Variables", "context": "Cloud variables section header" }, + "noCloudVariables": { + "string": "This project does not contain cloud variables.", + "context": "Message that appears when the project contain no cloud variables." + }, "mode": { "string": "Mode", "context": "Label to choose how to handle cloud variables" diff --git a/src/p4/PackagerOptions.svelte b/src/p4/PackagerOptions.svelte index efbc73c..b4204c3 100644 --- a/src/p4/PackagerOptions.svelte +++ b/src/p4/PackagerOptions.svelte @@ -455,17 +455,18 @@ -{#if cloudVariables.length > 0} -
{ - resetOptions([ - 'cloudVariables' - ]); - }} - > -
-

{$_('options.cloudVariables')}

+
{ + resetOptions([ + 'cloudVariables' + ]); + }} +> +
+

{$_('options.cloudVariables')}

+ + {#if cloudVariables.length > 0}