Skip to content

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

Python
1.6 KB
Raw Blame
<!-- Mobile Notes Panel.

     Same shape as mobile-summary-panel — toolbar hides during editing
     so the edit-pen active-state inconsistency disappears, and the
     editor takes the full panel height with thin outer padding plus a
     sticky Cancel/Save footer. -->
<!-- Per-tab contextual toolbar lives in mobile-header.html. -->
<div v-if="mobileTab === 'notes'" class="h-full flex flex-col">

    <!-- Editing-mode shell — editor goes edge-to-edge. -->
    <div v-if="editingNotes" class="flex-grow flex flex-col min-h-0 pt-1">
        <div class="markdown-editor-container flex-1 min-h-0 flex flex-col">
            <textarea ref="notesMarkdownEditor"
                      v-model="selectedRecording.notes"></textarea>
        </div>
        <div class="flex justify-end gap-2 flex-shrink-0 px-3 py-2 border-t"
             style="border-top-color: var(--border-secondary);">
            <button @click="cancelEditNotes" class="btn btn--sm btn--ghost" v-text="t('common.cancel')"></button>
            <button @click="saveEditNotes" class="btn btn--sm btn--primary" v-text="t('common.save')"></button>
        </div>
    </div>

    <!-- Reading-mode body. -->
    <div v-else class="flex-grow overflow-y-auto px-3 py-3" @click="clickToEditNotes">
        <div v-if="!selectedRecording.notes" class="empty">
            <div class="empty__icon"><i class="fas fa-sticky-note"></i></div>
            <div class="empty__title" v-text="t('help.clickToAddNotes')"></div>
            <div class="empty__body" v-text="t('notes.markdownSupported')"></div>
        </div>
        <div v-else class="prose-flush h-full" v-html="notesHtml"></div>
    </div>
</div>