major update
front and middleware
This commit is contained in:
1 parent
234ed5989a
commit
07ce9d56ca
51 files changed
+1732
-592
No files matched your search
+138
-14
@@ -1,31 +1,155 @@
|
||||
import { BrowserWindow, dialog, ipcMain } from 'electron'
|
||||
import { Convos, scan } from '../ts'
|
||||
import utf8 from 'utf8'
|
||||
|
||||
import { readFileSync } from 'fs'
|
||||
import rawFacebookZipsToIndexedBlobs, { EntryTypes, FileType } from '../ts/zips'
|
||||
import {
|
||||
connectDB,
|
||||
getInbox,
|
||||
getInboxes,
|
||||
getMedia,
|
||||
getMessages,
|
||||
getStats,
|
||||
importInbox,
|
||||
importRawEntry,
|
||||
} from '../ts/Database'
|
||||
import Inbox from '../ts/Inbox'
|
||||
|
||||
import { MAIN_TO_RENDERER, RENDERER_TO_MAIN } from '../ts/types/global'
|
||||
import { pathOriginalToName } from '../ts/normalizers'
|
||||
|
||||
let listeners = (mainWindow: BrowserWindow) => {
|
||||
function send(channel: string, ...args: any[]) {
|
||||
mainWindow.webContents.send(channel, ...args)
|
||||
}
|
||||
|
||||
let events = {}
|
||||
|
||||
for (const chanel in events) ipcMain.on(chanel, events[chanel])
|
||||
|
||||
let handles = {
|
||||
'get-paths': async e => {
|
||||
return await dialog.showOpenDialog({
|
||||
properties: ['openDirectory', 'multiSelections'],
|
||||
[RENDERER_TO_MAIN.GET_ZIP_PATHS]: e => {
|
||||
return dialog.showOpenDialog({
|
||||
properties: ['openFile', 'multiSelections'],
|
||||
filters: [{ name: 'Zip files', extensions: ['zip'] }],
|
||||
})
|
||||
},
|
||||
'scan': async (e, { paths }) => {
|
||||
return await scan(paths, {}, (...progress) => {
|
||||
mainWindow.webContents.send('update-progress', progress)
|
||||
}).then(convosIds => {
|
||||
mainWindow.webContents.send('update-convos-ids', convosIds)
|
||||
[RENDERER_TO_MAIN.GET_DB_PATH]: e => {
|
||||
return dialog.showSaveDialog({
|
||||
filters: [{ name: 'Database', extensions: ['db'] }],
|
||||
})
|
||||
},
|
||||
[RENDERER_TO_MAIN.IMPORT_ZIPS]: async (e, { paths, savePath }) => {
|
||||
let inboxes: { [key: string]: Inbox } = {}
|
||||
|
||||
return convosIds
|
||||
async function handler(entryName: string, blob: Buffer, type: EntryTypes) {
|
||||
let out = importRawEntry(entryName, blob, type)
|
||||
|
||||
if (out) {
|
||||
let id = out.raw.thread_path.split('/')[1]
|
||||
|
||||
if (id in inboxes) {
|
||||
inboxes[id].append(out.raw)
|
||||
} else {
|
||||
inboxes[id] = new Inbox(entryName, out.raw)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
connectDB(savePath)
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
send(MAIN_TO_RENDERER.UPDATE_PROGRESS, ['main', 'Extraxting zip files', 1])
|
||||
// send(MAIN_TO_RENDERER.UPDATE_PROGRESS, ['sub', 'Extraxting zip files', 0])
|
||||
|
||||
const progress = (title: string, percent: number) => {
|
||||
send(MAIN_TO_RENDERER.UPDATE_PROGRESS, ['sub', title, percent])
|
||||
}
|
||||
|
||||
rawFacebookZipsToIndexedBlobs(paths, handler, progress).then(() => {
|
||||
send(MAIN_TO_RENDERER.UPDATE_PROGRESS, ['main', 'Analyzing conversations', 2])
|
||||
// send(MAIN_TO_RENDERER.UPDATE_PROGRESS, ['sub', 'Analyzing conversations', 0])
|
||||
|
||||
const inboxList = Object.values(inboxes),
|
||||
totalInboxes = inboxList.length
|
||||
|
||||
// estimate the owner between all inboxes,
|
||||
// by getting the most common participant
|
||||
let nameCount = Object.entries(
|
||||
inboxList
|
||||
// .filter(i => i.meta?.type == 'Regular') // ignore groups
|
||||
.reduce((sum, inbox) => {
|
||||
// count participant occurrences
|
||||
inbox.participants.forEach(({ name }) =>
|
||||
sum[name] ? sum[name]++ : (sum[name] = 1)
|
||||
)
|
||||
return sum
|
||||
}, {} as { [name: string]: number })
|
||||
),
|
||||
rawOwner = nameCount.reduce(
|
||||
// reduce to the most common participant
|
||||
([name, count], next) => (next[1] > count ? next : [name, count]),
|
||||
['', 0]
|
||||
)[0],
|
||||
owner = utf8.decode(rawOwner)
|
||||
|
||||
console.log(`[owner] ${owner}`)
|
||||
|
||||
inboxList.forEach((inbox, i) => {
|
||||
let overall = (i / totalInboxes) * 100
|
||||
send(MAIN_TO_RENDERER.UPDATE_PROGRESS, [
|
||||
'sub',
|
||||
`Analyzing (${inbox.title})`,
|
||||
overall,
|
||||
])
|
||||
inbox.finalize(owner)
|
||||
})
|
||||
|
||||
send(MAIN_TO_RENDERER.UPDATE_PROGRESS, ['main', 'Saving conversations', 3])
|
||||
|
||||
inboxList.forEach((inbox, i) => {
|
||||
importInbox(inbox, (title, percent) => {
|
||||
let overall = ((i + percent) / totalInboxes) * 100
|
||||
send(MAIN_TO_RENDERER.UPDATE_PROGRESS, ['sub', `Saving (${title})`, overall])
|
||||
})
|
||||
})
|
||||
|
||||
send(MAIN_TO_RENDERER.UPDATE_PROGRESS, ['sub', 'Saving messages', 100])
|
||||
resolve(getInboxes())
|
||||
})
|
||||
})
|
||||
},
|
||||
'get-convo': async (e, id) => {
|
||||
if (id in Convos) return JSON.stringify(Convos[id])
|
||||
else return null
|
||||
[RENDERER_TO_MAIN.IMPORT_DB]: (e, path) => {
|
||||
connectDB(path)
|
||||
return getInboxes()
|
||||
},
|
||||
[RENDERER_TO_MAIN.GET_INBOXES]: e => {
|
||||
let payload = getInboxes()
|
||||
if (!payload) console.log(`[api] getInboxes() empty result`)
|
||||
return payload
|
||||
},
|
||||
[RENDERER_TO_MAIN.GET_INBOX]: (e, id) => {
|
||||
let payload = getInbox(id)
|
||||
if (!payload) console.log(`[api] getInbox(${id}) empty result`)
|
||||
return payload
|
||||
},
|
||||
[RENDERER_TO_MAIN.GET_MESSAGES]: (e, { id, from, to }) => {
|
||||
let payload = getMessages(id, from, to)
|
||||
if (!payload) console.log(`[api] getMessages(${id}, ${from}, ${to}) empty result`)
|
||||
return payload
|
||||
},
|
||||
[RENDERER_TO_MAIN.GET_MEDIA]: (e, { id, type, uri }) => {
|
||||
let segments = uri.split('/'),
|
||||
file = segments[segments.length - 1],
|
||||
inbox = segments[1]
|
||||
|
||||
let payload = getMedia(type, file, inbox)
|
||||
if (!payload) console.log(`[api] getMedia(${type}, ${file}, ${inbox}) empty result`)
|
||||
return payload
|
||||
},
|
||||
[RENDERER_TO_MAIN.GET_STATS]: (e, { id, stat }) => {
|
||||
let payload = getStats(id, stat)
|
||||
if (!payload) console.log(`[api] getStats(${id}, ${stat}) empty result`)
|
||||
return payload
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
+5
-1
@@ -1,6 +1,7 @@
|
||||
import { app, BrowserWindow } from 'electron'
|
||||
import path from 'path'
|
||||
import listeners from './listeners'
|
||||
import { closeDB } from '../ts/Database'
|
||||
|
||||
let mainWindow: Electron.BrowserWindow | null
|
||||
|
||||
@@ -11,11 +12,13 @@ function createWindow() {
|
||||
icon: 'assets/icon.png',
|
||||
backgroundColor: '#efe9f4',
|
||||
webPreferences: {
|
||||
nodeIntegration: false,
|
||||
nodeIntegration: true,
|
||||
contextIsolation: true,
|
||||
preload: path.join(__dirname, 'preload.js'),
|
||||
},
|
||||
})
|
||||
// mainWindow.loadURL('http://localhost:8080')
|
||||
// mainWindow.webContents.openDevTools()
|
||||
|
||||
mainWindow.loadFile('build/index.html')
|
||||
|
||||
@@ -32,6 +35,7 @@ app.on('ready', createWindow)
|
||||
app.on('window-all-closed', () => {
|
||||
if (process.platform !== 'darwin') {
|
||||
app.quit()
|
||||
closeDB()
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Vendored
+1
@@ -1,4 +1,5 @@
|
||||
import { events, invoke } from '../../electron/preload'
|
||||
import { E_DATABASE } from '../events'
|
||||
|
||||
declare global {
|
||||
// eslint-disable-next-line
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
import { createContext } from 'react'
|
||||
import Convo from '../../ts/Convo'
|
||||
|
||||
export default createContext([] as { id: Convo['id']; title: Convo['title'] }[])
|
||||
@@ -1,7 +0,0 @@
|
||||
import { createContext } from 'react'
|
||||
import Convo from '../../ts/Convo'
|
||||
|
||||
export default createContext<[[Convo | null, any], [[number, number], any]]>([
|
||||
[null, undefined],
|
||||
[[0, Infinity], undefined],
|
||||
])
|
||||
@@ -0,0 +1,9 @@
|
||||
import { createContext } from 'react'
|
||||
import { Inbox } from '../Sources'
|
||||
|
||||
export default createContext<[Inbox | null, any, [number, number], any]>([
|
||||
null,
|
||||
undefined,
|
||||
[-1, -1],
|
||||
undefined,
|
||||
])
|
||||
@@ -0,0 +1,5 @@
|
||||
import { createContext } from 'react'
|
||||
|
||||
export type inboxList = { id: string; title: string; category: string }[]
|
||||
|
||||
export default createContext<[inboxList, any]>([[], undefined])
|
||||
+50
-37
@@ -2,19 +2,19 @@ import { createContext, useContext, useEffect, useState } from 'react'
|
||||
|
||||
import Browse from './components/Browse/Browse'
|
||||
import ConvoSelector from './components/ConvoSelector/ConvoSelector'
|
||||
import Media from './components/Media/Media'
|
||||
import Search from './components/Search/Search'
|
||||
// import Media from './components/Media/Media'
|
||||
// import Search from './components/Search/Search'
|
||||
import Stats from './components/Stats/Stats'
|
||||
import Intro from './components/Intro/Intro'
|
||||
import Menu from './components/Menu/Menu'
|
||||
|
||||
import contextCurrentConvo from './Contexts/contextCurrentConvo'
|
||||
import contextConvos from './Contexts/contextConvos'
|
||||
|
||||
import { dateToUnixExtended } from './PartialConvo'
|
||||
import Convo from '../ts/Convo'
|
||||
import contextCurrentInbox from './Contexts/contextCurrentInbox'
|
||||
import contextInboxes, { inboxList } from './Contexts/contextInboxes'
|
||||
|
||||
import './index.css'
|
||||
import { RENDERER_TO_MAIN } from '../ts/types/global'
|
||||
import { Inbox } from './Sources'
|
||||
import { E_DATABASE, eDatabase } from './events'
|
||||
|
||||
const contextPane = createContext('')
|
||||
|
||||
@@ -22,61 +22,74 @@ function Pane({ children, id }: any) {
|
||||
const pane = useContext(contextPane)
|
||||
|
||||
return (
|
||||
<div
|
||||
className="pane"
|
||||
style={{ display: pane == id ? 'initial' : 'none' }}
|
||||
>
|
||||
<div className="pane" style={{ display: pane == id ? 'initial' : 'none' }}>
|
||||
{children}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default function Main() {
|
||||
const [pane, setPane] = useState('selector'),
|
||||
[convos, setConvos] = useState([])
|
||||
const [pane, setPane] = useState('import')
|
||||
|
||||
const [currentConvo, setCurrentConvo] = useState<Convo | null>(null)
|
||||
const [inboxes, setInboxes] = useState<inboxList>([]),
|
||||
[currentInbox, setCurrentInbox] = useState<Inbox | null>(null)
|
||||
|
||||
let [range, setRange] = useState<[number, number]>([
|
||||
dateToUnixExtended(new Date()) - 1.296e13,
|
||||
dateToUnixExtended(new Date()),
|
||||
])
|
||||
let [range, setRange] = useState<[number, number]>([0, 0])
|
||||
|
||||
useEffect(() => {
|
||||
// TODO: check if there are any already scanned convos
|
||||
window.events.on('update-convos-ids', convos => setConvos(convos))
|
||||
}, [])
|
||||
if (currentInbox)
|
||||
setRange([currentInbox.meta.lastMessage - 86400, currentInbox.meta.lastMessage])
|
||||
}, [currentInbox])
|
||||
|
||||
async function changeConvo(id: string) {
|
||||
let data = await window.invoke('get-convo', id)
|
||||
data = JSON.parse(data)
|
||||
setCurrentConvo(data)
|
||||
useEffect(() => {
|
||||
if (currentInbox) currentInbox.setRange(range)
|
||||
}, [range])
|
||||
|
||||
useEffect(() => {
|
||||
eDatabase.addEventListener(E_DATABASE.DB_READY, (e: Event) => {
|
||||
let data = (e as CustomEvent).detail as inboxList
|
||||
setInboxes(data)
|
||||
})
|
||||
})
|
||||
|
||||
async function changeInbox(id: string) {
|
||||
if (id == 'reset') {
|
||||
setCurrentInbox(null)
|
||||
setInboxes([])
|
||||
return
|
||||
}
|
||||
if (inboxes.filter(i => i.id == id).length != 1) return
|
||||
|
||||
let raw = await window.invoke(RENDERER_TO_MAIN.GET_INBOX, id),
|
||||
inbox = new Inbox(raw)
|
||||
|
||||
if (currentInbox) currentInbox.resetRange()
|
||||
inbox.setRange(range)
|
||||
|
||||
console.log('Changing inbox', inbox)
|
||||
|
||||
setCurrentInbox(inbox)
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Menu setPane={id => setPane(id)} initial={pane} />
|
||||
<Menu setPane={id => setPane(id)} initial={pane} dbReady={currentInbox != null} />
|
||||
|
||||
<div className="container">
|
||||
<contextConvos.Provider value={convos}>
|
||||
<contextCurrentConvo.Provider
|
||||
value={[
|
||||
[currentConvo, changeConvo],
|
||||
[range, setRange],
|
||||
]}
|
||||
>
|
||||
<contextInboxes.Provider value={[inboxes, setInboxes]}>
|
||||
<contextCurrentInbox.Provider value={[currentInbox, changeInbox, range, setRange]}>
|
||||
<contextPane.Provider value={pane}>
|
||||
<Pane id="convo" children={<Browse />} />
|
||||
<Pane id="media" children={<Media />} />
|
||||
<Pane id="search" children={<Search />} />
|
||||
{/* <Pane id="media" children={<Media />} /> */}
|
||||
{/* <Pane id="search" children={<Search />} /> */}
|
||||
<Pane id="stats" children={<Stats />} />
|
||||
|
||||
<Pane id="import" children={<Intro />} />
|
||||
<Pane id="selector" children={<ConvoSelector />} />
|
||||
{/* TODO: settings */}
|
||||
</contextPane.Provider>
|
||||
</contextCurrentConvo.Provider>
|
||||
</contextConvos.Provider>
|
||||
</contextCurrentInbox.Provider>
|
||||
</contextInboxes.Provider>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
+154
@@ -0,0 +1,154 @@
|
||||
import { RENDERER_TO_MAIN } from '../ts/types/global'
|
||||
|
||||
export class Member {
|
||||
name: string
|
||||
participates: boolean
|
||||
self: boolean
|
||||
|
||||
constructor(raw) {
|
||||
this.name = raw.name
|
||||
this.participates = !!raw.participates
|
||||
this.self = !!raw.self
|
||||
}
|
||||
}
|
||||
|
||||
export class Inbox {
|
||||
id: string
|
||||
category: string
|
||||
title: string
|
||||
thread_path: string
|
||||
image?: {
|
||||
uri: string
|
||||
creation_timestamp: number
|
||||
}
|
||||
is_still_participant: boolean
|
||||
participants: Member[]
|
||||
|
||||
joinable_mode?: {
|
||||
mode: number
|
||||
link: string
|
||||
}
|
||||
magic_words?: any[]
|
||||
meta: any
|
||||
messageCount: number
|
||||
|
||||
messages: Message[]
|
||||
range: [number, number]
|
||||
|
||||
static mediaKeys = ['photos', 'gifs', 'videos', 'audio_files', 'files', 'sticker', 'share']
|
||||
|
||||
constructor(raw) {
|
||||
this.id = raw.id
|
||||
this.category = raw.category
|
||||
this.title = raw.title
|
||||
this.thread_path = raw.thread_path
|
||||
this.is_still_participant = !!raw.is_still_participant
|
||||
this.messageCount = raw.messageCount
|
||||
this.messages = []
|
||||
this.range = [-1, -1]
|
||||
|
||||
this.participants = JSON.parse(raw.participants).map(p => new Member(p))
|
||||
this.joinable_mode = JSON.parse(raw.joinable_mode)
|
||||
this.meta = JSON.parse(raw.meta)
|
||||
|
||||
if (raw.image) this.image = JSON.parse(raw.image)
|
||||
if (raw.magic_words) this.magic_words = JSON.parse(raw.magic_words)
|
||||
}
|
||||
|
||||
async setRange(range: [number, number]) {
|
||||
let [from, to] = range
|
||||
|
||||
if (from < this.meta.firstMessage) from = this.meta.firstMessage
|
||||
if (to > this.meta.lastMessage) to = this.meta.lastMessage
|
||||
|
||||
if (from > to || from == to) {
|
||||
from = this.meta.firstMessage
|
||||
to = this.meta.lastMessage
|
||||
}
|
||||
|
||||
let rawMessages = await window.invoke(RENDERER_TO_MAIN.GET_MESSAGES, {
|
||||
id: this.id,
|
||||
from: range[0],
|
||||
to: range[1],
|
||||
})
|
||||
|
||||
this.messages = rawMessages
|
||||
.map(m => new Message(m))
|
||||
.sort((a, b) => a.timestamp_ms - b.timestamp_ms)
|
||||
this.range = range
|
||||
}
|
||||
|
||||
resetRange() {
|
||||
this.range = [-1, -1]
|
||||
this.messages = []
|
||||
}
|
||||
|
||||
isOwner(name: string) {
|
||||
return this.participants.filter(p => p.name == name && p.self).length == 1
|
||||
}
|
||||
|
||||
getStats(statName: string) {
|
||||
return window
|
||||
.invoke(RENDERER_TO_MAIN.GET_STATS, {
|
||||
id: this.id,
|
||||
stat: statName,
|
||||
})
|
||||
.then(raw => JSON.parse(raw.content))
|
||||
}
|
||||
}
|
||||
|
||||
export class Message {
|
||||
inbox: string
|
||||
sender_name: string
|
||||
timestamp_ms: number
|
||||
is_geoblocked_for_viewer: boolean
|
||||
|
||||
content: string
|
||||
is_unsent: boolean
|
||||
|
||||
ip?: string
|
||||
call_duration?: number
|
||||
missed?: boolean
|
||||
|
||||
photos?: { uri: string; creation_timestamp: number }[]
|
||||
gifs?: { uri: string }[]
|
||||
videos?: { uri: string; creation_timestamp: number }[]
|
||||
audio_files?: { uri: string; creation_timestamp: number }[]
|
||||
files?: { uri: string; creation_timestamp: number }[]
|
||||
sticker?: { uri: string; ai_stickers: { [k: string]: unknown }[] }
|
||||
share?: { link?: string; share_text?: string }
|
||||
reactions?: { reaction: string; actor: string }[]
|
||||
|
||||
constructor(raw) {
|
||||
this.inbox = raw.inbox
|
||||
this.sender_name = raw.sender_name
|
||||
this.timestamp_ms = raw.timestamp_ms
|
||||
this.is_geoblocked_for_viewer = !!raw.is_geoblocked_for_viewer
|
||||
|
||||
this.content = raw.content
|
||||
this.is_unsent = !!raw.is_unsent
|
||||
|
||||
if (raw.ip) this.ip = raw.ip
|
||||
if (raw.call_duration) this.call_duration = raw.call_duration
|
||||
if (raw.missed) this.missed = raw.missed
|
||||
|
||||
if (raw.photos) this.photos = JSON.parse(raw.photos)
|
||||
if (raw.gifs) this.gifs = JSON.parse(raw.gifs)
|
||||
if (raw.videos) this.videos = JSON.parse(raw.videos)
|
||||
if (raw.audio_files) this.audio_files = JSON.parse(raw.audio_files)
|
||||
if (raw.files) this.files = JSON.parse(raw.files)
|
||||
if (raw.sticker) this.sticker = JSON.parse(raw.sticker)
|
||||
if (raw.share) this.share = JSON.parse(raw.share)
|
||||
|
||||
if (raw.reactions) {
|
||||
let parsed = JSON.parse(raw.reactions)
|
||||
|
||||
// fix older black emojis for newer ones
|
||||
parsed.forEach(r => {
|
||||
if (r.reaction == '❤') r.reaction = '❤️'
|
||||
})
|
||||
|
||||
this.reactions = parsed
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
import { useEffect, useState } from 'react'
|
||||
import { RENDERER_TO_MAIN } from '../../../ts/types/global'
|
||||
|
||||
type mediaType = 'photos' | 'gifs' | 'videos' | 'audio_files' | 'files' | 'sticker' | 'group_photos'
|
||||
|
||||
function BlobMedia({ id, uri, mediaType }: { id?: string; uri: string; mediaType: mediaType }) {
|
||||
const [mediaUrl, setMediaUrl] = useState<string | null>(null)
|
||||
|
||||
useEffect(() => {
|
||||
let isMounted = true
|
||||
|
||||
async function fetchMediaBlob() {
|
||||
try {
|
||||
console.log('Requesting media', { uri, mediaType })
|
||||
|
||||
const arrayBuffer = await window.invoke(RENDERER_TO_MAIN.GET_MEDIA, {
|
||||
type: mediaType,
|
||||
uri,
|
||||
})
|
||||
|
||||
console.log('Got media', arrayBuffer)
|
||||
|
||||
if (isMounted) {
|
||||
const blob = new Blob([arrayBuffer.data]),
|
||||
url = URL.createObjectURL(blob)
|
||||
|
||||
setMediaUrl(url)
|
||||
}
|
||||
} catch (error) {
|
||||
setMediaUrl('')
|
||||
console.error('Failed to fetch media blob:', error)
|
||||
}
|
||||
}
|
||||
|
||||
fetchMediaBlob()
|
||||
|
||||
// Cleanup function to revoke the object URL
|
||||
return () => {
|
||||
isMounted = false
|
||||
if (mediaUrl)
|
||||
if (mediaUrl != '') {
|
||||
URL.revokeObjectURL(mediaUrl)
|
||||
setMediaUrl(null)
|
||||
}
|
||||
}
|
||||
}, [uri])
|
||||
|
||||
return (
|
||||
<>
|
||||
{mediaUrl &&
|
||||
{
|
||||
photos: <img src={mediaUrl} alt="Photo" />,
|
||||
gifs: <img src={mediaUrl} alt="GIF" />,
|
||||
videos: <video src={mediaUrl} controls />,
|
||||
audio_files: <audio src={mediaUrl} controls />,
|
||||
files: (
|
||||
<a href={mediaUrl} download>
|
||||
Download File
|
||||
</a>
|
||||
),
|
||||
sticker: <img src={mediaUrl} alt="Sticker" />,
|
||||
}[mediaType]}
|
||||
{mediaUrl == null ? 'Loading...' : mediaUrl == '' && 'Failed'}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default BlobMedia
|
||||
+178
-120
@@ -1,99 +1,165 @@
|
||||
import { useContext, useEffect, useState } from 'react'
|
||||
import Convo from '../../../ts/Convo'
|
||||
import Message from '../../../ts/Message'
|
||||
import { messageMedia } from '../../../ts/types/takeout'
|
||||
import contextCurrentConvo from '../../Contexts/contextCurrentConvo'
|
||||
import PartialConvo from '../../PartialConvo'
|
||||
|
||||
import './browse.sass'
|
||||
import contextCurrentInbox from '../../Contexts/contextCurrentInbox'
|
||||
import { Message, Inbox } from '../../Sources'
|
||||
import BlobMedia from '../BlobMedia/BlobMedia'
|
||||
import { Alert, Button, Popover } from '@mui/material'
|
||||
|
||||
function Media({ type, contents }: { type: string; contents: messageMedia[] }) {
|
||||
// TODO: add image preview
|
||||
return (
|
||||
<div className={'media ' + type}>
|
||||
{{
|
||||
photos: contents.map(p => (
|
||||
<img key={p.uri} src={'file://' + p.uri} />
|
||||
)),
|
||||
gifs: contents.map(g => (
|
||||
<img key={g.uri} src={'file://' + g.uri} />
|
||||
)),
|
||||
videos: contents.map(v => (
|
||||
<video controls>
|
||||
<source src={v.uri} />
|
||||
</video>
|
||||
)),
|
||||
audios: contents.map(a => (
|
||||
<audio controls>
|
||||
<source src={a.uri} />
|
||||
</audio>
|
||||
)),
|
||||
}[type] ?? (
|
||||
<span>
|
||||
{type}: {JSON.stringify(contents)}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
function Media({ message }: { message: Message }) {
|
||||
const { photos, gifs, videos, audio_files, files, sticker, share } = message
|
||||
|
||||
let children: JSX.Element[] = []
|
||||
|
||||
if (photos) {
|
||||
children.push(...photos.map(p => <BlobMedia uri={p.uri} mediaType="photos" />))
|
||||
}
|
||||
|
||||
if (gifs) {
|
||||
children.push(...gifs.map(g => <BlobMedia uri={g.uri} mediaType="gifs" />))
|
||||
}
|
||||
|
||||
if (videos) {
|
||||
children.push(...videos.map(v => <BlobMedia uri={v.uri} mediaType="videos" />))
|
||||
}
|
||||
|
||||
if (audio_files) {
|
||||
children.push(...audio_files.map(a => <BlobMedia uri={a.uri} mediaType="audio_files" />))
|
||||
}
|
||||
|
||||
if (files) {
|
||||
children.push(...files.map(f => <BlobMedia uri={f.uri} mediaType="files" />))
|
||||
}
|
||||
|
||||
if (sticker) {
|
||||
children.push(<BlobMedia uri={sticker.uri} mediaType="sticker" />)
|
||||
}
|
||||
|
||||
if (share) {
|
||||
children.push(<i>{share.link}</i>)
|
||||
}
|
||||
|
||||
return <div className="media">{children}</div>
|
||||
}
|
||||
|
||||
function MessageBubble({
|
||||
message: { sender, content, time, media, unsent, sticker, reactions },
|
||||
convo,
|
||||
type,
|
||||
init,
|
||||
close,
|
||||
reactions: hasReactions,
|
||||
message,
|
||||
previous,
|
||||
next,
|
||||
inbox,
|
||||
highlight,
|
||||
n,
|
||||
}: {
|
||||
message: Message
|
||||
convo: Convo
|
||||
type: 'first' | 'middle' | 'last' | 'alone'
|
||||
init: boolean
|
||||
close: boolean
|
||||
reactions: boolean
|
||||
previous: Message
|
||||
next: Message
|
||||
|
||||
inbox: Inbox
|
||||
|
||||
highlight: boolean
|
||||
n: number
|
||||
}) {
|
||||
let date = new Date(time / 1e3)
|
||||
const { sender_name, timestamp_ms, is_unsent, content, reactions } = message
|
||||
|
||||
const timeBetweenConversations = 9e5
|
||||
|
||||
let type =
|
||||
sender_name == previous?.sender_name
|
||||
? sender_name == next?.sender_name
|
||||
? 'middle'
|
||||
: 'last'
|
||||
: sender_name == next?.sender_name
|
||||
? 'first'
|
||||
: 'alone',
|
||||
init = timestamp_ms - previous?.timestamp_ms > timeBetweenConversations || n == 0,
|
||||
close = next?.timestamp_ms - timestamp_ms > timeBetweenConversations
|
||||
|
||||
let date = new Date(timestamp_ms),
|
||||
hasMedia = Object.keys(message).filter(item => Inbox.mediaKeys.includes(item)).length > 0,
|
||||
isSticker = message.sticker != null,
|
||||
hasReactions = message.reactions != null
|
||||
|
||||
const [anchorEl, setAnchorEl] = useState<HTMLElement | null>(null),
|
||||
handlePopoverOpen = (event: React.MouseEvent<HTMLElement>) => {
|
||||
setAnchorEl(event.currentTarget)
|
||||
},
|
||||
handlePopoverClose = () => {
|
||||
setAnchorEl(null)
|
||||
},
|
||||
open = Boolean(anchorEl),
|
||||
unique = reactions ? [...new Set(reactions.map(r => r.reaction))] : []
|
||||
|
||||
return (
|
||||
<div
|
||||
className={[
|
||||
'message',
|
||||
sender == convo.owner && 'self',
|
||||
inbox.isOwner(sender_name) && 'self',
|
||||
type,
|
||||
init && 'init',
|
||||
close && 'close',
|
||||
unsent && 'unsent',
|
||||
media && 'media',
|
||||
sticker && 'sticker',
|
||||
is_unsent && 'unsent',
|
||||
hasMedia && 'media',
|
||||
isSticker && 'sticker',
|
||||
hasReactions && 'reactions',
|
||||
highlight && 'highlight',
|
||||
]
|
||||
.filter(c => c)
|
||||
.join(' ')}
|
||||
data-time={date.toLocaleString()}
|
||||
data-media={media && Object.keys(media)}
|
||||
// data-media={media && Object.keys(media)}
|
||||
title={date.toISOString()}
|
||||
>
|
||||
<div className="sender">{sender}</div>
|
||||
<div className="sender">{sender_name}</div>
|
||||
<div className="content">
|
||||
{content}
|
||||
{media && (
|
||||
{hasMedia || content}
|
||||
{hasMedia && (
|
||||
<div className="media">
|
||||
{Object.entries(media).map(([type, contents]) => (
|
||||
<Media key={type} type={type} contents={contents} />
|
||||
))}
|
||||
<Media message={message} />
|
||||
</div>
|
||||
)}
|
||||
{sticker && <img src={'file://' + sticker} />}
|
||||
|
||||
{/* {sticker && <img src={'file://' + sticker} />} */}
|
||||
{reactions && (
|
||||
<div className="reactions">
|
||||
{reactions.map(({ reaction, actor }) => (
|
||||
<span key={actor} title={actor}>
|
||||
{reaction}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
<>
|
||||
<div
|
||||
className="reactions"
|
||||
aria-owns={open ? 'mouse-over-popover' : undefined}
|
||||
aria-haspopup="true"
|
||||
onClick={open ? handlePopoverClose : handlePopoverOpen}
|
||||
>
|
||||
{unique.map(reaction => (
|
||||
<span key={reaction}>{reaction}</span>
|
||||
))}
|
||||
{<span>{reactions.length}</span>}
|
||||
</div>
|
||||
{/* popover */}
|
||||
<Popover
|
||||
id="mouse-over-popover"
|
||||
sx={{
|
||||
pointerEvents: 'none',
|
||||
}}
|
||||
open={open}
|
||||
anchorEl={anchorEl}
|
||||
anchorOrigin={{
|
||||
vertical: 'bottom',
|
||||
horizontal: 'left',
|
||||
}}
|
||||
transformOrigin={{
|
||||
vertical: 'top',
|
||||
horizontal: 'left',
|
||||
}}
|
||||
onClose={handlePopoverClose}
|
||||
disableRestoreFocus
|
||||
>
|
||||
<div className="reactors">
|
||||
{reactions.map(({ reaction, actor }) => (
|
||||
<div key={actor}>
|
||||
{reaction} {actor}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</Popover>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
@@ -101,82 +167,74 @@ function MessageBubble({
|
||||
}
|
||||
|
||||
export function Chat({
|
||||
inbox,
|
||||
range,
|
||||
expand,
|
||||
goto,
|
||||
}: {
|
||||
inbox: Inbox
|
||||
range: [number, number]
|
||||
expand: (days: number) => void
|
||||
goto?: number
|
||||
}) {
|
||||
const [[currentConvo]] = useContext(contextCurrentConvo)
|
||||
// TODO: scroll to goto
|
||||
// useEffect(() => {
|
||||
// document
|
||||
// .querySelector<HTMLElement>('.browse .message.highlight')
|
||||
// ?.scrollIntoView({
|
||||
// behavior: 'smooth',
|
||||
// })
|
||||
// })
|
||||
|
||||
const [partial, setPartial] = useState<PartialConvo>()
|
||||
|
||||
useEffect(() => {
|
||||
if (currentConvo) setPartial(new PartialConvo(currentConvo, range))
|
||||
}, [currentConvo, range])
|
||||
|
||||
useEffect(() => {
|
||||
document
|
||||
.querySelector<HTMLElement>('.browse .message.highlight')
|
||||
?.scrollIntoView({
|
||||
behavior: 'smooth',
|
||||
})
|
||||
})
|
||||
const messages = inbox.messages.slice(0, 500)
|
||||
|
||||
return (
|
||||
(partial && currentConvo && (
|
||||
<div className="browse">
|
||||
<div className="timestamp">
|
||||
{/* TODO: add expand range buttons */}⇊{' '}
|
||||
{new Date(range[0] / 1e3).toLocaleString()} ⇊
|
||||
</div>
|
||||
{partial.messages.slice(0, 500).map((m, i, all) => (
|
||||
<div className="browse">
|
||||
<Button variant="outlined" size="small" onClick={() => expand(-1)}>
|
||||
Earlier
|
||||
</Button>
|
||||
<div className="timestamp">⇊ {new Date(range[0]).toLocaleDateString()} ⇊</div>
|
||||
{messages.map((m, i, all) => {
|
||||
const previous = all[i - 1],
|
||||
next = all[i + 1]
|
||||
|
||||
return (
|
||||
<MessageBubble
|
||||
key={m.time}
|
||||
key={m.timestamp_ms + m.sender_name}
|
||||
message={m}
|
||||
convo={currentConvo}
|
||||
type={
|
||||
m.sender == all[i - 1]?.sender
|
||||
? m.sender == all[i + 1]?.sender
|
||||
? 'middle'
|
||||
: 'last'
|
||||
: m.sender == all[i + 1]?.sender
|
||||
? 'first'
|
||||
: 'alone'
|
||||
}
|
||||
init={m.time - all[i - 1]?.time > 9e8 || i == 0}
|
||||
close={all[i + 1]?.time - m.time > 9e8}
|
||||
reactions={!!m.reactions}
|
||||
highlight={m.time == goto}
|
||||
inbox={inbox}
|
||||
previous={previous}
|
||||
next={next}
|
||||
n={i}
|
||||
highlight={m.timestamp_ms == goto}
|
||||
/>
|
||||
))}
|
||||
{partial.count < 1 && (
|
||||
<div className="timestamp">
|
||||
No messages in the selected range
|
||||
</div>
|
||||
)}
|
||||
<div className="timestamp">
|
||||
⇈ {new Date(range[1] / 1e3).toLocaleString()} ⇈
|
||||
</div>
|
||||
</div>
|
||||
)) || <></>
|
||||
)
|
||||
})}
|
||||
{messages.length < 1 && (
|
||||
// <div className="timestamp">No messages in the selected range</div>
|
||||
<Alert severity="info">No messages in the selected range</Alert>
|
||||
)}
|
||||
<div className="timestamp">⇈ {new Date(range[1]).toLocaleDateString()}⇈</div>
|
||||
<Button variant="outlined" size="small" onClick={() => expand(1)}>
|
||||
Later
|
||||
</Button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default function Browse() {
|
||||
const [[currentConvo], [range]] = useContext(contextCurrentConvo)
|
||||
const [currentInbox, , range, setRange] = useContext(contextCurrentInbox)
|
||||
|
||||
const [partial, setPartial] = useState<PartialConvo>()
|
||||
|
||||
useEffect(() => {
|
||||
if (currentConvo) setPartial(new PartialConvo(currentConvo, range))
|
||||
}, [currentConvo, range])
|
||||
function expandRange(days: number) {
|
||||
let ms = days * 86400 * 1000
|
||||
if (ms > 0) setRange([range[0], range[1] + ms])
|
||||
else setRange([range[0] + ms, range[1]])
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
{(partial && currentConvo && <Chat range={range} />) || (
|
||||
<div className="timestamp">Select a conversation</div>
|
||||
)}
|
||||
{!currentInbox && <div className="timestamp">Select a conversation</div>}
|
||||
{currentInbox && <Chat inbox={currentInbox} range={range} expand={expandRange} />}
|
||||
</>
|
||||
)
|
||||
}
|
||||
@@ -50,6 +50,13 @@
|
||||
cursor: help
|
||||
padding: .1em 0.3em
|
||||
|
||||
.reactors
|
||||
padding: .1em 0.3em
|
||||
|
||||
& > div:not(:last-child)
|
||||
margin-bottom: .2em
|
||||
|
||||
|
||||
&.reactions
|
||||
margin-bottom: 1.2em
|
||||
|
||||
|
||||
@@ -1,20 +1,35 @@
|
||||
import { useContext, useEffect, useState } from 'react'
|
||||
import { DateRangePicker } from 'react-date-range'
|
||||
|
||||
import { dateToUnixExtended } from '../../PartialConvo'
|
||||
|
||||
import contextCurrentConvo from '../../Contexts/contextCurrentConvo'
|
||||
import contextConvos from '../../Contexts/contextConvos'
|
||||
import contextCurrentInbox from '../../Contexts/contextCurrentInbox'
|
||||
import contextInboxes from '../../Contexts/contextInboxes'
|
||||
|
||||
import './convoselector.sass'
|
||||
|
||||
import 'react-date-range/dist/styles.css' // picker main style file
|
||||
import 'react-date-range/dist/theme/default.css' // picker theme css file
|
||||
import { Avatar, FormControl, InputLabel, ListSubheader, MenuItem, Select } from '@mui/material'
|
||||
import BlobMedia from '../BlobMedia/BlobMedia'
|
||||
import { stringAvatar } from '../universal'
|
||||
|
||||
const categoryLookup = {
|
||||
e2ee_cutover: 'Inboxes Encrypted',
|
||||
inbox: 'Inboxes',
|
||||
archived_threads: 'Archived',
|
||||
message_requests: 'Requests',
|
||||
filtered_threads: 'Filtered',
|
||||
},
|
||||
categoryOrder = [
|
||||
'e2ee_cutover',
|
||||
'inbox',
|
||||
'archived_threads',
|
||||
'message_requests',
|
||||
'filtered_threads',
|
||||
]
|
||||
|
||||
function ConvoSelector() {
|
||||
const convos = useContext(contextConvos),
|
||||
[[currentConvo, setCurrentConvo], [range, setRange]] =
|
||||
useContext(contextCurrentConvo)
|
||||
const [inboxes] = useContext(contextInboxes),
|
||||
[currentInbox, changeInbox, , setRange] = useContext(contextCurrentInbox)
|
||||
|
||||
const [picker, setPicker] = useState({
|
||||
startDate: new Date(new Date().getTime() - 3.024e9),
|
||||
@@ -22,66 +37,86 @@ function ConvoSelector() {
|
||||
key: 'selection',
|
||||
})
|
||||
|
||||
let separator = label => <ListSubheader color="primary">{label}</ListSubheader>
|
||||
|
||||
useEffect(() => {
|
||||
setRange([
|
||||
dateToUnixExtended(picker.startDate),
|
||||
dateToUnixExtended(picker.endDate) + 8.64e10,
|
||||
])
|
||||
setRange([picker.startDate.getTime(), picker.endDate.getTime() + 8.64e7])
|
||||
}, [picker])
|
||||
|
||||
return (
|
||||
<div className="selector">
|
||||
<div className="select">
|
||||
<span>Select an inbox: </span>
|
||||
<select
|
||||
onChange={({ target: { value } }) => setCurrentConvo(value)}
|
||||
defaultValue={currentConvo?.id}
|
||||
>
|
||||
{convos
|
||||
.sort((a, b) => a.title.localeCompare(b.title))
|
||||
.map(c => (
|
||||
<option key={c.id} value={c.id}>
|
||||
{c.title}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
<FormControl fullWidth>
|
||||
<InputLabel id="select-label">Select an inbox</InputLabel>
|
||||
<Select
|
||||
labelId="select-label"
|
||||
value={currentInbox?.id || ''}
|
||||
label="Inbox"
|
||||
onChange={({ target: { value } }) => changeInbox(value)}
|
||||
>
|
||||
{inboxes
|
||||
// .sort((a, b) => a.category.localeCompare(b.category))
|
||||
// .sort((a, b) => a.title.localeCompare(b.title))
|
||||
.sort((a, b) => {
|
||||
let category =
|
||||
categoryOrder.indexOf(a.category) - categoryOrder.indexOf(b.category),
|
||||
title = a.title.localeCompare(b.title)
|
||||
|
||||
return category || title
|
||||
})
|
||||
.map((current, i, all) => {
|
||||
let children = [
|
||||
<MenuItem value={current.id} key={current.id}>
|
||||
{current.title}
|
||||
</MenuItem>,
|
||||
]
|
||||
|
||||
if (i == 0) children.unshift(separator(categoryLookup[current.category]))
|
||||
else {
|
||||
if (all[i - 1].category != current.category)
|
||||
children.unshift(separator(categoryLookup[current.category]))
|
||||
}
|
||||
return children
|
||||
})}
|
||||
</Select>
|
||||
</FormControl>
|
||||
</div>
|
||||
|
||||
{currentConvo && (
|
||||
{currentInbox && (
|
||||
<div className="preview">
|
||||
<h2>{currentConvo.title}</h2>
|
||||
<h2>{currentInbox.title}</h2>
|
||||
<div className="desc">
|
||||
<img src={currentConvo.image ?? ''} alt="photo unavailable" />
|
||||
<div className="photo">
|
||||
{currentInbox.image ? (
|
||||
<div className="img">
|
||||
<BlobMedia uri={currentInbox.image.uri} mediaType="group_photos" />
|
||||
</div>
|
||||
) : (
|
||||
<Avatar {...stringAvatar(currentInbox.title)} />
|
||||
)}
|
||||
</div>
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Title</td>
|
||||
<td>{currentConvo.title}</td>
|
||||
<td>{currentInbox.title}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
{/* <tr>
|
||||
<td>Type</td>
|
||||
<td>{currentConvo.type}</td>
|
||||
</tr>
|
||||
</tr> */}
|
||||
<tr>
|
||||
<td>Category</td>
|
||||
<td>{'inbox'}</td>
|
||||
{/* TODO: pass category to convo from inbox */}
|
||||
<td>{currentInbox.category}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>First Message</td>
|
||||
<td>
|
||||
{new Date(
|
||||
currentConvo.firstMessage / 1e3
|
||||
).toLocaleString()}
|
||||
</td>
|
||||
<td>{new Date(currentInbox.meta.firstMessage).toLocaleString()}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Last Message</td>
|
||||
<td>
|
||||
{new Date(
|
||||
currentConvo.lastMessage / 1e3
|
||||
).toLocaleString()}
|
||||
</td>
|
||||
<td>{new Date(currentInbox.meta.lastMessage).toLocaleString()}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -89,9 +124,9 @@ function ConvoSelector() {
|
||||
<h2>Members</h2>
|
||||
<div className="members">
|
||||
<ul>
|
||||
{currentConvo.members.map(m => (
|
||||
{currentInbox.participants.map(m => (
|
||||
<li
|
||||
key={m.name}
|
||||
key={m.name + currentInbox.id}
|
||||
data-left={!m.participates}
|
||||
data-self={m.self}
|
||||
>
|
||||
@@ -103,15 +138,15 @@ function ConvoSelector() {
|
||||
</div>
|
||||
)}
|
||||
|
||||
{currentConvo && (
|
||||
{currentInbox && (
|
||||
<div className="picker">
|
||||
<h1>Select a range for displayed messages:</h1>
|
||||
<DateRangePicker
|
||||
onChange={item => setPicker(item.selection)}
|
||||
showSelectionPreview={true}
|
||||
moveRangeOnFirstSelection={false}
|
||||
minDate={new Date(currentConvo.firstMessage / 1e3)}
|
||||
maxDate={new Date(currentConvo.lastMessage / 1e3)}
|
||||
minDate={new Date(currentInbox.meta.firstMessage)}
|
||||
maxDate={new Date(currentInbox.meta.lastMessage)}
|
||||
ranges={[picker]}
|
||||
direction="vertical"
|
||||
/>
|
||||
|
||||
@@ -19,6 +19,19 @@
|
||||
.desc
|
||||
display: flex
|
||||
|
||||
.photo
|
||||
padding-right: 1em
|
||||
|
||||
.img
|
||||
width: 3em
|
||||
height: 3em
|
||||
border-radius: 100%
|
||||
|
||||
.MuiAvatar-root
|
||||
width: 3em
|
||||
height: 3em
|
||||
font-size: 2em
|
||||
|
||||
img
|
||||
margin: .5em
|
||||
width: 6em
|
||||
|
||||
+328
-75
@@ -1,100 +1,353 @@
|
||||
import { useEffect, useReducer, useState } from 'react'
|
||||
import Button from '../Button/Button'
|
||||
import { useContext, useEffect, useReducer, useState } from 'react'
|
||||
import Progress from '../Progress/Progress'
|
||||
|
||||
import RestartAltIcon from '@mui/icons-material/RestartAlt'
|
||||
|
||||
import './intro.sass'
|
||||
import {
|
||||
ToggleButton,
|
||||
ToggleButtonGroup,
|
||||
Typography,
|
||||
Button,
|
||||
Box,
|
||||
Stepper,
|
||||
StepLabel,
|
||||
Step,
|
||||
Chip,
|
||||
Alert,
|
||||
} from '@mui/material'
|
||||
|
||||
import { MAIN_TO_RENDERER, RENDERER_TO_MAIN } from '../../../ts/types/global'
|
||||
import { E_DATABASE, eDatabase } from '../../events'
|
||||
import contextCurrentInbox from '../../Contexts/contextCurrentInbox'
|
||||
import contextInboxes from '../../Contexts/contextInboxes'
|
||||
|
||||
type status = [string, number]
|
||||
|
||||
const totalMasterParts = 4
|
||||
|
||||
function Intro() {
|
||||
const [paths, setPaths] = useState<string[]>([]),
|
||||
[mainProgress, setMainProgress] = useState<status>([
|
||||
'Waiting for paths',
|
||||
0,
|
||||
]),
|
||||
[subProgress, setSubProgress] = useState<status>(['', 0]),
|
||||
[log, addLog] = useState<any[]>([])
|
||||
function Paths(paths: string[], setPaths?: React.Dispatch<React.SetStateAction<string[]>>) {
|
||||
return (
|
||||
<div className="paths">
|
||||
{(paths.length < 1 && <div style={{ textAlign: 'center' }}>-- none selected --</div>) ||
|
||||
paths.map(path => (
|
||||
<div key={path}>
|
||||
{path}
|
||||
{setPaths && (
|
||||
<i
|
||||
className="icon-cancel"
|
||||
onClick={() => setPaths(prev => prev.filter(p => p != path))}
|
||||
></i>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
function beginScan(paths: string[]) {
|
||||
window.invoke('scan', { paths }).then(convosIds => {
|
||||
console.log(convosIds)
|
||||
var Reset: () => JSX.Element
|
||||
|
||||
function Intro() {
|
||||
const [activeStep, setActiveStep] = useState(0),
|
||||
[importType, setImportType] = useState('zip'),
|
||||
[paths, setPaths] = useState<string[]>(['/vault/takeout_zips/all-json-no-media.zip']),
|
||||
[savePath, setSavePath] = useState('/vault/takeout_zips/all-json2.db')
|
||||
|
||||
const steps = ['Choose type of import', 'Select files', 'Import']
|
||||
|
||||
const [, changeInbox] = useContext(contextCurrentInbox),
|
||||
[inboxes] = useContext(contextInboxes)
|
||||
|
||||
const success = inboxes.length > 0
|
||||
|
||||
Reset = function Reset() {
|
||||
function reset() {
|
||||
setActiveStep(0)
|
||||
setImportType('zip')
|
||||
setPaths([])
|
||||
setSavePath('')
|
||||
changeInbox('reset')
|
||||
}
|
||||
|
||||
return (
|
||||
<Button
|
||||
fullWidth
|
||||
variant="contained"
|
||||
color="error"
|
||||
endIcon={<RestartAltIcon />}
|
||||
onClick={reset}
|
||||
>
|
||||
Reset
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="intro">
|
||||
<Box sx={{ width: '100%' }}>
|
||||
<Stepper activeStep={activeStep} alternativeLabel>
|
||||
{steps.map(label => (
|
||||
<Step key={label}>
|
||||
<StepLabel>{label}</StepLabel>
|
||||
</Step>
|
||||
))}
|
||||
</Stepper>
|
||||
</Box>
|
||||
|
||||
<Box display="flex" flexDirection="column" width="100%" height="100%">
|
||||
<Box flexGrow={1}>
|
||||
{
|
||||
{
|
||||
0: selectImport(setActiveStep, [importType, setImportType]),
|
||||
1: selectFiles(
|
||||
importType,
|
||||
[paths, setPaths],
|
||||
[savePath, setSavePath],
|
||||
setActiveStep
|
||||
),
|
||||
2: importZip(paths, savePath, success),
|
||||
3: importDb(savePath, success),
|
||||
}[activeStep]
|
||||
}
|
||||
</Box>
|
||||
|
||||
<Box display="flex" flexDirection="column" justifyContent="flex-end">
|
||||
{activeStep < 2 && (
|
||||
<Button
|
||||
variant="contained"
|
||||
onClick={() => {
|
||||
if (activeStep == 0) setActiveStep(1)
|
||||
if (activeStep == 1) {
|
||||
if (importType == 'zip') setActiveStep(2)
|
||||
if (importType == 'db') setActiveStep(3)
|
||||
}
|
||||
}}
|
||||
disabled={
|
||||
activeStep > 1 &&
|
||||
((importType == 'zip' && paths.length < 1) ||
|
||||
(importType == 'db' && savePath == ''))
|
||||
}
|
||||
fullWidth
|
||||
>
|
||||
next
|
||||
</Button>
|
||||
)}
|
||||
|
||||
<br />
|
||||
{Reset()}
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
<br />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
function selectImport(
|
||||
setActiveStep: React.Dispatch<React.SetStateAction<number>>,
|
||||
[importType, setImportType]: [string, React.Dispatch<React.SetStateAction<string>>]
|
||||
) {
|
||||
return (
|
||||
<>
|
||||
<Typography variant="h4">Choose type of import</Typography>
|
||||
<br />
|
||||
<ToggleButtonGroup
|
||||
color="primary"
|
||||
value={importType}
|
||||
exclusive
|
||||
aria-label="Import Type"
|
||||
onChange={(e, v) => setImportType(v)}
|
||||
fullWidth
|
||||
>
|
||||
<ToggleButton value="zip" fullWidth>
|
||||
.ZIP
|
||||
</ToggleButton>
|
||||
<ToggleButton value="db" fullWidth>
|
||||
.DB
|
||||
</ToggleButton>
|
||||
</ToggleButtonGroup>
|
||||
<br />
|
||||
{importType == 'zip' && (
|
||||
<span>
|
||||
Imports from multiple .zip files, downloaded directly from Facebook's data export
|
||||
This converts the data into a single .db file, which can be used for viewing in this
|
||||
app. It's main benefit is ease of storage, and space saving (Meta includes multiple
|
||||
duplicates) Use this option if you're using the app for the first time, or if you
|
||||
want to import new data
|
||||
</span>
|
||||
)}
|
||||
{importType == 'db' && (
|
||||
<span>
|
||||
Imports from a single .db file, which can be used for viewing in this app. Use this
|
||||
option if you've already imported data, and want to continue working with it
|
||||
</span>
|
||||
)}
|
||||
<br />
|
||||
<br />
|
||||
{/* <Button variant="contained" onClick={() => setActiveStep(1)} fullWidth>
|
||||
next
|
||||
</Button>
|
||||
<br />
|
||||
{Reset()} */}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
function selectFiles(
|
||||
importType: string,
|
||||
[paths, setPaths]: [string[], React.Dispatch<React.SetStateAction<string[]>>],
|
||||
[savePath, setSavePath]: [string, React.Dispatch<React.SetStateAction<string>>],
|
||||
|
||||
setActiveStep: React.Dispatch<React.SetStateAction<number>>
|
||||
) {
|
||||
if (importType == 'zip')
|
||||
return (
|
||||
<>
|
||||
<Typography variant="h4" gutterBottom>
|
||||
Select .zip files
|
||||
</Typography>
|
||||
<Button
|
||||
variant="outlined"
|
||||
fullWidth
|
||||
onClick={() => {
|
||||
window.invoke(RENDERER_TO_MAIN.GET_ZIP_PATHS).then(e => {
|
||||
if (e.canceled) return
|
||||
setPaths(prev => [...prev, ...e.filePaths])
|
||||
})
|
||||
}}
|
||||
>
|
||||
Add
|
||||
</Button>
|
||||
<br />
|
||||
{Paths(paths, setPaths)}
|
||||
|
||||
<Typography variant="h4" gutterBottom>
|
||||
Select .db save location
|
||||
</Typography>
|
||||
<Button
|
||||
variant="outlined"
|
||||
fullWidth
|
||||
onClick={() => {
|
||||
window.invoke(RENDERER_TO_MAIN.GET_DB_PATH).then(e => {
|
||||
if (e.canceled) return
|
||||
setSavePath(e.filePath)
|
||||
})
|
||||
}}
|
||||
>
|
||||
select
|
||||
</Button>
|
||||
<br />
|
||||
{Paths([savePath])}
|
||||
{/* <Button
|
||||
disabled={paths.length < 1 || savePath == ''}
|
||||
variant="contained"
|
||||
onClick={() => setActiveStep(2)}
|
||||
fullWidth
|
||||
>
|
||||
next
|
||||
</Button>
|
||||
<br />
|
||||
{Reset()} */}
|
||||
</>
|
||||
)
|
||||
else
|
||||
return (
|
||||
<>
|
||||
<Typography variant="h4" gutterBottom>
|
||||
Select a .db to import
|
||||
</Typography>
|
||||
<Button
|
||||
variant="outlined"
|
||||
fullWidth
|
||||
onClick={() => {
|
||||
window.invoke(RENDERER_TO_MAIN.GET_DB_PATH).then(e => {
|
||||
if (e.canceled) return
|
||||
setSavePath(e.filePath)
|
||||
})
|
||||
}}
|
||||
>
|
||||
Add
|
||||
</Button>
|
||||
<br />
|
||||
{Paths([savePath])}
|
||||
{/* <Button
|
||||
disabled={savePath == ''}
|
||||
variant="contained"
|
||||
onClick={() => setActiveStep(3)}
|
||||
fullWidth
|
||||
>
|
||||
next
|
||||
</Button>
|
||||
<br />
|
||||
{Reset()} */}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
function importZip(paths: string[], savePath: string, success: boolean) {
|
||||
function invokeImportZips() {
|
||||
window.invoke(RENDERER_TO_MAIN.IMPORT_ZIPS, { paths, savePath }).then(out => {
|
||||
eDatabase.dispatchEvent(new CustomEvent(E_DATABASE.DB_READY, { detail: out }))
|
||||
})
|
||||
}
|
||||
|
||||
const [mainProgress, setMainProgress] = useState<status>(['Press start to begin', 0]),
|
||||
[subProgress, setSubProgress] = useState<status>(['---', 0]),
|
||||
[log, addLog] = useState<any[]>([])
|
||||
|
||||
useEffect(() => {
|
||||
window.events.on('update-progress', ([level, message, status, err]) => {
|
||||
if (level == 'main') setMainProgress([message, status])
|
||||
window.events.on(MAIN_TO_RENDERER.UPDATE_PROGRESS, ([level, message, status, err]) => {
|
||||
if (level == 'main') {
|
||||
setMainProgress([message, status])
|
||||
setSubProgress([message, 0])
|
||||
}
|
||||
if (level == 'sub') setSubProgress([message, status])
|
||||
addLog(prev => [...prev, [level, message, status, err]])
|
||||
})
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div
|
||||
className="intro"
|
||||
style={{
|
||||
cursor:
|
||||
mainProgress[1] > 0 && mainProgress[1] < totalMasterParts
|
||||
? 'wait'
|
||||
: 'default',
|
||||
}}
|
||||
>
|
||||
<span className="header">Select paths to scan</span>
|
||||
<p>
|
||||
Add folders with <code>filtered_threads</code>,{' '}
|
||||
<code>archived_threads</code>, <code>inbox</code> or{' '}
|
||||
<code>message_requests</code> inside
|
||||
</p>
|
||||
<div className="controls">
|
||||
<Button
|
||||
label="Open"
|
||||
action={() =>
|
||||
window.invoke('get-paths').then(({ canceled, filePaths }) => {
|
||||
!canceled &&
|
||||
setPaths(prev => [
|
||||
...prev,
|
||||
...filePaths.filter(p => !prev.includes(p)),
|
||||
])
|
||||
})
|
||||
}
|
||||
icon="plus-squared"
|
||||
/>
|
||||
</div>
|
||||
<div className="paths">
|
||||
{paths.map(path => (
|
||||
<div key={path}>
|
||||
{path}
|
||||
<i
|
||||
className="icon-cancel"
|
||||
onClick={() =>
|
||||
setPaths(prev => prev.filter(p => p != path))
|
||||
}
|
||||
></i>
|
||||
</div>
|
||||
))}
|
||||
<>
|
||||
Selected files:
|
||||
{paths.map(path => (
|
||||
<Chip key={path} label={`${path}`} variant="outlined" />
|
||||
))}
|
||||
<br />
|
||||
<Button variant="contained" fullWidth onClick={() => invokeImportZips()}>
|
||||
start
|
||||
</Button>
|
||||
<div className="bars">
|
||||
<Progress label={mainProgress[0]} steps={[mainProgress[1], 3]} />
|
||||
<Progress label={subProgress[0]} status={subProgress[1]} />
|
||||
{/* TODO: display the logs */}
|
||||
</div>
|
||||
<br />
|
||||
{/* {Reset()} */}
|
||||
<br />
|
||||
{success && <Alert severity="success">Files succefuly imported</Alert>}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
{paths.length > 0 && (
|
||||
<Button
|
||||
label="Scan"
|
||||
action={() => beginScan(paths)}
|
||||
icon="search"
|
||||
/>
|
||||
)}
|
||||
function importDb(path: string, success: boolean) {
|
||||
function invokeImportDb() {
|
||||
window.invoke(RENDERER_TO_MAIN.IMPORT_DB, path).then(out => {
|
||||
eDatabase.dispatchEvent(new CustomEvent(E_DATABASE.DB_READY, { detail: out }))
|
||||
})
|
||||
}
|
||||
|
||||
{log.length > 0 && (
|
||||
<div className="bars">
|
||||
<Progress
|
||||
label={mainProgress[0]}
|
||||
steps={[mainProgress[1], totalMasterParts]}
|
||||
/>
|
||||
<Progress label={subProgress[0]} status={subProgress[1]} />
|
||||
{/* TODO: display the logs */}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
return (
|
||||
<>
|
||||
Selected file:
|
||||
<Chip label={`${path}`} variant="outlined" />
|
||||
<Button variant="contained" fullWidth onClick={() => invokeImportDb()}>
|
||||
import
|
||||
</Button>
|
||||
<br />
|
||||
{/* {Reset()} */}
|
||||
<br />
|
||||
{success && <Alert severity="success">File succefuly imported</Alert>}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
import { useContext, useEffect, useState } from 'react'
|
||||
import Message from '../../../ts/Message'
|
||||
import { messageMedia } from '../../../ts/types/takeout'
|
||||
import contextCurrentConvo from '../../Contexts/contextCurrentConvo'
|
||||
import PartialConvo from '../../PartialConvo'
|
||||
|
||||
import './media.sass'
|
||||
import contextCurrentInbox from '../../Contexts/contextCurrentInbox'
|
||||
import { Inbox, Message } from '../../Sources'
|
||||
|
||||
function Entry({
|
||||
type,
|
||||
content,
|
||||
media,
|
||||
message,
|
||||
goto,
|
||||
}: {
|
||||
type: string
|
||||
content: messageMedia
|
||||
media: {
|
||||
type: string
|
||||
uri: string
|
||||
creation_timestamp: number
|
||||
}
|
||||
message: Message
|
||||
goto: (number) => void
|
||||
}) {
|
||||
@@ -26,48 +26,37 @@ function Entry({
|
||||
{
|
||||
photos: <i className="icon-picture"></i>,
|
||||
gifs: <i className="icon-picture"></i>,
|
||||
audios: <i className="icon-mic"></i>,
|
||||
videos: <i className="icon-video"></i>,
|
||||
audio_files: <i className="icon-mic"></i>,
|
||||
files: <i className="icon-attach"></i>,
|
||||
}[type]
|
||||
}[media.type]
|
||||
}
|
||||
{message.sender} —
|
||||
{new Date(message.time / 1e3).toLocaleDateString()}
|
||||
{message.sender_name} —
|
||||
{new Date(message.timestamp_ms).toLocaleDateString()}
|
||||
</div>
|
||||
|
||||
{open && (
|
||||
<div className="preview">
|
||||
{
|
||||
{
|
||||
photos: (
|
||||
<img src={content.uri} alt="unable to load image" />
|
||||
),
|
||||
gifs: <img src={content.uri} alt="unable to load gif" />,
|
||||
audios: (
|
||||
<audio controls>
|
||||
<source src={content.uri} />
|
||||
</audio>
|
||||
),
|
||||
videos: (
|
||||
<video controls>
|
||||
<source src={content.uri} />
|
||||
</video>
|
||||
),
|
||||
files: <i className="icon-attach"></i>,
|
||||
}[type]
|
||||
}
|
||||
{{
|
||||
photos: () => <img src={media.uri} alt="unable to load image" />,
|
||||
gifs: () => <img src={media.uri} alt="unable to load gif" />,
|
||||
audios: () => (
|
||||
<audio controls>
|
||||
<source src={media.uri} />
|
||||
</audio>
|
||||
),
|
||||
videos: () => (
|
||||
<video controls>
|
||||
<source src={media.uri} />
|
||||
</video>
|
||||
),
|
||||
files: () => <i className="icon-attach"></i>,
|
||||
}[media.type]()}
|
||||
|
||||
<div className="info">
|
||||
<div>
|
||||
Time: {new Date(message.time / 1e3).toLocaleTimeString()}
|
||||
</div>
|
||||
{content.creation_timestamp && (
|
||||
<div>
|
||||
Created:{' '}
|
||||
{new Date(
|
||||
content.creation_timestamp * 1e3
|
||||
).toLocaleString()}
|
||||
</div>
|
||||
<div>Time: {new Date(message.timestamp_ms).toLocaleTimeString()}</div>
|
||||
{media.creation_timestamp && (
|
||||
<div>Created: {new Date(media.creation_timestamp).toLocaleString()}</div>
|
||||
)}
|
||||
<div></div>
|
||||
<div></div>
|
||||
@@ -98,33 +87,46 @@ function Preview() {
|
||||
// TODO: add optional grid view
|
||||
|
||||
export default function Media() {
|
||||
const [[currentConvo], [range, setRange]] = useContext(contextCurrentConvo)
|
||||
|
||||
const [partial, setPartial] = useState<PartialConvo>()
|
||||
|
||||
useEffect(() => {
|
||||
if (currentConvo) setPartial(new PartialConvo(currentConvo, range))
|
||||
}, [currentConvo, range])
|
||||
const [currentInbox, changeInbox, range] = useContext(contextCurrentInbox)
|
||||
|
||||
return (
|
||||
<div className="media">
|
||||
{partial &&
|
||||
partial.messages
|
||||
.filter(({ media }) => media)
|
||||
.map(message =>
|
||||
Object.entries(message.media!).map(([type, entries]) =>
|
||||
entries.map(e => (
|
||||
<Entry
|
||||
key={e.uri}
|
||||
type={type}
|
||||
content={e}
|
||||
message={message}
|
||||
goto={() => {}} /* TODO: add goto in conversation feature */
|
||||
/>
|
||||
))
|
||||
{
|
||||
currentInbox &&
|
||||
currentInbox.messages
|
||||
.filter(
|
||||
message =>
|
||||
Object.keys(message).filter(key => Inbox.mediaKeys.includes(key)).length > 0
|
||||
)
|
||||
)
|
||||
.flat()}
|
||||
.map(message =>
|
||||
Object.entries(message)
|
||||
.filter(([key, value]) => Inbox.mediaKeys.includes(key))
|
||||
.map(([type, value]) => ({
|
||||
type,
|
||||
...value,
|
||||
}))
|
||||
.flat()
|
||||
.map(media => [media, message])
|
||||
)
|
||||
.flat(3)
|
||||
.map(([media, message]) => {
|
||||
return <Entry media={media} message={message} goto={() => {}} />
|
||||
})
|
||||
// .map(media =>
|
||||
// Object.entries(message.media!).map(([type, entries]) =>
|
||||
// entries.map(e => (
|
||||
// <Entry
|
||||
// key={e.uri}
|
||||
// type={type}
|
||||
// content={e}
|
||||
// message={message}
|
||||
// goto={() => {}} /* TODO: add goto in conversation feature */
|
||||
// />
|
||||
// ))
|
||||
// )
|
||||
// )
|
||||
// .flat()}
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -5,9 +5,11 @@ import icon from '../../../assets/icon.png'
|
||||
function Menu({
|
||||
setPane,
|
||||
initial,
|
||||
dbReady,
|
||||
}: {
|
||||
setPane: (id: string) => void
|
||||
initial: string
|
||||
dbReady: boolean
|
||||
}) {
|
||||
const [active, setActive] = useState(initial)
|
||||
|
||||
@@ -37,9 +39,10 @@ function Menu({
|
||||
<i
|
||||
key={id}
|
||||
data-active={id == active}
|
||||
data-disabled={!dbReady}
|
||||
className={`icon-${icon}`}
|
||||
title={title}
|
||||
onClick={() => change(id)}
|
||||
onClick={() => dbReady && change(id)}
|
||||
></i>
|
||||
))}
|
||||
</div>
|
||||
|
||||
@@ -51,6 +51,10 @@
|
||||
&[data-active=true]:after
|
||||
opacity: 1
|
||||
|
||||
&[data-disabled=true]
|
||||
opacity: .5
|
||||
cursor: not-allowed
|
||||
|
||||
&:after
|
||||
content: ""
|
||||
opacity: 0
|
||||
|
||||
@@ -9,16 +9,21 @@ function Progress({
|
||||
status?: number
|
||||
steps?: [number, number]
|
||||
}) {
|
||||
let progress = '',
|
||||
hide = false
|
||||
|
||||
if (status) {
|
||||
progress = `[${status.toPrecision(3)}%]`
|
||||
if (status == 0) hide = true
|
||||
} else if (steps) {
|
||||
progress = `[${steps[0]}/${steps[1]}]`
|
||||
if (steps[0] == 0) hide = true
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="progress">
|
||||
<span className="label">
|
||||
{label} [
|
||||
{typeof status != 'undefined'
|
||||
? `${status}%`
|
||||
: steps
|
||||
? `${steps[0]}/${steps[1]}`
|
||||
: `?`}
|
||||
]
|
||||
{label} {!hide && progress}
|
||||
</span>
|
||||
<div
|
||||
className="status"
|
||||
|
||||
@@ -1,108 +1,96 @@
|
||||
import Fuse from 'fuse.js'
|
||||
import { useContext, useEffect, useState } from 'react'
|
||||
import Convo from '../../../ts/Convo'
|
||||
import Message from '../../../ts/Message'
|
||||
import { chunkRange } from '../../ChunkConvo'
|
||||
import contextCurrentConvo from '../../Contexts/contextCurrentConvo'
|
||||
import PartialConvo from '../../PartialConvo'
|
||||
import { Chat } from '../Browse/Browse'
|
||||
// import Fuse, { FuseResult } from 'fuse.js'
|
||||
// import { useContext, useEffect, useState } from 'react'
|
||||
// import Convo from '../../../ts/Convo'
|
||||
// import Message from '../../../ts/Message'
|
||||
// import { chunkRange } from '../../ChunkConvo'
|
||||
// import contextCurrentConvo from '../../Contexts/contextCurrentInbox'
|
||||
// import PartialConvo from '../../PartialConvo'
|
||||
// import { Chat } from '../Browse/Browse'
|
||||
|
||||
import './search.sass'
|
||||
// import './search.sass'
|
||||
|
||||
function runSearch(convo: Convo, query: string, options: {}) {
|
||||
let fullPartial = new PartialConvo(convo, [0, Infinity])
|
||||
const fuse = new Fuse(fullPartial.messages, {
|
||||
keys: ['content'],
|
||||
...options,
|
||||
})
|
||||
// function runSearch(convo: Convo, query: string, options: {}) {
|
||||
// let fullPartial = new PartialConvo(convo, [0, Infinity])
|
||||
// const fuse = new Fuse(fullPartial.messages, {
|
||||
// keys: ['content'],
|
||||
// ...options,
|
||||
// })
|
||||
|
||||
return fuse.search(query)
|
||||
}
|
||||
// return fuse.search(query)
|
||||
// }
|
||||
|
||||
export default function Search() {
|
||||
const [[currentConvo]] = useContext(contextCurrentConvo)
|
||||
// export default function Search() {
|
||||
// const [[currentConvo]] = useContext(contextCurrentConvo)
|
||||
|
||||
let [query, setQuery] = useState(''),
|
||||
[accuracy, setAccuracy] = useState(0.6),
|
||||
[caseSensitive, setCaseSensitive] = useState(false),
|
||||
[range, setRange] = useState<[number, number]>()
|
||||
// let [query, setQuery] = useState(''),
|
||||
// [accuracy, setAccuracy] = useState(0.6),
|
||||
// [caseSensitive, setCaseSensitive] = useState(false),
|
||||
// [range, setRange] = useState<[number, number]>()
|
||||
|
||||
const [[results, n], setResults] = useState<
|
||||
[Fuse.FuseResult<Message>[], number]
|
||||
>([[], -1])
|
||||
// const [[results, n], setResults] = useState<[FuseResult<Message>[], number]>([[], -1])
|
||||
|
||||
function search() {
|
||||
setResults([
|
||||
runSearch(currentConvo!, query, {
|
||||
threshold: accuracy,
|
||||
caseSensitive,
|
||||
}),
|
||||
0,
|
||||
])
|
||||
}
|
||||
// function search() {
|
||||
// setResults([
|
||||
// runSearch(currentConvo!, query, {
|
||||
// threshold: accuracy,
|
||||
// caseSensitive,
|
||||
// }),
|
||||
// 0,
|
||||
// ])
|
||||
// }
|
||||
|
||||
function browse(up: boolean) {
|
||||
if (up) {
|
||||
if (n < results.length - 1) setResults(([r, n]) => [r, ++n])
|
||||
} else {
|
||||
if (n > 0) setResults(([r, n]) => [r, --n])
|
||||
}
|
||||
}
|
||||
// function browse(up: boolean) {
|
||||
// if (up) {
|
||||
// if (n < results.length - 1) setResults(([r, n]) => [r, ++n])
|
||||
// } else {
|
||||
// if (n > 0) setResults(([r, n]) => [r, --n])
|
||||
// }
|
||||
// }
|
||||
|
||||
useEffect(() => {
|
||||
currentConvo &&
|
||||
n != -1 &&
|
||||
setRange(chunkRange(currentConvo, results[n].item.time, [6, 8]))
|
||||
}, [results, n])
|
||||
// useEffect(() => {
|
||||
// currentConvo && n != -1 && setRange(chunkRange(currentConvo, results[n].item.time, [6, 8]))
|
||||
// }, [results, n])
|
||||
|
||||
// TODO: add regex mode,
|
||||
// enter to search and next,
|
||||
// more search options
|
||||
// // TODO: add regex mode,
|
||||
// // enter to search and next,
|
||||
// // more search options
|
||||
|
||||
return (
|
||||
<div className="search">
|
||||
<div className="criteria">
|
||||
Search criteria
|
||||
<div>
|
||||
<input
|
||||
type="search"
|
||||
name="query"
|
||||
placeholder="Search query"
|
||||
onChange={e => setQuery(e.target.value)}
|
||||
/>
|
||||
Case sensisite:{' '}
|
||||
<input
|
||||
type="checkbox"
|
||||
name="case"
|
||||
onChange={e => setCaseSensitive(e.target.checked)}
|
||||
/>
|
||||
<input
|
||||
type="range"
|
||||
name="accuracy"
|
||||
min={0}
|
||||
max={1}
|
||||
step="0.025"
|
||||
onChange={e => setAccuracy(parseInt(e.target.value))}
|
||||
/>
|
||||
<input
|
||||
type="button"
|
||||
value="Search"
|
||||
onClick={() => currentConvo && search()}
|
||||
/>
|
||||
<input
|
||||
type="button"
|
||||
value="Previous"
|
||||
onClick={() => browse(false)}
|
||||
/>
|
||||
<input type="button" value="Next" onClick={() => browse(true)} />
|
||||
</div>
|
||||
{n > -1 && <div>Results: {results.length}</div>}
|
||||
</div>
|
||||
<div>
|
||||
{currentConvo && range && results.length > 0 && (
|
||||
<Chat goto={results[n].item.time} range={range} />
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
// return (
|
||||
// <div className="search">
|
||||
// <div className="criteria">
|
||||
// Search criteria
|
||||
// <div>
|
||||
// <input
|
||||
// type="search"
|
||||
// name="query"
|
||||
// placeholder="Search query"
|
||||
// onChange={e => setQuery(e.target.value)}
|
||||
// />
|
||||
// Case sensisite:{' '}
|
||||
// <input
|
||||
// type="checkbox"
|
||||
// name="case"
|
||||
// onChange={e => setCaseSensitive(e.target.checked)}
|
||||
// />
|
||||
// <input
|
||||
// type="range"
|
||||
// name="accuracy"
|
||||
// min={0}
|
||||
// max={1}
|
||||
// step="0.025"
|
||||
// onChange={e => setAccuracy(parseInt(e.target.value))}
|
||||
// />
|
||||
// <input type="button" value="Search" onClick={() => currentConvo && search()} />
|
||||
// <input type="button" value="Previous" onClick={() => browse(false)} />
|
||||
// <input type="button" value="Next" onClick={() => browse(true)} />
|
||||
// </div>
|
||||
// {n > -1 && <div>Results: {results.length}</div>}
|
||||
// </div>
|
||||
// <div>
|
||||
// {currentConvo && range && results.length > 0 && (
|
||||
// <Chat goto={results[n].item.time} range={range} />
|
||||
// )}
|
||||
// </div>
|
||||
// </div>
|
||||
// )
|
||||
// }
|
||||
@@ -1,22 +1,20 @@
|
||||
import 'chart.js/auto'
|
||||
|
||||
import { useContext, useEffect, useState } from 'react'
|
||||
import contextCurrentConvo from '../../Contexts/contextCurrentConvo'
|
||||
|
||||
import './stats.sass'
|
||||
|
||||
import messagesPerDay from './messages-per-day'
|
||||
import messagesPerMember from './messages-per-member'
|
||||
import * as _views from './views'
|
||||
|
||||
import contextCurrentInbox from '../../Contexts/contextCurrentInbox'
|
||||
import { FormControl, InputLabel, MenuItem, Select } from '@mui/material'
|
||||
|
||||
// TODO: add missing renderers
|
||||
|
||||
const renderers = {
|
||||
messagesPerDay,
|
||||
messagesPerMember,
|
||||
}
|
||||
const views = _views as _views.Views
|
||||
|
||||
export default function Stats() {
|
||||
const [[currentConvo]] = useContext(contextCurrentConvo)
|
||||
const [currentInbox] = useContext(contextCurrentInbox),
|
||||
[rawStats, setRawStats] = useState<object | null>(null)
|
||||
|
||||
const [statName, setStatName] = useState(''),
|
||||
[chartStyle, setChartStyle] = useState('')
|
||||
@@ -26,54 +24,78 @@ export default function Stats() {
|
||||
|
||||
useEffect(() => setChartStyle(''), [statName])
|
||||
|
||||
useEffect(() => {
|
||||
if (currentInbox && statName) {
|
||||
currentInbox.getStats(statName).then(setRawStats)
|
||||
}
|
||||
}, [currentInbox, statName])
|
||||
|
||||
return (
|
||||
<div className="stats">
|
||||
<div className="settings">
|
||||
<select onChange={e => setStatName(e.target.value)}>
|
||||
<option value="">select a stat</option>
|
||||
{Object.entries(renderers).map(([id, { label }]) => (
|
||||
<option key={id} value={id}>
|
||||
{label}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
<FormControl fullWidth>
|
||||
<InputLabel id="select-stat">Select a statistic</InputLabel>
|
||||
<Select
|
||||
labelId="select-stat"
|
||||
value={statName}
|
||||
label="Select a statistic"
|
||||
onChange={e => setStatName(e.target.value)}
|
||||
>
|
||||
{Object.entries(_views).map(([id, view]) => (
|
||||
<MenuItem key={id} value={id}>
|
||||
{view.label}
|
||||
</MenuItem>
|
||||
))}
|
||||
</Select>
|
||||
</FormControl>
|
||||
|
||||
{statName && (
|
||||
<select onChange={e => setChartStyle(e.target.value)}>
|
||||
<option value="">select a chart</option>
|
||||
<br />
|
||||
|
||||
{Object.entries(renderers[statName])
|
||||
.filter(([, renderer]) => typeof renderer == 'function')
|
||||
.map(([id]) => (
|
||||
<option key={id} value={id}>
|
||||
{id}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
)}
|
||||
<FormControl fullWidth>
|
||||
{statName && (
|
||||
<>
|
||||
<InputLabel id="select-chart">Select a chart</InputLabel>
|
||||
<Select
|
||||
labelId="select-chart"
|
||||
value={chartStyle}
|
||||
label="Select a chart"
|
||||
onChange={e => setChartStyle(e.target.value)}
|
||||
>
|
||||
{Object.keys(views[statName].renderers)
|
||||
// .filter(([name, renderer]) => typeof renderer == 'function')
|
||||
.map(id => (
|
||||
<MenuItem key={id} value={id}>
|
||||
{id}
|
||||
</MenuItem>
|
||||
))}
|
||||
</Select>
|
||||
</>
|
||||
)}
|
||||
|
||||
{chartStyle && (
|
||||
<div>
|
||||
Stacked:
|
||||
<input
|
||||
type="checkbox"
|
||||
defaultChecked={stacked}
|
||||
onChange={e => setStacked(e.target.checked)}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
{chartStyle && (
|
||||
<>
|
||||
{/* <div>
|
||||
Stacked:
|
||||
<input
|
||||
type="checkbox"
|
||||
defaultChecked={stacked}
|
||||
onChange={e => setStacked(e.target.checked)}
|
||||
/>
|
||||
</div> */}
|
||||
</>
|
||||
)}
|
||||
</FormControl>
|
||||
</div>
|
||||
|
||||
<div className="view">
|
||||
{currentConvo ? (
|
||||
{currentInbox ? (
|
||||
statName ? (
|
||||
chartStyle ? (
|
||||
currentConvo.stats[statName] ? (
|
||||
renderers[statName][chartStyle] ? (
|
||||
//
|
||||
renderers[statName][chartStyle]({
|
||||
// FIXME: charts often overflow offscreen
|
||||
convo: currentConvo,
|
||||
data: currentConvo.stats[statName],
|
||||
rawStats ? (
|
||||
views[statName].renderers[chartStyle] ? (
|
||||
views[statName].renderers[chartStyle]({
|
||||
inbox: currentInbox,
|
||||
rawStats,
|
||||
options: [stacked, year],
|
||||
})
|
||||
) : (
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
// TODO: add a function for groups with more uniform hue spread
|
||||
export function hueFromString(s: string) {
|
||||
// TODO: offset character codes closer to 0
|
||||
return Array(...s).reduce((s, c) => s + c.charCodeAt(0), 0) % 360
|
||||
}
|
||||
|
||||
export function nToMonthName(n: number) {
|
||||
return [
|
||||
'January',
|
||||
'February',
|
||||
'March',
|
||||
'April',
|
||||
'May',
|
||||
'June',
|
||||
'July',
|
||||
'August',
|
||||
'September',
|
||||
'October',
|
||||
'November',
|
||||
'December',
|
||||
][n]
|
||||
}
|
||||
|
||||
export const monthsEmpty = (): 0[][] => [
|
||||
new Array(31).fill(0),
|
||||
new Array(29).fill(0), // FIXME: this will cause problems
|
||||
new Array(31).fill(0),
|
||||
new Array(30).fill(0),
|
||||
new Array(31).fill(0),
|
||||
new Array(30).fill(0),
|
||||
new Array(31).fill(0),
|
||||
new Array(31).fill(0),
|
||||
new Array(30).fill(0),
|
||||
new Array(31).fill(0),
|
||||
new Array(30).fill(0),
|
||||
new Array(31).fill(0),
|
||||
]
|
||||
|
||||
export const monthsLabels = monthsEmpty().map((days, m) =>
|
||||
days.map((_, d) => `${nToMonthName(m)} ${d + 1}`)
|
||||
)
|
||||
@@ -1,36 +0,0 @@
|
||||
import { Bar } from 'react-chartjs-2'
|
||||
import {
|
||||
hueFromString,
|
||||
monthsLabels,
|
||||
statRendererProps,
|
||||
} from '../../../ts/types/Stat'
|
||||
|
||||
function bar({ data, convo, options: [stacked, year] }: statRendererProps) {
|
||||
return (
|
||||
<>
|
||||
<h1>Messages per day</h1>
|
||||
<div className="chart">
|
||||
<Bar
|
||||
about="asdf"
|
||||
data={{
|
||||
labels: monthsLabels.flat(),
|
||||
datasets: convo.members.map(({ name }) => ({
|
||||
label: name,
|
||||
stack: stacked ? 'stack' : name,
|
||||
data: data[name][year].flat(),
|
||||
backgroundColor: `hsl(${hueFromString(
|
||||
name
|
||||
)}deg, 50%, 50%)`,
|
||||
})),
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default {
|
||||
label: 'Messages per day',
|
||||
desc: 'Number of messages sent by each member during a day',
|
||||
bar,
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
// FIXME: charts often overflow offscreen
|
||||
@@ -0,0 +1,16 @@
|
||||
export interface Views {
|
||||
[view: string]: {
|
||||
renderers: {
|
||||
[renderer: string]: (data: any) => JSX.Element
|
||||
}
|
||||
label: string
|
||||
desc: string
|
||||
}
|
||||
}
|
||||
|
||||
export { default as messagesPerDay } from './messages-per-day'
|
||||
export { default as messagesPerMember } from './messages-per-member'
|
||||
export { default as mediaPerMember } from './media-per-member'
|
||||
export { default as wordsPerMember } from './words-per-member'
|
||||
export { default as mostUsedWords } from './most-used-words'
|
||||
export { default as mostUsedReactions } from './most-used-reactions'
|
||||
@@ -0,0 +1,38 @@
|
||||
import { Doughnut, Bar } from 'react-chartjs-2'
|
||||
|
||||
import { hueFromString } from '../common'
|
||||
import Inbox from '../../../../ts/Inbox'
|
||||
|
||||
function stacked_bar({
|
||||
inbox,
|
||||
rawStats,
|
||||
options: [stacked, year],
|
||||
}: {
|
||||
inbox: Inbox
|
||||
rawStats: any
|
||||
options: [boolean, number]
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
<h1>Media per member</h1>
|
||||
<div className="chart">
|
||||
<Bar
|
||||
data={{
|
||||
labels: ['photos', 'gifs', 'videos', 'audio_files', 'files', 'sticker'],
|
||||
datasets: Object.entries(rawStats).map(([name, data]) => ({
|
||||
label: name,
|
||||
data: data,
|
||||
backgroundColor: `hsl(${hueFromString(name)}deg, 50%, 50%)`,
|
||||
})),
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default {
|
||||
renderers: { stacked_bar },
|
||||
label: 'Media per member',
|
||||
desc: 'Total count of media, by type, sent by each member',
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
import { Bar } from 'react-chartjs-2'
|
||||
|
||||
import { hueFromString, monthsLabels } from '../common'
|
||||
import { Inbox } from '../../../Sources'
|
||||
|
||||
function bar({
|
||||
inbox,
|
||||
rawStats,
|
||||
options: [stacked, year],
|
||||
}: {
|
||||
inbox: Inbox
|
||||
rawStats: any
|
||||
options: [boolean, number]
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
<h1>Messages per day</h1>
|
||||
<div className="chart">
|
||||
<Bar
|
||||
about="asdf"
|
||||
data={{
|
||||
labels: monthsLabels.flat(),
|
||||
datasets: inbox.participants.map(({ name }) => ({
|
||||
label: name,
|
||||
stack: stacked ? 'stack' : name,
|
||||
data: rawStats[name][year].flat(),
|
||||
backgroundColor: `hsl(${hueFromString(name)}deg, 50%, 50%)`,
|
||||
})),
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default {
|
||||
renderers: { bar },
|
||||
label: 'Messages per day',
|
||||
desc: 'Number of messages sent by each member during a day',
|
||||
}
|
||||
+15
-6
@@ -1,8 +1,17 @@
|
||||
import { Doughnut } from 'react-chartjs-2'
|
||||
|
||||
import { hueFromString, statRendererProps } from '../../../ts/types/Stat'
|
||||
import { hueFromString } from '../common'
|
||||
import Inbox from '../../../../ts/Inbox'
|
||||
|
||||
export function donut({ data }: statRendererProps) {
|
||||
function donut({
|
||||
inbox,
|
||||
rawStats,
|
||||
options: [stacked, year],
|
||||
}: {
|
||||
inbox: Inbox
|
||||
rawStats: any
|
||||
options: [boolean, number]
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
<h1>Messages per member</h1>
|
||||
@@ -10,12 +19,12 @@ export function donut({ data }: statRendererProps) {
|
||||
<Doughnut
|
||||
about="asdf"
|
||||
data={{
|
||||
labels: Object.keys(data),
|
||||
labels: Object.keys(rawStats),
|
||||
datasets: [
|
||||
{
|
||||
label: 'Messages',
|
||||
data: Object.values(data),
|
||||
backgroundColor: Object.keys(data).map(
|
||||
data: Object.values(rawStats),
|
||||
backgroundColor: Object.keys(rawStats).map(
|
||||
n => `hsl(${hueFromString(n)}deg, 50%, 50%)`
|
||||
),
|
||||
},
|
||||
@@ -28,7 +37,7 @@ export function donut({ data }: statRendererProps) {
|
||||
}
|
||||
|
||||
export default {
|
||||
renderers: { donut },
|
||||
label: 'Messages per member',
|
||||
desc: 'Total number of messages sent by each member',
|
||||
donut,
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
import { Doughnut, Bar } from 'react-chartjs-2'
|
||||
|
||||
import { hueFromString } from '../common'
|
||||
import Inbox from '../../../../ts/Inbox'
|
||||
|
||||
type stats = {
|
||||
[member: string]: {
|
||||
got: {
|
||||
[reaction: string]: number
|
||||
}
|
||||
used: {
|
||||
[reaction: string]: number
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function donut({
|
||||
inbox,
|
||||
rawStats,
|
||||
options: [stacked, year],
|
||||
}: {
|
||||
inbox: Inbox
|
||||
rawStats: stats
|
||||
options: [boolean, number]
|
||||
}) {
|
||||
const members = Object.keys(rawStats)
|
||||
|
||||
const nMembers = members.length
|
||||
|
||||
let labels = Object.values(rawStats)
|
||||
.map(r => [Object.keys(r.got), Object.keys(r.used)])
|
||||
.flat(10)
|
||||
|
||||
labels = Array.from(new Set(labels))
|
||||
|
||||
return (
|
||||
<>
|
||||
<h1>Reactions</h1>
|
||||
<div className="chart">
|
||||
{nMembers == 2 && (
|
||||
<Bar
|
||||
about="asdf"
|
||||
data={{
|
||||
labels,
|
||||
datasets: members.map((n, i) => ({
|
||||
label: n,
|
||||
data: labels.map(l => rawStats[n].used[l] || 0),
|
||||
backgroundColor: `hsl(${hueFromString(n)}deg, 50%, 50%)`,
|
||||
})),
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
|
||||
{nMembers > 2 &&
|
||||
Object.entries(rawStats).map(([name, { got, used }]) => {
|
||||
let all = Array.from(
|
||||
new Set([
|
||||
...Object.keys(got).filter(emoji => got[emoji] > 10),
|
||||
...Object.keys(used).filter(emoji => used[emoji] > 10),
|
||||
])
|
||||
)
|
||||
|
||||
return (
|
||||
<Bar
|
||||
options={{
|
||||
plugins: {
|
||||
title: {
|
||||
display: true,
|
||||
text: name,
|
||||
},
|
||||
},
|
||||
}}
|
||||
data={{
|
||||
labels: all,
|
||||
datasets: [
|
||||
{
|
||||
label: 'Used',
|
||||
data: all.map(l => used[l] || 0),
|
||||
// backgroundColor: `hsl(${hueFromString(name)}deg, 50%, 50%)`,
|
||||
},
|
||||
{
|
||||
label: `Received`,
|
||||
data: all.map(l => -got[l] || 0),
|
||||
// backgroundColor: `hsl(${hueFromString(name)}deg, 50%, 70%)`
|
||||
},
|
||||
],
|
||||
}}
|
||||
/>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default {
|
||||
renderers: { donut },
|
||||
label: 'Reactions',
|
||||
desc: 'Count of reactions used by each member',
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
import { Bar } from 'react-chartjs-2'
|
||||
|
||||
import { hueFromString } from '../common'
|
||||
import Inbox from '../../../../ts/Inbox'
|
||||
|
||||
type stats = {
|
||||
[member: string]: {
|
||||
[word: string]: number
|
||||
}
|
||||
}
|
||||
|
||||
function bar({
|
||||
inbox,
|
||||
rawStats,
|
||||
options: [stacked, year],
|
||||
}: {
|
||||
inbox: Inbox
|
||||
rawStats: stats
|
||||
options: [boolean, number]
|
||||
}) {
|
||||
let top = Object.values(rawStats).map(o =>
|
||||
Object.entries(o)
|
||||
.sort((a, b) => b[1] - a[1])
|
||||
.slice(0, 25)
|
||||
)
|
||||
|
||||
return (
|
||||
<>
|
||||
<h1>Most used words</h1>
|
||||
<div className="chart">
|
||||
{Object.keys(rawStats).map((member, i) => (
|
||||
<Bar
|
||||
data={{
|
||||
labels: top[i].map(([word]) => word),
|
||||
datasets: [
|
||||
{
|
||||
label: member,
|
||||
data: top[i].map(([, count]) => count),
|
||||
backgroundColor: `hsl(${hueFromString(member)}deg, 50%, 50%)`,
|
||||
},
|
||||
],
|
||||
}}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default {
|
||||
renderers: { bar },
|
||||
label: 'Most used words',
|
||||
desc: 'Most used words by each member',
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
import { Doughnut } from 'react-chartjs-2'
|
||||
|
||||
import { hueFromString } from '../common'
|
||||
import Inbox from '../../../../ts/Inbox'
|
||||
|
||||
function donut({
|
||||
inbox,
|
||||
rawStats,
|
||||
options: [stacked, year],
|
||||
}: {
|
||||
inbox: Inbox
|
||||
rawStats: any
|
||||
options: [boolean, number]
|
||||
}) {
|
||||
let labels = Object.keys(rawStats),
|
||||
data = Object.values(rawStats),
|
||||
backgroundColor = Object.keys(rawStats).map(n => `hsl(${hueFromString(n)}deg, 50%, 50%)`)
|
||||
|
||||
return (
|
||||
<>
|
||||
<h1>Words per member</h1>
|
||||
<div className="chart">
|
||||
<Doughnut
|
||||
about="asdf"
|
||||
data={{
|
||||
labels,
|
||||
datasets: [
|
||||
{
|
||||
label: 'Words',
|
||||
data,
|
||||
backgroundColor,
|
||||
},
|
||||
],
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default {
|
||||
renderers: { donut },
|
||||
label: 'Words per member',
|
||||
desc: 'Total number of words typed by each member',
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
export function stringToColor(string: string) {
|
||||
let hash = 0
|
||||
let i
|
||||
|
||||
/* eslint-disable no-bitwise */
|
||||
for (i = 0; i < string.length; i += 1) {
|
||||
hash = string.charCodeAt(i) + ((hash << 5) - hash)
|
||||
}
|
||||
|
||||
let color = '#'
|
||||
|
||||
for (i = 0; i < 3; i += 1) {
|
||||
const value = (hash >> (i * 8)) & 0xff
|
||||
color += `00${value.toString(16)}`.slice(-2)
|
||||
}
|
||||
/* eslint-enable no-bitwise */
|
||||
|
||||
return color
|
||||
}
|
||||
|
||||
export function stringAvatar(title: string) {
|
||||
let segments = title.split(' '),
|
||||
initials = ''
|
||||
|
||||
if (segments.length > 1) {
|
||||
initials = segments[0][0] + segments[1][0]
|
||||
} else initials = segments[0][0]
|
||||
|
||||
return {
|
||||
sx: {
|
||||
bgcolor: stringToColor(title),
|
||||
},
|
||||
children: initials,
|
||||
}
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,4 @@
|
||||
export const eDatabase = new EventTarget()
|
||||
export enum E_DATABASE {
|
||||
DB_READY = 'db-ready',
|
||||
}
|
||||
@@ -89,6 +89,18 @@
|
||||
"css": "mic",
|
||||
"code": 61744,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "8b80d36d4ef43889db10bc1f0dc9a862",
|
||||
"css": "user",
|
||||
"code": 59400,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "31972e4e9d080eaa796290349ae6c1fd",
|
||||
"css": "users",
|
||||
"code": 59401,
|
||||
"src": "fontawesome"
|
||||
}
|
||||
]
|
||||
}
|
||||
Vendored
+2
@@ -7,6 +7,8 @@
|
||||
.icon-th-list:before { content: '\e805'; } /* '' */
|
||||
.icon-video:before { content: '\e806'; } /* '' */
|
||||
.icon-attach:before { content: '\e807'; } /* '' */
|
||||
.icon-user:before { content: '\e808'; } /* '' */
|
||||
.icon-users:before { content: '\e809'; } /* '' */
|
||||
.icon-spin2:before { content: '\e831'; } /* '' */
|
||||
.icon-chat-empty:before { content: '\f0e6'; } /* '' */
|
||||
.icon-plus-squared:before { content: '\f0fe'; } /* '' */
|
||||
|
||||
+8
-6
@@ -1,15 +1,15 @@
|
||||
@font-face {
|
||||
font-family: 'fontello';
|
||||
src: url('../font/fontello.eot?9879669');
|
||||
src: url('../font/fontello.eot?9879669#iefix') format('embedded-opentype'),
|
||||
url('../font/fontello.svg?9879669#fontello') format('svg');
|
||||
src: url('../font/fontello.eot?22772321');
|
||||
src: url('../font/fontello.eot?22772321#iefix') format('embedded-opentype'),
|
||||
url('../font/fontello.svg?22772321#fontello') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'fontello';
|
||||
src: url('data:application/octet-stream;base64,d09GRgABAAAAABkIAA8AAAAAKQAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABW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E1NCYHIyIGBxUUFjsBMjYDETQmByEiBhcRFBYXITI2FzU0JisBIgYHFRQWNzMyNjc1NCYnIyIGBxUUFhczMjY3NTQmByMiBgcVFBY7ATI2NxEUBiMhIiY3ETQ2NyEyFtYUD0gOFhYOSA4WARQPSA4WFg5IDhYBFA9IDhYWDkgOFgI7Fg7+Uw4WARQPAa0PFP3FFA9IDhYWDkgOFgMRFg5HDxQBFg5HDxTVFg7+Uw4WARQPAa0PFNcWDkcPFAEWDkcPFAEWDkcPFAEWDkcPFAEWDkcPFAEWDkcPFEg0JfyDJDYBNCUDfSU0K0gOFgEUD0gOFhbkSA4WFg5IDhYBFOZHDxQBFg5HDxQBFv5hAR4OFhYO/uIOFhYCkUcPFgEUEEcOFhb9i0gOFgEUD0gOFhYBuwEdDxYBFBD+4w8UARbJSA4WFg5IDhYBFOZHDxQBFg5HDxQBFuRHDxYBFBBHDhYWZ/0SJTQ0JQLuJTQBNgABAAD/tAMQAwgANgLine truncated
|
||||
}
|
||||
/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */
|
||||
/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */
|
||||
@@ -17,7 +17,7 @@
|
||||
@media screen and (-webkit-min-device-pixel-ratio:0) {
|
||||
@font-face {
|
||||
font-family: 'fontello';
|
||||
src: url('../font/fontello.svg?9879669#fontello') format('svg');
|
||||
src: url('../font/fontello.svg?22772321#fontello') format('svg');
|
||||
}
|
||||
}
|
||||
*/
|
||||
@@ -65,6 +65,8 @@
|
||||
.icon-th-list:before { content: '\e805'; } /* '' */
|
||||
.icon-video:before { content: '\e806'; } /* '' */
|
||||
.icon-attach:before { content: '\e807'; } /* '' */
|
||||
.icon-user:before { content: '\e808'; } /* '' */
|
||||
.icon-users:before { content: '\e809'; } /* '' */
|
||||
.icon-spin2:before { content: '\e831'; } /* '' */
|
||||
.icon-chat-empty:before { content: '\f0e6'; } /* '' */
|
||||
.icon-plus-squared:before { content: '\f0fe'; } /* '' */
|
||||
|
||||
+2
@@ -7,6 +7,8 @@
|
||||
.icon-th-list { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-video { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-attach { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-user { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-users { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-spin2 { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-chat-empty { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-plus-squared { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
|
||||
Vendored
+2
@@ -18,6 +18,8 @@
|
||||
.icon-th-list { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-video { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-attach { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-user { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-users { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-spin2 { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-chat-empty { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-plus-squared { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
|
||||
Vendored
+9
-7
@@ -1,11 +1,11 @@
|
||||
@font-face {
|
||||
font-family: 'fontello';
|
||||
src: url('../font/fontello.eot?36294298');
|
||||
src: url('../font/fontello.eot?36294298#iefix') format('embedded-opentype'),
|
||||
url('../font/fontello.woff2?36294298') format('woff2'),
|
||||
url('../font/fontello.woff?36294298') format('woff'),
|
||||
url('../font/fontello.ttf?36294298') format('truetype'),
|
||||
url('../font/fontello.svg?36294298#fontello') format('svg');
|
||||
src: url('../font/fontello.eot?35784564');
|
||||
src: url('../font/fontello.eot?35784564#iefix') format('embedded-opentype'),
|
||||
url('../font/fontello.woff2?35784564') format('woff2'),
|
||||
url('../font/fontello.woff?35784564') format('woff'),
|
||||
url('../font/fontello.ttf?35784564') format('truetype'),
|
||||
url('../font/fontello.svg?35784564#fontello') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
@@ -15,7 +15,7 @@
|
||||
@media screen and (-webkit-min-device-pixel-ratio:0) {
|
||||
@font-face {
|
||||
font-family: 'fontello';
|
||||
src: url('../font/fontello.svg?36294298#fontello') format('svg');
|
||||
src: url('../font/fontello.svg?35784564#fontello') format('svg');
|
||||
}
|
||||
}
|
||||
*/
|
||||
@@ -62,6 +62,8 @@
|
||||
.icon-th-list:before { content: '\e805'; } /* '' */
|
||||
.icon-video:before { content: '\e806'; } /* '' */
|
||||
.icon-attach:before { content: '\e807'; } /* '' */
|
||||
.icon-user:before { content: '\e808'; } /* '' */
|
||||
.icon-users:before { content: '\e809'; } /* '' */
|
||||
.icon-spin2:before { content: '\e831'; } /* '' */
|
||||
.icon-chat-empty:before { content: '\f0e6'; } /* '' */
|
||||
.icon-plus-squared:before { content: '\f0fe'; } /* '' */
|
||||
|
||||
+13
-7
@@ -146,11 +146,11 @@
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'fontello';
|
||||
src: url('./font/fontello.eot?98707866');
|
||||
src: url('./font/fontello.eot?98707866#iefix') format('embedded-opentype'),
|
||||
url('./font/fontello.woff?98707866') format('woff'),
|
||||
url('./font/fontello.ttf?98707866') format('truetype'),
|
||||
url('./font/fontello.svg?98707866#fontello') format('svg');
|
||||
src: url('./font/fontello.eot?64883368');
|
||||
src: url('./font/fontello.eot?64883368#iefix') format('embedded-opentype'),
|
||||
url('./font/fontello.woff?64883368') format('woff'),
|
||||
url('./font/fontello.ttf?64883368') format('truetype'),
|
||||
url('./font/fontello.svg?64883368#fontello') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
@@ -239,20 +239,26 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="span3" title="Code: 0xe808">
|
||||
<i class="demo-icon icon-user"></i> <span class="i-name">icon-user</span><span class="i-code">0xe808</span>
|
||||
</div>
|
||||
<div class="span3" title="Code: 0xe809">
|
||||
<i class="demo-icon icon-users"></i> <span class="i-name">icon-users</span><span class="i-code">0xe809</span>
|
||||
</div>
|
||||
<div class="span3" title="Code: 0xe831">
|
||||
<i class="demo-icon icon-spin2 animate-spin"></i> <span class="i-name">icon-spin2</span><span class="i-code">0xe831</span>
|
||||
</div>
|
||||
<div class="span3" title="Code: 0xf0e6">
|
||||
<i class="demo-icon icon-chat-empty"></i> <span class="i-name">icon-chat-empty</span><span class="i-code">0xf0e6</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="span3" title="Code: 0xf0fe">
|
||||
<i class="demo-icon icon-plus-squared"></i> <span class="i-name">icon-plus-squared</span><span class="i-code">0xf0fe</span>
|
||||
</div>
|
||||
<div class="span3" title="Code: 0xf130">
|
||||
<i class="demo-icon icon-mic"></i> <span class="i-name">icon-mic</span><span class="i-code">0xf130</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="span3" title="Code: 0xf146">
|
||||
<i class="demo-icon icon-minus-squared"></i> <span class="i-name">icon-minus-squared</span><span class="i-code">0xf146</span>
|
||||
</div>
|
||||
|
||||
Binary file not shown.
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>Copyright (C) 2022 by original authors @ fontello.com</metadata>
|
||||
<metadata>Copyright (C) 2024 by original authors @ fontello.com</metadata>
|
||||
<defs>
|
||||
<font id="fontello" horiz-adv-x="1000" >
|
||||
<font-face font-family="fontello" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
|
||||
@@ -22,6 +22,10 @@
|
||||
|
||||
<glyph glyph-name="attach" unicode="" d="M784 77q0-65-45-109t-109-44q-75 0-131 55l-434 434q-63 64-63 151 0 89 62 150t150 62q88 0 152-63l338-338q5-5 5-12 0-9-17-26t-26-17q-7 0-12 5l-339 339q-44 43-101 43-59 0-100-42t-40-101q0-58 42-101l433-433q35-36 81-36 36 0 59 24t24 59q0 46-35 81l-325 324q-14 14-33 14-16 0-27-11t-11-27q0-18 14-33l229-228q6-6 6-13 0-9-18-26t-26-17q-6 0-12 5l-229 229q-35 34-35 83 0 46 32 78t77 32q49 0 84-35l324-325q56-54 56-131z" horiz-adv-x="785.7" />
|
||||
|
||||
<glyph glyph-name="user" unicode="" d="M714 69q0-60-35-104t-84-44h-476q-49 0-84 44t-35 104q0 48 5 90t17 85 33 73 52 50 76 19q73-72 174-72t175 72q42 0 75-19t52-50 33-73 18-85 4-90z m-143 495q0-88-62-151t-152-63-151 63-63 151 63 152 151 63 152-63 62-152z" horiz-adv-x="714.3" />
|
||||
|
||||
<glyph glyph-name="users" unicode="" d="M331 350q-90-3-148-71h-75q-45 0-77 22t-31 66q0 197 69 197 4 0 25-11t54-24 66-12q38 0 75 13-3-21-3-37 0-78 45-143z m598-356q0-66-41-105t-108-39h-488q-68 0-108 39t-41 105q0 30 2 58t8 61 14 61 24 54 35 45 48 30 62 11q6 0 24-12t41-26 59-27 76-12 75 12 60 27 41 26 24 12q34 0 62-11t47-30 35-45 24-54 15-61 8-61 2-58z m-572 713q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m393-214q0-89-63-152t-151-62-152 62-63 152 63 151 152 63 151-63 63-151z m321-126q0-43-31-66t-77-22h-75q-57 68-147 71 45 65 45 143 0 16-3 37 37-13 74-13 33 0 67 12t54 24 24 11q69 0 69-197z m-71 340q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z" horiz-adv-x="1071.4" />
|
||||
|
||||
<glyph glyph-name="spin2" unicode="" d="M46 144l0 0c0 0-1 0-1 0-8 18-15 37-21 55-6 19-11 38-15 58-19 99-8 203 35 298 3 6 10 8 15 5 1 0 2 0 2-1l0 0 80-59c5-3 6-9 4-14-5-12-9-25-12-37-4-13-7-26-9-40-11-67-3-137 23-201 2-5 0-10-4-13l0 0-80-56c-5-4-12-2-16 3-1 0-1 1-1 2l0 0z m120 574l0 0c0 1 0 1 0 1 15 13 30 25 46 37 16 11 33 22 51 31 89 50 192 72 297 60 6-1 10-6 10-13 0-1-1-1-1-2l0 0-31-94c-2-5-8-8-13-7-13 0-27 0-40 0-14-1-27-2-40-4-68-11-133-40-186-84-4-3-10-3-14 0l0 0-79 58c-5 3-6 11-2 16 0 0 1 1 2 1l0 0z m588 65l0 0c0 0 1 0 1 0 17-10 34-21 50-32 16-12 31-25 46-38 74-69 127-160 148-262 2-6-2-12-9-13-1 0-1 0-2 0l0 0-100 1c-5 0-10 4-11 9-3 13-8 26-12 38-5 12-10 25-17 36-31 61-78 113-137 150-5 3-6 8-5 13l0 0 31 92c2 6 9 9 15 7 1 0 2-1 2-1l0 0z m244-535l0 0c0 0 0 0 0 0-4-20-9-39-15-57-7-19-14-37-22-55-44-92-114-170-205-221-6-3-13-1-16 4 0 1-1 2-1 2l0 0-30 94c-2 6 1 12 6 14 11 7 22 15 32 23 11 9 21 18 30 27 49 48 84 109 101 176 2 5 6 8 11 8l0 0 98-1c6 0 11-5 11-11 0-1 0-2 0-3l0 0z m-438-395l0 0c0 0 0 0 0 0-20-2-40-3-60-3-20 0-40 1-59 4-102 12-198 54-276 125-5 4-5 11 0 16 0 0 1 1 1 1l0 0 81 58c5 3 12 2 16-2 10-8 20-16 32-23 11-7 22-14 34-20 62-31 131-45 200-41 6 0 10-3 12-8l0 0 29-92c2-6-1-12-7-14-1-1-2-1-3-1l0 0z" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="chat-empty" unicode="" d="M393 636q-85 0-160-29t-118-79-44-107q0-45 30-88t83-73l54-32-19-46q19 11 34 21l25 18 30-6q43-8 85-8 85 0 160 29t118 79 43 106-43 107-118 79-160 29z m0 71q106 0 197-38t143-104 53-144-53-143-143-104-197-38q-48 0-98 9-70-49-155-72-21-5-48-9h-2q-6 0-12 5t-6 12q-1 1-1 3t1 4 1 3l1 3t2 3 2 3 3 3 2 2q3 3 13 14t15 16 12 17 14 21 11 25q-69 40-108 98t-40 125q0 78 53 144t143 104 197 38z m459-652q5-14 11-25t14-21 13-16 14-17 13-14q0 0 2-2t3-3 2-3 2-3l1-3t1-3 1-4-1-3q-2-8-7-13t-12-4q-28 4-48 9-86 23-156 72-50-9-98-9-151 0-263 74 32-3 49-3 90 0 172 25t148 72q69 52 107 119t37 141q0 43-13 85 72-39 114-99t42-128q0-67-40-126t-108-98z" horiz-adv-x="1000" />
|
||||
|
||||
|
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 9.9 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -62,6 +62,10 @@ body {
|
||||
backdrop-filter: blur(5px);
|
||||
}
|
||||
|
||||
.container > .pane > div {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3 {
|
||||
|
||||
+8
-8
@@ -1,5 +1,5 @@
|
||||
import { createRoot } from 'react-dom/client'
|
||||
import lorem from '../ts/lorem'
|
||||
// import lorem from '../ts/lorem'
|
||||
import Main from './Main'
|
||||
|
||||
if (!window.events)
|
||||
@@ -10,12 +10,12 @@ if (!window.events)
|
||||
off: () => {},
|
||||
}
|
||||
|
||||
if (!window.invoke) {
|
||||
window.invoke = async (chanel, data) => {
|
||||
if (chanel == 'get-convo') return JSON.stringify(lorem?.[data]) ?? null
|
||||
if (chanel == 'scan')
|
||||
return Object.keys(lorem).map(id => ({ id, title: lorem[id].title }))
|
||||
}
|
||||
}
|
||||
// if (!window.invoke) {
|
||||
// window.invoke = async (chanel, data) => {
|
||||
// if (chanel == 'get-convo') return JSON.stringify(lorem?.[data]) ?? null
|
||||
// if (chanel == 'scan')
|
||||
// return Object.keys(lorem).map(id => ({ id, title: lorem[id].title }))
|
||||
// }
|
||||
// }
|
||||
|
||||
createRoot(document.getElementById('root')!).render(<Main />)
|
||||
Reference in new issue
Block a user