adminforth 2.13.0-next.4 → 2.13.0-next.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
aria-describedby="helper-text-explanation"
|
|
18
18
|
class="afcl-input inline-flex bg-lightInputBackground border border-lightInputBorder rounded-0 focus:ring-lightPrimary focus:border-lightPrimary dark:focus:ring-darkPrimary dark:focus:border-darkPrimary
|
|
19
19
|
blue-500 focus:border-blue-500 block w-20 p-2.5 dark:bg-darkInputBackground dark:border-darkInputBorder placeholder-lightInputPlaceholderText dark:placeholder-darkInputPlaceholderText dark:text-darkInputText translate-y-0"
|
|
20
|
-
:class="{'rounded-l-md': !$slots.prefix && !prefix, 'rounded-r-md': !$slots.suffix && !suffix, 'w-full': fullWidth, 'text-base':
|
|
20
|
+
:class="{'rounded-l-md': !$slots.prefix && !prefix, 'rounded-r-md': !$slots.suffix && !suffix, 'w-full': fullWidth, 'text-base': isIos, 'text-sm': !isIos }"
|
|
21
21
|
:disabled="readonly"
|
|
22
22
|
>
|
|
23
23
|
|
|
@@ -36,7 +36,10 @@
|
|
|
36
36
|
<script setup lang="ts">
|
|
37
37
|
|
|
38
38
|
import { ref } from 'vue';
|
|
39
|
-
|
|
39
|
+
import { useCoreStore } from '@/stores/core';
|
|
40
|
+
|
|
41
|
+
const coreStore = useCoreStore();
|
|
42
|
+
const isIos = coreStore.isIos;
|
|
40
43
|
|
|
41
44
|
const props = defineProps<{
|
|
42
45
|
type: string,
|
|
@@ -53,12 +56,5 @@ defineExpose({
|
|
|
53
56
|
focus: () => input.value?.focus(),
|
|
54
57
|
});
|
|
55
58
|
|
|
56
|
-
function isIOS() {
|
|
57
|
-
return (
|
|
58
|
-
/iPad|iPhone|iPod/.test(navigator.userAgent) ||
|
|
59
|
-
(navigator.userAgent.includes('Mac') && 'ontouchend' in document)
|
|
60
|
-
)
|
|
61
|
-
}
|
|
62
|
-
|
|
63
59
|
</script>
|
|
64
60
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<textarea
|
|
3
3
|
ref="input"
|
|
4
|
-
class="bg-lightInputBackground border border-lightInputBorder text-lightInputText placeholder-lightInputPlaceholderText text-sm rounded-
|
|
4
|
+
class="afcl-textarea bg-lightInputBackground border border-lightInputBorder text-lightInputText placeholder-lightInputPlaceholderText text-sm rounded-md block w-full p-2.5 dark:bg-darkInputBackground dark:border-darkInputBorder dark:placeholder-darkInputPlaceholderText dark:text-darkInputText dark:border-darkInputBorder focus:ring-lightInputFocusRing focus:border-lightInputFocusBorder dark:focus:ring-darkInputFocusRing dark:focus:border-darkInputFocusBorder"
|
|
5
|
+
:class="`${readonly ? 'opacity-50' : ''} ${isIos ? 'text-md' : 'text-sm'}`"
|
|
5
6
|
:placeholder="placeholder"
|
|
6
7
|
:value="modelValue"
|
|
7
8
|
@input="$emit('update:modelValue', ($event.target as HTMLTextAreaElement).value)"
|
|
@@ -11,6 +12,10 @@
|
|
|
11
12
|
|
|
12
13
|
<script setup lang="ts">
|
|
13
14
|
import { ref } from 'vue';
|
|
15
|
+
import { useCoreStore } from '@/stores/core';
|
|
16
|
+
|
|
17
|
+
const coreStore = useCoreStore();
|
|
18
|
+
const isIos = coreStore.isIos;
|
|
14
19
|
|
|
15
20
|
const props = defineProps<{
|
|
16
21
|
modelValue: string
|
|
@@ -221,6 +221,12 @@ export const useCoreStore = defineStore('core', () => {
|
|
|
221
221
|
return userData.value && userFullnameField && userData.value[userFullnameField];
|
|
222
222
|
})
|
|
223
223
|
|
|
224
|
+
const isIos = computed(() => {
|
|
225
|
+
return (
|
|
226
|
+
/iPad|iPhone|iPod/.test(navigator.userAgent) ||
|
|
227
|
+
(navigator.userAgent.includes('Mac') && 'ontouchend' in document)
|
|
228
|
+
)});
|
|
229
|
+
|
|
224
230
|
|
|
225
231
|
return {
|
|
226
232
|
config,
|
|
@@ -245,5 +251,6 @@ export const useCoreStore = defineStore('core', () => {
|
|
|
245
251
|
resetAdminUser,
|
|
246
252
|
resetResource,
|
|
247
253
|
isResourceFetching,
|
|
254
|
+
isIos
|
|
248
255
|
}
|
|
249
256
|
})
|