Merge branch 'vue-3' into migrate-to-nuxt

This commit is contained in:
Julien Nahum 2023-12-19 15:25:05 +01:00
commit 4b00835a15
9 changed files with 43 additions and 31 deletions

View File

@ -16,6 +16,7 @@ class SitemapController extends Controller
*/
protected $urls = [
['/', 1],
['/pricing', 0.9],
['/privacy-policy', 0.5],
['/terms-conditions', 0.5],
['/login', 0.4],

View File

@ -34,7 +34,7 @@ class License extends Model
return $query->where('status', self::STATUS_ACTIVE);
}
public function getMaxFileSizeAttribute()
public function getMaxFileSizeAttribute(): int
{
return [
1 => 25000000, // 25 MB,
@ -43,7 +43,7 @@ class License extends Model
][$this->meta['tier']];
}
public function getCustomDomainLimitCountAttribute()
public function getCustomDomainLimitCountAttribute(): ?int
{
return [
1 => 1,

View File

@ -2,7 +2,6 @@
namespace App\Models;
use App\Http\Requests\AnswerFormRequest;
use App\Models\Forms\Form;
use App\Models\Traits\CachableAttributes;
use App\Models\Traits\CachesAttributes;
@ -71,7 +70,7 @@ class Workspace extends Model implements CachableAttributes
return null;
}
return $this->remember('custom_domain_count', 15 * 60, function(): int {
return $this->remember('custom_domain_count', 15 * 60, function(): ?int {
foreach ($this->owners as $owner) {
if ($owner->is_subscribed) {
if ($license = $owner->activeLicense()) {

View File

@ -68,7 +68,7 @@ class DiscordHandler extends AbstractWebhookHandler
"description" => implode(' - ', $externalLinks)
];
}
return [
'content' => 'New submission for your form **' . $this->form->title . '**',
'tts' => false,

View File

@ -59,9 +59,9 @@ export default {
window.addEventListener('resize', this.calcDimensions)
// Check if shadows are necessary after the element is resized.
const scrollContainerObserver = newResizeObserver(this.toggleShadow)
if (scrollContainerObserver) {
scrollContainerObserver.observe(this.$refs.scrollContainer)
this.scrollContainerObserver = newResizeObserver(this.toggleShadow)
if (this.scrollContainerObserver) {
this.scrollContainerObserver.observe(this.$refs.scrollContainer)
}
// Recalculate the container dimensions when the wrapper is resized.

View File

@ -56,6 +56,9 @@ export default {
return this.$store.getters['open/workspaces/getCurrent']()
},
customDomainOptions () {
if (!this.workspace || !this.workspace.custom_domains) {
return []
}
return this.workspace.custom_domains.map((domain) => {
return {
name: domain,

View File

@ -70,8 +70,8 @@
label="Transparent Background" help="Only applies when form is embedded"
/>
<toggle-switch-input name="confetti_on_submission" :form="form" class="mt-4"
label="Confetti on successful submisison"
@update:model-value="onChangeConfettiOnSubmission"
label="Confetti on successful submission"
@input="onChangeConfettiOnSubmission"
/>
<toggle-switch-input name="auto_save" :form="form"
label="Auto save form response"

View File

@ -1,7 +1,7 @@
<template>
<div class="w-full">
<div class="grid md:grid-cols-3 my-8">
<div class="flex mt-2">
<div class="flex mt-2 items-center">
<p class="text-sm text-gray-600 dark:text-gray-400 text-center w-full">
© Copyright {{ currYear }}. All Rights Reserved
</p>
@ -14,18 +14,31 @@
</span>
</router-link>
</div>
<ul class="flex justify-center mt-5 md:mt-1">
<li class="mr-10">
<router-link :to="{name:'privacy-policy'}" class="text-gray-600 dark:text-gray-400 transition-colors duration-300 hover:text-nt-blue">
Privacy Policy
</router-link>
</li>
<li class="list-disc pl-3">
<router-link :to="{name:'terms-conditions'}" class="text-gray-600 dark:text-gray-400 transition-colors duration-300 hover:text-nt-blue">
Terms & Conditions
</router-link>
</li>
</ul>
<div class="flex justify-center mt-5 md:mt-0">
<div class="grid grid-cols-1 lg:grid-cols-2 gap-x-4 gap-y-2">
<a href="https://opnform.featurebase.app/" target="_blank"
class="text-gray-600 dark:text-gray-400 transition-colors duration-300 hover:text-nt-blue">
Feature Requests
</a>
<a href="https://opnform.featurebase.app/roadmap" target="_blank"
class="text-gray-600 dark:text-gray-400 transition-colors duration-300 hover:text-nt-blue">
Roadmap
</a>
<a href="www.facebook.com/groups/opnform" target="_blank"
class="text-gray-600 dark:text-gray-400 transition-colors duration-300 hover:text-nt-blue">
Facebook Group
</a>
<router-link :to="{name:'privacy-policy'}"
class="text-gray-600 dark:text-gray-400 transition-colors duration-300 hover:text-nt-blue">
Privacy Policy
</router-link>
<router-link :to="{name:'terms-conditions'}"
class="text-gray-600 dark:text-gray-400 transition-colors duration-300 hover:text-nt-blue">
Terms & Conditions
</router-link>
</div>
</div>
</div>
</div>
</template>
@ -57,7 +70,8 @@ export default {
featureRequestsUrl: () => window.config.links.feature_requests
},
mounted () {},
mounted() {
},
methods: {}
}

View File

@ -56,22 +56,17 @@
</template>
<script>
import OpenFormFooter from '../../components/pages/OpenFormFooter.vue'
import Testimonials from '../../components/pages/welcome/Testimonials.vue'
import LoginForm from './components/LoginForm.vue'
import SeoMeta from '../../mixins/seo-meta.js'
import OpenFormFooter from '~/components/pages/OpenFormFooter.vue'
import LoginForm from "./components/LoginForm.vue";
export default {
components: {
OpenFormFooter,
Testimonials,
LoginForm
},
middleware: 'guest',
mixins: [SeoMeta],
data: () => ({
metaTitle: 'Login',
}),