aumera-on-screen-widget 0.0.4 → 0.0.5
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/assets/chat-agent.jpg +0 -0
- package/assets/collapse_dark.svg +5 -0
- package/assets/expand_dark.svg +7 -0
- package/df-btn.js +23 -14
- package/package.json +1 -1
|
Binary file
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
|
2
|
+
<svg width="800px" height="800px" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<path d="M44 20H28V4" stroke="#FFFFFF" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
<path d="M4 28H20V44" stroke="#FFFFFF" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
|
3
|
+
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
4
|
+
<g id="Arrow / Expand">
|
|
5
|
+
<path id="Vector" d="M10 19H5V14M14 5H19V10" stroke="#FFFFFF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
6
|
+
</g>
|
|
7
|
+
</svg>
|
package/df-btn.js
CHANGED
|
@@ -98,13 +98,17 @@ if (!config.project) {
|
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
.df-btn-text:before {
|
|
101
|
-
min-width: 56px;
|
|
102
|
-
height: 48px;
|
|
103
101
|
background-position: center;
|
|
104
102
|
background-repeat: no-repeat;
|
|
105
|
-
background-size:
|
|
106
|
-
background-image: url('${
|
|
107
|
-
|
|
103
|
+
background-size: cover;
|
|
104
|
+
background-image: url('${origin + "/assets/chat-agent.jpg"}');
|
|
105
|
+
border-radius: 50%;
|
|
106
|
+
width: 32px;
|
|
107
|
+
height: 32px;
|
|
108
|
+
margin: 8px 12px;
|
|
109
|
+
content: '';
|
|
110
|
+
display: inline-block;
|
|
111
|
+
flex-shrink: 0;
|
|
108
112
|
}
|
|
109
113
|
|
|
110
114
|
.df-btn:hover {
|
|
@@ -122,8 +126,8 @@ if (!config.project) {
|
|
|
122
126
|
.df-btn-content {
|
|
123
127
|
display: block;
|
|
124
128
|
border: 0;
|
|
125
|
-
height: ${config.height || "
|
|
126
|
-
width: ${config.width || "
|
|
129
|
+
height: ${config.height || "896px"};
|
|
130
|
+
width: ${config.width || "414px"};
|
|
127
131
|
transition: all .45s cubic-bezier(.4, 0, .2, 1);
|
|
128
132
|
${config.position === "left" ? "float: left;" : "float: right;"}
|
|
129
133
|
opacity: 1;
|
|
@@ -137,7 +141,8 @@ if (!config.project) {
|
|
|
137
141
|
.df-closed > .df-btn-content {
|
|
138
142
|
width: 0;
|
|
139
143
|
height: 0;
|
|
140
|
-
opacity: 0
|
|
144
|
+
opacity: 0;
|
|
145
|
+
overflow: hidden;
|
|
141
146
|
}
|
|
142
147
|
|
|
143
148
|
.maximize-minimize-btn {
|
|
@@ -159,18 +164,19 @@ if (!config.project) {
|
|
|
159
164
|
bottom: 0 !important;
|
|
160
165
|
margin: 0 !important;
|
|
161
166
|
border-radius: 0 !important;
|
|
167
|
+
transition: all .45s cubic-bezier(.4, 0, .2, 1) !important;
|
|
162
168
|
}
|
|
163
169
|
.df-btn.df-maximized .df-btn-content {
|
|
164
170
|
width: 100vw !important;
|
|
165
171
|
height: calc(100vh - 56px) !important;
|
|
166
172
|
opacity: 1 !important;
|
|
167
173
|
display: block !important;
|
|
174
|
+
transition: all .45s cubic-bezier(.4, 0, .2, 1) !important;
|
|
168
175
|
}
|
|
169
176
|
.df-btn.df-closed .df-btn-content {
|
|
170
177
|
width: 0 !important;
|
|
171
178
|
height: 0 !important;
|
|
172
179
|
opacity: 0 !important;
|
|
173
|
-
display: none !important;
|
|
174
180
|
}
|
|
175
181
|
.close-btn {
|
|
176
182
|
width: 16px;
|
|
@@ -216,9 +222,7 @@ if (!config.project) {
|
|
|
216
222
|
}
|
|
217
223
|
|
|
218
224
|
.df-btn-text:before {
|
|
219
|
-
background-image: url('${
|
|
220
|
-
config.logoDark || origin + "/assets/logo_dark.svg"
|
|
221
|
-
}')
|
|
225
|
+
background-image: url('${origin + "/assets/chat-agent.jpg"}')
|
|
222
226
|
}
|
|
223
227
|
|
|
224
228
|
.df-btn:not(.df-closed) > .df-btn-text:before {
|
|
@@ -348,9 +352,12 @@ if (!config.project) {
|
|
|
348
352
|
const maxBtn = document.createElement("div");
|
|
349
353
|
maxBtn.className = "maximize-minimize-btn";
|
|
350
354
|
const maximized = btn.classList.contains("df-maximized");
|
|
355
|
+
const isDarkMode =
|
|
356
|
+
window.matchMedia &&
|
|
357
|
+
window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
351
358
|
maxBtn.innerHTML = `<img class="maximize-minimize-icon" src="${origin}/assets/${
|
|
352
359
|
maximized ? "collapse" : "expand"
|
|
353
|
-
}.svg" alt="${
|
|
360
|
+
}${isDarkMode ? "_dark" : ""}.svg" alt="${
|
|
354
361
|
maximized ? "Minimize" : "Maximize"
|
|
355
362
|
}" style="width:24px;height:24px;cursor:pointer;" />`;
|
|
356
363
|
header.appendChild(maxBtn);
|
|
@@ -361,7 +368,9 @@ if (!config.project) {
|
|
|
361
368
|
// Add close button (left)
|
|
362
369
|
const closeBtn = document.createElement("div");
|
|
363
370
|
closeBtn.className = "close-btn";
|
|
364
|
-
closeBtn.innerHTML = `<img src="${origin}/assets/close
|
|
371
|
+
closeBtn.innerHTML = `<img src="${origin}/assets/close${
|
|
372
|
+
isDarkMode ? "_dark" : ""
|
|
373
|
+
}.svg" alt="Close" style="width:20px;height:20px;cursor:pointer;" />`;
|
|
365
374
|
header.insertBefore(closeBtn, btnText);
|
|
366
375
|
closeBtn.addEventListener("click", (e) => {
|
|
367
376
|
e.stopPropagation();
|