windmill-components 1.430.3 → 1.430.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package/components/Login.svelte +10 -1
- package/package/components/UserSettings.svelte +1 -7
- package/package/components/details/DetailPageLayout.svelte +3 -1
- package/package/components/triggers/RouteEditorInner.svelte +1 -2
- package/package/components/triggers/WebhooksPanel.svelte +5 -6
- package/package.json +1 -1
|
@@ -13,7 +13,7 @@ import { Button, Skeleton } from './common';
|
|
|
13
13
|
import { sendUserToast } from '../toast';
|
|
14
14
|
import { isCloudHosted } from '../cloud';
|
|
15
15
|
import { refreshSuperadmin } from '../refreshUser';
|
|
16
|
-
import { createEventDispatcher } from 'svelte';
|
|
16
|
+
import { createEventDispatcher, onMount } from 'svelte';
|
|
17
17
|
export let rd = undefined;
|
|
18
18
|
export let email = undefined;
|
|
19
19
|
export let password = undefined;
|
|
@@ -150,6 +150,14 @@ function handleKeyUp(event) {
|
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
const dispatch = createEventDispatcher();
|
|
153
|
+
onMount(() => {
|
|
154
|
+
try {
|
|
155
|
+
localStorage.removeItem('closeUponLogin');
|
|
156
|
+
}
|
|
157
|
+
catch (e) {
|
|
158
|
+
console.error('Could not remove closeUponLogin from local storage', e);
|
|
159
|
+
}
|
|
160
|
+
});
|
|
153
161
|
function popupListener(event) {
|
|
154
162
|
let data = event.data;
|
|
155
163
|
if (event.origin !== window.location.origin) {
|
|
@@ -179,6 +187,7 @@ function storeRedirect(provider) {
|
|
|
179
187
|
window.open(url, '_blank', 'popup');
|
|
180
188
|
}
|
|
181
189
|
else {
|
|
190
|
+
localStorage.setItem('closeUponLogin', 'false');
|
|
182
191
|
window.location.href = url;
|
|
183
192
|
}
|
|
184
193
|
}
|
|
@@ -5,8 +5,6 @@ import TableCustom from './TableCustom.svelte';
|
|
|
5
5
|
import { Button } from './common';
|
|
6
6
|
import Drawer from './common/drawer/Drawer.svelte';
|
|
7
7
|
import DrawerContent from './common/drawer/DrawerContent.svelte';
|
|
8
|
-
import { page } from '$app/stores';
|
|
9
|
-
import { goto as gotoUrl } from '$app/navigation';
|
|
10
8
|
import { sendUserToast } from '../toast';
|
|
11
9
|
import Tooltip from './Tooltip.svelte';
|
|
12
10
|
import Version from './Version.svelte';
|
|
@@ -36,11 +34,7 @@ export function closeDrawer() {
|
|
|
36
34
|
removeHash();
|
|
37
35
|
}
|
|
38
36
|
function removeHash() {
|
|
39
|
-
|
|
40
|
-
if (index === -1)
|
|
41
|
-
return;
|
|
42
|
-
const hashRemoved = $page.url.href.slice(0, index);
|
|
43
|
-
gotoUrl(hashRemoved);
|
|
37
|
+
window.location.hash = '';
|
|
44
38
|
}
|
|
45
39
|
async function setPassword() {
|
|
46
40
|
if (newPassword) {
|
|
@@ -13,7 +13,6 @@ import { Loader2, Save, Pipette } from 'lucide-svelte';
|
|
|
13
13
|
import Label from '../Label.svelte';
|
|
14
14
|
import ToggleButton from '../common/toggleButton-v2/ToggleButton.svelte';
|
|
15
15
|
import ToggleButtonGroup from '../common/toggleButton-v2/ToggleButtonGroup.svelte';
|
|
16
|
-
import { page } from '$app/stores';
|
|
17
16
|
import { isCloudHosted } from '../../cloud';
|
|
18
17
|
import { base } from '../../base';
|
|
19
18
|
import S3FilePicker from '../S3FilePicker.svelte';
|
|
@@ -149,7 +148,7 @@ async function triggerScript() {
|
|
|
149
148
|
}
|
|
150
149
|
let drawer;
|
|
151
150
|
let dirtyPath = false;
|
|
152
|
-
$: fullRoute = `${
|
|
151
|
+
$: fullRoute = `${window.location.origin}${base}/api/r/${isCloudHosted() ? $workspaceStore + '/' : ''}${route_path}`;
|
|
153
152
|
async function routeExists(route_path, method) {
|
|
154
153
|
return await HttpTriggerService.existsRoute({
|
|
155
154
|
workspace: $workspaceStore,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
<script>import
|
|
2
|
-
import Tooltip from '../Tooltip.svelte';
|
|
1
|
+
<script>import Tooltip from '../Tooltip.svelte';
|
|
3
2
|
import { userStore, workspaceStore } from '../../stores';
|
|
4
3
|
import bash from 'svelte-highlight/languages/bash';
|
|
5
4
|
import { Tabs, Tab, TabContent, Button, Alert } from '../common';
|
|
@@ -29,7 +28,7 @@ let selectedTab = 'rest';
|
|
|
29
28
|
let webhooks;
|
|
30
29
|
$: webhooks = isFlow ? computeFlowWebhooks(path) : computeScriptWebhooks(hash, path);
|
|
31
30
|
function computeScriptWebhooks(hash, path) {
|
|
32
|
-
let webhookBase = `${
|
|
31
|
+
let webhookBase = `${window.location.origin}${base}/api/w/${$workspaceStore}/jobs`;
|
|
33
32
|
return {
|
|
34
33
|
async: {
|
|
35
34
|
hash: `${webhookBase}/run/h/${hash}`,
|
|
@@ -43,7 +42,7 @@ function computeScriptWebhooks(hash, path) {
|
|
|
43
42
|
};
|
|
44
43
|
}
|
|
45
44
|
function computeFlowWebhooks(path) {
|
|
46
|
-
let webhooksBase = `${
|
|
45
|
+
let webhooksBase = `${window.location.origin}${base}/api/w/${$workspaceStore}/jobs`;
|
|
47
46
|
let urlAsync = `${webhooksBase}/run/f/${path}`;
|
|
48
47
|
let urlSync = `${webhooksBase}/run_wait_result/f/${path}`;
|
|
49
48
|
return {
|
|
@@ -128,7 +127,7 @@ async function triggerJob() {
|
|
|
128
127
|
function waitForJobCompletion(UUID) {
|
|
129
128
|
return new Promise(async (resolve, reject) => {
|
|
130
129
|
try {
|
|
131
|
-
const endpoint = \`${
|
|
130
|
+
const endpoint = \`${window.location.origin}/api/w/${$workspaceStore}/jobs_u/completed/get_result_maybe/\${UUID}\`;
|
|
132
131
|
const checkResponse = await fetch(endpoint, {
|
|
133
132
|
method: 'GET',
|
|
134
133
|
headers: ${JSON.stringify(headers(), null, 2).replaceAll('\n', '\n\t\t\t\t')}
|
|
@@ -162,7 +161,7 @@ ${webhookType === 'sync' ? 'RESULT' : 'UUID'}=$(curl -s ${requestType != 'get_pa
|
|
|
162
161
|
${webhookType === 'sync'
|
|
163
162
|
? 'echo -E $RESULT | jq'
|
|
164
163
|
: `
|
|
165
|
-
URL="${
|
|
164
|
+
URL="${window.location.origin}/api/w/${$workspaceStore}/jobs_u/completed/get_result_maybe/$UUID"
|
|
166
165
|
while true; do
|
|
167
166
|
curl -s -H "Authorization: Bearer $TOKEN" $URL -o res.json
|
|
168
167
|
COMPLETED=$(cat res.json | jq .completed)
|