create-rue 0.1.3 → 0.1.4
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/bundle.js +2 -2
- package/package.json +1 -1
- package/template/base/app/pages/TodoApp.tsx +20 -10
package/bundle.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
/*! create-rue v0.1.
|
|
2
|
+
/*! create-rue v0.1.4 | MIT */
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import * as fs from "node:fs";
|
|
5
5
|
import "node:fs";
|
|
@@ -2037,7 +2037,7 @@ function inferPackageManager() {
|
|
|
2037
2037
|
//#endregion
|
|
2038
2038
|
//#region package.json
|
|
2039
2039
|
var name = "create-rue";
|
|
2040
|
-
var version = "0.1.
|
|
2040
|
+
var version = "0.1.4";
|
|
2041
2041
|
//#endregion
|
|
2042
2042
|
//#region index.ts
|
|
2043
2043
|
const language = await getLanguage(fileURLToPath(new URL("./locales", import.meta.url)));
|
package/package.json
CHANGED
|
@@ -424,13 +424,13 @@ const TodoApp: FC = () => {
|
|
|
424
424
|
}
|
|
425
425
|
|
|
426
426
|
const nextTodo: TodoItem = {
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
427
|
+
id: nextId.value++,
|
|
428
|
+
title,
|
|
429
|
+
status: 'todo',
|
|
430
|
+
archived: false,
|
|
431
|
+
createdAt: new Date().toISOString(),
|
|
432
|
+
createdOrder: nextCreatedOrder.value++,
|
|
433
|
+
}
|
|
434
434
|
|
|
435
435
|
setTodos((current) => [nextTodo, ...current])
|
|
436
436
|
setDraft('')
|
|
@@ -608,7 +608,9 @@ const TodoApp: FC = () => {
|
|
|
608
608
|
<div className="flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between">
|
|
609
609
|
<div className="flex-1 space-y-3">
|
|
610
610
|
<div className="flex flex-wrap items-center gap-2">
|
|
611
|
-
<span
|
|
611
|
+
<span
|
|
612
|
+
className={`inline-block h-2.5 w-2.5 rounded-full ${meta.dotClass}`}
|
|
613
|
+
></span>
|
|
612
614
|
<span className={meta.badgeClass}>{meta.label}</span>
|
|
613
615
|
{item.archived && (
|
|
614
616
|
<span className="badge badge-secondary badge-outline">已归档</span>
|
|
@@ -663,7 +665,11 @@ const TodoApp: FC = () => {
|
|
|
663
665
|
>
|
|
664
666
|
保存
|
|
665
667
|
</button>
|
|
666
|
-
<button
|
|
668
|
+
<button
|
|
669
|
+
className="btn btn-ghost btn-sm"
|
|
670
|
+
onClick={cancelEditing}
|
|
671
|
+
type="button"
|
|
672
|
+
>
|
|
667
673
|
取消
|
|
668
674
|
</button>
|
|
669
675
|
</div>
|
|
@@ -689,7 +695,11 @@ const TodoApp: FC = () => {
|
|
|
689
695
|
|
|
690
696
|
<div className="flex flex-wrap gap-2 lg:justify-end">
|
|
691
697
|
{!isEditing && (
|
|
692
|
-
<button
|
|
698
|
+
<button
|
|
699
|
+
className="btn btn-sm btn-outline"
|
|
700
|
+
onClick={() => startEditing(item)}
|
|
701
|
+
type="button"
|
|
702
|
+
>
|
|
693
703
|
改名
|
|
694
704
|
</button>
|
|
695
705
|
)}
|