hamzus-ui 0.0.85 → 0.0.87
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.
package/package.json
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
export let buttonLabel = 'ajouter un fichier';
|
|
10
10
|
export let multiple = false;
|
|
11
11
|
export let name = 'file';
|
|
12
|
+
export let acceptLabel = null;
|
|
12
13
|
export let accept = null;
|
|
13
14
|
export let required = false;
|
|
14
15
|
export let actualFiles = '';
|
|
@@ -69,8 +70,8 @@
|
|
|
69
70
|
{#if required}
|
|
70
71
|
<strong style="color:var(--red);">*</strong>
|
|
71
72
|
{/if}
|
|
72
|
-
{#if accept && acceptText[accept]}
|
|
73
|
-
<strong style="color:var(--accent);">{acceptText[accept]}</strong>
|
|
73
|
+
{#if (accept && acceptText[accept]) || acceptLabel != null}
|
|
74
|
+
<strong style="color:var(--accent);">{acceptText[accept] ?? acceptLabel}</strong>
|
|
74
75
|
{/if}
|
|
75
76
|
</h4>
|
|
76
77
|
|
|
@@ -89,7 +90,7 @@
|
|
|
89
90
|
{multiple}
|
|
90
91
|
required={actualFiles.length > 0 ? false : required}
|
|
91
92
|
on:change={handleFileChange}
|
|
92
|
-
accept={acceptData[accept]}
|
|
93
|
+
accept={acceptData[accept] ?? accept}
|
|
93
94
|
/>
|
|
94
95
|
|
|
95
96
|
{#if files.length > 0}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export let config = {
|
|
2
|
-
url: "http://localhost:8000",// default url for api request
|
|
3
|
-
sessionTokenName: "token", // cookie name where your token is stored
|
|
2
|
+
url: import.meta.env.VITE_API_URL || "http://localhost:8000",// default url for api request
|
|
3
|
+
sessionTokenName: import.meta.env.VITE_TOKEN_NAME || "token", // cookie name where your token is stored
|
|
4
4
|
}
|