mirror of
https://github.com/junkfix/config-editor-card.git
synced 2026-02-22 18:26:31 +01:00
Merge pull request #39 from htmltiger/htmltiger-patch-1
subdir depth config added
This commit is contained in:
commit
65c4ac9ead
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
@ -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(){
|
||||
|
|
@ -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){
|
||||
|
|
|
|||
Loading…
Reference in a new issue