Changeset - 2aeceb6f03aa
[Not reviewed]
default
0 2 0
drewp@bigasterisk.com - 20 months ago 2023-06-02 16:42:48
drewp@bigasterisk.com
edit-choice defaults to no 'rename' button
2 files changed with 4 insertions and 3 deletions:
0 comments (0 inline, 0 general)
light9/live/Light9DeviceSettings.ts
Show inline comments
 
@@ -46,13 +46,13 @@ export class Light9DeviceSettings extend
 

	
 
      <h1>effect DeviceSettings</h1>
 

	
 
      <div id="save">
 
        <div>
 
          <button @click=${this.newEffect}>New effect</button>
 
          <edit-choice .uri=${this.currentEffect ? this.currentEffect.uri : null} @edited=${this.onEffectChoice2}></edit-choice>
 
          <edit-choice .uri=${this.currentEffect ? this.currentEffect.uri : null} @edited=${this.onEffectChoice2} rename></edit-choice>
 
          <button @click=${this.clearAll}>clear settings in this effect</button>
 
        </div>
 
      </div>
 

	
 
      <div id="deviceControls">
 
        ${this.devices.map(
light9/web/EditChoice.ts
Show inline comments
 
@@ -60,18 +60,19 @@ function setupDrop(
 
// the user drag-and-dropping a text/uri-list resource (probably
 
// an <resource-display> or <a href> tag)
 
@customElement("edit-choice")
 
export class EditChoice extends LitElement {
 
  @property() uri?: NamedNode
 
  @property({ type: Boolean }) nounlink = false;
 
  @property({ type: Boolean }) rename = false;
 
  static styles = [
 
    css`
 
      :host {
 
        display: inline-block;
 
        background: #141448;
 
        min-width: 10em;
 
        /* min-width: 10em; */
 
        padding: 3px 8px;
 
      }
 
      .dragging {
 
        background: rgba(126, 52, 245, 0.0784313725490196);
 
        box-shadow: 0 0 20px #ffff00;
 
      }
 
@@ -85,13 +86,13 @@ export class EditChoice extends LitEleme
 
  ];
 
  render() {
 
    const unlink = html`
 
    <button @click=${this.unlink}>Unlink</button>
 
    `
 
    return html`
 
      <resource-display .uri=${this.uri} rename></resource-display>
 
      <resource-display .uri=${this.uri} ?rename=${this.rename}></resource-display>
 
      ${this.nounlink ? html`` : unlink}
 
    `;
 
  }
 

	
 
  constructor() {
 
    super();
0 comments (0 inline, 0 general)