Add rename for sequences and projects, per-sub color cycling, project path editing
- Sequences: add rename button with name shown in expansion header - Subsequences: cycle through 6 distinct border colors by sub-index - Projects: add rename and change path buttons with DB methods Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
18
db.py
18
db.py
@@ -98,6 +98,24 @@ class ProjectDB:
|
||||
).fetchone()
|
||||
return dict(row) if row else None
|
||||
|
||||
def rename_project(self, old_name: str, new_name: str) -> bool:
|
||||
now = time.time()
|
||||
cur = self.conn.execute(
|
||||
"UPDATE projects SET name = ?, updated_at = ? WHERE name = ?",
|
||||
(new_name, now, old_name),
|
||||
)
|
||||
self.conn.commit()
|
||||
return cur.rowcount > 0
|
||||
|
||||
def update_project_path(self, name: str, folder_path: str) -> bool:
|
||||
now = time.time()
|
||||
cur = self.conn.execute(
|
||||
"UPDATE projects SET folder_path = ?, updated_at = ? WHERE name = ?",
|
||||
(folder_path, now, name),
|
||||
)
|
||||
self.conn.commit()
|
||||
return cur.rowcount > 0
|
||||
|
||||
def delete_project(self, name: str) -> bool:
|
||||
cur = self.conn.execute("DELETE FROM projects WHERE name = ?", (name,))
|
||||
self.conn.commit()
|
||||
|
||||
Reference in New Issue
Block a user