--- Project Management ---
()
| 190 | // --- Project Management --- |
| 191 | |
| 192 | func (a *App) NewProject() { |
| 193 | a.mu.Lock() |
| 194 | defer a.mu.Unlock() |
| 195 | |
| 196 | if a.ActiveScan { |
| 197 | a.emitLog("Cannot create new project during active scan", LogError) |
| 198 | return |
| 199 | } |
| 200 | |
| 201 | a.ProjectData = &ProjectData{ |
| 202 | Dependencies: make(map[string][]string), |
| 203 | Theme: "dark", |
| 204 | SavedNewMods: []string{}, |
| 205 | DismissedHangingLibs: []string{}, |
| 206 | } |
| 207 | a.ProjectFilePath = "" |
| 208 | a.ProjectModified = false |
| 209 | a.HangingLibraries = nil |
| 210 | a.emitLog("New project created", LogSuccess) |
| 211 | } |
| 212 | |
| 213 | func (a *App) GetProjectData() *ProjectData { |
| 214 | a.mu.Lock() |