form color reset (#577)
* form color reset * fix link color --------- Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
parent
5ab3477e0a
commit
33ad2d41b8
|
|
@ -141,8 +141,20 @@
|
||||||
<color-input
|
<color-input
|
||||||
name="color"
|
name="color"
|
||||||
:form="form"
|
:form="form"
|
||||||
label="Color (for buttons & inputs border)"
|
>
|
||||||
/>
|
<template #help>
|
||||||
|
<InputHelp>
|
||||||
|
<span class="text-gray-500">
|
||||||
|
Color (for buttons & inputs border) - <a
|
||||||
|
class="text-blue-500"
|
||||||
|
href="#"
|
||||||
|
@click.prevent="form.color = DEFAULT_COLOR"
|
||||||
|
>Reset</a>
|
||||||
|
</span>
|
||||||
|
</InputHelp>
|
||||||
|
</template>
|
||||||
|
</color-input>
|
||||||
|
|
||||||
<toggle-switch-input
|
<toggle-switch-input
|
||||||
name="hide_title"
|
name="hide_title"
|
||||||
:form="form"
|
:form="form"
|
||||||
|
|
@ -204,6 +216,8 @@ import { useWorkingFormStore } from "../../../../../stores/working_form"
|
||||||
import EditorOptionsPanel from "../../../editors/EditorOptionsPanel.vue"
|
import EditorOptionsPanel from "../../../editors/EditorOptionsPanel.vue"
|
||||||
import GoogleFontPicker from "../../../editors/GoogleFontPicker.vue"
|
import GoogleFontPicker from "../../../editors/GoogleFontPicker.vue"
|
||||||
import ProTag from "~/components/global/ProTag.vue"
|
import ProTag from "~/components/global/ProTag.vue"
|
||||||
|
import { DEFAULT_COLOR } from "@/composables/forms/initForm"
|
||||||
|
|
||||||
|
|
||||||
const workingFormStore = useWorkingFormStore()
|
const workingFormStore = useWorkingFormStore()
|
||||||
const subscriptionModalStore = useSubscriptionModalStore()
|
const subscriptionModalStore = useSubscriptionModalStore()
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import { generateUUID } from "~/lib/utils.js"
|
import { generateUUID } from "~/lib/utils.js"
|
||||||
|
export const DEFAULT_COLOR = '#3B82F6'
|
||||||
|
|
||||||
export const initForm = (defaultValue = {}, withDefaultProperties = false) => {
|
export const initForm = (defaultValue = {}, withDefaultProperties = false) => {
|
||||||
return useForm({
|
return useForm({
|
||||||
|
|
@ -13,7 +14,7 @@ export const initForm = (defaultValue = {}, withDefaultProperties = false) => {
|
||||||
theme: "default",
|
theme: "default",
|
||||||
width: "centered",
|
width: "centered",
|
||||||
dark_mode: "auto",
|
dark_mode: "auto",
|
||||||
color: "#3B82F6",
|
color: DEFAULT_COLOR,
|
||||||
hide_title: false,
|
hide_title: false,
|
||||||
no_branding: false,
|
no_branding: false,
|
||||||
uppercase_labels: false,
|
uppercase_labels: false,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue