Skip to content

Commit 10bb00b

Browse files
committed
chore(core): misc before package upgrades
1 parent 28dfb80 commit 10bb00b

File tree

11 files changed

+23447
-17636
lines changed

11 files changed

+23447
-17636
lines changed

.eslintrc.json

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
"complexity": ["error", 20]
2020
},
2121
"globals": {
22-
"angular": true,
2322
"define": true,
2423
"requirejs": true,
2524
"MG": true,

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
#compressed files
55
*.gz
66

7+
# Yarn Cache
8+
.yarn
9+
710
# Runtime data
811
pids
912
*.pid

.yarnrc.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
nodeLinker: node-modules
2+
3+
yarnPath: .yarn/releases/yarn-3.2.1.cjs

package.json

+2-5
Original file line numberDiff line numberDiff line change
@@ -156,17 +156,14 @@
156156
"cross-env": "7.0.3",
157157
"css-loader": "6.6.0",
158158
"eslint": "8.9.0",
159-
"eslint-config-angular": "0.5.0",
160159
"eslint-config-prettier": "8.3.0",
161160
"eslint-config-standard": "16.0.3",
162161
"eslint-import-resolver-webpack": "0.13.2",
163-
"eslint-plugin-angular": "4.1.0",
164162
"eslint-plugin-import": "2.25.4",
165163
"eslint-plugin-node": "11.1.0",
166164
"eslint-plugin-prettier": "4.0.0",
167165
"eslint-plugin-promise": "6.0.0",
168166
"eslint-plugin-react": "7.28.0",
169-
"eslint-plugin-standard": "5.0.0",
170167
"exports-loader": "3.1.0",
171168
"expose-loader": "3.1.0",
172169
"grunt": "1.4.1",
@@ -244,7 +241,6 @@
244241
"/src/public/js/vendor/"
245242
],
246243
"globals": [
247-
"angular",
248244
"define",
249245
"MG",
250246
"Snackbar",
@@ -270,5 +266,6 @@
270266
}
271267
}
272268
},
273-
"snyk": true
269+
"snyk": true,
270+
"packageManager": "[email protected]"
274271
}

src/client/components/StepWizard/index.jsx

+10-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, { createRef } from 'react'
22
import PropTypes from 'prop-types'
33
import { union } from 'lodash'
4+
import { connect } from 'react-redux'
45
import clsx from 'clsx'
56

67
import velocity from 'velocity'
@@ -9,7 +10,6 @@ import 'jquery_steps'
910
import 'jquery_actual'
1011
import $ from 'jquery'
1112
import UIKit from 'uikit'
12-
import socket from 'lib/socket'
1313

1414
class StepWizard extends React.Component {
1515
constructor (props) {
@@ -31,11 +31,11 @@ class StepWizard extends React.Component {
3131
componentDidMount () {
3232
this.init()
3333

34-
socket.socket.on('$trudesk:accounts:import:onStatusChange', this.onImportStatusChange)
34+
this.props.socket.on('$trudesk:accounts:import:onStatusChange', this.onImportStatusChange)
3535
}
3636

3737
componentWillUnmount () {
38-
socket.socket.removeAllListeners('$trudesk:accounts:import:onStatusChange')
38+
this.props.socket.removeAllListeners('$trudesk:accounts:import:onStatusChange')
3939
}
4040

4141
onImportStatusChange = data => {
@@ -94,7 +94,7 @@ class StepWizard extends React.Component {
9494

9595
setTimeout(() => {
9696
// Importing...
97-
socket.accountsImporter.sendAccountData('csv', this.addedUsers, this.updatedUsers)
97+
this.props.socket.emit('$trudesk:accounts:importer:send_csv')
9898
}, 1000)
9999
}
100100

@@ -329,6 +329,7 @@ class StepWizard extends React.Component {
329329
}
330330

331331
StepWizard.propTypes = {
332+
socket: PropTypes.object.isRequired,
332333
title: PropTypes.string.isRequired,
333334
subtitle: PropTypes.string.isRequired,
334335
cancelButtonText: PropTypes.string,
@@ -340,4 +341,8 @@ StepWizard.defaultProps = {
340341
onCancelClicked: () => {}
341342
}
342343

343-
export default StepWizard
344+
const mapStateToProps = state => ({
345+
socket: state.shared.socket
346+
})
347+
348+
export default connect(mapStateToProps, {})(StepWizard)

src/client/containers/Profile/index.jsx

+9
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import QRCode from 'components/QRCode'
2323
import TruAccordion from 'components/TruAccordion'
2424

2525
import helpers from 'lib/helpers'
26+
import RGrid from 'components/RGrid'
2627

2728
@observer
2829
class ProfileContainer extends React.Component {
@@ -196,6 +197,14 @@ class ProfileContainer extends React.Component {
196197
}
197198

198199
render () {
200+
// return (
201+
// <div>
202+
// <PageTitle title={'Dashboard'} />
203+
// <PageContent>
204+
// <RGrid />
205+
// </PageContent>
206+
// </div>
207+
// )
199208
if (!this.props.sessionUser) return <div />
200209

201210
const InfoItem = ({ label, prop, paddingLeft, paddingRight, isRequired, onUpdate }) => {

src/client/index.html

+146-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,151 @@
11
<!DOCTYPE html>
2-
<html lang="en">
2+
<html>
33
<head>
4-
<meta charset="UTF-8">
5-
<title>$Title$</title>
4+
<title>{{data.common.siteTitle}} &middot; {{{title}}}</title>
5+
<meta charset="utf-8"/>
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
7+
<meta name="csrf-token" content="{{data.common.csrfToken}}" />
8+
<link rel="icon" href="{{data.common.favicon}}" />
9+
<link rel="stylesheet" href="/css/normalize.min.css"/>
10+
<link rel="stylesheet" href="/css/plugins.min.css"/>
11+
<link rel="stylesheet" href="/css/app.min.css"/>
12+
13+
<script src="/socket.io/socket.io.js"></script>
14+
<script src="/js/vendor.js"></script>
15+
<!-- <script src="/js/truRequire.js"></script>-->
616
</head>
717
<body>
8-
$END$
18+
<!--<header>-->
19+
<!--<div aria-busy="false" aria-label="Loading, please wait." role="progressbar"></div>-->
20+
<!--</header>-->
21+
<div id="loader-wrapper" class="loader-wrapper">
22+
<div class="shadow-wrapper">
23+
<svg class="shadow">
24+
<defs>
25+
<radialGradient r="0.5" cy="0.5" cx="0.5" id="bigdotshadow">
26+
<stop stop-color="#000000" offset="0"/>
27+
<stop stop-opacity="0" stop-color="#000000" offset="1"/>
28+
</radialGradient>
29+
</defs>
30+
<ellipse class="shadow" opacity="0.2" ry="6" rx="10" id="svg_1" cy="65" cx="103" stroke-linecap="null" stroke-linejoin="null" stroke-width="0" stroke="#000000" fill="url(#bigdotshadow)"/>
31+
</svg>
32+
</div>
33+
<div class="test-wrapper">
34+
<svg id="t" class="bigdot" style="width: 140px; height: 75px;" viewBox="0 0 288.9 70.1" preserveAspectRatio="xMidYMid meet">
35+
<g id="g" style="width: 100%; height: 100%;">
36+
<circle class="s1" cx="35.9" cy="82" r="10" />
37+
</g>
38+
</svg>
39+
</div>
40+
</div>
41+
<div id="serverRestarting" class="loader-wrapper hide" style="position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: #ddd; z-index: 999998;">
42+
<div class="shadow-wrapper">
43+
<svg class="shadow">
44+
<defs>
45+
<radialGradient r="0.5" cy="0.5" cx="0.5" id="shadow">
46+
<stop stop-color="#323232" offset="0"/>
47+
<stop stop-opacity="0" stop-color="#323232" offset="1"/>
48+
</radialGradient>
49+
</defs>
50+
<ellipse class="shadow" opacity="0.2" ry="6" rx="35" id="svg_1" cy="65" cx="90" stroke-linecap="null" stroke-linejoin="null" stroke-width="0" stroke="#323232" fill="url(#shadow)"/>
51+
</svg>
52+
</div>
53+
<div class="test-wrapper" style="width: 280px;">
54+
<svg id="t" class="t" style="width: 140px; height: 75px;" viewBox="0 0 288.9 70.1" preserveAspectRatio="xMidYMid meet">
55+
<g id="g" style="width: 100%; height: 100%;">
56+
<path class="s1" d="M28.5,28.4c-0.1,1.6-0.7,3.4-1.6,5.4c-2.4-0.3-4.6-0.4-6.8-0.4h-1.7c-2.9,13.9-4.3,22.6-4.3,26.1 c0,1.8,0.4,2.7,1.2,2.7c0.8,0,2.9-0.8,6.2-2.3l1.7,3.1C17.7,67.7,12.5,70,7.8,70c-2.2,0-4-0.7-5.4-2.1c-1.4-1.4-2.1-3.2-2.1-5.5 c0-2.3,0.3-4.9,0.8-7.7c0.5-2.9,1.3-6.4,2.2-10.6c0.9-4.2,1.6-7.5,2.1-10.1c-2.3,0.2-4,0.4-5.2,0.6c-0.1-0.8-0.2-1.8-0.2-3 c0-1.3,0.1-2.3,0.3-3.1h5.9c0.5-3.4,0.8-6.6,0.8-9.6L6.8,16v-0.3c4.9-1.7,9.5-2.5,13.8-2.5c0.2,1.3,0.4,2.8,0.4,4.7 c0,1.9-0.5,5.4-1.6,10.6H28.5z" />
57+
<circle class="s1" cx="35.9" cy="82" r="4" />
58+
</g>
59+
</svg>
60+
</div>
61+
<div class="test-wrapper" style="height: auto; top: 52%; width: 280px;">
62+
<h4 style="font-size: 24px; font-weight: 300; margin-left: 25px;">Please Wait...</h4>
63+
</div>
64+
</div>
65+
<div id="nomobile" class="uk-visible-small uk-hidden-medium uk-hidden-large" style="
66+
position: fixed;
67+
top: 0;
68+
left: 0;
69+
height: 100vh;
70+
width: 100vw;
71+
z-index: 99999999;
72+
background: #f6f6f6;
73+
">
74+
<div style="position: absolute; top: 50%; left: 0; width: 100%;text-align: center;font-size: 28px; font-weight: 300;"><a
75+
href="/mobile">View Mobile Site...</a></div>
76+
</div>
77+
78+
<div class="disconnected loader-wrapper" style="display: none; opacity: 0; z-index: 999997;">
79+
<div class="shadow-wrapper">
80+
<svg class="shadow">
81+
<defs>
82+
<radialGradient r="0.5" cy="0.5" cx="0.5" id="shadow">
83+
<stop stop-color="#323232" offset="0"/>
84+
<stop stop-opacity="0" stop-color="#323232" offset="1"/>
85+
</radialGradient>
86+
</defs>
87+
<ellipse class="shadow" opacity="0.2" ry="6" rx="35" id="svg_1" cy="65" cx="90" stroke-linecap="null" stroke-linejoin="null" stroke-width="0" stroke="#323232" fill="url(#shadow)"/>
88+
</svg>
89+
</div>
90+
<div class="test-wrapper">
91+
<svg id="t" class="t" style="width: 140px; height: 75px;" viewBox="0 0 288.9 70.1" preserveAspectRatio="xMidYMid meet">
92+
<g id="g" style="width: 100%; height: 100%;">
93+
<path class="s1" style="fill: white !important;" d="M28.5,28.4c-0.1,1.6-0.7,3.4-1.6,5.4c-2.4-0.3-4.6-0.4-6.8-0.4h-1.7c-2.9,13.9-4.3,22.6-4.3,26.1 c0,1.8,0.4,2.7,1.2,2.7c0.8,0,2.9-0.8,6.2-2.3l1.7,3.1C17.7,67.7,12.5,70,7.8,70c-2.2,0-4-0.7-5.4-2.1c-1.4-1.4-2.1-3.2-2.1-5.5 c0-2.3,0.3-4.9,0.8-7.7c0.5-2.9,1.3-6.4,2.2-10.6c0.9-4.2,1.6-7.5,2.1-10.1c-2.3,0.2-4,0.4-5.2,0.6c-0.1-0.8-0.2-1.8-0.2-3 c0-1.3,0.1-2.3,0.3-3.1h5.9c0.5-3.4,0.8-6.6,0.8-9.6L6.8,16v-0.3c4.9-1.7,9.5-2.5,13.8-2.5c0.2,1.3,0.4,2.8,0.4,4.7 c0,1.9-0.5,5.4-1.6,10.6H28.5z" />
94+
<circle class="s1" cx="35.9" cy="82" r="4" />
95+
</g>
96+
</svg>
97+
</div>
98+
<div style="position:absolute;width: 400px;top:50%; left: 50%;transform: translate(-50%, -50%);">
99+
<p style="padding-top: 75px;">Disconnected... Trying to reconnect</p>
100+
</div>
101+
</div>
102+
<div id="restoreBackupOverlay" class="loader-wrapper hide" style="position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: #ddd; z-index: 999998;">
103+
<div class="page-center">
104+
<h1 class="text-light" style="color: #444;">Restore in Progress...</h1>
105+
<div class="uk-progress uk-progress-striped uk-progress-accent uk-active" style="height: 31px;">
106+
<div class="uk-progress-bar" style="width: 100%;"></div>
107+
</div>
108+
</div>
109+
</div>
110+
<!--<div class="tour-fader hide" style="top: 0; left: 0; position: absolute; width: 100vw; height: 100vh; background: rgba(0,0,0,0.3); z-index: 1;"></div>-->
111+
112+
<!--Tour Start Here-->
113+
<div id="__tourEnabled" class="hide" style="display:none; visibility: hidden; opacity: 0;">{{data.common.showTour}}</div>
114+
<div id="__timezone" class="hide" style="display:none; visibility: hidden; opacity: 0;">{{data.common.timezone}}</div>
115+
<div class="wrapper uk-hidden-small" style="overflow: hidden; height: 100%;">
116+
117+
<div id="topbar"></div>
118+
<div id="sidebar"></div>
119+
<div class="sidebar-to-right"></div>
120+
121+
<div class="ajaxyContent">
122+
<div id="page-content" style="margin-left: 57px;" ng-controller="TrudeskController">
123+
<div id="__sidebar_route" class="hide" style="visibility: hidden">{{nav}}</div>
124+
<div id="__sidebar_sub_route" class="hide" style="visibility: hidden">{{subnav}}</div>
125+
{{{body}}}
126+
</div>
127+
</div>
128+
{{> onlineListSidebar }}
129+
{{> chatdock }}
130+
<div id="modal-wrapper"></div>
131+
</div>
132+
133+
<audio id="newticketaudio" src="/sounds/newticket.ogg" class="uk-hidden"></audio>
134+
<audio id="newmessageaudio" src="/sounds/newmessage.ogg" class="uk-hidden"></audio>
135+
<audio id="sendChatMessage_audio" src="/sounds/messagesent.ogg" class="uk-hidden"></audio>
136+
<audio id="receivedChatMessage_audio" src="/sounds/messagereceived.ogg" class="uk-hidden"></audio>
137+
<audio id="success_audio" src="/sounds/success.ogg" class="uk-hidden"></audio>
138+
<audio id="error_audio" src="/sounds/error.ogg" class="uk-hidden"></audio>
139+
<audio id="clicksound" src="/sounds/click.ogg" class="uk-hidden"></audio>
140+
141+
<script type="text/javascript">
142+
if (screen.width <= 800) {
143+
document.location = '/mobile';
144+
}
145+
</script>
146+
147+
<script src="/js/trudesk.min.js"></script>
148+
9149
</body>
10-
</html>
150+
151+
</html>

src/public/js/modules/socket.js

-26
This file was deleted.

src/public/js/pages/messages.js

+11-12
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,13 @@
1515
define('pages/messages', [
1616
'jquery',
1717
'underscore',
18-
'angular',
1918
'uikit',
2019
'moment',
2120
'modules/helpers',
2221
'modules/socket',
2322
'history',
2423
'isinview'
25-
], function ($, _, angular, UIKit, moment, helpers) {
24+
], function ($, _, UIKit, moment, helpers) {
2625
const messagesPage = {}
2726

2827
messagesPage.init = function (callback) {
@@ -320,16 +319,16 @@ define('pages/messages', [
320319
recentMessage: message.owner.fullname + ': ' + message.body
321320
})
322321

323-
const $injector = angular.injector(['ng', 'trudesk'])
324-
$injector.invoke([
325-
'$compile',
326-
'$rootScope',
327-
function ($compile, $rootScope) {
328-
const $scope = convoUL.prepend(newLI).scope()
329-
$compile(convoUL)($scope || $rootScope)
330-
$rootScope.$digest()
331-
}
332-
])
322+
// const $injector = angular.injector(['ng', 'trudesk'])
323+
// $injector.invoke([
324+
// '$compile',
325+
// '$rootScope',
326+
// function ($compile, $rootScope) {
327+
// const $scope = convoUL.prepend(newLI).scope()
328+
// $compile(convoUL)($scope || $rootScope)
329+
// $rootScope.$digest()
330+
// }
331+
// ])
333332
}
334333
}
335334

0 commit comments

Comments
 (0)