@opengis/admin 0.3.77 → 0.3.79
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/{add-page-CAIOJCHI.js → add-page-DHcV6ZVu.js} +5 -5
- package/dist/{admin-interface-BS39PBJt.js → admin-interface-sixpdw0Z.js} +12 -12
- package/dist/{admin-view-CTng2Bgj.js → admin-view-CyAdQyhH.js} +43 -43
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +73 -73
- package/dist/{card-view-Dm_mixDf.js → card-view-fIhBcWi3.js} +3 -3
- package/dist/{edit-page-CvPLXtsE.js → edit-page-sxUa27zw.js} +8 -8
- package/dist/{import-file-BSRkcRkP.js → import-file-DyHdxyPP.js} +18505 -18375
- package/dist/{profile-page--JAUPzak.js → profile-page-DmjElRBr.js} +4 -4
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/server/helpers/core/buttonHelper.js +2 -2
- package/server/helpers/utils/buttonDel.js +24 -5
- package/server/helpers/utils/buttonEdit.js +17 -4
@@ -1,6 +1,19 @@
|
|
1
1
|
|
2
|
-
const newColor = 'blue'
|
3
|
-
export default function button(token, title) {
|
4
|
-
|
5
|
-
|
2
|
+
const newColor = 'blue';
|
3
|
+
export default function button(token, title, icon) {
|
4
|
+
const formCall = `window.v3plugin.$form({ token: '${token}' })`;
|
5
|
+
|
6
|
+
const buttonClass = icon
|
7
|
+
? `size-8 inline-flex justify-center items-center gap-x-2 font-medium rounded-s-lg border border-stone-200 bg-${newColor}-100 text-stone-800 shadow-sm hover:bg-${newColor}-200 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-${newColor}-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700 `
|
8
|
+
: `px-2 py-1 inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border border-transparent hover:text-white ring-offset-white bg-${newColor}-100 text-${newColor}-500 hover:bg-${newColor}-500 focus:ring-${newColor}-500`;
|
9
|
+
|
10
|
+
const buttonContent = icon
|
11
|
+
? `<svg class="shrink-0 size-3.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="${newColor}" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
12
|
+
<path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"></path>
|
13
|
+
<path d="m15 5 4 4"></path>
|
14
|
+
</svg>`
|
15
|
+
: `${title || 'Редагувати'}`;
|
16
|
+
|
17
|
+
return `<button onclick="${formCall}" class="${buttonClass}">${buttonContent}</button>`;
|
18
|
+
|
6
19
|
}
|