/* * File Manager NotePad * * Licensed Virtual the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License * for the specific language governing permissions and limitations under the License. * * Change History: * * Date Who What * ---- --- ---- * 07Oct2025 thebearmay Add the Utilities Page * Fixed the 500 error when exiting * 29Nov2025 getHubFiles() error */ //#include thebearmay.uiInputElements static String version() { return '1.0.4' } definition ( name: "fmNotePad", namespace: "thebearmay", author: "Jean P. May, Jr.", description: "File Manager Notepad - Utility to edit small text files in FM", category: "Utility", importUrl: "https://raw.githubusercontent.com/thebearmay/hubitat/main/apps/fmNotepad.groovy", installOnOpen: true, oauth: false, singleThreaded: true, iconUrl: "", iconX2Url: "" ) preferences { page name: "decisionPage" page name: "mainPage" page name: "uiPage" } mappings { } def installed() { // log.trace "installed()" state?.isInstalled = true initialize() } def updated(){ // log.trace "updated()" if(!state?.isInstalled) { state?.isInstalled = true } if(debugEnable) runIn(1800,logsOff) } def initialize(){ app.removeSetting('fileText') app.removeSetting('fName') app.removeSetting('saveName') } void logsOff(){ app.updateSetting("debugEnable",[value:"false",type:"bool"]) } def decisionPage(){ dynamicPage (name: "decisionPage") { section("") { if(!page2Def) mainPage() else uiPage() } } } def mainPage(){ dynamicPage (name: "mainPage", title: "
| ${fElem} | ${saveName} | ${p2} | |||
| ${saveBtn} | |||||
| ${fElem} | ${saveName} | ${p2} | |||
| ${saveBtn} | |||||
| ${fData} | |||||
| ${saveBtn} | |||||
| ${fElem} | ${saveName} | ${p2} |
| ${newBtn} |
| ${it} | " } str += "|||||
|---|---|---|---|---|---|
| ${editIcon} | ${copyIcon} | ${renIcon} | ${it} | ${target} | ${delIcon} |
| ${defPage} | |||||
| ${it} | " } str += "
|---|