Skip to content

Commit

Permalink
Merge pull request #39 from htmltiger/htmltiger-patch-1
Browse files Browse the repository at this point in the history
subdir depth config added
  • Loading branch information
htmltiger authored Mar 12, 2022
2 parents 078059b + 6c8b99a commit 65c4ac9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,6 @@ choose the first blank in dropdown menu and type some text and hit Save or ctrl+
| hidefooter | `false` |
| basic | `false` | Force basic editor
| size | `100` | font size
| depth | `2` | subfolder depth 0 or more

Please backup your files before using as there is no undo.
6 changes: 3 additions & 3 deletions config-editor-card.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
console.info("Config Editor 4.0");
console.info("Config Editor 4.1");
const LitElement = window.LitElement || Object.getPrototypeOf(customElements.get("hui-masonry-view") );
const html = LitElement.prototype.html;
const css = LitElement.prototype.css;
Expand Down Expand Up @@ -179,7 +179,7 @@ localSet(k,v){

cmd(action, data, file){
return this._hass.callWS({type: "config_editor/ws", action: action,
data: data, file: file, ext: this.edit.ext});
data: data, file: file, ext: this.edit.ext, depth: this.edit.depth});
}

saveList(){
Expand Down Expand Up @@ -312,7 +312,7 @@ getCardSize() {
}

setConfig(config) {
this.edit = {file: '', hidefooter: false, readonly: false, basic: false, size: 0, ext: '', orgCode: '', coder:1, ...config};
this.edit = {file: '', hidefooter: false, readonly: false, basic: false, size: 0, depth: 2, ext: '', orgCode: '', coder:1, ...config};
if(this.edit.file){
const f=this.edit.file.split('.')[1];
if(f){
Expand Down

0 comments on commit 65c4ac9

Please sign in to comment.