forked from jsnbuchanan/crowd-funder-for-time-pwa
add the other activity envisioned on the home page (though not sending data yet)
This commit is contained in:
72
src/components/GiftedDialog.vue
Normal file
72
src/components/GiftedDialog.vue
Normal file
@@ -0,0 +1,72 @@
|
||||
<template>
|
||||
<div v-if="visible" class="dialog-overlay">
|
||||
<div class="dialog">
|
||||
<h1>Received from {{ contact?.name || "nobody in particular" }}</h1>
|
||||
<p>{{ message }}</p>
|
||||
<input
|
||||
type="text"
|
||||
class="block w-full rounded border border-slate-400 mb-4 px-3 py-2"
|
||||
placeholder="What you received"
|
||||
v-model="description"
|
||||
/>
|
||||
<button @click="confirm">Confirm</button>
|
||||
|
||||
<button @click="cancel">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: ["message"],
|
||||
data() {
|
||||
return {
|
||||
contact: null,
|
||||
description: "",
|
||||
visible: false,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
open(contact) {
|
||||
this.contact = contact;
|
||||
this.visible = true;
|
||||
},
|
||||
close() {
|
||||
this.visible = false;
|
||||
},
|
||||
confirm() {
|
||||
this.close();
|
||||
this.$emit("dialog-result", {
|
||||
action: "confirm",
|
||||
contact: this.contact,
|
||||
description: this.description,
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
this.close();
|
||||
this.$emit("dialog-result", { action: "cancel" });
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.dialog-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.dialog {
|
||||
background-color: white;
|
||||
padding: 1rem;
|
||||
border-radius: 0.5rem;
|
||||
width: 50%;
|
||||
}
|
||||
</style>
|
||||
@@ -2,7 +2,7 @@ import { PlaneGeometry, MeshLambertMaterial, Mesh, TextureLoader } from "three";
|
||||
|
||||
export function createTerrain(props) {
|
||||
const loader = new TextureLoader();
|
||||
const height = loader.load("img/textures/forest-floor.png");
|
||||
const height = loader.load("img/textures/leafy-autumn-forest-floor.jpg");
|
||||
// w h
|
||||
const geometry = new PlaneGeometry(props.width, props.height, 64, 64);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user