2023-06-15 20:45:38 +02:00
|
|
|
<script setup="setup">
|
2023-11-12 22:55:24 +01:00
|
|
|
|
|
|
|
const { etherpadUrl, etherpadPrefix } = useRuntimeConfig().public
|
|
|
|
|
2023-06-15 20:45:38 +02:00
|
|
|
const store = usePojmiStore()
|
|
|
|
|
|
|
|
const props = defineProps({
|
2023-11-12 22:55:24 +01:00
|
|
|
naslov: String,
|
|
|
|
revisionId: String
|
2023-06-15 20:45:38 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
//const pojem = computed(() => store.pojmi[props.naslov])
|
|
|
|
|
|
|
|
//await store.naloziPojme()
|
|
|
|
|
|
|
|
// const UREJAM = !!pojem.value
|
|
|
|
const UREJAM = false
|
|
|
|
|
|
|
|
let naslov = ''
|
|
|
|
let tekst = ''
|
|
|
|
let email = ''
|
|
|
|
|
|
|
|
const oddajPredlog = data => {
|
|
|
|
console.log('oddajam predlog!', naslov, tekst, email)
|
|
|
|
store.ustvariPojem(data)
|
|
|
|
}
|
|
|
|
|
2023-11-12 22:55:24 +01:00
|
|
|
const etherNalozen = ev => {
|
|
|
|
window.location.hash = props.revisionId
|
|
|
|
}
|
|
|
|
|
2023-06-15 20:45:38 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<section class="pojem">
|
|
|
|
<div v-if="UREJAM">UREJAM</div>
|
|
|
|
<form class="pojem" @submit.prevent="oddajPredlog">
|
|
|
|
<label for="naslov">Naslov</label>
|
|
|
|
<input name="naslov" type="text" v-model="naslov">
|
|
|
|
|
|
|
|
<label for="tekst">Besedilo</label>
|
2023-11-12 22:55:24 +01:00
|
|
|
<EtherpadTextarea :onLoad="etherNalozen" :revisionId="props.revisionId" />
|
2023-06-15 20:45:38 +02:00
|
|
|
|
|
|
|
<label for="email">E-poštni naslov</label>
|
|
|
|
<input name="email" type="email" v-model="email">
|
|
|
|
|
|
|
|
<input type="submit" value="Predlagaj">
|
|
|
|
</form>
|
|
|
|
</section>
|
|
|
|
</template>
|