Skip to content

Commit 9ade326

Browse files
committed
Cleanup.
1 parent 9b6a1f2 commit 9ade326

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

demo/index.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en">
33
<head>
44
<script src="/htmlimports.js"></script>
5-
<title>Gleap</title>
5+
<title>Gleap Demo</title>
66
<meta charset="UTF-8" />
77
<meta name="viewport" content="width=device-width, initial-scale=1" />
88
<link rel="preconnect" href="https://fonts.gstatic.com" />
@@ -39,7 +39,7 @@
3939
.header {
4040
width: 100%;
4141
min-height: 500px;
42-
background-color: #ffff3f;
42+
background-color: #03fff5;
4343
}
4444

4545
.header-container {
@@ -85,6 +85,7 @@
8585

8686
.logo i {
8787
font-size: 50px;
88+
color: #333;
8889
}
8990

9091
.head-image {
@@ -128,7 +129,7 @@
128129
font-size: 16px;
129130
font-weight: 600;
130131
color: rgb(255, 255, 255);
131-
background-color: #55a630;
132+
background-color: #485BFF;
132133
border-style: solid;
133134
border-width: 0px;
134135
border-radius: 10px;

src/AutoConfig.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import Session from "./Session";
44

55
export default class AutoConfig {
66
static run = () => {
7-
/*const session = Session.getInstance();
7+
const session = Session.getInstance();
88
const cachedConfig = loadFromGleapCache(`config-${session.sdkKey}`);
99
if (cachedConfig) {
1010
AutoConfig.applyConfig(cachedConfig, false);
1111
AutoConfig.loadConfigFromServer(true).catch(function (e) {});
1212
return Promise.resolve();
13-
}*/
13+
}
1414

1515
return AutoConfig.loadConfigFromServer(false);
1616
};

src/Session.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ export default class Session {
7777
// Optionally update UI.
7878
const userNameInfo = document.querySelector("#bb-user-name");
7979
if (userNameInfo) {
80-
userNameInfo.textContent = session.name ? session.name : "";
80+
userNameInfo.textContent =
81+
session.name && Gleap.getInstance().showUserName ? session.name : "";
8182
}
8283

8384
this.notifySessionReady();
@@ -138,9 +139,7 @@ export default class Session {
138139
if (this.session.userId.toString() !== userId.toString()) {
139140
return true;
140141
}
141-
} catch (exp) {
142-
console.log("Gleap: warn");
143-
}
142+
} catch (exp) {}
144143

145144
if (userData) {
146145
var userDataKeys = Object.keys(userData);

0 commit comments

Comments
 (0)