Skip to content

Commit

Permalink
Merge pull request #5317 from Countly/SER-1442-master
Browse files Browse the repository at this point in the history
[SER-1442] master
  • Loading branch information
coskunaydinoglu authored Jun 7, 2024
2 parents 217eecc + 19ff673 commit 0e46a1a
Show file tree
Hide file tree
Showing 10 changed files with 25,676 additions and 110 deletions.
Binary file not shown.
25,461 changes: 25,461 additions & 0 deletions frontend/express/public/fonts/Inter/Inter-SemiBold.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
17 changes: 15 additions & 2 deletions frontend/express/public/stylesheets/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,19 @@
url('../fonts/Inter/inter-v7-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-500.svg#Inter') format('svg'); /* Legacy iOS */
}

@font-face {
font-family: 'Inter';
src: url('../fonts/Inter/Inter-SemiBold.eot');
src: url('../fonts/Inter/Inter-SemiBold.eot?#iefix') format('embedded-opentype'),
url('../fonts/Inter/Inter-SemiBold.woff2') format('woff2'),
url('../fonts/Inter/Inter-SemiBold.woff') format('woff'),
url('../fonts/Inter/Inter-SemiBold.ttf') format('truetype'),
url('../fonts/Inter/Inter-SemiBold.svg#Inter-SemiBold') format('svg');
font-weight: 600;
font-style: normal;
font-display: swap;
}

@font-face {
font-family: 'Roboto Mono';
font-weight: 400;
Expand Down Expand Up @@ -237,7 +250,7 @@ border-bottom: 1px solid #888;
#sidebar-menu .sidebar-menu .sidebar-submenu .submenu-close { right: 18px; position: absolute; top: 14px; font-size: 14px; cursor: pointer; opacity: 0.7; }
#sidebar-menu .sidebar-menu .sidebar-submenu .submenu-close:hover { opacity: 1; }
#sidebar-menu .sidebar-menu .sidebar-submenu .item,
#sidebar-menu .sidebar-menu .sidebar-submenu .disabled-item { text-transform:capitalize; background-color: #02060B text-overflow:ellipsis; white-space:nowrap; overflow:hidden; height:30px; display:block; padding-left:8px; cursor:pointer; }
#sidebar-menu .sidebar-menu .sidebar-submenu .disabled-item { text-transform:capitalize; background-color: #02060B; text-overflow:ellipsis; white-space:nowrap; overflow:hidden; height:30px; display:block; padding-left:8px; cursor:pointer; }
#sidebar-menu .sidebar-menu .sidebar-submenu .disabled-item { cursor:default; }
#sidebar-menu .sidebar-menu .sidebar-submenu .item .logo-icon { display:none; color:#888; width:30px; height:30px; float:left; margin-left:8px; margin-top:8px; text-align:center;}
#sidebar-menu .sidebar-menu .sidebar-submenu .item .logo { display:none; color:#888; width:30px; height:30px; float:left; margin-left:8px; margin-top:1px; }
Expand Down Expand Up @@ -1519,7 +1532,7 @@ margin: 50px 0;}
}
.export-columns-selector .export-columns-search input, .data-table-column-selector .export-columns-search input {
border: none;
background-color: #fffff;
background-color: #ffffff;
width:100%;
border-radius:2px;
color:#6B6B6B;
Expand Down
53 changes: 41 additions & 12 deletions plugins/alerts/frontend/public/javascripts/countly.views.js
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,16 @@
}
return alertDataSubTypeOptions;
},
alertDataVariableOptions: function() {
var alertDataVariableOptions;
if (this.$refs.drawerData.editedObject.alertDataType === "onlineUsers") {
alertDataVariableOptions = this.onlineUsersAlertVariable.condition;
}
else {
alertDataVariableOptions = this.defaultAlertVariable.condition;
}
return alertDataVariableOptions;
},
elSelectKey: function() {
var key = this.allGroups
.map(function(g) {
Expand Down Expand Up @@ -986,24 +996,43 @@
this.title = jQuery.i18n.map["alert.Create_New_Alert"];
this.saveButtonLabel = jQuery.i18n.map["alert.save"];
},
isNumberKeyPressEvent(evt) {
evt = (evt) ? evt : window.event;
var charCode = (evt.which) ? evt.which : evt.keyCode;
if ((charCode > 31 && (charCode < 48 || charCode > 57)) && charCode !== 46) {
evt.preventDefault();
}
else {
return true;
}
},
calculateWidth(value) {
if (!value || !this.$refs?.alertDataSubTypeSelect?.$el) {
return;
}
let tmpEl = document.createElement("span");
tmpEl.textContent = value;
tmpEl.style.cssText = `
visibility: hidden;
position: fixed;
font-size: 13px;
font-family: Arial, sans-serif !important;
box-sizing: border-box;
font-weight: 600;
padding: 10px
`;
document.body.appendChild(tmpEl);
const tempSelectWidth = tmpEl.getBoundingClientRect().width;
tmpEl.remove();
//this.changeColor(this.$refs.alertDataSubTypeSelect.$el);
return tempSelectWidth;
},
// Handle the change event of the element
handleChange(element) {
this.changeColor(element);
if (element.nodeName !== "SELECT") {
return;
}
let tempSelect = document.createElement("element"),
tempOption = document.createElement("option");
tempOption.textContent =
element.options[element.selectedIndex].text;
tempSelect.style.cssText +=
"visibility:hidden;position:fixed;font-weight:500;padding:6px;font-size:13px";
tempSelect.appendChild(tempOption);
element.after(tempSelect);
const tempSelectWidth =
tempSelect.getBoundingClientRect().width;
element.style.width = `${tempSelectWidth}px`;
tempSelect.remove();
},
changeColor(element) {
// Set the background color of the element to green when a selection is made
Expand Down
127 changes: 96 additions & 31 deletions plugins/alerts/frontend/public/stylesheets/vue-main.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#alerts-view {
.alert-drawer-trigger-select-and-input input::placeholder {
color: #0166d6;
opacity: 1;
}

.alerts-table-app-selector .el-input input::placeholder {
color: #333C48;
opacity: 1;
Expand Down Expand Up @@ -26,6 +31,7 @@
border-top: 1px solid #ECECEC;
}
}

.alert-data-type-block {
label {
flex: 1;
Expand All @@ -39,44 +45,103 @@
}

#alert-drawer-container {
.alert-trigger{
font-size: 14px;
padding-left: 16px;
padding-right: 16px;
.alert-trigger {
font-size: 13px;
padding: 12px 16px;
}

.el-radio__label{
.el-radio__label {
align-content: center;
}

.first-two-button-element{
.first-two-button-element {
padding-top: 16px;
}

.alert-drawer-trigger-select-and-input{
&:hover{
background-color: #E1EFFF;
}
/* The "appearance: none" property is used to remove the default arrow icon from the select button. */
-webkit-appearance: none; /* remove default appearance on Webkit-based browsers */
-moz-appearance: none; /* remove default appearance on Mozilla-based browsers */
appearance: none; /* remove default appearance on all other browsers */
display: inline-block;
width: auto;
padding: 3.5px 8px 4.5px 8px;
text-align: center;
border-width: 0px;
background-color: #F8FAFD;
.alert-drawer-trigger-select-and-input {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
display: inline-block;
padding: 0;
text-align: center;
border-width: 0px;
background-color: #f8fafd;
border-radius: 4px;
font-size: 13px;
font-family:Inter, sans-serif;
font-family: Inter, sans-serif !important;
box-shadow: 0 0px 0px rgba(0, 0, 0, 0);
font-weight: 500;
color: #0166D6;
}
color: #0166d6;
height: 24px;
}

.alert-drawer-trigger-select-and-input.metric {
width: 60px;
}

.alert-drawer-trigger-select-and-input.variable {
width: 70px;
}

.alert-drawer-trigger-select-and-input.time {
width: 48px;
}

.alert-drawer-trigger-select-and-input:active,
.alert-drawer-trigger-select-and-input:focus,
.alert-drawer-trigger-select-and-input:hover {
color: #81868D;

&::placeholder {
color: #81868D;
opacity: 1;
}
}

.alert-trigger .cly-vue-form-field {
padding: 2px 0;
}

.alert-drawer-trigger-select-and-input input {
font-weight: 600;
border: 1px solid rgba(0, 0, 0, 0);
background-color: #f8fafd;
color: #333c48;
height: 24px;
font-size: 13px;
text-align: center;
padding: 0;
font-family: Inter, sans-serif !important;
}

.alert-drawer-trigger-select-and-input input:not(:placeholder-shown) {
font-weight: 600;
}

.alert-drawer-trigger-select-and-input input:hover,
.alert-drawer-trigger-select-and-input input:active,
.alert-drawer-trigger-select-and-input input:focus {
background-color: #fff;
box-shadow: none;
color: #81868d;
border: 1px solid #0166d6;
}

.alert-drawer-trigger-select-and-input.alert-drawer-trigger-select-active input,
.alert-drawer-trigger-select-and-input.alert-drawer-trigger-select-active input:focus,
.alert-drawer-trigger-select-and-input.alert-drawer-trigger-select-active input:active,
.alert-drawer-trigger-select-and-input.alert-drawer-trigger-select-active input:hover {
background-color: #E1EFFF;
color: #333C48;
}

.alert-drawer-trigger-select-and-input:hover {
background-color: #f8fafd;
}

.alert-drawer-trigger-input{
width:48px;
height: auto;
.alert-drawer-trigger-input {
width: 48px;
}

.no-spinner::-webkit-inner-spin-button,
Expand All @@ -85,18 +150,18 @@
margin: 0;
}

.alert-drawer-trigger-input::placeholder{
cursor:pointer;
font-weight: 500;
.alert-drawer-trigger-input::placeholder {
cursor: pointer;
font-weight: 600;
opacity: 1;
color:#0166D6;
}

.cly-alert-email-header{
.cly-alert-email-header {
font-size: 13px;
}

.alert-drawer-inline-icon{
.alert-drawer-inline-icon {
display: inline-block;
vertical-align: middle;
}
Expand Down
Loading

0 comments on commit 0e46a1a

Please sign in to comment.