27 lines
546 B
Vue
27 lines
546 B
Vue
<script setup="setup">
|
|
|
|
const { etherpadApiUrl } = useEtherpadApi()
|
|
|
|
const prikazi = ref(false)
|
|
const revisionId = ref(null)
|
|
|
|
const dodajPojem = async () => {
|
|
revisionId.value = crypto.randomUUID()
|
|
|
|
// Ustvari nov, prazen pad
|
|
const padId = revisionId.value
|
|
const resp = await $fetch(`${etherpadApiUrl}/createPad?padID=${padId}`)
|
|
prikazi.value = true
|
|
}
|
|
|
|
</script>
|
|
|
|
<template>
|
|
<div>
|
|
<div class="gumb" @click="dodajPojem()">
|
|
Dodaj pojem
|
|
</div>
|
|
<PojemForm v-if="prikazi" :revisionId="revisionId" />
|
|
</div>
|
|
</template>
|