Skip to content

Commit 2c7e024

Browse files
committed
Nits to pass npm checks
1 parent 4ffe4be commit 2c7e024

File tree

6 files changed

+27
-22
lines changed

6 files changed

+27
-22
lines changed

frontend/src/lib/components/RunPageTutorials.svelte

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<script lang="ts">
22
import { skipAllTodos } from '$lib/tutorialUtils'
33
import TroubleshootFlowTutorial from './tutorials/TroubleshootFlowTutorial.svelte'
4+
import { getTutorialIndex } from '$lib/tutorials/config'
45
56
let troubleshootFlowTutorial: TroubleshootFlowTutorial | undefined = $state(undefined)
67
@@ -15,4 +16,10 @@
1516
}
1617
</script>
1718

18-
<TroubleshootFlowTutorial bind:this={troubleshootFlowTutorial} on:error on:skipAll={skipAll} on:reload />
19+
<TroubleshootFlowTutorial
20+
bind:this={troubleshootFlowTutorial}
21+
index={getTutorialIndex('troubleshoot-flow')}
22+
on:error
23+
on:skipAll={skipAll}
24+
on:reload
25+
/>

frontend/src/lib/components/apps/editor/AppEditorTutorial.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@
6565
<AppTutorials
6666
bind:this={appTutorials}
6767
on:reload
68-
on:error={({ detail }) => {
69-
targetTutorial = detail.detail
68+
on:error={(event: CustomEvent<{ detail: string }>) => {
69+
targetTutorial = event.detail.detail
7070
}}
7171
/>
7272

frontend/src/lib/components/flows/map/FlowModuleSchemaMap.svelte

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,6 @@
102102
flowHasChanged
103103
}: Props = $props()
104104
105-
let flowTutorials: FlowTutorials | undefined = $state(undefined)
106-
107105
const { customUi, selectionManager, moving, history, flowStateStore, flowStore, pathStore } =
108106
getContext<FlowEditorContext>('FlowEditorContext')
109107
const { triggersCount, triggersState } = getContext<TriggerContext>('TriggerContext')
@@ -659,5 +657,5 @@
659657
</div>
660658

661659
{#if !disableTutorials}
662-
<FlowTutorials bind:this={flowTutorials} on:reload />
660+
<FlowTutorials on:reload />
663661
{/if}

frontend/src/lib/components/sidebar/SidebarContent.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
tutorialsToDo,
1212
skippedAll
1313
} from '$lib/stores'
14-
import { syncTutorialsTodos, shouldHideTutorialsFromMainMenu } from '$lib/tutorialUtils'
14+
import { syncTutorialsTodos } from '$lib/tutorialUtils'
1515
import { SIDEBAR_SHOW_SCHEDULES } from '$lib/consts'
1616
import {
1717
BookOpen,

frontend/src/lib/tutorials/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export function getTutorialIndex(id: string): number {
4343
export const TUTORIALS_CONFIG: Record<TabId, TabConfig> = {
4444
quickstart: {
4545
label: 'Quickstart',
46-
roles: ['admin', 'developer', 'operator'],
46+
roles: ['admin', 'developer'],
4747
progressBar: true,
4848
active: true,
4949
tutorials: [
@@ -58,7 +58,7 @@ export const TUTORIALS_CONFIG: Record<TabId, TabConfig> = {
5858
index: 1,
5959
active: true,
6060
comingSoon: false,
61-
roles: ['operator','developer', 'admin'],
61+
roles: ['developer', 'admin'],
6262
order: 1
6363
},
6464
{

frontend/src/routes/(root)/(logged)/+page.svelte

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
Globe2,
2121
Loader2,
2222
Code,
23-
LayoutDashboard,
24-
GraduationCap
23+
LayoutDashboard
2524
} from 'lucide-svelte'
2625
import { hubBaseUrlStore } from '$lib/stores'
2726
import { base } from '$lib/base'
@@ -43,25 +42,26 @@
4342
4443
type Tab = 'hub' | 'workspace'
4544
46-
let tab: Tab =
45+
let tab: Tab = $state(
4746
window.location.hash == '#workspace' || window.location.hash == '#hub'
4847
? (window.location.hash?.replace('#', '') as Tab)
4948
: 'workspace'
49+
)
5050
51-
let subtab: 'flow' | 'script' | 'app' = 'script'
51+
let subtab: 'flow' | 'script' | 'app' = $state('script')
5252
53-
let filter: string = ''
53+
let filter: string = $state('')
5454
55-
let flowViewer: Drawer
56-
let flowViewerFlow: { flow?: OpenFlow & { id?: number } } | undefined
55+
let flowViewer: Drawer = $state()
56+
let flowViewerFlow: { flow?: OpenFlow & { id?: number } } | undefined = $state(undefined)
5757
58-
let appViewer: Drawer
59-
let appViewerApp: { app?: any & { id?: number } } | undefined
58+
let appViewer: Drawer = $state()
59+
let appViewerApp: { app?: any & { id?: number } } | undefined = $state(undefined)
6060
61-
let codeViewer: Drawer
62-
let codeViewerContent: string = ''
63-
let codeViewerLanguage: Script['language'] = 'deno'
64-
let codeViewerObj: HubItem | undefined = undefined
61+
let codeViewer: Drawer = $state()
62+
let codeViewerContent: string = $state('')
63+
let codeViewerLanguage: Script['language'] = $state('deno')
64+
let codeViewerObj: HubItem | undefined = $state(undefined)
6565
6666
const breakpoint = writable<EditorBreakpoint>('lg')
6767

0 commit comments

Comments
 (0)