This commit is contained in:
2026-05-09 20:40:27 +02:00
parent 94e2b8bd47
commit 0b49ac4b48
8 changed files with 175 additions and 141 deletions

View File

@@ -10,32 +10,6 @@ const campaignName = computed(() => {
return Campaign.value?.name ?? 'Campaign';
});
async function createNote() {
if (!Campaign.value) {
return;
}
const campaignId = Campaign.value?._id
try {
const response = await Server().post('/note/create', {
title: 'New note',
content: content.value,
campaign: campaignId
});
if (response.data.status !== 'ok') {
return;
}
emitter.emit('note-created', response.data.note);
} catch (err) {
error.value = 'Unable to create note.';
} finally {
isSaving.value = false;
}
}
function exitToMainMenu() {
SetCampaign(null);
SetShowContent(false);
@@ -60,10 +34,6 @@ function exitToMainMenu() {
<img class="top-bar-button-icon" src="/icons/iconoir/regular/nav-arrow-left.svg" alt="" aria-hidden="true">
<span>Main Menu</span>
</button>
<button class="note-button sound-click" type="button" @click="createNote" :disabled="!Campaign">
<img class="note-button-icon" src="/icons/iconoir/regular/plus.svg" alt="" aria-hidden="true">
<span>New Note</span>
</button>
</div>
</div>
</template>