From 85ce9ee14772b9fb69c41618579390b92a832760 Mon Sep 17 00:00:00 2001
From: tglide <26071571+TGlide@users.noreply.github.com>
Date: Tue, 21 Feb 2023 14:18:00 +0000
Subject: [PATCH 1/3] refactor: make self-hosted alerts dismissible on cloud
---
.../platforms/wizard/apple/step3.svelte | 26 ++++++++++++-------
.../platforms/wizard/flutter/step3.svelte | 26 ++++++++++++-------
2 files changed, 34 insertions(+), 18 deletions(-)
diff --git a/src/routes/console/project-[project]/overview/platforms/wizard/apple/step3.svelte b/src/routes/console/project-[project]/overview/platforms/wizard/apple/step3.svelte
index fe5be13fc..d66e95903 100644
--- a/src/routes/console/project-[project]/overview/platforms/wizard/apple/step3.svelte
+++ b/src/routes/console/project-[project]/overview/platforms/wizard/apple/step3.svelte
@@ -2,6 +2,7 @@
import { Alert, Code } from '$lib/components';
import { WizardStep } from '$lib/layout';
import { sdkForProject } from '$lib/stores/sdk';
+ import { Mode, MODE } from '$lib/system';
const { endpoint, project } = sdkForProject.client.config;
const code = `import Appwrite
@@ -10,6 +11,8 @@ let client = Client()
.setEndpoint("${endpoint}")
.setProject("${project}")
.setSelfSigned(status: true) // For self signed certificates, only use for development`;
+
+ let dismissedAlert = false;
@@ -25,13 +28,18 @@ let client = Client()
Before sending any API calls to your new Appwrite project, make sure your device or emulator
has network access to your Appwrite project's hostname or IP address.
-
-
- For self-hosted solutions
- When connecting to a locally hosted Appwrite project from an emulator or a mobile device,
- you should use the private IP of the device running your Appwrite project as the hostname
- of the endpoint instead of localhost. You can also use a service like ngrok to proxy the
- Appwrite server.
-
-
+ {#if !dismissedAlert}
+
+
(dismissedAlert = true)}>
+ For self-hosted solutions
+ When connecting to a locally hosted Appwrite project from an emulator or a mobile device,
+ you should use the private IP of the device running your Appwrite project as the hostname
+ of the endpoint instead of localhost. You can also use a service like ngrok to proxy
+ the Appwrite server.
+
+
+ {/if}
diff --git a/src/routes/console/project-[project]/overview/platforms/wizard/flutter/step3.svelte b/src/routes/console/project-[project]/overview/platforms/wizard/flutter/step3.svelte
index 6f46f657d..cac8f77ef 100644
--- a/src/routes/console/project-[project]/overview/platforms/wizard/flutter/step3.svelte
+++ b/src/routes/console/project-[project]/overview/platforms/wizard/flutter/step3.svelte
@@ -2,6 +2,7 @@
import { Alert, Code } from '$lib/components';
import { WizardStep } from '$lib/layout';
import { sdkForProject } from '$lib/stores/sdk';
+ import { Mode, MODE } from '$lib/system';
const { endpoint, project } = sdkForProject.client.config;
const code = `import 'package:appwrite/appwrite.dart';
@@ -11,6 +12,8 @@ client
.setEndpoint('${endpoint}')
.setProject('${project}')
.setSelfSigned(status: true); // For self signed certificates, only use for development`;
+
+ let dismissedAlert = false;
@@ -26,13 +29,18 @@ client
Before sending any API calls to your new Appwrite project, make sure your device or emulator
has network access to your Appwrite project's hostname or IP address.
-
-
- For self-hosted solutions
- When connecting to a locally hosted Appwrite project from an emulator or a mobile device,
- you should use the private IP of the device running your Appwrite project as the hostname
- of the endpoint instead of localhost. You can also use a service like ngrok to proxy the
- Appwrite server.
-
-
+ {#if !dismissedAlert}
+
+
(dismissedAlert = true)}>
+ For self-hosted solutions
+ When connecting to a locally hosted Appwrite project from an emulator or a mobile device,
+ you should use the private IP of the device running your Appwrite project as the hostname
+ of the endpoint instead of localhost. You can also use a service like ngrok to proxy
+ the Appwrite server.
+
+
+ {/if}
From 2e198c72625bb949977832be11f9d7e8c90fcc4e Mon Sep 17 00:00:00 2001
From: tglide <26071571+TGlide@users.noreply.github.com>
Date: Mon, 27 Feb 2023 10:09:38 +0000
Subject: [PATCH 2/3] refactor: change variable names
---
.../overview/platforms/wizard/apple/step3.svelte | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/routes/console/project-[project]/overview/platforms/wizard/apple/step3.svelte b/src/routes/console/project-[project]/overview/platforms/wizard/apple/step3.svelte
index d66e95903..167bc53e8 100644
--- a/src/routes/console/project-[project]/overview/platforms/wizard/apple/step3.svelte
+++ b/src/routes/console/project-[project]/overview/platforms/wizard/apple/step3.svelte
@@ -12,7 +12,7 @@ let client = Client()
.setProject("${project}")
.setSelfSigned(status: true) // For self signed certificates, only use for development`;
- let dismissedAlert = false;
+ let showAlert = true;
@@ -28,12 +28,12 @@ let client = Client()
Before sending any API calls to your new Appwrite project, make sure your device or emulator
has network access to your Appwrite project's hostname or IP address.
- {#if !dismissedAlert}
+ {#if showAlert}
(dismissedAlert = true)}>
+ on:dismiss={() => (showAlert = false)}>
For self-hosted solutions
When connecting to a locally hosted Appwrite project from an emulator or a mobile device,
you should use the private IP of the device running your Appwrite project as the hostname
From b9132761510e1e68fe8f05515f9b7a82167a8d5d Mon Sep 17 00:00:00 2001
From: tglide <26071571+TGlide@users.noreply.github.com>
Date: Wed, 1 Mar 2023 20:14:19 +0000
Subject: [PATCH 3/3] refactor: change variable names
---
.../overview/platforms/wizard/flutter/step3.svelte | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/routes/console/project-[project]/overview/platforms/wizard/flutter/step3.svelte b/src/routes/console/project-[project]/overview/platforms/wizard/flutter/step3.svelte
index cac8f77ef..ef97d30cb 100644
--- a/src/routes/console/project-[project]/overview/platforms/wizard/flutter/step3.svelte
+++ b/src/routes/console/project-[project]/overview/platforms/wizard/flutter/step3.svelte
@@ -13,7 +13,7 @@ client
.setProject('${project}')
.setSelfSigned(status: true); // For self signed certificates, only use for development`;
- let dismissedAlert = false;
+ let showAlert = true;
@@ -29,12 +29,12 @@ client
Before sending any API calls to your new Appwrite project, make sure your device or emulator
has network access to your Appwrite project's hostname or IP address.
- {#if !dismissedAlert}
+ {#if showAlert}
(dismissedAlert = true)}>
+ on:dismiss={() => (showAlert = false)}>
For self-hosted solutions
When connecting to a locally hosted Appwrite project from an emulator or a mobile device,
you should use the private IP of the device running your Appwrite project as the hostname