1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-01 19:18:28 -04:00

feat(Notepad): add notepad desktop entry & IPC commands file handling

This commit is contained in:
purian23
2026-07-04 16:10:56 -04:00
parent bfda5f2d66
commit 81a4d3b4e0
23 changed files with 129 additions and 1 deletions
@@ -248,6 +248,29 @@ Singleton {
return newTab
}
function createTabForFile(path) {
var id = Date.now()
var fileName = path.split('/').pop()
var newTab = {
id: id,
title: fileName,
filePath: path,
isTemporary: false,
lastModified: new Date().toISOString(),
cursorPosition: 0,
scrollPosition: 0
}
var newTabs = tabs.slice()
newTabs.push(newTab)
tabs = newTabs
currentTabIndex = tabs.length - 1
saveMetadata()
return newTab
}
function closeTab(tabIndex) {
if (tabIndex < 0 || tabIndex >= tabs.length) return