Skip to content

Speakr is a personal, self-hosted web application designed for transcribing audio recordings

Python
1.9 KB
Raw Blame
<!-- Desktop Notes Tab. Flex-column shell so editing mode's textarea
     fills the rail with its own scrollbar instead of stretching the
     outer container (which pushed the tab-bar save buttons offscreen
     for long notes). Per-tab actions live in the right-rail tab-bar. -->
<div v-if="selectedTab === 'notes'" class="h-full flex flex-col overflow-hidden">

    <!-- Reading mode — single flex-1 scroll surface. -->
    <div v-if="!editingNotes"
         class="flex-1 overflow-y-auto px-4 py-4 prose-flush"
         @click="clickToEditNotes">
        <div v-if="notesHtml"
             v-html="notesHtml">
        </div>
        <div v-else-if="selectedRecording.notes" class="whitespace-pre-wrap">
            ${selectedRecording.notes}
        </div>
        <div v-else class="empty">
            <div class="empty__icon"><i class="fas fa-pen"></i></div>
            <div class="empty__title" v-text="t('help.clickToAddNotes')"></div>
            <div class="empty__body t-meta" v-text="t('notes.markdownSupported')"></div>
        </div>
    </div>

    <!-- Editing mode — see desktop-summary-tab.html for the rationale
         behind the .markdown-editor-container wrapper; without it
         EasyMDE renders un-themed and auto-grows past the viewport. -->
    <div v-else class="flex-1 flex flex-col overflow-hidden px-4 py-4">
        <div class="markdown-editor-container flex-1 min-h-0 flex flex-col">
            <textarea ref="notesMarkdownEditor"
                      v-model="selectedRecording.notes"
                      :placeholder="t('form.enterNotesMarkdown')">
            </textarea>
        </div>
        <div class="t-meta" style="margin-top: var(--sp-2); flex-shrink: 0;">
            <i class="fas fa-circle" style="font-size: 6px; color: var(--text-accent); margin-right: var(--sp-1);"></i>
            <span>${ t('summary.editingSaveHint') }</span>
        </div>
    </div>
</div>