Compare commits
No commits in common. "2a5415bc70cbb2e4fd95dd784edd134506575839" and "2cdab82bfd808d15c14a35f0653e383bd4251199" have entirely different histories.
2a5415bc70
...
2cdab82bfd
|
@ -1,4 +1,4 @@
|
||||||
.parcel-cache/
|
.parcel-cache/
|
||||||
dist/
|
dist/
|
||||||
node_modules/
|
node_modules/
|
||||||
yarn-error.log
|
|
||||||
|
|
|
@ -19,9 +19,7 @@
|
||||||
"@types/bootstrap": "^5.2.3",
|
"@types/bootstrap": "^5.2.3",
|
||||||
"bootstrap": "^5.2",
|
"bootstrap": "^5.2",
|
||||||
"bootstrap-icons": "^1.10.3",
|
"bootstrap-icons": "^1.10.3",
|
||||||
"cash-dom": "^8.1.4",
|
|
||||||
"dexie": "^3.2.2",
|
"dexie": "^3.2.2",
|
||||||
"jsx-dom": "^8.0.3",
|
"jsx-dom": "^8.0.3"
|
||||||
"string-to-color": "^2.2.2"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,10 +8,6 @@ table {
|
||||||
th, td {
|
th, td {
|
||||||
}
|
}
|
||||||
|
|
||||||
tr.session-stripe {
|
|
||||||
background-color: #f4f4f4;
|
|
||||||
}
|
|
||||||
|
|
||||||
.message-from-user {
|
.message-from-user {
|
||||||
max-width: 400px;
|
max-width: 400px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
@ -62,8 +58,10 @@ tr.session-stripe {
|
||||||
}
|
}
|
||||||
|
|
||||||
@include media-breakpoint-down(lg) {
|
@include media-breakpoint-down(lg) {
|
||||||
//Remove padding from container, but keep it on stuff that isn't
|
/*
|
||||||
//navbar or chat messages.
|
Remove padding from container, but keep it on stuff that isn't
|
||||||
|
navbar or chat messages.
|
||||||
|
*/
|
||||||
.container-lg {
|
.container-lg {
|
||||||
padding-left: 0px;
|
padding-left: 0px;
|
||||||
padding-right: 0px;
|
padding-right: 0px;
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import Dexie from 'dexie';
|
import Dexie from 'dexie';
|
||||||
|
|
||||||
export class MsnDatabase extends Dexie {
|
export class MsnDatabase extends Dexie {
|
||||||
entries!: Dexie.Table<BackupEntry, string>;
|
entries!: Dexie.Table<BackupEntry, string>; // number = type of the primkey
|
||||||
|
//...other tables goes here...
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super("MsnDatabase");
|
super("MsnDatabase");
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
import * as bootstrap from 'bootstrap';
|
import * as bootstrap from 'bootstrap';
|
||||||
import stc from 'string-to-color';
|
|
||||||
|
|
||||||
import $ from 'cash-dom';
|
|
||||||
import xslContent from 'bundle-text:../xsl/MessageLog.xsl';
|
import xslContent from 'bundle-text:../xsl/MessageLog.xsl';
|
||||||
import * as ui from './ui';
|
import * as ui from './ui';
|
||||||
import { db } from './db';
|
import { db } from './db';
|
||||||
|
@ -96,26 +94,15 @@ function checkOverflow(elem: HTMLElement) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function processFragment() {
|
function processFragment() {
|
||||||
// add username popover
|
document
|
||||||
$('[data-bs-toggle="popover"]')
|
.querySelectorAll('[data-bs-toggle="popover"]')
|
||||||
.each((_, popover) => new bootstrap.Popover(popover, { trigger: 'focus' }));
|
.forEach(popover => new bootstrap.Popover(popover, { trigger: 'focus' }));
|
||||||
|
|
||||||
// indicate overflow on mobile
|
document.querySelectorAll('.message-content div').forEach(div => {
|
||||||
$('.message-content div').each((_, div) => {
|
if (checkOverflow(div as HTMLElement)) {
|
||||||
if (checkOverflow(div)) {
|
|
||||||
div.parentElement?.classList.add('overflow-icon');
|
div.parentElement?.classList.add('overflow-icon');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// uniquely color usernames
|
|
||||||
const colorMap = new Map(
|
|
||||||
Array.from($('.message-from-user'))
|
|
||||||
.map(el => el?.textContent || '')
|
|
||||||
.map((username) => [username, stc(username)])
|
|
||||||
);
|
|
||||||
|
|
||||||
$('.message-from-user')
|
|
||||||
.each((_, el) => el.style.color = colorMap.get(el.textContent!)!)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function saveToDatabase(filename: string, xml: string) {
|
async function saveToDatabase(filename: string, xml: string) {
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"noImplicitAny": false,
|
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
"target": "es6",
|
"target": "es6",
|
||||||
"module": "es6",
|
"module": "es6",
|
||||||
|
|
|
@ -21,11 +21,11 @@ https://github.com/jerecui/MSNChatHistoryCombiner
|
||||||
|
|
||||||
<!-- variables -->
|
<!-- variables -->
|
||||||
<xsl:variable name='UseZebraStripe'>1</xsl:variable>
|
<xsl:variable name='UseZebraStripe'>1</xsl:variable>
|
||||||
<xsl:variable name='ZebraStripeClass'>session-stripe</xsl:variable>
|
<xsl:variable name='ZebraStripeStyle'>background-color:#e0edff</xsl:variable>
|
||||||
<xsl:variable name='MostRecentSessionFirst'>0</xsl:variable>
|
<xsl:variable name='MostRecentSessionFirst'>0</xsl:variable>
|
||||||
|
|
||||||
<xsl:template match="Log">
|
<xsl:template match="Log">
|
||||||
<table id='BodyTable' class="table border">
|
<table id='BodyTable' class="table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="d-lg-none message-mobile-date-time">
|
<th class="d-lg-none message-mobile-date-time">
|
||||||
|
@ -34,10 +34,10 @@ https://github.com/jerecui/MSNChatHistoryCombiner
|
||||||
<th class="d-none d-lg-table-cell">
|
<th class="d-none d-lg-table-cell">
|
||||||
<xsl:value-of select="$ColumnHeader_Date"/>
|
<xsl:value-of select="$ColumnHeader_Date"/>
|
||||||
</th>
|
</th>
|
||||||
<th class="d-none d-lg-table-cell border-end">
|
<th class="d-none d-lg-table-cell">
|
||||||
<xsl:value-of select="$ColumnHeader_Time"/>
|
<xsl:value-of select="$ColumnHeader_Time"/>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th class="message-from-user">
|
||||||
<xsl:value-of select="$ColumnHeader_From"/>
|
<xsl:value-of select="$ColumnHeader_From"/>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
|
@ -73,7 +73,7 @@ https://github.com/jerecui/MSNChatHistoryCombiner
|
||||||
<tr>
|
<tr>
|
||||||
<xsl:call-template name="CommonMessageProcessing" />
|
<xsl:call-template name="CommonMessageProcessing" />
|
||||||
|
|
||||||
<td class="message-from-user" ><xsl:apply-templates select="From/User"/> </td>
|
<td class="message-from-user"><xsl:apply-templates select="From/User"/> </td>
|
||||||
<td class="message-content">
|
<td class="message-content">
|
||||||
<div class="overflow-auto">
|
<div class="overflow-auto">
|
||||||
<xsl:value-of select="Text"/>
|
<xsl:value-of select="Text"/>
|
||||||
|
@ -111,8 +111,8 @@ https://github.com/jerecui/MSNChatHistoryCombiner
|
||||||
<!-- zebra-stripe the sessions -->
|
<!-- zebra-stripe the sessions -->
|
||||||
<xsl:if test="$UseZebraStripe = 1">
|
<xsl:if test="$UseZebraStripe = 1">
|
||||||
<xsl:if test="(@SessionID mod 2) = 1">
|
<xsl:if test="(@SessionID mod 2) = 1">
|
||||||
<xsl:attribute name="class">
|
<xsl:attribute name="style">
|
||||||
<xsl:value-of select="$ZebraStripeClass"/>
|
<xsl:value-of select="$ZebraStripeStyle"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
@ -130,7 +130,7 @@ https://github.com/jerecui/MSNChatHistoryCombiner
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td class="d-none d-lg-table-cell message-date"> <xsl:value-of select="@Date"/> </td>
|
<td class="d-none d-lg-table-cell message-date"> <xsl:value-of select="@Date"/> </td>
|
||||||
<td class="d-none d-lg-table-cell message-time border-end"> <xsl:value-of select="@Time"/> </td>
|
<td class="d-none d-lg-table-cell message-time"> <xsl:value-of select="@Time"/> </td>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
|
||||||
|
|
47
yarn.lock
47
yarn.lock
|
@ -866,11 +866,6 @@ caniuse-lite@^1.0.30001400:
|
||||||
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001441.tgz#987437b266260b640a23cd18fbddb509d7f69f3e"
|
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001441.tgz#987437b266260b640a23cd18fbddb509d7f69f3e"
|
||||||
integrity sha512-OyxRR4Vof59I3yGWXws6i908EtGbMzVUi3ganaZQHmydk1iwDhRnvaPG2WaR0KcqrDFKrxVZHULT396LEPhXfg==
|
integrity sha512-OyxRR4Vof59I3yGWXws6i908EtGbMzVUi3ganaZQHmydk1iwDhRnvaPG2WaR0KcqrDFKrxVZHULT396LEPhXfg==
|
||||||
|
|
||||||
cash-dom@^8.1.4:
|
|
||||||
version "8.1.4"
|
|
||||||
resolved "https://registry.yarnpkg.com/cash-dom/-/cash-dom-8.1.4.tgz#445c2a509cffa8b1c99094634418b4b439d57718"
|
|
||||||
integrity sha512-bFLMk+r3lv+sDwxlAFfRlMxpRls7zMnSQePVpNouwnpm9G4MbLYZZtIUG2urUgfmIaKlc/hqG8o7yZg3+nFKRA==
|
|
||||||
|
|
||||||
chalk@^2.0.0:
|
chalk@^2.0.0:
|
||||||
version "2.4.2"
|
version "2.4.2"
|
||||||
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
|
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
|
||||||
|
@ -937,11 +932,6 @@ color-name@~1.1.4:
|
||||||
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
|
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
|
||||||
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
|
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
|
||||||
|
|
||||||
colornames@^1.1.1:
|
|
||||||
version "1.1.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/colornames/-/colornames-1.1.1.tgz#f8889030685c7c4ff9e2a559f5077eb76a816f96"
|
|
||||||
integrity sha512-/pyV40IrsdulWv+wFPmERh9k/mjsPZ64yUMDmWrtj/k1nmgrzzIENWKdaVKyBbvFdQWqkcaRxr+polCo3VMe7A==
|
|
||||||
|
|
||||||
commander@^2.20.0:
|
commander@^2.20.0:
|
||||||
version "2.20.3"
|
version "2.20.3"
|
||||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
|
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
|
||||||
|
@ -1122,11 +1112,6 @@ has-flag@^4.0.0:
|
||||||
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
|
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
|
||||||
integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
|
integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
|
||||||
|
|
||||||
hex-rgb@^4.1.0:
|
|
||||||
version "4.3.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/hex-rgb/-/hex-rgb-4.3.0.tgz#af5e974e83bb2fefe44d55182b004ec818c07776"
|
|
||||||
integrity sha512-Ox1pJVrDCyGHMG9CFg1tmrRUMRPRsAWYc/PinY0XzJU4K7y7vjNoLKIQ7BR5UJMCxNN8EM1MNDmHWA/B3aZUuw==
|
|
||||||
|
|
||||||
htmlnano@^2.0.0:
|
htmlnano@^2.0.0:
|
||||||
version "2.0.3"
|
version "2.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/htmlnano/-/htmlnano-2.0.3.tgz#50ee639ed63357d4a6c01309f52a35892e4edc2e"
|
resolved "https://registry.yarnpkg.com/htmlnano/-/htmlnano-2.0.3.tgz#50ee639ed63357d4a6c01309f52a35892e4edc2e"
|
||||||
|
@ -1294,21 +1279,6 @@ lmdb@2.5.2:
|
||||||
"@lmdb/lmdb-linux-x64" "2.5.2"
|
"@lmdb/lmdb-linux-x64" "2.5.2"
|
||||||
"@lmdb/lmdb-win32-x64" "2.5.2"
|
"@lmdb/lmdb-win32-x64" "2.5.2"
|
||||||
|
|
||||||
lodash.padend@^4.6.1:
|
|
||||||
version "4.6.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/lodash.padend/-/lodash.padend-4.6.1.tgz#53ccba047d06e158d311f45da625f4e49e6f166e"
|
|
||||||
integrity sha512-sOQs2aqGpbl27tmCS1QNZA09Uqp01ZzWfDUoD+xzTii0E7dSQfRKcRetFwa+uXaxaqL+TKm7CgD2JdKP7aZBSw==
|
|
||||||
|
|
||||||
lodash.trimstart@^4.5.1:
|
|
||||||
version "4.5.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/lodash.trimstart/-/lodash.trimstart-4.5.1.tgz#8ff4dec532d82486af59573c39445914e944a7f1"
|
|
||||||
integrity sha512-b/+D6La8tU76L/61/aN0jULWHkT0EeJCmVstPBn/K9MtD2qBW83AsBNrr63dKuWYwVMO7ucv13QNO/Ek/2RKaQ==
|
|
||||||
|
|
||||||
lodash.words@^4.2.0:
|
|
||||||
version "4.2.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/lodash.words/-/lodash.words-4.2.0.tgz#5ecfeaf8ecf8acaa8e0c8386295f1993c9cf4036"
|
|
||||||
integrity sha512-mXxqd8Yx9BGPij3lZKFSdOsjOTbL4krbCCp9slEozaN4EMppA2dFmK/f8HeohodprY6W0vOdiQ5WFgPaTI75xQ==
|
|
||||||
|
|
||||||
mdn-data@2.0.14:
|
mdn-data@2.0.14:
|
||||||
version "2.0.14"
|
version "2.0.14"
|
||||||
resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.14.tgz#7113fc4281917d63ce29b43446f701e68c25ba50"
|
resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.14.tgz#7113fc4281917d63ce29b43446f701e68c25ba50"
|
||||||
|
@ -1495,11 +1465,6 @@ resolve-from@^4.0.0:
|
||||||
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6"
|
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6"
|
||||||
integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==
|
integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==
|
||||||
|
|
||||||
rgb-hex@^3.0.0:
|
|
||||||
version "3.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/rgb-hex/-/rgb-hex-3.0.0.tgz#eab0168cc1279563b18a14605315389142e2e487"
|
|
||||||
integrity sha512-8h7ZcwxCBDKvchSWbWngJuSCqJGQ6nDuLLg+QcRyQDbX9jMWt+PpPeXAhSla0GOooEomk3lCprUpGkMdsLjKyg==
|
|
||||||
|
|
||||||
safe-buffer@^5.0.1:
|
safe-buffer@^5.0.1:
|
||||||
version "5.2.1"
|
version "5.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
|
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
|
||||||
|
@ -1542,18 +1507,6 @@ stable@^0.1.8:
|
||||||
resolved "https://registry.yarnpkg.com/stable/-/stable-0.1.8.tgz#836eb3c8382fe2936feaf544631017ce7d47a3cf"
|
resolved "https://registry.yarnpkg.com/stable/-/stable-0.1.8.tgz#836eb3c8382fe2936feaf544631017ce7d47a3cf"
|
||||||
integrity sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==
|
integrity sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==
|
||||||
|
|
||||||
string-to-color@^2.2.2:
|
|
||||||
version "2.2.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/string-to-color/-/string-to-color-2.2.2.tgz#46210bf7777dc9198dcdf997bd18ae6749cc9a73"
|
|
||||||
integrity sha512-XeA2goP7PNsSlz8RRn6KhYswnMf5Tl+38ajfy8n4oZJyMGC4qqKgHNHsZ/3qwvr42NRIjf9eSr721SyetDeMkA==
|
|
||||||
dependencies:
|
|
||||||
colornames "^1.1.1"
|
|
||||||
hex-rgb "^4.1.0"
|
|
||||||
lodash.padend "^4.6.1"
|
|
||||||
lodash.trimstart "^4.5.1"
|
|
||||||
lodash.words "^4.2.0"
|
|
||||||
rgb-hex "^3.0.0"
|
|
||||||
|
|
||||||
supports-color@^5.3.0:
|
supports-color@^5.3.0:
|
||||||
version "5.5.0"
|
version "5.5.0"
|
||||||
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
|
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
|
||||||
|
|
Loading…
Reference in New Issue