Merge branch 'develop' into feat/email-forwarding
This commit is contained in:
@@ -1,26 +1,26 @@
|
||||
<template>
|
||||
<div class="p-4 space-y-6 bg-white dark:bg-slate-900">
|
||||
<div class="p-4 space-y-6 bg-n-background">
|
||||
<div class="space-y-2 animate-loader-pulse">
|
||||
<div class="h-6 bg-slate-100 dark:bg-slate-700 rounded w-1/5" />
|
||||
<div class="h-10 bg-slate-100 dark:bg-slate-700 rounded w-3/5" />
|
||||
<div class="h-6 bg-n-slate-4 dark:bg-n-slate-6 rounded w-1/5" />
|
||||
<div class="h-10 bg-n-slate-4 dark:bg-n-slate-6 rounded w-3/5" />
|
||||
</div>
|
||||
<div class="space-y-2 animate-loader-pulse">
|
||||
<div class="h-5 bg-slate-100 dark:bg-slate-700 rounded" />
|
||||
<div class="h-5 bg-slate-100 dark:bg-slate-700 rounded" />
|
||||
<div class="h-5 bg-slate-100 dark:bg-slate-700 rounded" />
|
||||
<div class="h-5 bg-slate-100 dark:bg-slate-700 rounded w-4/5" />
|
||||
<div class="h-5 bg-n-slate-4 dark:bg-n-slate-6 rounded" />
|
||||
<div class="h-5 bg-n-slate-4 dark:bg-n-slate-6 rounded" />
|
||||
<div class="h-5 bg-n-slate-4 dark:bg-n-slate-6 rounded" />
|
||||
<div class="h-5 bg-n-slate-4 dark:bg-n-slate-6 rounded w-4/5" />
|
||||
</div>
|
||||
<div class="space-y-2 animate-loader-pulse">
|
||||
<div class="h-5 bg-slate-100 dark:bg-slate-700 rounded" />
|
||||
<div class="h-5 bg-slate-100 dark:bg-slate-700 rounded" />
|
||||
<div class="h-5 bg-slate-100 dark:bg-slate-700 rounded w-3/5" />
|
||||
<div class="h-5 bg-slate-100 dark:bg-slate-700 rounded" />
|
||||
<div class="h-5 bg-n-slate-4 dark:bg-n-slate-6 rounded" />
|
||||
<div class="h-5 bg-n-slate-4 dark:bg-n-slate-6 rounded" />
|
||||
<div class="h-5 bg-n-slate-4 dark:bg-n-slate-6 rounded w-3/5" />
|
||||
<div class="h-5 bg-n-slate-4 dark:bg-n-slate-6 rounded" />
|
||||
</div>
|
||||
<div class="space-y-2 animate-loader-pulse">
|
||||
<div class="h-5 bg-slate-100 dark:bg-slate-700 rounded" />
|
||||
<div class="h-5 bg-slate-100 dark:bg-slate-700 rounded" />
|
||||
<div class="h-5 bg-slate-100 dark:bg-slate-700 rounded" />
|
||||
<div class="h-5 bg-slate-100 dark:bg-slate-700 rounded w-3/5" />
|
||||
<div class="h-5 bg-n-slate-4 dark:bg-n-slate-6 rounded" />
|
||||
<div class="h-5 bg-n-slate-4 dark:bg-n-slate-6 rounded" />
|
||||
<div class="h-5 bg-n-slate-4 dark:bg-n-slate-6 rounded" />
|
||||
<div class="h-5 bg-n-slate-4 dark:bg-n-slate-6 rounded w-3/5" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script>
|
||||
import globalConfigMixin from 'shared/mixins/globalConfigMixin';
|
||||
import { useBranding } from 'shared/composables/useBranding';
|
||||
|
||||
const {
|
||||
LOGO_THUMBNAIL: logoThumbnail,
|
||||
@@ -8,13 +8,18 @@ const {
|
||||
} = window.globalConfig || {};
|
||||
|
||||
export default {
|
||||
mixins: [globalConfigMixin],
|
||||
props: {
|
||||
disableBranding: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
setup() {
|
||||
const { replaceInstallationName } = useBranding();
|
||||
return {
|
||||
replaceInstallationName,
|
||||
};
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
globalConfig: {
|
||||
@@ -28,13 +33,15 @@ export default {
|
||||
brandRedirectURL() {
|
||||
try {
|
||||
const referrerHost = this.$store.getters['appConfig/getReferrerHost'];
|
||||
const baseURL = `${this.globalConfig.widgetBrandURL}?utm_source=${
|
||||
referrerHost ? 'widget_branding' : 'survey_branding'
|
||||
}`;
|
||||
const url = new URL(this.globalConfig.widgetBrandURL);
|
||||
if (referrerHost) {
|
||||
return `${baseURL}&utm_referrer=${referrerHost}`;
|
||||
url.searchParams.set('utm_source', referrerHost);
|
||||
url.searchParams.set('utm_medium', 'widget');
|
||||
} else {
|
||||
url.searchParams.set('utm_medium', 'survey');
|
||||
}
|
||||
return baseURL;
|
||||
url.searchParams.set('utm_campaign', 'branding');
|
||||
return url.toString();
|
||||
} catch (e) {
|
||||
// Suppressing the error as getter is not defined in some cases
|
||||
}
|
||||
@@ -61,7 +68,7 @@ export default {
|
||||
:src="globalConfig.logoThumbnail"
|
||||
/>
|
||||
<span>
|
||||
{{ useInstallationName($t('POWERED_BY'), globalConfig.brandName) }}
|
||||
{{ replaceInstallationName($t('POWERED_BY')) }}
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -27,11 +27,11 @@ export default {
|
||||
let className =
|
||||
'text-white py-3 px-4 rounded-lg shadow-sm leading-4 cursor-pointer disabled:opacity-50';
|
||||
if (this.type === 'clear') {
|
||||
className = 'flex mx-auto mt-4 text-xs leading-3 w-auto text-black-600';
|
||||
className = 'flex mx-auto mt-4 text-xs leading-3 w-auto text-n-gray-12';
|
||||
}
|
||||
|
||||
if (this.type === 'blue' && !Object.keys(this.buttonStyles).length) {
|
||||
className = `${className} bg-woot-500 hover:bg-woot-700`;
|
||||
className = `${className} bg-n-brand hover:brightness-110`;
|
||||
}
|
||||
if (this.block) {
|
||||
className = `${className} w-full`;
|
||||
|
||||
@@ -1,64 +1,56 @@
|
||||
<script>
|
||||
<script setup>
|
||||
import { ref, useTemplateRef, computed, watch } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import ArticleSkeletonLoader from 'shared/components/ArticleSkeletonLoader.vue';
|
||||
|
||||
export default {
|
||||
name: 'IframeLoader',
|
||||
components: {
|
||||
ArticleSkeletonLoader,
|
||||
const props = defineProps({
|
||||
url: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
props: {
|
||||
url: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
isRtl: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
isRtl: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isLoading: true,
|
||||
showEmptyState: !this.url,
|
||||
};
|
||||
isDirApplied: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
watch: {
|
||||
isRtl: {
|
||||
immediate: true,
|
||||
handler(value) {
|
||||
this.$nextTick(() => {
|
||||
const iframeElement = this.$el.querySelector('iframe');
|
||||
if (iframeElement) {
|
||||
iframeElement.onload = () => {
|
||||
try {
|
||||
const iframeDocument =
|
||||
iframeElement.contentDocument ||
|
||||
(iframeElement.contentWindow &&
|
||||
iframeElement.contentWindow.document);
|
||||
});
|
||||
|
||||
if (iframeDocument) {
|
||||
iframeDocument.documentElement.dir = value ? 'rtl' : 'ltr';
|
||||
}
|
||||
} catch (e) {
|
||||
// error
|
||||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
handleIframeLoad() {
|
||||
// Once loaded, the loading state is hidden
|
||||
this.isLoading = false;
|
||||
},
|
||||
handleIframeError() {
|
||||
// Hide the loading state and show the empty state when an error occurs
|
||||
this.isLoading = false;
|
||||
this.showEmptyState = true;
|
||||
},
|
||||
},
|
||||
const { t } = useI18n();
|
||||
|
||||
const iframe = useTemplateRef('iframe');
|
||||
const isLoading = ref(true);
|
||||
const showEmptyState = ref(!props.url);
|
||||
|
||||
const direction = computed(() => (props.isRtl ? 'rtl' : 'ltr'));
|
||||
|
||||
const applyDirection = () => {
|
||||
if (!iframe.value) return;
|
||||
if (!props.isDirApplied) return; // If direction is already applied through props, do not apply again (iframe case)
|
||||
try {
|
||||
const doc =
|
||||
iframe.value.contentDocument || iframe.value.contentWindow?.document;
|
||||
if (doc?.documentElement) {
|
||||
doc.documentElement.dir = direction.value;
|
||||
doc.documentElement.setAttribute('data-dir-applied', 'true');
|
||||
}
|
||||
} catch (e) {
|
||||
// error
|
||||
}
|
||||
};
|
||||
|
||||
watch(() => props.isRtl, applyDirection);
|
||||
|
||||
const handleIframeLoad = () => {
|
||||
isLoading.value = false;
|
||||
applyDirection();
|
||||
};
|
||||
|
||||
const handleIframeError = () => {
|
||||
isLoading.value = false;
|
||||
showEmptyState.value = true;
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -66,6 +58,7 @@ export default {
|
||||
<div class="relative overflow-hidden pb-1/2 h-full">
|
||||
<iframe
|
||||
v-if="url"
|
||||
ref="iframe"
|
||||
:src="url"
|
||||
class="absolute w-full h-full top-0 left-0"
|
||||
@load="handleIframeLoad"
|
||||
@@ -79,7 +72,7 @@ export default {
|
||||
v-if="showEmptyState"
|
||||
class="absolute w-full h-full top-0 left-0 flex justify-center items-center"
|
||||
>
|
||||
<p>{{ $t('PORTAL.IFRAME_ERROR') }}</p>
|
||||
<p>{{ t('PORTAL.IFRAME_ERROR') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -69,7 +69,7 @@ export default {
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
value() {
|
||||
modelValue() {
|
||||
this.resizeTextarea();
|
||||
// 🚨 watch triggers every time the value is changed, we cannot set this to focus then
|
||||
// when this runs, it sets the cursor to the end of the body, ignoring the signature
|
||||
|
||||
@@ -13,15 +13,15 @@ export default {
|
||||
computed: {
|
||||
colorSchemeClasses() {
|
||||
if (this.colorScheme === 'primary') {
|
||||
return 'before:!border-t-woot-500';
|
||||
return 'before:!border-t-n-brand';
|
||||
}
|
||||
|
||||
if (this.colorScheme === 'warning') {
|
||||
return 'before:!border-t-yellow-500';
|
||||
return 'before:!border-t-n-amber-6';
|
||||
}
|
||||
|
||||
if (this.colorScheme === 'success') {
|
||||
return 'before:!border-t-success-500';
|
||||
return 'before:!border-t-n-teal-9';
|
||||
}
|
||||
|
||||
return this.colorScheme;
|
||||
|
||||
@@ -38,23 +38,22 @@ export default {
|
||||
v-if="label"
|
||||
class="mb-2 text-xs font-medium"
|
||||
:class="{
|
||||
'text-black-800': !error,
|
||||
'text-red-400': error,
|
||||
'text-n-gray-12': !error,
|
||||
'text-n-ruby-9': error,
|
||||
}"
|
||||
>
|
||||
{{ label }}
|
||||
</div>
|
||||
<textarea
|
||||
v-model="computedModel"
|
||||
class="w-full px-3 py-2 leading-tight border rounded outline-none resize-none text-slate-700"
|
||||
class="w-full px-3 py-2 leading-tight border rounded outline-none resize-none text-n-gray-12"
|
||||
:class="{
|
||||
'border-black-200 hover:border-black-300 focus:border-black-300':
|
||||
!error,
|
||||
'border-red-200 hover:border-red-300 focus:border-red-300': error,
|
||||
'border-n-weak hover:border-n-weak focus:border-n-weak': !error,
|
||||
'border-n-ruby-9 hover:border-n-ruby-9 focus:border-n-ruby-9': error,
|
||||
}"
|
||||
:placeholder="placeholder"
|
||||
/>
|
||||
<div v-if="error" class="mt-2 text-xs font-medium text-red-400">
|
||||
<div v-if="error" class="mt-2 text-xs font-medium text-n-ruby-9">
|
||||
{{ error }}
|
||||
</div>
|
||||
</label>
|
||||
|
||||
@@ -210,23 +210,10 @@ export default {
|
||||
</style>
|
||||
|
||||
<style lang="scss">
|
||||
@import 'dashboard/assets/scss/mixins';
|
||||
|
||||
.emoji-dialog {
|
||||
&::before {
|
||||
$space-slab: 12px;
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
$color-bg-dark: #26292b;
|
||||
@include arrow(bottom, $color-bg-dark, $space-slab);
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
$color-bg: #ebf0f5;
|
||||
@include arrow(bottom, $color-bg, $space-slab);
|
||||
}
|
||||
|
||||
@apply -bottom-3 absolute right-5;
|
||||
@apply absolute -bottom-3 h-3 w-6 bg-n-slate-3 content-[""];
|
||||
clip-path: polygon(50% 100%, 0% 0%, 100% 0%);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import { OnClickOutside } from '@vueuse/components';
|
||||
import { useToggle } from '@vueuse/core';
|
||||
|
||||
import Button from 'dashboard/components-next/button/Button.vue';
|
||||
import Thumbnail from 'dashboard/components/widgets/Thumbnail.vue';
|
||||
import Avatar from 'next/avatar/Avatar.vue';
|
||||
import MultiselectDropdownItems from 'shared/components/ui/MultiselectDropdownItems.vue';
|
||||
|
||||
const props = defineProps({
|
||||
@@ -82,17 +82,22 @@ const hasValue = computed(() => {
|
||||
{{ selectedItem.name }}
|
||||
</h4>
|
||||
</div>
|
||||
<Thumbnail
|
||||
<Avatar
|
||||
v-if="hasValue && hasThumbnail"
|
||||
:src="selectedItem.thumbnail"
|
||||
size="24px"
|
||||
:status="selectedItem.availability_status"
|
||||
:username="selectedItem.name"
|
||||
:name="selectedItem.name"
|
||||
:size="24"
|
||||
hide-offline-status
|
||||
rounded-full
|
||||
/>
|
||||
</Button>
|
||||
<div
|
||||
:class="{ 'dropdown-pane--open': showSearchDropdown }"
|
||||
class="dropdown-pane"
|
||||
:class="{
|
||||
'block visible': showSearchDropdown,
|
||||
'hidden invisible': !showSearchDropdown,
|
||||
}"
|
||||
class="box-border top-[2.625rem] w-full border rounded-lg bg-n-alpha-3 backdrop-blur-[100px] absolute shadow-lg border-n-strong dark:border-n-strong p-2 z-[9999]"
|
||||
>
|
||||
<div class="flex items-center justify-between mb-1">
|
||||
<h4
|
||||
@@ -115,9 +120,3 @@ const hasValue = computed(() => {
|
||||
</div>
|
||||
</OnClickOutside>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.dropdown-pane {
|
||||
@apply box-border top-[2.625rem] w-full;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<script>
|
||||
import WootDropdownItem from 'shared/components/ui/dropdown/DropdownItem.vue';
|
||||
import WootDropdownMenu from 'shared/components/ui/dropdown/DropdownMenu.vue';
|
||||
import Thumbnail from 'dashboard/components/widgets/Thumbnail.vue';
|
||||
import Avatar from 'next/avatar/Avatar.vue';
|
||||
import NextButton from 'dashboard/components-next/button/Button.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
WootDropdownItem,
|
||||
WootDropdownMenu,
|
||||
Thumbnail,
|
||||
Avatar,
|
||||
NextButton,
|
||||
},
|
||||
|
||||
@@ -105,13 +105,14 @@ export default {
|
||||
{{ option.name }}
|
||||
</span>
|
||||
</div>
|
||||
<Thumbnail
|
||||
<Avatar
|
||||
v-if="hasThumbnail"
|
||||
:src="option.thumbnail"
|
||||
size="24px"
|
||||
:username="option.name"
|
||||
:name="option.name"
|
||||
:status="option.availability_status"
|
||||
has-border
|
||||
:size="24"
|
||||
hide-offline-status
|
||||
rounded-full
|
||||
/>
|
||||
</NextButton>
|
||||
</WootDropdownItem>
|
||||
@@ -133,7 +134,7 @@ export default {
|
||||
}
|
||||
|
||||
.search-input {
|
||||
@apply m-0 w-full border border-solid border-transparent h-8 text-sm text-slate-700 dark:text-slate-100 rounded-md focus:border-woot-500 bg-slate-50 dark:bg-slate-900;
|
||||
@apply m-0 w-full border border-solid border-transparent h-8 text-sm text-n-slate-12 rounded-md focus:border-n-brand bg-n-background dark:bg-n-background;
|
||||
}
|
||||
|
||||
.multiselect-dropdown--item {
|
||||
@@ -144,7 +145,7 @@ export default {
|
||||
}
|
||||
|
||||
&:hover {
|
||||
@apply bg-n-slate-2 dark:bg-n-solid-3 text-slate-800 dark:text-slate-100;
|
||||
@apply bg-n-slate-2 dark:bg-n-solid-3 text-n-slate-12;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -4,7 +4,7 @@ export default {};
|
||||
|
||||
<template>
|
||||
<li
|
||||
class="list-none my-1 mx-0 border-b border-slate-50 dark:border-slate-700"
|
||||
class="list-none my-1 mx-0 border-b border-n-weak"
|
||||
:tabindex="null"
|
||||
:aria-disabled="true"
|
||||
/>
|
||||
|
||||
@@ -13,7 +13,7 @@ export default {
|
||||
<template>
|
||||
<li class="inline-flex list-none" :tabindex="null" :aria-disabled="true">
|
||||
<span
|
||||
class="text-xs text-slate-600 dark:text-slate-100 mt-1 font-medium w-full block text-left rtl:text-right whitespace-nowrap p-2"
|
||||
class="text-xs text-n-slate-12 mt-1 font-medium w-full block text-left rtl:text-right whitespace-nowrap p-2"
|
||||
>
|
||||
{{ title }}
|
||||
</span>
|
||||
|
||||
@@ -18,20 +18,10 @@ export default {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<li class="sub-menu-container">
|
||||
<ul class="sub-menu-li-container">
|
||||
<li class="!mt-0.5">
|
||||
<ul class="!m-0">
|
||||
<WootDropdownHeader v-if="title" :title="title" />
|
||||
<slot />
|
||||
</ul>
|
||||
</li>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.sub-menu-container {
|
||||
margin-top: var(--space-micro);
|
||||
}
|
||||
|
||||
.sub-menu-li-container {
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -114,12 +114,12 @@ export default {
|
||||
<div class="flex flex-col w-full max-h-[12.5rem]">
|
||||
<div class="flex items-center justify-center mb-1">
|
||||
<h4
|
||||
class="flex-grow m-0 overflow-hidden text-sm text-slate-800 dark:text-slate-100 whitespace-nowrap text-ellipsis"
|
||||
class="flex-grow m-0 overflow-hidden text-sm text-n-slate-12 whitespace-nowrap text-ellipsis"
|
||||
>
|
||||
{{ $t('CONTACT_PANEL.LABELS.LABEL_SELECT.TITLE') }}
|
||||
</h4>
|
||||
<Hotkey
|
||||
custom-class="border border-solid text-slate-800 dark:text-slate-100 bg-slate-50 dark:bg-slate-600 text-xxs border-slate-75 dark:border-slate-600 flex-shrink-0"
|
||||
custom-class="border border-solid text-n-slate-12 bg-n-slate-2 text-xxs border-n-strong flex-shrink-0"
|
||||
>
|
||||
{{ 'L' }}
|
||||
</Hotkey>
|
||||
@@ -150,13 +150,13 @@ export default {
|
||||
</woot-dropdown-menu>
|
||||
<div
|
||||
v-if="noResult"
|
||||
class="flex justify-center py-4 px-2.5 font-medium text-xs text-slate-700 dark:text-slate-200"
|
||||
class="flex justify-center py-4 px-2.5 font-medium text-xs text-n-slate-11"
|
||||
>
|
||||
{{ $t('CONTACT_PANEL.LABELS.LABEL_SELECT.NO_RESULT') }}
|
||||
</div>
|
||||
<div
|
||||
v-if="allowCreation && shouldShowCreate"
|
||||
class="flex pt-1 border-t border-solid border-slate-100 dark:border-slate-900"
|
||||
class="flex pt-1 border-t border-solid border-n-weak"
|
||||
>
|
||||
<NextButton
|
||||
icon="i-lucide-plus"
|
||||
|
||||
Reference in New Issue
Block a user