Browse Source

refac: hide pipelines save button if not present

Timothy J. Baek 8 months ago
parent
commit
82edd0e3d9
1 changed files with 10 additions and 8 deletions
  1. 10 8
      src/lib/components/admin/Settings/Pipelines.svelte

+ 10 - 8
src/lib/components/admin/Settings/Pipelines.svelte

@@ -546,12 +546,14 @@
 		{/if}
 	</div>
 
-	<div class="flex justify-end pt-3 text-sm font-medium">
-		<button
-			class=" px-4 py-2 bg-emerald-700 hover:bg-emerald-800 text-gray-100 transition rounded-lg"
-			type="submit"
-		>
-			{$i18n.t('Save')}
-		</button>
-	</div>
+	{#if PIPELINES_LIST !== null && PIPELINES_LIST.length > 0}
+		<div class="flex justify-end pt-3 text-sm font-medium">
+			<button
+				class=" px-4 py-2 bg-emerald-700 hover:bg-emerald-800 text-gray-100 transition rounded-lg"
+				type="submit"
+			>
+				{$i18n.t('Save')}
+			</button>
+		</div>
+	{/if}
 </form>