feat: init commit w/ callback prototype components

This commit is contained in:
Zack Spear
2023-05-26 17:34:23 -07:00
committed by Zack Spear
parent a205bca6ec
commit c96c0a765c
22 changed files with 11134 additions and 0 deletions

15
components/Auth.ce.vue Normal file
View File

@@ -0,0 +1,15 @@
<script lang="ts" setup>
import 'tailwindcss/tailwind.css';
</script>
<template>
<div class="text-white font-semibold p-4 bg-orange-400 rounded-lg">
Auth.ce
</div>
</template>
<style lang="postcss">
@tailwind base;
@tailwind components;
@tailwind utilities;
</style>

View File

@@ -0,0 +1,26 @@
<script setup lang="ts">
import { useCallbackStore } from '~/store/callback';
import 'tailwindcss/tailwind.css';
import { storeToRefs } from 'pinia';
const callbackStore = useCallbackStore();
const { decryptedData } = storeToRefs(callbackStore);
onBeforeMount(() => {
callbackStore.watcher();
});
</script>
<template>
<div class="text-white font-semibold p-4 bg-orange-400 rounded-lg">
<h2>CallbackHandler.ce</h2>
<pre>{{ JSON.stringify(decryptedData, null, 2) }}</pre>
</div>
</template>
<style lang="postcss">
@tailwind base;
@tailwind components;
@tailwind utilities;
</style>

View File

@@ -0,0 +1,15 @@
<script lang="ts" setup>
import 'tailwindcss/tailwind.css';
</script>
<template>
<div class="text-white font-semibold p-4 bg-orange-400 rounded-lg">
KeyActions.ce
</div>
</template>
<style lang="postcss">
@tailwind base;
@tailwind components;
@tailwind utilities;
</style>

View File

@@ -0,0 +1,15 @@
<script lang="ts" setup>
import 'tailwindcss/tailwind.css';
</script>
<template>
<div class="text-white font-semibold p-4 bg-orange-400 rounded-lg">
Launchpad.ce
</div>
</template>
<style lang="postcss">
@tailwind base;
@tailwind components;
@tailwind utilities;
</style>

View File

@@ -0,0 +1,15 @@
<script lang="ts" setup>
import 'tailwindcss/tailwind.css';
</script>
<template>
<div class="text-white font-semibold p-4 bg-orange-400 rounded-lg">
PluginPromo.ce
</div>
</template>
<style lang="postcss">
@tailwind base;
@tailwind components;
@tailwind utilities;
</style>

View File

@@ -0,0 +1,49 @@
<script lang="ts" setup>
import { storeToRefs } from 'pinia';
import { useCallbackStore } from '~/store/callback';
import { useServerStore } from '~/store/server';
import type { Server } from '~/types/server';
import 'tailwindcss/tailwind.css';
export interface Props {
server?: Server;
}
const props = defineProps<Props>();
const callbackStore = useCallbackStore();
const serverStore = useServerStore();
const { name, description, guid } = storeToRefs(serverStore);
onBeforeMount(() => {
console.debug('[onBeforeMount]', { props }, typeof props.server);
if (!props.server) return console.error('Server data not present');
// set props from web component in store so the data is available throughout other components
if (typeof props.server === 'object') { // handle the testing dev Vue component
serverStore.setServer(props.server);
} else if (typeof props.server === 'string') { // handle web component
try {
const parsedServerProp = JSON.parse(props.server);
serverStore.setServer(parsedServerProp);
} catch (e) {
console.error(e);
}
}
});
</script>
<template>
<div class="text-white bg-blue-700 flex flex-col gap-y-2 p-4 rounded-lg">
<h3 class="italic">{{ name }}</h3>
<h4 class="text-gray-300">{{ description }}</h4>
<h5>{{ guid }}</h5>
<button class="p-2 text-blue-700 hover:text-white bg-white border border-white hover:bg-transparent rounded-sm" @click="callbackStore.send()" type="button">Test Purchase Callback</button>
</div>
</template>
<style lang="postcss">
@tailwind base;
@tailwind components;
@tailwind utilities;
</style>

View File

@@ -0,0 +1,15 @@
<script lang="ts" setup>
import 'tailwindcss/tailwind.css';
</script>
<template>
<div class="text-white font-semibold p-4 bg-orange-400 rounded-lg">
WanIpCheck.ce
</div>
</template>
<style lang="postcss">
@tailwind base;
@tailwind components;
@tailwind utilities;
</style>