feat: embeds (#3627)
Co-authored-by: Liyas Thomas <liyascthomas@gmail.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div
|
||||
v-if="selectedWidget"
|
||||
class="divide-y divide-divider rounded border border-divider"
|
||||
class="border divide-y rounded divide-divider border-divider"
|
||||
>
|
||||
<div v-if="loading" class="px-4 py-2">
|
||||
{{ t("shared_requests.creating_widget") }}
|
||||
@@ -10,17 +10,17 @@
|
||||
{{ t("shared_requests.description") }}
|
||||
</div>
|
||||
<div class="flex flex-col divide-y divide-divider">
|
||||
<div class="flex flex-col space-y-4 p-4">
|
||||
<div class="flex flex-col p-4 space-y-4">
|
||||
<div
|
||||
v-for="widget in widgets"
|
||||
:key="widget.value"
|
||||
class="flex cursor-pointer flex-col space-y-2 rounded border border-divider px-4 py-3 hover:bg-dividerLight"
|
||||
class="flex flex-col p-4 border rounded cursor-pointer border-divider hover:bg-dividerLight"
|
||||
:class="{
|
||||
'!border-accentLight': selectedWidget.value === widget.value,
|
||||
}"
|
||||
@click="selectedWidget = widget"
|
||||
>
|
||||
<span class="text-md font-bold">
|
||||
<span class="mb-1 font-bold text-secondaryDark">
|
||||
{{ widget.label }}
|
||||
</span>
|
||||
<span class="text-tiny">
|
||||
@@ -28,9 +28,13 @@
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-col divide-y divide-divider">
|
||||
<div class="px-4 py-3">{{ t("shared_requests.preview") }}</div>
|
||||
<div class="flex flex-col items-center justify-center px-4 py-10">
|
||||
<div class="flex flex-col items-center justify-center p-4">
|
||||
<span
|
||||
class="flex justify-center flex-1 mb-2 text-secondaryLight text-tiny"
|
||||
>
|
||||
{{ t("shared_requests.preview") }}
|
||||
</span>
|
||||
<div class="w-full">
|
||||
<ShareTemplatesEmbeds
|
||||
v-if="selectedWidget.value === 'embed'"
|
||||
:endpoint="request?.endpoint"
|
||||
@@ -132,7 +136,7 @@ const embedOption = ref<EmbedOption>({
|
||||
{
|
||||
value: "authorization",
|
||||
label: t("tab.authorization"),
|
||||
enabled: true,
|
||||
enabled: false,
|
||||
},
|
||||
],
|
||||
theme: "system",
|
||||
|
||||
Reference in New Issue
Block a user