Merge branch 'master' of http://10.81.13.221:6990/Web/next-ucap-messenger
# Conflicts: # projects/ucap-webmessenger-ui/src/lib/ucap-ui.module.ts
This commit is contained in:
commit
d746aece70
|
@ -74,26 +74,32 @@ function createWindow() {
|
|||
const window = new AppWindow();
|
||||
|
||||
if (__DEV__) {
|
||||
const {
|
||||
default: installExtension,
|
||||
REDUX_DEVTOOLS
|
||||
} = require('electron-devtools-installer');
|
||||
// const {
|
||||
// default: installExtension,
|
||||
// REDUX_DEVTOOLS
|
||||
// } = require('electron-devtools-installer');
|
||||
|
||||
require('electron-debug')({ showDevTools: true });
|
||||
import('electron-debug').then(ed => {
|
||||
ed.default({ showDevTools: true });
|
||||
});
|
||||
|
||||
import('electron-devtools-installer').then(edi => {
|
||||
const ChromeLens = {
|
||||
id: 'idikgljglpfilbhaboonnpnnincjhjkd',
|
||||
electron: '>=1.2.1'
|
||||
};
|
||||
|
||||
const extensions = [REDUX_DEVTOOLS, ChromeLens];
|
||||
const extensions = [edi.REDUX_DEVTOOLS, ChromeLens];
|
||||
|
||||
for (const extension of extensions) {
|
||||
try {
|
||||
installExtension(extension);
|
||||
} catch (e) {}
|
||||
edi.default(extension);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
window.onClose(() => {
|
||||
appWindow = null;
|
||||
|
|
480
package-lock.json
generated
480
package-lock.json
generated
|
@ -2095,20 +2095,6 @@
|
|||
"ajv-keywords": "^3.1.0"
|
||||
}
|
||||
},
|
||||
"@electron/get": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@electron/get/-/get-1.5.0.tgz",
|
||||
"integrity": "sha512-tafxBz6n08G6SX961F/h8XFtpB/DdwRvJJoDeOH9x78jDSCMQ2G/rRWqSwLFp9oeMFBJf0Pf5Kkw6TKt5w9TWg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"debug": "^4.1.1",
|
||||
"env-paths": "^2.2.0",
|
||||
"fs-extra": "^8.1.0",
|
||||
"got": "^9.6.0",
|
||||
"sanitize-filename": "^1.6.2",
|
||||
"sumchecker": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"@hapi/address": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.1.1.tgz",
|
||||
|
@ -2301,6 +2287,21 @@
|
|||
"detect-browser": "*"
|
||||
}
|
||||
},
|
||||
"@types/electron-debug": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/electron-debug/-/electron-debug-2.1.0.tgz",
|
||||
"integrity": "sha512-/bvdTUd2OF0LZuVp/qPZYhyraBkFBkULhk665ine71zIi2QywzirS+5rxt/n9Bj5RWqO6TYZKslFc+Vy+chggQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"electron-debug": "*"
|
||||
}
|
||||
},
|
||||
"@types/electron-devtools-installer": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/electron-devtools-installer/-/electron-devtools-installer-2.2.0.tgz",
|
||||
"integrity": "sha512-HJNxpaOXuykCK4rQ6FOMxAA0NLFYsf7FiPFGmab0iQmtVBHSAfxzy3MRFpLTTDDWbV0yD2YsHOQvdu8yCqtCfw==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/estree": {
|
||||
"version": "0.0.39",
|
||||
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz",
|
||||
|
@ -2978,6 +2979,12 @@
|
|||
"integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=",
|
||||
"dev": true
|
||||
},
|
||||
"array-find-index": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz",
|
||||
"integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=",
|
||||
"dev": true
|
||||
},
|
||||
"array-flatten": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz",
|
||||
|
@ -4034,6 +4041,24 @@
|
|||
"integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
|
||||
"dev": true
|
||||
},
|
||||
"camelcase-keys": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz",
|
||||
"integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"camelcase": "^2.0.0",
|
||||
"map-obj": "^1.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"camelcase": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz",
|
||||
"integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"caniuse-lite": {
|
||||
"version": "1.0.30000989",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000989.tgz",
|
||||
|
@ -4965,6 +4990,15 @@
|
|||
"integrity": "sha1-QICG1AlVDCYxFVYZ6fp7ytw7mRs=",
|
||||
"dev": true
|
||||
},
|
||||
"currently-unhandled": {
|
||||
"version": "0.4.1",
|
||||
"resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz",
|
||||
"integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"array-find-index": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"custom-event": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz",
|
||||
|
@ -5465,22 +5499,14 @@
|
|||
"dev": true
|
||||
},
|
||||
"electron": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/electron/-/electron-7.0.0.tgz",
|
||||
"integrity": "sha512-vrF1loRW1p0vQCbduqO0EZpo8ePJOuxUT6tSoUSU3lsbGK3VnlJop+0PpCIPzbe2K4G4Gk7WexH08V9se7mJcA==",
|
||||
"version": "6.1.2",
|
||||
"resolved": "https://registry.npmjs.org/electron/-/electron-6.1.2.tgz",
|
||||
"integrity": "sha512-zVste1obJC645RrU4PP+CqU8Yq33h8fzS7zx3tWbiNnyRzp6m7O2bpgKLJBRZ/4BPRsNCqSSXm4vimyGPUXVaw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@electron/get": "^1.0.1",
|
||||
"@types/node": "^12.0.12",
|
||||
"@types/node": "^10.12.18",
|
||||
"electron-download": "^4.1.0",
|
||||
"extract-zip": "^1.0.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/node": {
|
||||
"version": "12.11.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.11.6.tgz",
|
||||
"integrity": "sha512-4uPUyY1Aofo1YzoypalYHNd2SnKYxH2b6LzXwpryZCJKA2XlagZSynXx5C8sfPH0r1cSltUpaVHV2q5sYXschQ==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"electron-builder": {
|
||||
|
@ -5641,6 +5667,57 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"electron-download": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/electron-download/-/electron-download-4.1.1.tgz",
|
||||
"integrity": "sha512-FjEWG9Jb/ppK/2zToP+U5dds114fM1ZOJqMAR4aXXL5CvyPE9fiqBK/9YcwC9poIFQTEJk/EM/zyRwziziRZrg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"debug": "^3.0.0",
|
||||
"env-paths": "^1.0.0",
|
||||
"fs-extra": "^4.0.1",
|
||||
"minimist": "^1.2.0",
|
||||
"nugget": "^2.0.1",
|
||||
"path-exists": "^3.0.0",
|
||||
"rc": "^1.2.1",
|
||||
"semver": "^5.4.1",
|
||||
"sumchecker": "^2.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"debug": {
|
||||
"version": "3.2.6",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
|
||||
"integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ms": "^2.1.1"
|
||||
}
|
||||
},
|
||||
"env-paths": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/env-paths/-/env-paths-1.0.0.tgz",
|
||||
"integrity": "sha1-QWgTO0K7BcOKNbGuQ5fIKYqzaeA=",
|
||||
"dev": true
|
||||
},
|
||||
"fs-extra": {
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz",
|
||||
"integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"graceful-fs": "^4.1.2",
|
||||
"jsonfile": "^4.0.0",
|
||||
"universalify": "^0.1.0"
|
||||
}
|
||||
},
|
||||
"semver": {
|
||||
"version": "5.7.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
||||
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"electron-is-accelerator": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/electron-is-accelerator/-/electron-is-accelerator-0.1.2.tgz",
|
||||
|
@ -6828,6 +6905,12 @@
|
|||
"integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==",
|
||||
"dev": true
|
||||
},
|
||||
"get-stdin": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz",
|
||||
"integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=",
|
||||
"dev": true
|
||||
},
|
||||
"get-stream": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
|
||||
|
@ -7454,6 +7537,15 @@
|
|||
"integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=",
|
||||
"dev": true
|
||||
},
|
||||
"indent-string": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz",
|
||||
"integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"repeating": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"indexof": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz",
|
||||
|
@ -7882,6 +7974,12 @@
|
|||
"integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
|
||||
"dev": true
|
||||
},
|
||||
"is-utf8": {
|
||||
"version": "0.2.1",
|
||||
"resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
|
||||
"integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=",
|
||||
"dev": true
|
||||
},
|
||||
"is-windows": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz",
|
||||
|
@ -9274,6 +9372,36 @@
|
|||
"integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=",
|
||||
"dev": true
|
||||
},
|
||||
"load-json-file": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
|
||||
"integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"graceful-fs": "^4.1.2",
|
||||
"parse-json": "^2.2.0",
|
||||
"pify": "^2.0.0",
|
||||
"pinkie-promise": "^2.0.0",
|
||||
"strip-bom": "^2.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"parse-json": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
|
||||
"integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"error-ex": "^1.2.0"
|
||||
}
|
||||
},
|
||||
"pify": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
|
||||
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"loader-runner": {
|
||||
"version": "2.4.0",
|
||||
"resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.4.0.tgz",
|
||||
|
@ -9384,6 +9512,16 @@
|
|||
"js-tokens": "^3.0.0 || ^4.0.0"
|
||||
}
|
||||
},
|
||||
"loud-rejection": {
|
||||
"version": "1.6.0",
|
||||
"resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz",
|
||||
"integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"currently-unhandled": "^0.4.1",
|
||||
"signal-exit": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"lowercase-keys": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz",
|
||||
|
@ -9493,6 +9631,12 @@
|
|||
"integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=",
|
||||
"dev": true
|
||||
},
|
||||
"map-obj": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz",
|
||||
"integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=",
|
||||
"dev": true
|
||||
},
|
||||
"map-visit": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz",
|
||||
|
@ -9546,6 +9690,24 @@
|
|||
"integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=",
|
||||
"dev": true
|
||||
},
|
||||
"meow": {
|
||||
"version": "3.7.0",
|
||||
"resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz",
|
||||
"integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"camelcase-keys": "^2.0.0",
|
||||
"decamelize": "^1.1.2",
|
||||
"loud-rejection": "^1.0.0",
|
||||
"map-obj": "^1.0.1",
|
||||
"minimist": "^1.1.3",
|
||||
"normalize-package-data": "^2.3.4",
|
||||
"object-assign": "^4.0.1",
|
||||
"read-pkg-up": "^1.0.1",
|
||||
"redent": "^1.0.0",
|
||||
"trim-newlines": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"merge-descriptors": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
|
||||
|
@ -10334,6 +10496,38 @@
|
|||
"path-key": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"nugget": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/nugget/-/nugget-2.0.1.tgz",
|
||||
"integrity": "sha1-IBCVpIfhrTYIGzQy+jytpPjQcbA=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"debug": "^2.1.3",
|
||||
"minimist": "^1.1.0",
|
||||
"pretty-bytes": "^1.0.2",
|
||||
"progress-stream": "^1.1.0",
|
||||
"request": "^2.45.0",
|
||||
"single-line-log": "^1.1.2",
|
||||
"throttleit": "0.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"debug": {
|
||||
"version": "2.6.9",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
||||
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ms": "2.0.0"
|
||||
}
|
||||
},
|
||||
"ms": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"null-check": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/null-check/-/null-check-1.0.0.tgz",
|
||||
|
@ -11153,6 +11347,16 @@
|
|||
"integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=",
|
||||
"dev": true
|
||||
},
|
||||
"pretty-bytes": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz",
|
||||
"integrity": "sha1-CiLoIQYJrTVUL4yNXSFZr/B1HIQ=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"get-stdin": "^4.0.1",
|
||||
"meow": "^3.1.0"
|
||||
}
|
||||
},
|
||||
"private": {
|
||||
"version": "0.1.8",
|
||||
"resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz",
|
||||
|
@ -11171,6 +11375,67 @@
|
|||
"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
|
||||
"dev": true
|
||||
},
|
||||
"progress-stream": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/progress-stream/-/progress-stream-1.2.0.tgz",
|
||||
"integrity": "sha1-LNPP6jO6OonJwSHsM0er6asSX3c=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"speedometer": "~0.1.2",
|
||||
"through2": "~0.2.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"isarray": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
|
||||
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=",
|
||||
"dev": true
|
||||
},
|
||||
"object-keys": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz",
|
||||
"integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=",
|
||||
"dev": true
|
||||
},
|
||||
"readable-stream": {
|
||||
"version": "1.1.14",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
|
||||
"integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"core-util-is": "~1.0.0",
|
||||
"inherits": "~2.0.1",
|
||||
"isarray": "0.0.1",
|
||||
"string_decoder": "~0.10.x"
|
||||
}
|
||||
},
|
||||
"string_decoder": {
|
||||
"version": "0.10.31",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
|
||||
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
|
||||
"dev": true
|
||||
},
|
||||
"through2": {
|
||||
"version": "0.2.3",
|
||||
"resolved": "https://registry.npmjs.org/through2/-/through2-0.2.3.tgz",
|
||||
"integrity": "sha1-6zKE2k6jEbbMis42U3SKUqvyWj8=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"readable-stream": "~1.1.9",
|
||||
"xtend": "~2.1.1"
|
||||
}
|
||||
},
|
||||
"xtend": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz",
|
||||
"integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"object-keys": "~0.4.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"promise": {
|
||||
"version": "7.3.1",
|
||||
"resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz",
|
||||
|
@ -11671,6 +11936,65 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"read-pkg-up": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz",
|
||||
"integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"find-up": "^1.0.0",
|
||||
"read-pkg": "^1.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"find-up": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
|
||||
"integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"path-exists": "^2.0.0",
|
||||
"pinkie-promise": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"path-exists": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz",
|
||||
"integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"pinkie-promise": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"path-type": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz",
|
||||
"integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"graceful-fs": "^4.1.2",
|
||||
"pify": "^2.0.0",
|
||||
"pinkie-promise": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"pify": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
|
||||
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
|
||||
"dev": true
|
||||
},
|
||||
"read-pkg": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
|
||||
"integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"load-json-file": "^1.0.0",
|
||||
"normalize-package-data": "^2.3.2",
|
||||
"path-type": "^1.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"readable-stream": {
|
||||
"version": "2.3.6",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
|
||||
|
@ -11707,6 +12031,16 @@
|
|||
"picomatch": "^2.0.4"
|
||||
}
|
||||
},
|
||||
"redent": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz",
|
||||
"integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"indent-string": "^2.1.0",
|
||||
"strip-indent": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"reflect-metadata": {
|
||||
"version": "0.1.13",
|
||||
"resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz",
|
||||
|
@ -12512,6 +12846,37 @@
|
|||
"integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
|
||||
"dev": true
|
||||
},
|
||||
"single-line-log": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/single-line-log/-/single-line-log-1.1.2.tgz",
|
||||
"integrity": "sha1-wvg/Jzo+GhbtsJlWYdoO1e8DM2Q=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"string-width": "^1.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"is-fullwidth-code-point": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
|
||||
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"number-is-nan": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"string-width": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
|
||||
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"code-point-at": "^1.0.0",
|
||||
"is-fullwidth-code-point": "^1.0.0",
|
||||
"strip-ansi": "^3.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"slash": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz",
|
||||
|
@ -13010,6 +13375,12 @@
|
|||
"chalk": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"speedometer": {
|
||||
"version": "0.1.4",
|
||||
"resolved": "https://registry.npmjs.org/speedometer/-/speedometer-0.1.4.tgz",
|
||||
"integrity": "sha1-mHbb0qFp0xFUAtSObqYynIgWpQ0=",
|
||||
"dev": true
|
||||
},
|
||||
"split-string": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
|
||||
|
@ -13240,12 +13611,30 @@
|
|||
"ansi-regex": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"strip-bom": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz",
|
||||
"integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-utf8": "^0.2.0"
|
||||
}
|
||||
},
|
||||
"strip-eof": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
|
||||
"integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=",
|
||||
"dev": true
|
||||
},
|
||||
"strip-indent": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz",
|
||||
"integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"get-stdin": "^4.0.1"
|
||||
}
|
||||
},
|
||||
"strip-json-comments": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
|
||||
|
@ -13325,12 +13714,29 @@
|
|||
}
|
||||
},
|
||||
"sumchecker": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-3.0.0.tgz",
|
||||
"integrity": "sha512-yreseuC/z4iaodVoq07XULEOO9p4jnQazO7mbrnDSvWAU/y2cbyIKs+gWJptfcGu9R+1l27K8Rkj0bfvqnBpgQ==",
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-2.0.2.tgz",
|
||||
"integrity": "sha1-D0LBDl0F2l1C7qPlbDOZo31sWz4=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"debug": "^4.1.0"
|
||||
"debug": "^2.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"debug": {
|
||||
"version": "2.6.9",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
||||
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ms": "2.0.0"
|
||||
}
|
||||
},
|
||||
"ms": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"supports-color": {
|
||||
|
@ -13506,6 +13912,12 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"throttleit": {
|
||||
"version": "0.0.2",
|
||||
"resolved": "https://registry.npmjs.org/throttleit/-/throttleit-0.0.2.tgz",
|
||||
"integrity": "sha1-z+34jmDADdlpe2H90qg0OptoDq8=",
|
||||
"dev": true
|
||||
},
|
||||
"through": {
|
||||
"version": "2.3.8",
|
||||
"resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
|
||||
|
@ -13641,6 +14053,12 @@
|
|||
"integrity": "sha512-4hjqbObwlh2dLyW4tcz0Ymw0ggoaVDMveUB9w8kFSQScdRLo0gxO9J7WFcUBo+W3C1TLdFIEwNOWebgZZ0RH9Q==",
|
||||
"dev": true
|
||||
},
|
||||
"trim-newlines": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz",
|
||||
"integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=",
|
||||
"dev": true
|
||||
},
|
||||
"trim-right": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz",
|
||||
|
|
|
@ -44,6 +44,8 @@
|
|||
"@types/copy-webpack-plugin": "^5.0.0",
|
||||
"@types/crypto-js": "^3.1.43",
|
||||
"@types/detect-browser": "^4.0.0",
|
||||
"@types/electron-debug": "^2.1.0",
|
||||
"@types/electron-devtools-installer": "^2.2.0",
|
||||
"@types/extract-text-webpack-plugin": "^3.0.4",
|
||||
"@types/fs-extra": "^8.0.0",
|
||||
"@types/filesize": "^4.1.0",
|
||||
|
@ -64,7 +66,7 @@
|
|||
"cross-env": "^5.2.1",
|
||||
"detect-browser": "^4.6.0",
|
||||
"devtron": "^1.4.0",
|
||||
"electron": "^7.0.0",
|
||||
"electron": "^6.1.2",
|
||||
"electron-builder": "^21.2.0",
|
||||
"electron-debug": "^3.0.1",
|
||||
"electron-devtools-installer": "^2.2.4",
|
||||
|
|
|
@ -6,17 +6,25 @@ const routes: Routes = [
|
|||
{ path: '', redirectTo: '/messenger', pathMatch: 'full' },
|
||||
{
|
||||
path: 'messenger',
|
||||
loadChildren:
|
||||
'./pages/messenger/messenger.page.module#AppMessengerPageModule',
|
||||
loadChildren: () =>
|
||||
import('./pages/messenger/messenger.page.module').then(
|
||||
m => m.AppMessengerPageModule
|
||||
),
|
||||
canActivate: [AppAuthGuard]
|
||||
},
|
||||
{
|
||||
path: 'account',
|
||||
loadChildren: './pages/account/account.page.module#AppAccountPageModule'
|
||||
loadChildren: () =>
|
||||
import('./pages/account/account.page.module').then(
|
||||
m => m.AppAccountPageModule
|
||||
)
|
||||
},
|
||||
{
|
||||
path: 'template',
|
||||
loadChildren: './pages/template/template.page.module#AppTemplatePageModule'
|
||||
loadChildren: () =>
|
||||
import('./pages/template/template.page.module').then(
|
||||
m => m.AppTemplatePageModule
|
||||
)
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ import { UCapPiModule } from '@ucap-webmessenger/pi';
|
|||
import { UCapProtocolModule } from '@ucap-webmessenger/protocol';
|
||||
import { UCapAuthenticationProtocolModule } from '@ucap-webmessenger/protocol-authentication';
|
||||
import { UCapEventProtocolModule } from '@ucap-webmessenger/protocol-event';
|
||||
import { UCapGroupProtocolModule } from '@ucap-webmessenger/protocol-group';
|
||||
import { UCapInfoProtocolModule } from '@ucap-webmessenger/protocol-info';
|
||||
import { UCapInnerProtocolModule } from '@ucap-webmessenger/protocol-inner';
|
||||
import { UCapOptionProtocolModule } from '@ucap-webmessenger/protocol-option';
|
||||
|
@ -73,6 +74,7 @@ import { AppNativeLayoutModule } from './layouts/native/native.layout.module';
|
|||
}),
|
||||
UCapAuthenticationProtocolModule.forRoot(),
|
||||
UCapEventProtocolModule.forRoot(),
|
||||
UCapGroupProtocolModule.forRoot(),
|
||||
UCapInfoProtocolModule.forRoot(),
|
||||
UCapInnerProtocolModule.forRoot(),
|
||||
UCapOptionProtocolModule.forRoot(),
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
#chatContextMenuTrigger="matMenuTrigger"
|
||||
[matMenuTriggerFor]="chatContextMenu"
|
||||
></div>
|
||||
<mat-menu #chatContextMenu="matMenu" [overlapTrigger]="false">
|
||||
<mat-menu #chatContextMenu="matMenu" [hasBackdrop]="false">
|
||||
<ng-template matMenuContent let-roomInfo="roomInfo">
|
||||
<button mat-menu-item (click)="onSelectedRoom(roomInfo)">
|
||||
대화방 열기
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#groupMenu="matMenu"
|
||||
xPosition="after"
|
||||
yPosition="below"
|
||||
[overlapTrigger]="false"
|
||||
[hasBackdrop]="false"
|
||||
>
|
||||
<button mat-menu-item (click)="onClickGroupMenu('GROUP_NEW')">
|
||||
<mat-icon>group_add</mat-icon>
|
||||
|
@ -92,7 +92,7 @@
|
|||
#profileContextMenuTrigger="matMenuTrigger"
|
||||
[matMenuTriggerFor]="profileContextMenu"
|
||||
></div>
|
||||
<mat-menu #profileContextMenu="matMenu" [overlapTrigger]="false">
|
||||
<mat-menu #profileContextMenu="matMenu" [hasBackdrop]="false">
|
||||
<ng-template matMenuContent let-userInfo="userInfo">
|
||||
<button
|
||||
mat-menu-item
|
||||
|
@ -155,7 +155,7 @@
|
|||
#groupContextMenuTrigger="matMenuTrigger"
|
||||
[matMenuTriggerFor]="groupContextMenu"
|
||||
></div>
|
||||
<mat-menu #groupContextMenu="matMenu" [overlapTrigger]="false">
|
||||
<mat-menu #groupContextMenu="matMenu" [hasBackdrop]="false">
|
||||
<ng-template matMenuContent let-group="group">
|
||||
<button mat-menu-item (click)="onClickGroupContextMenu('CHAT', group)">
|
||||
그룹 대화하기
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
<mat-icon>more_vert</mat-icon>
|
||||
</button>
|
||||
|
||||
<mat-menu #contactMenu="matMenu">
|
||||
<mat-menu #contactMenu="matMenu" [hasBackdrop]="false">
|
||||
<button mat-menu-item (click)="onClickContextMenu('CLOSE_ROOM')">
|
||||
방닫기
|
||||
</button>
|
||||
|
@ -113,7 +113,7 @@
|
|||
#messageContextMenuTrigger="matMenuTrigger"
|
||||
[matMenuTriggerFor]="messageContextMenu"
|
||||
></div>
|
||||
<mat-menu #messageContextMenu="matMenu" [overlapTrigger]="false">
|
||||
<mat-menu #messageContextMenu="matMenu" [hasBackdrop]="false">
|
||||
<ng-template matMenuContent let-message="message" let-loginRes="loginRes">
|
||||
<ng-container *ngIf="!isRecalledMessage(message.type)">
|
||||
<button
|
||||
|
|
|
@ -29,7 +29,6 @@ import {
|
|||
} from '@ucap-webmessenger/protocol-event';
|
||||
|
||||
import * as ChatStore from '@app/store/messenger/chat';
|
||||
import * as EventStore from '@app/store/messenger/event';
|
||||
import * as SyncStore from '@app/store/messenger/sync';
|
||||
|
||||
import {
|
||||
|
@ -239,7 +238,7 @@ export class Effects {
|
|||
ChatStore.selectedRoom({ roomSeq: action.trgtRoomSeq })
|
||||
);
|
||||
this.store.dispatch(
|
||||
EventStore.send({
|
||||
send({
|
||||
senderSeq: action.senderSeq,
|
||||
req: {
|
||||
roomSeq: action.trgtRoomSeq,
|
||||
|
@ -273,7 +272,7 @@ export class Effects {
|
|||
}),
|
||||
map(res => {
|
||||
this.store.dispatch(
|
||||
EventStore.send({
|
||||
send({
|
||||
senderSeq: action.senderSeq,
|
||||
req: {
|
||||
roomSeq: res.res.roomSeq,
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import * as url from 'url';
|
||||
|
||||
export abstract class UrlConfig {
|
||||
constructor(
|
||||
protected useSsl: boolean,
|
||||
|
@ -18,13 +16,20 @@ export abstract class UrlConfig {
|
|||
: 'http:';
|
||||
}
|
||||
|
||||
protected getUrl(extra: url.UrlObject): string {
|
||||
return url.format({
|
||||
...extra,
|
||||
protocol: this.getProtocol(),
|
||||
hostname: this.domain,
|
||||
port: this.port
|
||||
});
|
||||
protected getUrl(extra: Partial<URL>): string {
|
||||
const url = new URL(
|
||||
`${this.getProtocol()}//${this.domain}:${String(this.port)}`
|
||||
);
|
||||
|
||||
for (const key in extra) {
|
||||
if (extra.hasOwnProperty(key)) {
|
||||
url[key] = extra[key];
|
||||
}
|
||||
}
|
||||
|
||||
console.log('url.href', url.href);
|
||||
|
||||
return url.href;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"angularCompilerOptions": {
|
||||
"enableIvy": true,
|
||||
"allowEmptyCodegenFiles": true
|
||||
},
|
||||
"compilerOptions": {
|
||||
"outDir": "../../out-tsc/app",
|
||||
"types": []
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
contact: message.senderSeq !== loginRes.userSeq
|
||||
}"
|
||||
>
|
||||
|
||||
<ucap-chat-message-box-date-splitter
|
||||
*ngIf="getDateSplitter(i)"
|
||||
class="date-splitter"
|
||||
|
@ -50,7 +49,10 @@
|
|||
</ng-container>
|
||||
</ng-template>
|
||||
<ng-template #contents>
|
||||
<div *ngIf="getUserProfile(message.senderSeq) != ''" class="profile-img">
|
||||
<div
|
||||
*ngIf="getUserProfile(message.senderSeq) != ''"
|
||||
class="profile-img"
|
||||
>
|
||||
<!-- <img
|
||||
class="avatar"
|
||||
style="width: 50px; height: 50px;"
|
||||
|
@ -64,13 +66,21 @@
|
|||
| async
|
||||
"
|
||||
/> -->
|
||||
<ucap-ui-imaage
|
||||
<img
|
||||
class="avatar"
|
||||
style="width: 50px; height: 50px;"
|
||||
ucapUiImage
|
||||
[base]="profileImageRoot"
|
||||
[path]="getUserProfile(message.senderSeq)"
|
||||
[default]="'assets/images/img_nophoto_50.png'"
|
||||
/>
|
||||
<!-- <ucap-ui-imaage
|
||||
[style]="'width: 50px; height: 50px;'"
|
||||
[imageClass]="'avatar'"
|
||||
[base]="profileImageRoot"
|
||||
[path]="getUserProfile(message.senderSeq)"
|
||||
[default]="'assets/images/img_nophoto_50.png'"
|
||||
></ucap-ui-imaage>
|
||||
></ucap-ui-imaage> -->
|
||||
</div>
|
||||
|
||||
<div class="message-main">
|
||||
|
|
|
@ -22,8 +22,7 @@ import { MatMenu, MatMenuTrigger } from '@angular/material';
|
|||
@Component({
|
||||
selector: 'ucap-chat-messages',
|
||||
templateUrl: './messages.component.html',
|
||||
styleUrls: ['./messages.component.scss'],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
styleUrls: ['./messages.component.scss']
|
||||
})
|
||||
export class MessagesComponent implements OnInit {
|
||||
@Input()
|
||||
|
|
|
@ -21,13 +21,20 @@
|
|||
| async
|
||||
"
|
||||
/> -->
|
||||
<img
|
||||
class="thumbnail"
|
||||
ucapUiImage
|
||||
[base]="profileImageRoot"
|
||||
[path]="userInfo.profileImageFile"
|
||||
[default]="'assets/images/img_nophoto_50.png'"
|
||||
/>
|
||||
|
||||
<ucap-ui-imaage
|
||||
<!-- <ucap-ui-imaage
|
||||
[imageClass]="'thumbnail'"
|
||||
[base]="profileImageRoot"
|
||||
[path]="userInfo.profileImageFile"
|
||||
[default]="'assets/images/img_nophoto_50.png'"
|
||||
></ucap-ui-imaage>
|
||||
></ucap-ui-imaage> -->
|
||||
</dt>
|
||||
<dd class="info">
|
||||
<div class="detail">
|
||||
|
@ -46,8 +53,7 @@
|
|||
>
|
||||
{{ userInfo.intro }}
|
||||
</div>
|
||||
-->
|
||||
</dd>
|
||||
--></dd>
|
||||
</dl>
|
||||
<mat-checkbox
|
||||
*ngIf="checkable"
|
||||
|
|
|
@ -2,12 +2,19 @@
|
|||
<dl class="item-default">
|
||||
<dt>
|
||||
<!-- <img class="thumbnail" /> -->
|
||||
<ucap-ui-imaage
|
||||
<img
|
||||
class="thumbnail"
|
||||
ucapUiImage
|
||||
[base]="sessionVerinfo.profileRoot"
|
||||
[path]="imagePath"
|
||||
[default]="defaultPath"
|
||||
/>
|
||||
<!-- <ucap-ui-imaage
|
||||
[imageClass]="'thumbnail'"
|
||||
[base]="sessionVerinfo.profileRoot"
|
||||
[path]="imagePath"
|
||||
[default]="defaultPath"
|
||||
></ucap-ui-imaage>
|
||||
></ucap-ui-imaage> -->
|
||||
</dt>
|
||||
<dd class="info">
|
||||
<div class="detail">
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ImageComponent } from './image.component';
|
||||
|
||||
describe('UI::ImageComponent', () => {
|
||||
let component: ImageComponent;
|
||||
let fixture: ComponentFixture<ImageComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ImageComponent]
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ImageComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
|
@ -1,114 +0,0 @@
|
|||
import { Component, OnInit, Input, ElementRef } from '@angular/core';
|
||||
import { DomSanitizer, SafeStyle } from '@angular/platform-browser';
|
||||
|
||||
import { NGXLogger } from 'ngx-logger';
|
||||
import { ucapAnimations } from '../animations';
|
||||
|
||||
@Component({
|
||||
selector: 'ucap-ui-imaage',
|
||||
template: `
|
||||
<img
|
||||
#imageElement
|
||||
[src]="imageSrc"
|
||||
[style]="baseStyle"
|
||||
[ngClass]="classList"
|
||||
/>
|
||||
`,
|
||||
styles: [],
|
||||
animations: ucapAnimations
|
||||
})
|
||||
export class ImageComponent implements OnInit {
|
||||
@Input()
|
||||
base: string;
|
||||
|
||||
@Input()
|
||||
path: string;
|
||||
|
||||
@Input()
|
||||
validation = true;
|
||||
|
||||
@Input()
|
||||
default: string;
|
||||
|
||||
@Input()
|
||||
set style(style: string | object) {
|
||||
let mappedStyles = style as string;
|
||||
|
||||
if (typeof style === 'object') {
|
||||
mappedStyles = Object.entries(style).reduce(
|
||||
(styleString, [propName, propValue]) => {
|
||||
propName = propName.replace(
|
||||
/([A-Z])/g,
|
||||
matches => `-${matches[0].toLowerCase()}`
|
||||
);
|
||||
return `${styleString}${propName}:${propValue};`;
|
||||
},
|
||||
''
|
||||
);
|
||||
|
||||
this.baseStyle = this.domSanitizer.bypassSecurityTrustStyle(mappedStyles);
|
||||
} else if (typeof style === 'string') {
|
||||
this.baseStyle = this.domSanitizer.bypassSecurityTrustStyle(mappedStyles);
|
||||
}
|
||||
}
|
||||
|
||||
@Input()
|
||||
set imageClass(classes: string) {
|
||||
if (classes && classes.length) {
|
||||
classes.split(' ').forEach((className: string) => {
|
||||
this.classList[className] = true;
|
||||
});
|
||||
|
||||
this.elementRef.nativeElement.className = '';
|
||||
}
|
||||
}
|
||||
|
||||
baseStyle: SafeStyle;
|
||||
imageSrc: string;
|
||||
classList: { [key: string]: boolean } = {};
|
||||
|
||||
constructor(
|
||||
private elementRef: ElementRef<HTMLElement>,
|
||||
private domSanitizer: DomSanitizer,
|
||||
private logger: NGXLogger
|
||||
) {
|
||||
this.imageSrc = null;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
if (this.validation) {
|
||||
if (
|
||||
!this.base ||
|
||||
'' === this.base.trim() ||
|
||||
!this.path ||
|
||||
'' === this.path.trim()
|
||||
) {
|
||||
this.imageSrc = this.default;
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.imageSrc) {
|
||||
this.imageSrc = this.default;
|
||||
|
||||
const imageUrl = `${this.base}${this.path}`;
|
||||
const image = new Image();
|
||||
image.onload = () => {
|
||||
if ('naturalHeight' in image) {
|
||||
if (image.naturalHeight + image.naturalWidth === 0) {
|
||||
image.onerror('naturalHeight');
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (image.width + image.height === 0) {
|
||||
image.onerror('width');
|
||||
return;
|
||||
}
|
||||
this.imageSrc = image.src;
|
||||
};
|
||||
image.onerror = () => {
|
||||
this.imageSrc = this.default;
|
||||
};
|
||||
image.src = imageUrl;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,83 @@
|
|||
import {
|
||||
Directive,
|
||||
ElementRef,
|
||||
EventEmitter,
|
||||
Output,
|
||||
Input,
|
||||
AfterViewInit,
|
||||
OnInit,
|
||||
HostListener
|
||||
} from '@angular/core';
|
||||
|
||||
import { NGXLogger } from 'ngx-logger';
|
||||
|
||||
@Directive({
|
||||
selector: 'img[ucapUiImage]'
|
||||
})
|
||||
export class ImageDirective implements OnInit, AfterViewInit {
|
||||
@Input()
|
||||
base: string;
|
||||
|
||||
@Input()
|
||||
path: string;
|
||||
|
||||
@Input()
|
||||
validation = true;
|
||||
|
||||
@Input()
|
||||
default: string;
|
||||
|
||||
@Output()
|
||||
loaded = new EventEmitter<string>();
|
||||
|
||||
imageSrc: string;
|
||||
|
||||
constructor(
|
||||
private elementRef: ElementRef<HTMLImageElement>,
|
||||
private logger: NGXLogger
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
if (this.validation) {
|
||||
if (
|
||||
!this.base ||
|
||||
'' === this.base.trim() ||
|
||||
!this.path ||
|
||||
'' === this.path.trim()
|
||||
) {
|
||||
this.imageSrc = this.default;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ngAfterViewInit(): void {
|
||||
if (this.imageSrc === this.default) {
|
||||
this.elementRef.nativeElement.src = this.default;
|
||||
this.loaded.emit(this.elementRef.nativeElement.src);
|
||||
} else {
|
||||
this.elementRef.nativeElement.src = this.default;
|
||||
|
||||
const imageUrl = `${this.base}${this.path}`;
|
||||
const image = new Image();
|
||||
image.onload = () => {
|
||||
if ('naturalHeight' in image) {
|
||||
if (image.naturalHeight + image.naturalWidth === 0) {
|
||||
image.onerror('naturalHeight');
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (image.width + image.height === 0) {
|
||||
image.onerror('width');
|
||||
return;
|
||||
}
|
||||
this.elementRef.nativeElement.src = image.src;
|
||||
this.loaded.emit(this.elementRef.nativeElement.src);
|
||||
};
|
||||
image.onerror = () => {
|
||||
this.elementRef.nativeElement.src = this.default;
|
||||
this.loaded.emit(this.elementRef.nativeElement.src);
|
||||
};
|
||||
image.src = imageUrl;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,4 +1,3 @@
|
|||
import { DateToStringForChatRoomListPipe } from './pipes/dates.pipe';
|
||||
import { NgModule, ModuleWithProviders } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
|
||||
|
@ -13,35 +12,37 @@ import { MatSnackBarModule } from '@angular/material/snack-bar';
|
|||
import { DragDropModule } from '@angular/cdk/drag-drop';
|
||||
|
||||
import { FileUploadQueueComponent } from './components/file-upload-queue.component';
|
||||
import { ImageComponent } from './components/image.component';
|
||||
const COMPONENTS = [ImageComponent, FileUploadQueueComponent];
|
||||
|
||||
import { BottomSheetService } from './services/bottom-sheet.service';
|
||||
import { ClipboardService } from './services/clipboard.service';
|
||||
import { DialogService } from './services/dialog.service';
|
||||
import { SnackBarService } from './services/snack-bar.service';
|
||||
const SERVICES = [
|
||||
BottomSheetService,
|
||||
ClipboardService,
|
||||
DialogService,
|
||||
SnackBarService
|
||||
];
|
||||
|
||||
import { FileUploadForDirective } from './directives/file-upload-for.directive';
|
||||
const DIRECTIVES = [FileUploadForDirective];
|
||||
import { ImageDirective } from './directives/image.directive';
|
||||
|
||||
import { AlertDialogComponent } from './dialogs/alert.dialog.component';
|
||||
import { ConfirmDialogComponent } from './dialogs/confirm.dialog.component';
|
||||
const DIALOGS = [AlertDialogComponent, ConfirmDialogComponent];
|
||||
|
||||
import { BytesPipe } from './pipes/bytes.pipe';
|
||||
import { LinefeedToHtmlPipe, HtmlToLinefeedPipe } from './pipes/linefeed.pipe';
|
||||
import { DateToStringForChatRoomListPipe } from './pipes/dates.pipe';
|
||||
|
||||
const COMPONENTS = [FileUploadQueueComponent];
|
||||
const DIALOGS = [AlertDialogComponent, ConfirmDialogComponent];
|
||||
const DIRECTIVES = [FileUploadForDirective, ImageDirective];
|
||||
const PIPES = [
|
||||
BytesPipe,
|
||||
LinefeedToHtmlPipe,
|
||||
HtmlToLinefeedPipe,
|
||||
DateToStringForChatRoomListPipe
|
||||
];
|
||||
const SERVICES = [
|
||||
BottomSheetService,
|
||||
ClipboardService,
|
||||
DialogService,
|
||||
SnackBarService
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
|
|
@ -4,10 +4,13 @@
|
|||
|
||||
export * from './lib/animations';
|
||||
|
||||
export * from './lib/components/file-upload-queue.component';
|
||||
|
||||
export * from './lib/dialogs/alert.dialog.component';
|
||||
export * from './lib/dialogs/confirm.dialog.component';
|
||||
|
||||
export * from './lib/directives/file-upload-for.directive';
|
||||
export * from './lib/directives/image.directive';
|
||||
|
||||
export * from './lib/services/bottom-sheet.service';
|
||||
export * from './lib/services/clipboard.service';
|
||||
|
|
Loading…
Reference in New Issue
Block a user