Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
c4ba1921
Commit
c4ba1921
authored
Jul 16, 2023
by
Jeffrey Morgan
Browse files
app: use `enum` for steps
parent
fe758ca3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
app/src/app.tsx
app/src/app.tsx
+11
-5
No files found.
app/src/app.tsx
View file @
c4ba1921
...
@@ -28,14 +28,20 @@ async function installCLI() {
...
@@ -28,14 +28,20 @@ async function installCLI() {
}
}
}
}
enum
Step
{
WELCOME
=
0
,
CLI
,
FINISH
,
}
export
default
function
()
{
export
default
function
()
{
const
[
step
,
setStep
]
=
useState
(
0
)
const
[
step
,
setStep
]
=
useState
<
Step
>
(
Step
.
WELCOME
)
const
command
=
'
ollama run orca
'
const
command
=
'
ollama run orca
'
return
(
return
(
<
div
className
=
'mx-auto flex min-h-screen w-full flex-col justify-between bg-white px-4 pt-16'
>
<
div
className
=
'
drag
mx-auto flex min-h-screen w-full flex-col justify-between bg-white px-4 pt-16'
>
{
step
===
0
&&
(
{
step
===
Step
.
WELCOME
&&
(
<>
<>
<
div
className
=
'mx-auto text-center'
>
<
div
className
=
'mx-auto text-center'
>
<
h1
className
=
'mb-6 mt-4 text-2xl tracking-tight text-gray-900'
>
Welcome to Ollama
</
h1
>
<
h1
className
=
'mb-6 mt-4 text-2xl tracking-tight text-gray-900'
>
Welcome to Ollama
</
h1
>
...
@@ -56,7 +62,7 @@ export default function () {
...
@@ -56,7 +62,7 @@ export default function () {
</
div
>
</
div
>
</>
</>
)
}
)
}
{
step
===
1
&&
(
{
step
===
Step
.
CLI
&&
(
<>
<>
<
div
className
=
'mx-auto flex flex-col space-y-28 text-center'
>
<
div
className
=
'mx-auto flex flex-col space-y-28 text-center'
>
<
h1
className
=
'mt-4 text-2xl tracking-tight text-gray-900'
>
Install the command line
</
h1
>
<
h1
className
=
'mt-4 text-2xl tracking-tight text-gray-900'
>
Install the command line
</
h1
>
...
@@ -79,7 +85,7 @@ export default function () {
...
@@ -79,7 +85,7 @@ export default function () {
</
div
>
</
div
>
</>
</>
)
}
)
}
{
step
===
2
&&
(
{
step
===
Step
.
FINISH
&&
(
<>
<>
<
div
className
=
'mx-auto flex flex-col space-y-20 text-center'
>
<
div
className
=
'mx-auto flex flex-col space-y-20 text-center'
>
<
h1
className
=
'mt-4 text-2xl tracking-tight text-gray-900'
>
Run your first model
</
h1
>
<
h1
className
=
'mt-4 text-2xl tracking-tight text-gray-900'
>
Run your first model
</
h1
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment