changeset 2312:3f0b889c8fa9

don't let phone users click on song uris by mistake
author drewp@bigasterisk.com
date Wed, 31 May 2023 13:50:13 -0700
parents a10f0f0e4dae
children b438224512f4
files light9/ascoltami/Light9AscoltamiUi.ts light9/ascoltami/index.html light9/web/ResourceDisplay.ts
diffstat 3 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/light9/ascoltami/Light9AscoltamiUi.ts	Wed May 31 13:34:06 2023 -0700
+++ b/light9/ascoltami/Light9AscoltamiUi.ts	Wed May 31 13:50:13 2023 -0700
@@ -126,7 +126,7 @@
                       playing: !!(this.song && song.equals(this.song)),
                     })}"
                   >
-                    <td><resource-display .uri=${song}></resource-display></td>
+                    <td><resource-display .uri=${song} noclick></resource-display></td>
                     <td>
                       <button @click=${this.onSelectSong.bind(this, song)}>
                         <span>Select</span>
--- a/light9/ascoltami/index.html	Wed May 31 13:34:06 2023 -0700
+++ b/light9/ascoltami/index.html	Wed May 31 13:50:13 2023 -0700
@@ -42,7 +42,7 @@
     </style>
     <meta
       name="viewport"
-      content="user-scalable=no, width=500, initial-scale=1"
+      content="user-scalable=no, width=device-width, initial-scale=.7"
     />
     <script type="module" src="../ascoltami/Light9AscoltamiUi"></script>
   </head>
--- a/light9/web/ResourceDisplay.ts	Wed May 31 13:34:06 2023 -0700
+++ b/light9/web/ResourceDisplay.ts	Wed May 31 13:50:13 2023 -0700
@@ -77,6 +77,7 @@
   @state() renameTo = "";
 
   @property({ type: Boolean }) rename: boolean = false;
+  @property({ type: Boolean }) noclick: boolean = false;
   @property({ type: Boolean }) minor: boolean = false;
 
   constructor() {
@@ -112,7 +113,7 @@
   }
 
   private href(): string {
-    if (!this.uri) {
+    if (!this.uri || this.noclick) {
       return "javascript:;";
     }
     return this.uri.value;