sprof 1.17.2 → 1.17.4
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/dist/core/classes/FileInfo.d.ts +1 -1
- package/dist/core/components/AdminGallery.vue.d.ts +8 -2
- package/dist/core/helpers/Static.d.ts +13 -1
- package/dist/sprof.js +4390 -4221
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -23,7 +23,7 @@ export default class FileInfo {
|
|
|
23
23
|
* получал 404 (на pros — десятки в сутки). Пустая ссылка — сигнал вызывающему коду
|
|
24
24
|
* не рендерить картинку вовсе (см. способы применения: `if (getFileUrl())`).
|
|
25
25
|
*/
|
|
26
|
-
getFileUrl(): string
|
|
26
|
+
getFileUrl(): string;
|
|
27
27
|
getFileListObject(): {
|
|
28
28
|
name: string;
|
|
29
29
|
url: string;
|
|
@@ -6,8 +6,10 @@ type __VLS_Props = {
|
|
|
6
6
|
type?: string;
|
|
7
7
|
/** Соотношение сторон превью. */
|
|
8
8
|
ratio?: number;
|
|
9
|
-
/** Показывать
|
|
9
|
+
/** Показывать управление добавлением. */
|
|
10
10
|
upload?: boolean;
|
|
11
|
+
acceptTypes?: string;
|
|
12
|
+
maxFileSize?: number;
|
|
11
13
|
};
|
|
12
14
|
type __VLS_PublicProps = {
|
|
13
15
|
'images'?: FileInfo[];
|
|
@@ -26,6 +28,10 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
26
28
|
type: string;
|
|
27
29
|
id: string;
|
|
28
30
|
ratio: number;
|
|
31
|
+
acceptTypes: string;
|
|
32
|
+
maxFileSize: number;
|
|
29
33
|
upload: boolean;
|
|
30
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
34
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
35
|
+
inputEl: HTMLInputElement;
|
|
36
|
+
}, HTMLDivElement>;
|
|
31
37
|
export default _default;
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
export default abstract class Static {
|
|
2
2
|
private static staticUrl;
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Задать базу статики.
|
|
5
|
+
*
|
|
6
|
+
* Принимает и полный адрес (`https://host/api/static`), и голый origin
|
|
7
|
+
* (`https://host`), и пустую строку. Пустая / относительная база — это НЕ
|
|
8
|
+
* поломка: и dev-прокси Vite, и прод-nginx отдают `/api/static` на том же
|
|
9
|
+
* origin, поэтому относительный путь работает в обоих окружениях.
|
|
10
|
+
*
|
|
11
|
+
* ⚠️ Раньше `Setup(host, port = '9000', apiVersion = 'api')` всегда приписывал
|
|
12
|
+
* порт 9000 и удваивал `/api/static` (клиенты передавали уже готовый адрес) —
|
|
13
|
+
* картинки галерей уезжали на `host:9000/api/static/...` и не отображались.
|
|
14
|
+
*/
|
|
15
|
+
static Setup(address?: string): void;
|
|
4
16
|
static get StaticUrl(): string;
|
|
5
17
|
}
|