Skip to content

Commit 4512a32

Browse files
authored
First version of eagle eye feed (#507)
1 parent f11dec3 commit 4512a32

34 files changed

Lines changed: 1298 additions & 1097 deletions

frontend/package-lock.json

Lines changed: 76 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,14 @@
5959
"vue-json-pretty": "^2.2.2",
6060
"vue-router": "^4.1.5",
6161
"vue3-click-away": "^1.2.4",
62+
"vue3-lazyload": "^0.3.6",
6263
"vuedraggable": "^4.1.0",
6364
"vuex": "^4.0.2",
6465
"xlsx": "^0.17.2",
6566
"yup": "^0.32.11"
6667
},
6768
"devDependencies": {
69+
"@tailwindcss/line-clamp": "^0.4.2",
6870
"@tiptap/extension-link": "^2.0.0-beta.202",
6971
"@vue/cli-plugin-babel": "^5.0.8",
7072
"@vue/cli-plugin-eslint": "^5.0.1",

frontend/src/assets/scss/layout.scss

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -79,37 +79,6 @@ hr {
7979
flex-wrap: wrap;
8080
}
8181

82-
[class^='text-limit'],
83-
[class*=' text-limit'] {
84-
overflow: hidden;
85-
text-overflow: ellipsis;
86-
display: -webkit-box;
87-
-webkit-box-orient: vertical;
88-
}
89-
90-
// Limits text to 1 line
91-
.text-limit-1 {
92-
-webkit-line-clamp: 1;
93-
line-clamp: 1;
94-
}
95-
96-
// Limits text to 1 line
97-
.text-limit-2 {
98-
-webkit-line-clamp: 2;
99-
line-clamp: 2;
100-
}
101-
// Limits text to 1 line
102-
.text-limit-3 {
103-
-webkit-line-clamp: 3;
104-
line-clamp: 3;
105-
}
106-
107-
// Limits text to 4 lines
108-
.text-limit-4 {
109-
-webkit-line-clamp: 4;
110-
line-clamp: 4;
111-
}
112-
11382
// Disable autocomplete background
11483
input:-webkit-autofill,
11584
input:-webkit-autofill:hover,

frontend/src/jsons/eagle-eye-sources.json

Lines changed: 0 additions & 38 deletions
This file was deleted.

frontend/src/main.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import App from '@/app.vue'
2424
import { vueSanitizeOptions } from '@/plugins/sanitize'
2525
import marked from '@/plugins/marked'
2626
import posthog from 'posthog-js'
27+
import VueLazyLoad from 'vue3-lazyload'
2728

2829
i18nInit()
2930
/**
@@ -57,6 +58,8 @@ i18nInit()
5758
app.use(Vue3Sanitize, vueSanitizeOptions)
5859
app.use(VueClickAway)
5960
app.use(marked)
61+
app.use(VueLazyLoad)
62+
6063
app.config.productionTip =
6164
process.env.NODE_ENV === 'production'
6265

frontend/src/modules/conversation/components/conversation-reply.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
:display-title="false"
4545
class="text-sm"
4646
:class="{
47-
'text-limit-1': !displayContent && !showMore
47+
'line-clamp-1': !displayContent && !showMore
4848
}"
4949
:show-more="showMore"
5050
:limit="limit"

frontend/src/modules/layout/components/layout.vue

Lines changed: 20 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@
33
<app-menu></app-menu>
44
<el-container :style="elMainStyle">
55
<el-main id="main-page-wrapper" class="relative">
6-
<div :class="computedBannerWrapperClass">
6+
<div
7+
:class="{
8+
'pt-16': showBanner
9+
}"
10+
>
711
<banner
8-
v-if="shouldShowSampleDataAlert"
12+
v-if="showSampleDataAlert"
913
variant="alert"
1014
>
1115
<div
@@ -23,7 +27,7 @@
2327
</div>
2428
</banner>
2529
<banner
26-
v-if="shouldShowIntegrationsErrorAlert"
30+
v-if="showIntegrationsErrorAlert"
2731
variant="alert"
2832
>
2933
<div
@@ -41,7 +45,7 @@
4145
</banner>
4246

4347
<banner
44-
v-if="shouldShowIntegrationsInProgressAlert"
48+
v-if="showIntegrationsInProgressAlert"
4549
variant="info"
4650
>
4751
<div
@@ -67,7 +71,7 @@
6771
</div>
6872
</banner>
6973
<banner
70-
v-if="shouldShowTenantCreatingAlert"
74+
v-if="showTenantCreatingAlert"
7175
variant="info"
7276
>
7377
<div
@@ -84,10 +88,7 @@
8488
completely loaded.
8589
</div>
8690
</banner>
87-
<banner
88-
v-if="shouldShowPMFSurveyAlert"
89-
variant="info"
90-
>
91+
<banner v-if="showPMFSurveyAlert" variant="info">
9192
<div
9293
class="flex items-center justify-center grow text-sm"
9394
>
@@ -129,7 +130,6 @@ import { mapActions, mapGetters } from 'vuex'
129130
import Banner from '@/shared/banner/banner.vue'
130131
import identify from '@/shared/monitoring/identify'
131132
import ConfirmDialog from '@/shared/dialog/confirm-dialog.js'
132-
import moment from 'moment'
133133
import config from '@/config'
134134
135135
export default {
@@ -160,7 +160,16 @@ export default {
160160
currentUser: 'auth/currentUser',
161161
currentTenant: 'auth/currentTenant',
162162
integrationsInProgress: 'integration/inProgress',
163-
integrationsWithErrors: 'integration/withErrors'
163+
integrationsWithErrors: 'integration/withErrors',
164+
showSampleDataAlert: 'tenant/showSampleDataAlert',
165+
showIntegrationsErrorAlert:
166+
'tenant/showIntegrationsErrorAlert',
167+
showIntegrationsInProgressAlert:
168+
'tenant/showIntegrationsInProgressAlert',
169+
showTenantCreatingAlert:
170+
'tenant/showTenantCreatingAlert',
171+
showPMFSurveyAlert: 'tenant/showPMFSurveyAlert',
172+
showBanner: 'tenant/showBanner'
164173
}),
165174
integrationsInProgressToString() {
166175
const arr = this.integrationsInProgress.map(
@@ -178,43 +187,6 @@ export default {
178187
)
179188
}
180189
},
181-
shouldShowIntegrationsInProgressAlert() {
182-
return this.integrationsInProgress.length > 0
183-
},
184-
shouldShowIntegrationsErrorAlert() {
185-
return (
186-
this.integrationsWithErrors.length > 0 &&
187-
this.$route.name !== 'integration'
188-
)
189-
},
190-
shouldShowSampleDataAlert() {
191-
return this.currentTenant.hasSampleData
192-
},
193-
shouldShowPMFSurveyAlert() {
194-
return (
195-
config.typeformId &&
196-
config.typeformTitle &&
197-
!this.hideTypeformBanner
198-
)
199-
},
200-
shouldShowTenantCreatingAlert() {
201-
return (
202-
moment().diff(
203-
moment(this.currentTenant.createdAt),
204-
'minutes'
205-
) <= 2
206-
)
207-
},
208-
computedBannerWrapperClass() {
209-
return {
210-
'pt-16':
211-
this.shouldShowSampleDataAlert ||
212-
this.shouldShowIntegrationsErrorAlert ||
213-
this.shouldShowIntegrationsInProgressAlert ||
214-
this.shouldShowTenantCreatingAlert ||
215-
this.shouldShowPMFSurveyAlert
216-
}
217-
},
218190
elMainStyle() {
219191
if (this.isMobile && !this.collapsed) {
220192
return {
@@ -280,30 +252,6 @@ export default {
280252
// as long as it's not one of the above reserved names.
281253
},
282254
283-
account: {
284-
id: this.currentTenant.id, // Required if using Pendo Feedback, default uses the value 'ACCOUNT-UNIQUE-ID'
285-
name: this.currentTenant.name, // Optional
286-
is_paying: this.currentTenant.plan !== 'Essential' // Recommended if using Pendo Feedback
287-
// monthly_value:// Recommended if using Pendo Feedback
288-
// planLevel: // Optional
289-
// planPrice: // Optional
290-
// creationDate: // Optional
291-
292-
// You can add any additional account level key-values here,
293-
// as long as it's not one of the above reserved names.
294-
}
295-
})
296-
console.log({
297-
visitor: {
298-
id: this.currentUser.id, // Required if user is logged in, default creates anonymous ID
299-
email: this.currentUser.email, // Recommended if using Pendo Feedback, or NPS Email
300-
full_name: this.currentUser.fullName // Recommended if using Pendo Feedback
301-
// role: // Optional
302-
303-
// You can add any additional visitor level key-values here,
304-
// as long as it's not one of the above reserved names.
305-
},
306-
307255
account: {
308256
id: this.currentTenant.id, // Required if using Pendo Feedback, default uses the value 'ACCOUNT-UNIQUE-ID'
309257
name: this.currentTenant.name, // Optional

0 commit comments

Comments
 (0)