From 947afbdceb11db7ef709c692b3da51b1d1c7044a Mon Sep 17 00:00:00 2001 From: Niko PLP Date: Thu, 1 Aug 2024 16:42:08 +0300 Subject: [PATCH] change display of media when has_camera --- ng-app/src/lib/FullLayout.svelte | 55 ++++++++++++--------- ng-app/src/lib/components/PaneHeader.svelte | 2 +- 2 files changed, 32 insertions(+), 25 deletions(-) diff --git a/ng-app/src/lib/FullLayout.svelte b/ng-app/src/lib/FullLayout.svelte index 37ec4b9..ea13999 100644 --- a/ng-app/src/lib/FullLayout.svelte +++ b/ng-app/src/lib/FullLayout.svelte @@ -981,7 +981,7 @@ {/if} {#await check_has_camera() then has_camera} - {#if !has_camera} + {#if has_camera} scan_qr() }> @@ -999,31 +999,38 @@ class="w-7 h-7 text-gray-700 focus:outline-none dark:text-white"/> {$t("doc.record_reel")} - {/if} - {/await} - record_voice() }> - - {$t("doc.record_voice")} - - -
- { createMenuOpened.media = !createMenuOpened.media; scrollToCreateMenu("media"); } }> - - {$t("doc.media")} - - {#if createMenuOpened.media } - {#each create_media_items as item} - new_document(item) }> - - {get_class(item)["ng:n"]} + record_voice() }> + + {$t("doc.record_voice")} - {/each} - {/if} + {/if} + +
+ { createMenuOpened.media = !createMenuOpened.media; scrollToCreateMenu("media"); } }> + + {$t("doc.media")} + + {#if createMenuOpened.media } + {#each create_media_items as item} + new_document(item) }> + + {get_class(item)["ng:n"]} + + {/each} + {#if !has_camera} + record_voice() }> + + {$t("doc.record_voice")} + + {/if} + {/if} + {/await}
{ createMenuOpened.chart = !createMenuOpened.chart; scrollToCreateMenu("chart"); } }> diff --git a/ng-app/src/lib/components/PaneHeader.svelte b/ng-app/src/lib/components/PaneHeader.svelte index 781feb5..cfb6634 100644 --- a/ng-app/src/lib/components/PaneHeader.svelte +++ b/ng-app/src/lib/components/PaneHeader.svelte @@ -41,7 +41,7 @@ on:click={()=>closePane(pane_name)} on:keypress={()=>closePane(pane_name)} tabindex="0"> - +