copious-mail 0.0.0-stage → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +504 -0
- package/README.md +83 -2
- package/bin/index.js +345 -0
- package/client/copiousLogo.svg +123 -0
- package/client/hosted.html +5173 -0
- package/client/mail_styles.css +40 -0
- package/client/mikado.bundle.debug.js +1406 -0
- package/client/mikado.bundle.min.js +68 -0
- package/client/mikado.bundle.module.debug.js +1401 -0
- package/client/mikado.bundle.module.min.js +67 -0
- package/client/mikado.bundle.profiler.debug.js +1490 -0
- package/client/mikado.es5.debug.js +1995 -0
- package/client/mikado.es5.min.js +85 -0
- package/client/mikado.light.debug.js +535 -0
- package/client/mikado.light.min.js +29 -0
- package/client/mikado.light.module.debug.js +530 -0
- package/data/user_list.db +14 -0
- package/index.html +7242 -0
- package/index.js +5 -0
- package/jsconfig.json +32 -0
- package/lib/mail_repo_bridge_ops.js +1158 -0
- package/lib/utils.js +70 -0
- package/lib/websocket_con.js +248 -0
- package/mail_bridge.conf +10 -0
- package/package.json +41 -5
- package/svelte-src/App.svelte +2513 -0
- package/svelte-src/ContactGrid.svelte +98 -0
- package/svelte-src/FloatWindow.svelte +181 -0
- package/svelte-src/MessageDisplay.svelte +230 -0
- package/svelte-src/MessageEditor.svelte +664 -0
- package/svelte-src/MessageListEditor.svelte +133 -0
- package/svelte-src/Thing.svelte +190 -0
- package/svelte-src/ThingFull.svelte +117 -0
- package/svelte-src/ipfs_profile_proxy.js +923 -0
- package/svelte-src/main.js +10 -0
- package/svelte-src/search_box.js +69 -0
- package/svelte-src/utilities.js +180 -0
- package/test/c +28 -0
- package/test/copiousLogo.svg +123 -0
- package/test/index.html +4408 -0
- package/test/index.js +244 -0
- package/test/mail_styles.css +40 -0
- package/test/mikado.bundle.debug.js +1406 -0
- package/test/mikado.bundle.min.js +68 -0
- package/test/mikado.bundle.module.debug.js +1401 -0
- package/test/mikado.bundle.module.min.js +67 -0
- package/test/mikado.bundle.profiler.debug.js +1490 -0
- package/test/mikado.es5.debug.js +1995 -0
- package/test/mikado.es5.min.js +85 -0
- package/test/mikado.light.debug.js +535 -0
- package/test/mikado.light.min.js +29 -0
- package/test/mikado.light.module.debug.js +530 -0
- package/test/tpl/partial/attachment_edit.es5.js +1 -0
- package/test/tpl/partial/attachment_edit.html +5 -0
- package/test/tpl/partial/attachment_edit.js +1 -0
- package/test/tpl/partial/attachment_view.es5.js +1 -0
- package/test/tpl/partial/attachment_view.html +1 -0
- package/test/tpl/partial/attachment_view.js +1 -0
- package/test/tpl/partial/contact_list.es5.js +1 -0
- package/test/tpl/partial/contact_list.html +9 -0
- package/test/tpl/partial/contact_list.js +1 -0
- package/test/tpl/partial/draft_list.es5.js +1 -0
- package/test/tpl/partial/draft_list.html +8 -0
- package/test/tpl/partial/draft_list.js +1 -0
- package/test/tpl/partial/inbox_list.es5.js +1 -0
- package/test/tpl/partial/inbox_list.html +7 -0
- package/test/tpl/partial/inbox_list.js +1 -0
- package/test/tpl/partial/notify_list.es5.js +1 -0
- package/test/tpl/partial/notify_list.html +8 -0
- package/test/tpl/partial/notify_list.js +1 -0
- package/test/tpl/partial/sent_list.es5.js +1 -0
- package/test/tpl/partial/sent_list.html +7 -0
- package/test/tpl/partial/sent_list.js +1 -0
- package/test/tpl/partial/spam_list.es5.js +1 -0
- package/test/tpl/partial/spam_list.html +8 -0
- package/test/tpl/partial/spam_list.js +1 -0
- package/test/tpl/partial/trash_list.es5.js +1 -0
- package/test/tpl/partial/trash_list.html +7 -0
- package/test/tpl/partial/trash_list.js +1 -0
- package/test/tpl/partial/user.es5.js +1 -0
- package/test/tpl/partial/user.html +18 -0
- package/test/tpl/partial/user.js +1 -0
- package/tools/jsdoc.conf +47 -0
- package/tools/templates/docdash/publish.js +843 -0
- package/tools/templates/docdash/static/fonts/Montserrat/Montserrat-Bold.eot +0 -0
- package/tools/templates/docdash/static/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
- package/tools/templates/docdash/static/fonts/Montserrat/Montserrat-Bold.woff +0 -0
- package/tools/templates/docdash/static/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
- package/tools/templates/docdash/static/fonts/Montserrat/Montserrat-Regular.eot +0 -0
- package/tools/templates/docdash/static/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
- package/tools/templates/docdash/static/fonts/Montserrat/Montserrat-Regular.woff +0 -0
- package/tools/templates/docdash/static/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
- package/tools/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
- package/tools/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +978 -0
- package/tools/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
- package/tools/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
- package/tools/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
- package/tools/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
- package/tools/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +1049 -0
- package/tools/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
- package/tools/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
- package/tools/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
- package/tools/templates/docdash/static/scripts/collapse.js +67 -0
- package/tools/templates/docdash/static/scripts/commonNav.js +28 -0
- package/tools/templates/docdash/static/scripts/linenumber.js +25 -0
- package/tools/templates/docdash/static/scripts/nav.js +12 -0
- package/tools/templates/docdash/static/scripts/polyfill.js +4 -0
- package/tools/templates/docdash/static/scripts/prettify/Apache-License-2.0.txt +202 -0
- package/tools/templates/docdash/static/scripts/prettify/lang-css.js +2 -0
- package/tools/templates/docdash/static/scripts/prettify/prettify.js +28 -0
- package/tools/templates/docdash/static/scripts/search.js +99 -0
- package/tools/templates/docdash/static/styles/jsdoc.css +803 -0
- package/tools/templates/docdash/static/styles/prettify.css +80 -0
- package/tools/templates/docdash/tmpl/augments.tmpl +10 -0
- package/tools/templates/docdash/tmpl/container.tmpl +203 -0
- package/tools/templates/docdash/tmpl/details.tmpl +152 -0
- package/tools/templates/docdash/tmpl/example.tmpl +2 -0
- package/tools/templates/docdash/tmpl/examples.tmpl +13 -0
- package/tools/templates/docdash/tmpl/exceptions.tmpl +32 -0
- package/tools/templates/docdash/tmpl/layout.tmpl +102 -0
- package/tools/templates/docdash/tmpl/mainpage.tmpl +15 -0
- package/tools/templates/docdash/tmpl/members.tmpl +38 -0
- package/tools/templates/docdash/tmpl/method.tmpl +132 -0
- package/tools/templates/docdash/tmpl/modifies.tmpl +14 -0
- package/tools/templates/docdash/tmpl/namespace.tmpl +133 -0
- package/tools/templates/docdash/tmpl/params.tmpl +132 -0
- package/tools/templates/docdash/tmpl/properties.tmpl +107 -0
- package/tools/templates/docdash/tmpl/returns.tmpl +19 -0
- package/tools/templates/docdash/tmpl/source.tmpl +8 -0
- package/tools/templates/docdash/tmpl/tutorial.tmpl +19 -0
- package/tools/templates/docdash/tmpl/type.tmpl +26 -0
- package/tools/templates/templates/docdash/publish.js +843 -0
- package/tools/templates/templates/docdash/static/fonts/Montserrat/Montserrat-Bold.eot +0 -0
- package/tools/templates/templates/docdash/static/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
- package/tools/templates/templates/docdash/static/fonts/Montserrat/Montserrat-Bold.woff +0 -0
- package/tools/templates/templates/docdash/static/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
- package/tools/templates/templates/docdash/static/fonts/Montserrat/Montserrat-Regular.eot +0 -0
- package/tools/templates/templates/docdash/static/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
- package/tools/templates/templates/docdash/static/fonts/Montserrat/Montserrat-Regular.woff +0 -0
- package/tools/templates/templates/docdash/static/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
- package/tools/templates/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
- package/tools/templates/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +978 -0
- package/tools/templates/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
- package/tools/templates/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
- package/tools/templates/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
- package/tools/templates/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
- package/tools/templates/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +1049 -0
- package/tools/templates/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
- package/tools/templates/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
- package/tools/templates/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
- package/tools/templates/templates/docdash/static/scripts/collapse.js +67 -0
- package/tools/templates/templates/docdash/static/scripts/commonNav.js +28 -0
- package/tools/templates/templates/docdash/static/scripts/linenumber.js +25 -0
- package/tools/templates/templates/docdash/static/scripts/nav.js +12 -0
- package/tools/templates/templates/docdash/static/scripts/polyfill.js +4 -0
- package/tools/templates/templates/docdash/static/scripts/prettify/Apache-License-2.0.txt +202 -0
- package/tools/templates/templates/docdash/static/scripts/prettify/lang-css.js +2 -0
- package/tools/templates/templates/docdash/static/scripts/prettify/prettify.js +28 -0
- package/tools/templates/templates/docdash/static/scripts/search.js +99 -0
- package/tools/templates/templates/docdash/static/styles/jsdoc.css +803 -0
- package/tools/templates/templates/docdash/static/styles/prettify.css +80 -0
- package/tools/templates/templates/docdash/tmpl/augments.tmpl +10 -0
- package/tools/templates/templates/docdash/tmpl/container.tmpl +203 -0
- package/tools/templates/templates/docdash/tmpl/details.tmpl +152 -0
- package/tools/templates/templates/docdash/tmpl/example.tmpl +2 -0
- package/tools/templates/templates/docdash/tmpl/examples.tmpl +13 -0
- package/tools/templates/templates/docdash/tmpl/exceptions.tmpl +32 -0
- package/tools/templates/templates/docdash/tmpl/layout.tmpl +102 -0
- package/tools/templates/templates/docdash/tmpl/mainpage.tmpl +15 -0
- package/tools/templates/templates/docdash/tmpl/members.tmpl +38 -0
- package/tools/templates/templates/docdash/tmpl/method.tmpl +132 -0
- package/tools/templates/templates/docdash/tmpl/modifies.tmpl +14 -0
- package/tools/templates/templates/docdash/tmpl/namespace.tmpl +133 -0
- package/tools/templates/templates/docdash/tmpl/params.tmpl +132 -0
- package/tools/templates/templates/docdash/tmpl/properties.tmpl +107 -0
- package/tools/templates/templates/docdash/tmpl/returns.tmpl +19 -0
- package/tools/templates/templates/docdash/tmpl/source.tmpl +8 -0
- package/tools/templates/templates/docdash/tmpl/tutorial.tmpl +19 -0
- package/tools/templates/templates/docdash/tmpl/type.tmpl +26 -0
- package/tpl/partial/user.es5.js +1 -0
- package/tpl/partial/user.html +10 -0
- package/tpl/partial/user.js +1 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
// `current` is updated whenever the prop value changes...
|
|
3
|
+
export let things;
|
|
4
|
+
|
|
5
|
+
import Thing from './Thing.svelte';
|
|
6
|
+
import { createEventDispatcher } from 'svelte';
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
const dispatch = createEventDispatcher();
|
|
10
|
+
|
|
11
|
+
function do_display(event) {
|
|
12
|
+
let tid = event.currentTarget.id
|
|
13
|
+
|
|
14
|
+
//console.log(tid)
|
|
15
|
+
|
|
16
|
+
dispatch('message', {
|
|
17
|
+
type: 'click',
|
|
18
|
+
text: ('click ' + tid)
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function show_titles(event) {
|
|
23
|
+
let tid = event.currentTarget.id
|
|
24
|
+
|
|
25
|
+
//console.log(tid)
|
|
26
|
+
|
|
27
|
+
dispatch('message', {
|
|
28
|
+
type: 'over',
|
|
29
|
+
text: ('over ' + tid)
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<div class='grid-container' >
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
{#each things as thing (thing.id)}
|
|
40
|
+
<div id="xy_{thing.id}" class="element-poster" on:click={do_display} on:mouseover="{show_titles}">
|
|
41
|
+
<Thing {...thing}/>
|
|
42
|
+
</div>
|
|
43
|
+
{/each}
|
|
44
|
+
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<style>
|
|
48
|
+
.grid-container {
|
|
49
|
+
display: grid;
|
|
50
|
+
grid-column-gap: 25px;
|
|
51
|
+
grid-row-gap: 10px;
|
|
52
|
+
grid-template-columns: auto auto auto;
|
|
53
|
+
background-color: rgb(250, 250, 242);
|
|
54
|
+
padding: 10px;
|
|
55
|
+
}
|
|
56
|
+
.element-poster {
|
|
57
|
+
padding: 4px;
|
|
58
|
+
border: solid 1px darkgrey;
|
|
59
|
+
background-color: white;
|
|
60
|
+
height: 170px;
|
|
61
|
+
box-shadow: 5px 7px #888888;
|
|
62
|
+
cursor:pointer;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@media (min-width: 1500px) {
|
|
66
|
+
.grid-container {
|
|
67
|
+
display: grid;
|
|
68
|
+
grid-column-gap: 25px;
|
|
69
|
+
grid-row-gap: 10px;
|
|
70
|
+
grid-template-columns: auto auto auto auto;
|
|
71
|
+
background-color: rgb(250, 250, 242);
|
|
72
|
+
padding: 10px;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@media (max-width: 900px) {
|
|
77
|
+
.grid-container {
|
|
78
|
+
display: grid;
|
|
79
|
+
grid-column-gap: 25px;
|
|
80
|
+
grid-row-gap: 10px;
|
|
81
|
+
grid-template-columns: auto auto;
|
|
82
|
+
background-color: rgb(250, 250, 242);
|
|
83
|
+
padding: 10px;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
@media (max-width: 600px) {
|
|
88
|
+
.grid-container {
|
|
89
|
+
display: grid;
|
|
90
|
+
grid-column-gap: 25px;
|
|
91
|
+
grid-row-gap: 10px;
|
|
92
|
+
grid-template-columns: auto;
|
|
93
|
+
background-color: rgb(250, 250, 242);
|
|
94
|
+
padding: 10px;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
</style>
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
<script>
|
|
4
|
+
// `current` is updated whenever the prop value changes...
|
|
5
|
+
|
|
6
|
+
export let title;
|
|
7
|
+
export let scale_size_array;
|
|
8
|
+
export let use_smoke = true;
|
|
9
|
+
export let index = 0;
|
|
10
|
+
|
|
11
|
+
import { onMount } from 'svelte';
|
|
12
|
+
|
|
13
|
+
var SCROLL_WIDTH = 24;
|
|
14
|
+
|
|
15
|
+
//
|
|
16
|
+
|
|
17
|
+
//-- let the popup make draggable & movable.
|
|
18
|
+
var offset = { x: 0, y: 0 };
|
|
19
|
+
|
|
20
|
+
let scale_size_custom = scale_size_array
|
|
21
|
+
|
|
22
|
+
onMount(() => {
|
|
23
|
+
//
|
|
24
|
+
var popup = document.getElementById(`popup_${index}`);
|
|
25
|
+
var popup_bar = document.getElementById(`popup_bar_${index}`);
|
|
26
|
+
var btn_close = document.getElementById(`btn_close_${index}`);
|
|
27
|
+
var smoke = document.getElementById(`smoke_${index}`);
|
|
28
|
+
//
|
|
29
|
+
popup_bar.addEventListener('mousedown', mouseDown, false);
|
|
30
|
+
window.addEventListener('mouseup', mouseUp, false);
|
|
31
|
+
|
|
32
|
+
window.onkeydown = (e) => {
|
|
33
|
+
if(e.keyCode == 27){ // if ESC key pressed
|
|
34
|
+
var btn_close = document.getElementById(`btn_close_${index}`);
|
|
35
|
+
//btn_close.click(e);
|
|
36
|
+
|
|
37
|
+
var popup = document.getElementById(`popup_${index}`);
|
|
38
|
+
popup.style.display = "none";
|
|
39
|
+
if ( smoke ) smoke.style.display = "none";
|
|
40
|
+
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
btn_close.onclick = (e) => {
|
|
45
|
+
var popup = document.getElementById(`popup_${index}`);
|
|
46
|
+
popup.style.display = "none";
|
|
47
|
+
if ( smoke ) smoke.style.display = "none";
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
window.addEventListener("resize",(e) => {
|
|
51
|
+
spreadSmoke(use_smoke);
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
window.start_floating_window = (index) => {
|
|
56
|
+
popup_starter(index)
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
})
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
function fix_height(ii,startup_delta) {
|
|
63
|
+
let txt_area = document.getElementById('blg-window-full-text');
|
|
64
|
+
if ( txt_area ) {
|
|
65
|
+
//
|
|
66
|
+
txt_area._blg_app_resized = true
|
|
67
|
+
//
|
|
68
|
+
let r = txt_area.getBoundingClientRect();
|
|
69
|
+
//
|
|
70
|
+
var popup = document.getElementById(`popup_${ii}`);
|
|
71
|
+
if ( popup ) {
|
|
72
|
+
let rp = popup.getBoundingClientRect();
|
|
73
|
+
let h = Math.floor(rp.bottom - r.top) - startup_delta
|
|
74
|
+
txt_area.style.height = h + "px";
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function popup_starter(ii) {
|
|
80
|
+
spreadSmoke(use_smoke);
|
|
81
|
+
var popup = document.getElementById(`popup_${ii}`);
|
|
82
|
+
if ( popup.style.display !== 'block') {
|
|
83
|
+
popup.style.top = "4px";
|
|
84
|
+
popup.style.left = "4px";
|
|
85
|
+
popup.style.width = (window.innerWidth*scale_size_custom[ii].w) - SCROLL_WIDTH + "px";
|
|
86
|
+
popup.style.height = (window.innerHeight*scale_size_custom[ii].h) - SCROLL_WIDTH + "px";
|
|
87
|
+
popup.style.display = "block";
|
|
88
|
+
setTimeout(() => { fix_height(ii,4); },40)
|
|
89
|
+
}
|
|
90
|
+
setTimeout(() => { fix_height(ii,4); },20)
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function mouseUp() {
|
|
94
|
+
window.removeEventListener('mousemove', popupMove, true);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function mouseDown(e) {
|
|
98
|
+
var popup = document.getElementById(`popup_${index}`);
|
|
99
|
+
offset.x = e.clientX - popup.offsetLeft;
|
|
100
|
+
offset.y = e.clientY - popup.offsetTop;
|
|
101
|
+
window.addEventListener('mousemove', popupMove, true);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function popupMove(e){
|
|
105
|
+
var popup = document.getElementById(`popup_${index}`);
|
|
106
|
+
popup.style.position = 'absolute';
|
|
107
|
+
var top = e.clientY - offset.y;
|
|
108
|
+
var left = e.clientX - offset.x;
|
|
109
|
+
popup.style.top = top + 'px';
|
|
110
|
+
popup.style.left = left + 'px';
|
|
111
|
+
}
|
|
112
|
+
//-- / let the popup make draggable & movable.
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
function spreadSmoke(flg) {
|
|
116
|
+
if ( flg ) {
|
|
117
|
+
var smoke = document.getElementById(`smoke_${index}`);
|
|
118
|
+
if ( smoke ) {
|
|
119
|
+
if ( smoke ) smoke.style.width = window.outerWidth + 100 + "px";
|
|
120
|
+
if ( smoke ) smoke.style.height = window.outerHeight + 100 + "px";
|
|
121
|
+
if (smoke && (flg != undefined) && (flg == true)) smoke.style.display = "block";
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
</script>
|
|
127
|
+
|
|
128
|
+
{#if use_smoke }
|
|
129
|
+
<div id="smoke_{index}" class="smoke">...</div>
|
|
130
|
+
{/if}
|
|
131
|
+
<div id="popup_{index}" class="popup" >
|
|
132
|
+
<div id="popup_bar_{index}" class="popup_bar" >
|
|
133
|
+
{title}
|
|
134
|
+
<span id="btn_close_{index}" class="btn_close" >[X]</span>
|
|
135
|
+
</div>
|
|
136
|
+
<p style="font-size:0.75em;font-weight:bold;color:darkgreen;padding-left:4px">Press ESC to close window.</p>
|
|
137
|
+
<slot></slot>
|
|
138
|
+
</div>
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
<style>
|
|
142
|
+
|
|
143
|
+
.smoke {
|
|
144
|
+
display:none;
|
|
145
|
+
position:absolute;
|
|
146
|
+
top:-30px;
|
|
147
|
+
left:-30px;
|
|
148
|
+
opacity:0.3;
|
|
149
|
+
background-color:black;
|
|
150
|
+
z-index:9998
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.popup {
|
|
154
|
+
display:none;
|
|
155
|
+
background-color:rgb(255, 255, 255);
|
|
156
|
+
position:absolute;
|
|
157
|
+
top:0px;
|
|
158
|
+
z-index:9999;
|
|
159
|
+
box-shadow: 6px 6px 5px #888888;
|
|
160
|
+
border-radius:6px;
|
|
161
|
+
border:1px solid #4f4f4f;
|
|
162
|
+
width: 40%
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.popup_bar {
|
|
166
|
+
width:100%;
|
|
167
|
+
background-color:#76d825;
|
|
168
|
+
position:relative;top:0;
|
|
169
|
+
border-radius:6px 6px 0 0;
|
|
170
|
+
text-align:center;
|
|
171
|
+
height:24px;
|
|
172
|
+
cursor:move
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.btn_close {
|
|
176
|
+
float:right;
|
|
177
|
+
cursor:pointer;
|
|
178
|
+
padding-right:6px;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
</style>
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
|
|
3
|
+
// all of these fields come in from the message
|
|
4
|
+
export let name;
|
|
5
|
+
export let user_cid;
|
|
6
|
+
export let subject;
|
|
7
|
+
export let date;
|
|
8
|
+
export let readers;
|
|
9
|
+
export let business;
|
|
10
|
+
export let public_key;
|
|
11
|
+
export let signer_public_key;
|
|
12
|
+
export let nonce;
|
|
13
|
+
export let message;
|
|
14
|
+
export let is_in_contacts;
|
|
15
|
+
export let attachments;
|
|
16
|
+
|
|
17
|
+
import * as ipfs_profiles from './ipfs_profile_proxy.js'
|
|
18
|
+
import { createEventDispatcher } from 'svelte';
|
|
19
|
+
const dispatch = createEventDispatcher();
|
|
20
|
+
|
|
21
|
+
import * as utils from "./utilities.js"
|
|
22
|
+
|
|
23
|
+
function do_reply() {
|
|
24
|
+
dispatch('message', {
|
|
25
|
+
'cmd': 'reply',
|
|
26
|
+
'cid' : user_cid
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function add_to_contacts() {
|
|
31
|
+
dispatch('message', {
|
|
32
|
+
'cmd': 'new-contact',
|
|
33
|
+
'cid' : user_cid,
|
|
34
|
+
'signer_public_key' : signer_public_key
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
let attachments_display = ""
|
|
39
|
+
$: {
|
|
40
|
+
if ( attachments !== undefined ) {
|
|
41
|
+
if ( Array.isArray(attachments) ) {
|
|
42
|
+
if ( attachments.length ) {
|
|
43
|
+
attachments_display = attachments.join(',')
|
|
44
|
+
} else {
|
|
45
|
+
attachments_display = "none"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
attachments_display = utils.clear_char(attachments_display," ")
|
|
49
|
+
attachments_display = utils.clear_char(attachments_display,"\n")
|
|
50
|
+
attachments_display = utils.clear_char(attachments_display,"\t")
|
|
51
|
+
attachments_display = utils.clear_char(attachments_display," ")
|
|
52
|
+
//
|
|
53
|
+
if ( attachments_display !== "none" ) {
|
|
54
|
+
|
|
55
|
+
}
|
|
56
|
+
} else {
|
|
57
|
+
attachments_display = "none"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
let readers_display = ""
|
|
62
|
+
$: {
|
|
63
|
+
if ( readers !== undefined ) {
|
|
64
|
+
if ( Array.isArray(attachments) ) {
|
|
65
|
+
if ( readers.length ) {
|
|
66
|
+
readers_display = attachments.join(',')
|
|
67
|
+
} else {
|
|
68
|
+
readers_display = "none"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
readers_display = utils.clear_char(attachments_display," ")
|
|
72
|
+
readers_display = utils.clear_char(attachments_display,"\n")
|
|
73
|
+
readers_display = utils.clear_char(attachments_display,"\t")
|
|
74
|
+
readers_display = utils.clear_char(attachments_display," ")
|
|
75
|
+
} else {
|
|
76
|
+
readers_display = "none"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
async function downloader(f_cid) {
|
|
82
|
+
let attached_file = await ipfs_profiles.load_blob_as_url(f_cid)
|
|
83
|
+
generic_downloader(attached_file)
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
</script>
|
|
87
|
+
|
|
88
|
+
<div class="blg-el-wrapper-full" >
|
|
89
|
+
<div style="padding:6px;" >
|
|
90
|
+
<span class="cool-label" style="background-color: darkgreen">{date}</span>
|
|
91
|
+
<span class="cool-label" style="background-color: limegreen">From:</span>
|
|
92
|
+
<h4 class="blg-item-title" style="background-color: inherit;">{name}</h4>
|
|
93
|
+
<span class="show-cid">{user_cid}</span>
|
|
94
|
+
<div class="buttons">
|
|
95
|
+
<div class="little-info">
|
|
96
|
+
{name} is a { business ? "business" : "person" }
|
|
97
|
+
</div>
|
|
98
|
+
{#if !(is_in_contacts) }
|
|
99
|
+
<button on:click={add_to_contacts} >Add Contact</button>
|
|
100
|
+
{/if}
|
|
101
|
+
<button on:click={do_reply} disabled={!(is_in_contacts)} >Reply</button>
|
|
102
|
+
</div>
|
|
103
|
+
<div>
|
|
104
|
+
<span class="cool-label" style="background-color:navy">CC:</span>{readers_display}
|
|
105
|
+
</div>
|
|
106
|
+
<div>
|
|
107
|
+
<span class="cool-label" style="background-color:navy">subject</span> {@html subject}
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
<div style="border-bottom: slategrey solid 1px;margin-bottom: 4px;background-color:snow;">
|
|
111
|
+
<span class="useful-label" >Attachments:</span>
|
|
112
|
+
{#if attachments_display === 'none' }
|
|
113
|
+
<div style="display:inline-block;color:darkgreen">{attachments_display}</div>
|
|
114
|
+
{:else}
|
|
115
|
+
{#each attachments as attached }
|
|
116
|
+
<span class="attachment-click" on:click={() => downloader(attached)}>{attached}</span>
|
|
117
|
+
{/each}
|
|
118
|
+
{/if}
|
|
119
|
+
</div>
|
|
120
|
+
<div class="message-header">
|
|
121
|
+
<span class="useful-label" style="font-size: small;">Message:</span>
|
|
122
|
+
</div>
|
|
123
|
+
<div id="blg-window-full-text" class="full-display" >
|
|
124
|
+
{@html message}
|
|
125
|
+
</div>
|
|
126
|
+
<input type="hidden" id="pub-key" bind:value={public_key} />
|
|
127
|
+
</div>
|
|
128
|
+
|
|
129
|
+
<style>
|
|
130
|
+
|
|
131
|
+
.blg-el-wrapper-full {
|
|
132
|
+
overflow-y: hidden;
|
|
133
|
+
height:inherit;
|
|
134
|
+
padding:4px;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
.cool-label {
|
|
139
|
+
display: inline-block;
|
|
140
|
+
padding: 0.2em 0.5em;
|
|
141
|
+
margin: 0 0.2em 0.2em 0;
|
|
142
|
+
text-align: center;
|
|
143
|
+
border-radius: 0.2em;
|
|
144
|
+
color: white;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.useful-label {
|
|
148
|
+
font-weight: bold;
|
|
149
|
+
color:rgb(36, 71, 51)
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.message-header {
|
|
153
|
+
background-color: rgb(247, 247, 224);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.blg-item-title {
|
|
157
|
+
color:black;
|
|
158
|
+
display: unset;
|
|
159
|
+
border-bottom: 1px darkslateblue solid;
|
|
160
|
+
font-size: large;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
.full-display {
|
|
165
|
+
background-color: rgba(255, 255, 255, 0.9);
|
|
166
|
+
color: rgb(73, 1, 1);
|
|
167
|
+
border-top: solid 2px rgb(88, 4, 88);
|
|
168
|
+
padding: 6px 4px 6px 4px;
|
|
169
|
+
overflow-y: scroll;
|
|
170
|
+
height: 100px;
|
|
171
|
+
border-bottom: solid 1px rgb(88, 4, 88);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
.buttons {
|
|
176
|
+
clear: both;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.buttons button:disabled {
|
|
180
|
+
color:slategrey;
|
|
181
|
+
border-bottom-color: rgb(233, 237, 240);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.buttons button {
|
|
185
|
+
background-color:rgb(255, 249, 240);
|
|
186
|
+
font-size:small;
|
|
187
|
+
border-bottom-color: rgb(236, 250, 226);
|
|
188
|
+
border-radius: 6px;
|
|
189
|
+
font-weight: 580;
|
|
190
|
+
font-style: oblique;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.buttons button:disabled:hover {
|
|
194
|
+
background-color:inherit;
|
|
195
|
+
font-size:small;
|
|
196
|
+
border-bottom-color: rgb(228, 240, 247);
|
|
197
|
+
border-radius: 6px;
|
|
198
|
+
font-weight: 580;
|
|
199
|
+
font-style: oblique;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
button:disabled {
|
|
204
|
+
cursor:not-allowed;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
.little-info {
|
|
209
|
+
font-size: 0.87em;
|
|
210
|
+
display: inline-block;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.show-cid {
|
|
214
|
+
font-weight: bold;
|
|
215
|
+
font-size:x-small;
|
|
216
|
+
font-style: oblique;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
.attachment-click {
|
|
221
|
+
border: beige 1px solid;
|
|
222
|
+
cursor: pointer;
|
|
223
|
+
margin-left: 4px;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.attachment-click:hover {
|
|
227
|
+
color:green;
|
|
228
|
+
background-color: rgb(253, 253, 244);
|
|
229
|
+
}
|
|
230
|
+
</style>
|