Skip to content

Commit ba62787

Browse files
committed
wip
1 parent ad84382 commit ba62787

File tree

92 files changed

+1668
-814
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+1668
-814
lines changed

docs/.vitepress/tutorial/nuxt/+assets/base/app/pages/index.vue

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,41 +37,51 @@ async function removeTodo(id: string) {
3737
</script>
3838

3939
<template>
40-
<main class="tutorial-app">
40+
<main class="tutorial-app app-shell">
4141
<header class="hero">
42-
<h1>Nuxt rstore tutorial</h1>
43-
<p>Use the Nuxt module conventions while keeping the same local-first rstore data flow.</p>
42+
<h1>Tasks</h1>
4443
</header>
4544

4645
<section class="surface">
4746
<div class="form-row">
4847
<input
4948
v-model="inputText"
50-
placeholder="Ship the Nuxt tutorial"
49+
placeholder="Add a task"
5150
@keydown.enter.prevent="addTodo(inputText)"
5251
>
5352

5453
<button @click="addTodo(inputText)">
55-
Add todo
54+
Add
5655
</button>
5756
</div>
5857
</section>
5958

6059
<section class="surface">
61-
<ul class="todo-list">
60+
<div v-if="!todos.length" class="empty-state">
61+
No tasks yet.
62+
</div>
63+
64+
<ul v-else class="todo-list">
6265
<li
6366
v-for="todo in todos"
6467
:key="todo.id"
6568
class="todo-item"
6669
:class="{ done: todo.completed }"
6770
>
68-
<strong>{{ todo.text }}</strong>
71+
<label class="todo-toggle">
72+
<input
73+
class="todo-checkbox"
74+
type="checkbox"
75+
:checked="todo.completed"
76+
@change="toggleTodo(todo.id)"
77+
>
6978

70-
<div class="todo-actions">
71-
<button class="secondary" @click="toggleTodo(todo.id)">
72-
{{ todo.completed ? 'Mark open' : 'Complete' }}
73-
</button>
79+
<div class="todo-copy">
80+
<strong>{{ todo.text }}</strong>
81+
</div>
82+
</label>
7483

84+
<div class="todo-actions">
7585
<button class="ghost" @click="removeTodo(todo.id)">
7686
Delete
7787
</button>

docs/.vitepress/tutorial/nuxt/+assets/base/app/rstore/todos.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { z } from 'zod'
21
import type { Todo } from './types'
2+
import { z } from 'zod'
33

44
export default RStoreSchema.withItemType<Todo>().defineCollection({
55
name: 'Todo',

docs/.vitepress/tutorial/nuxt/+assets/base/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "rstore-interactive-tutorial",
3-
"private": true,
43
"type": "module",
4+
"private": true,
55
"scripts": {
66
"dev": "nuxt dev --host 0.0.0.0 --port 3000"
77
},
@@ -14,8 +14,8 @@
1414
"devDependencies": {
1515
"@vue/language-server": "3.2.5",
1616
"@vue/typescript-plugin": "3.2.5",
17-
"typescript-language-server": "5.1.3",
1817
"typescript": "5.9.3",
18+
"typescript-language-server": "5.1.3",
1919
"ws": "8.19.0"
2020
}
2121
}

docs/.vitepress/tutorial/nuxt/+assets/base/scripts/vue-language-server.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { createRequire } from 'node:module'
22
import { dirname } from 'node:path'
3+
import process from 'node:process'
34

45
const require = createRequire(import.meta.url)
56
const { createParsedCommandLine, createParsedCommandLineByJson, createVueLanguagePlugin } = requireFrom('@vue/language-core', ['@vue/language-server'])

docs/.vitepress/tutorial/nuxt/+assets/base/src/main.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ function updateRuntimeBanner(state: 'booting' | 'ready' | 'error', title: string
1111
if (!banner)
1212
return
1313

14+
banner.hidden = state === 'ready'
1415
banner.dataset.state = state
1516
banner.querySelector<HTMLElement>('[data-role="title"]')!.textContent = title
1617
banner.querySelector<HTMLElement>('[data-role="detail"]')!.textContent = detail

0 commit comments

Comments
 (0)