merge
BIN
dist/img/help/gallery.png
vendored
Normal file
After Width: | Height: | Size: 2.3 MiB |
BIN
dist/img/help/graph.png
vendored
Normal file
After Width: | Height: | Size: 677 KiB |
BIN
dist/img/help/latex.png
vendored
Normal file
After Width: | Height: | Size: 515 KiB |
3
dist/img/icon/checkbox0.svg
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="0.75" y="0.75" width="22.5" height="22.5" rx="5.25" stroke="#ACA996" stroke-width="1.5"/>
|
||||
</svg>
|
After Width: | Height: | Size: 202 B |
Before Width: | Height: | Size: 285 B After Width: | Height: | Size: 285 B |
19
dist/img/icon/graph.svg
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10.5 3.125C9.91421 3.125 9.4375 2.64829 9.4375 2.0625C9.4375 1.47671 9.91421 1 10.5 1C11.0858 1 11.5625 1.47671 11.5625 2.0625C11.5625 2.64829 11.0858 3.125 10.5 3.125Z" fill="#ACA996"/>
|
||||
<path d="M10.5 18C9.91421 18 9.4375 17.5233 9.4375 16.9375C9.4375 16.3517 9.91421 15.875 10.5 15.875C11.0858 15.875 11.5625 16.3517 11.5625 16.9375C11.5625 17.5233 11.0858 18 10.5 18Z" fill="#ACA996"/>
|
||||
<path d="M15.0078 4.99144C14.5935 4.57777 14.5921 3.90556 15.0078 3.48906C15.4073 3.08815 16.1086 3.08744 16.5102 3.48906C16.926 3.90486 16.926 4.57706 16.5102 4.99215C16.0944 5.40794 15.4229 5.40723 15.0078 4.99144Z" fill="#ACA996"/>
|
||||
<path d="M4.48982 15.5102C4.07403 15.0944 4.07403 14.4222 4.48982 14.0071C4.89074 13.6069 5.59199 13.6069 5.9922 14.0078C6.40657 14.4215 6.40799 15.0937 5.9922 15.5095C5.57711 15.926 4.90491 15.926 4.48982 15.5102Z" fill="#ACA996"/>
|
||||
<path d="M17.9375 10.5625C17.3517 10.5625 16.875 10.0858 16.875 9.5C16.875 8.91421 17.3517 8.4375 17.9375 8.4375C18.5233 8.4375 19 8.91421 19 9.5C19 10.0858 18.5233 10.5625 17.9375 10.5625Z" fill="#ACA996"/>
|
||||
<path d="M3.0625 10.5625C2.47671 10.5625 2 10.0858 2 9.5C2 8.91421 2.47671 8.4375 3.0625 8.4375C3.64829 8.4375 4.125 8.91421 4.125 9.5C4.125 10.0858 3.64829 10.5625 3.0625 10.5625Z" fill="#ACA996"/>
|
||||
<path d="M15.0078 15.5103C14.592 15.0945 14.5927 14.423 15.0085 14.0079C15.4073 13.6077 16.1092 13.607 16.5109 14.0079C16.9252 14.4216 16.9267 15.0945 16.5109 15.5103C16.0951 15.9261 15.4229 15.9261 15.0078 15.5103Z" fill="#ACA996"/>
|
||||
<path d="M4.48982 4.99225C4.07403 4.57716 4.07403 3.90496 4.48982 3.48916C4.89145 3.08825 5.59199 3.08825 5.99291 3.48916C6.40728 3.90425 6.4087 4.57646 5.99149 4.99225C5.57782 5.40733 4.90561 5.40804 4.48982 4.99225Z" fill="#ACA996"/>
|
||||
<path d="M10.5 5.427C10.2067 5.427 9.96875 5.189 9.96875 4.89575V2.77075C9.96875 2.4775 10.2067 2.2395 10.5 2.2395C10.7932 2.2395 11.0312 2.4775 11.0312 2.77075V4.89575C11.0312 5.189 10.7932 5.427 10.5 5.427Z" fill="#ACA996"/>
|
||||
<path d="M10.5 16.7605C10.2067 16.7605 9.96875 16.5225 9.96875 16.2292V14.1042C9.96875 13.811 10.2067 13.573 10.5 13.573C10.7932 13.573 11.0312 13.811 11.0312 14.1042V16.2292C11.0312 16.5225 10.7932 16.7605 10.5 16.7605Z" fill="#ACA996"/>
|
||||
<path d="M13.7556 6.77573C13.6196 6.77573 13.4836 6.72403 13.3801 6.6199C13.1726 6.41236 13.1726 6.0759 13.3801 5.86836L14.8825 4.36598C15.0901 4.15844 15.4265 4.15844 15.6341 4.36598C15.8416 4.57353 15.8416 4.90998 15.6341 5.11753L14.1317 6.6199C14.0276 6.72403 13.8916 6.77573 13.7556 6.77573Z" fill="#ACA996"/>
|
||||
<path d="M5.74201 14.789C5.60601 14.789 5.47001 14.7373 5.36659 14.6332C5.15905 14.4257 5.15905 14.0892 5.36659 13.8817L6.86897 12.3793C7.07651 12.1717 7.41297 12.1717 7.62051 12.3793C7.82805 12.5868 7.82805 12.9233 7.62051 13.1308L6.11814 14.6332C6.01401 14.7373 5.87801 14.789 5.74201 14.789Z" fill="#ACA996"/>
|
||||
<path d="M17.2292 10.0312H15.1042C14.811 10.0312 14.573 9.79325 14.573 9.5C14.573 9.20675 14.811 8.96875 15.1042 8.96875H17.2292C17.5225 8.96875 17.7605 9.20675 17.7605 9.5C17.7605 9.79325 17.5225 10.0312 17.2292 10.0312Z" fill="#ACA996"/>
|
||||
<path d="M5.89575 10.0312H3.77075C3.4775 10.0312 3.2395 9.79325 3.2395 9.5C3.2395 9.20675 3.4775 8.96875 3.77075 8.96875H5.89575C6.189 8.96875 6.427 9.20675 6.427 9.5C6.427 9.79325 6.189 10.0312 5.89575 10.0312Z" fill="#ACA996"/>
|
||||
<path d="M15.2579 14.789C15.1219 14.789 14.9859 14.7373 14.8825 14.6332L13.3801 13.1308C13.1726 12.9233 13.1726 12.5868 13.3801 12.3793C13.5877 12.1717 13.9241 12.1717 14.1317 12.3793L15.6341 13.8817C15.8416 14.0892 15.8416 14.4257 15.6341 14.6332C15.5299 14.7373 15.3939 14.789 15.2579 14.789Z" fill="#ACA996"/>
|
||||
<path d="M7.24448 6.77573C7.10848 6.77573 6.97248 6.72403 6.86907 6.6199L5.36598 5.11753C5.15844 4.90998 5.15844 4.57353 5.36598 4.36598C5.57353 4.15844 5.90998 4.15844 6.11753 4.36598L7.6199 5.86836C7.82744 6.0759 7.82744 6.41236 7.6199 6.6199C7.51648 6.72403 7.38048 6.77573 7.24448 6.77573Z" fill="#ACA996"/>
|
||||
<rect x="8.375" y="7.375" width="4.25" height="4.25" rx="2.125" fill="#ACA996"/>
|
||||
</svg>
|
After Width: | Height: | Size: 4 KiB |
6
dist/img/icon/home-big.svg
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="2.75" y="2.75" width="7.5" height="7.5" rx="1.25" stroke="#ACA996" stroke-width="1.5"/>
|
||||
<rect x="13.75" y="2.75" width="7.5" height="7.5" rx="1.25" stroke="#ACA996" stroke-width="1.5"/>
|
||||
<rect x="2.75" y="13.75" width="7.5" height="7.5" rx="1.25" stroke="#ACA996" stroke-width="1.5"/>
|
||||
<rect x="13.75" y="13.75" width="7.5" height="7.5" rx="1.25" stroke="#ACA996" stroke-width="1.5"/>
|
||||
</svg>
|
After Width: | Height: | Size: 495 B |
10
dist/img/icon/home.svg
vendored
|
@ -1,6 +1,6 @@
|
|||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="2.75" y="2.75" width="7.5" height="7.5" rx="1.25" stroke="#ACA996" stroke-width="1.5"/>
|
||||
<rect x="13.75" y="2.75" width="7.5" height="7.5" rx="1.25" stroke="#ACA996" stroke-width="1.5"/>
|
||||
<rect x="2.75" y="13.75" width="7.5" height="7.5" rx="1.25" stroke="#ACA996" stroke-width="1.5"/>
|
||||
<rect x="13.75" y="13.75" width="7.5" height="7.5" rx="1.25" stroke="#ACA996" stroke-width="1.5"/>
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M7 3.5H3C2.72386 3.5 2.5 3.72386 2.5 4V7C2.5 7.27614 2.72386 7.5 3 7.5H7C7.27614 7.5 7.5 7.27614 7.5 7V4C7.5 3.72386 7.27614 3.5 7 3.5ZM3 2C1.89543 2 1 2.89543 1 4V7C1 8.10457 1.89543 9 3 9H7C8.10457 9 9 8.10457 9 7V4C9 2.89543 8.10457 2 7 2H3Z" fill="#ACA996"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M7 12.5H3C2.72386 12.5 2.5 12.7239 2.5 13V16C2.5 16.2761 2.72386 16.5 3 16.5H7C7.27614 16.5 7.5 16.2761 7.5 16V13C7.5 12.7239 7.27614 12.5 7 12.5ZM3 11C1.89543 11 1 11.8954 1 13V16C1 17.1046 1.89543 18 3 18H7C8.10457 18 9 17.1046 9 16V13C9 11.8954 8.10457 11 7 11H3Z" fill="#ACA996"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M17 3.5H13C12.7239 3.5 12.5 3.72386 12.5 4V7C12.5 7.27614 12.7239 7.5 13 7.5H17C17.2761 7.5 17.5 7.27614 17.5 7V4C17.5 3.72386 17.2761 3.5 17 3.5ZM13 2C11.8954 2 11 2.89543 11 4V7C11 8.10457 11.8954 9 13 9H17C18.1046 9 19 8.10457 19 7V4C19 2.89543 18.1046 2 17 2H13Z" fill="#ACA996"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M17 12.5H13C12.7239 12.5 12.5 12.7239 12.5 13V16C12.5 16.2761 12.7239 16.5 13 16.5H17C17.2761 16.5 17.5 16.2761 17.5 16V13C17.5 12.7239 17.2761 12.5 17 12.5ZM13 11C11.8954 11 11 11.8954 11 13V16C11 17.1046 11.8954 18 13 18H17C18.1046 18 19 17.1046 19 16V13C19 11.8954 18.1046 11 17 11H13Z" fill="#ACA996"/>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 495 B After Width: | Height: | Size: 1.4 KiB |
4
dist/img/icon/plus.svg
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="9.25" y="2" width="1.5" height="16" rx="0.75" fill="#ACA996"/>
|
||||
<rect x="18" y="9.25" width="1.5" height="16" rx="0.75" transform="rotate(90 18 9.25)" fill="#ACA996"/>
|
||||
</svg>
|
After Width: | Height: | Size: 279 B |
Before Width: | Height: | Size: 599 B After Width: | Height: | Size: 599 B |
Before Width: | Height: | Size: 737 B After Width: | Height: | Size: 737 B |
Before Width: | Height: | Size: 632 B After Width: | Height: | Size: 632 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 293 B After Width: | Height: | Size: 293 B |
Before Width: | Height: | Size: 531 B After Width: | Height: | Size: 531 B |
Before Width: | Height: | Size: 367 B After Width: | Height: | Size: 367 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 942 B After Width: | Height: | Size: 942 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 1 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 603 B After Width: | Height: | Size: 603 B |
Before Width: | Height: | Size: 590 B After Width: | Height: | Size: 590 B |
Before Width: | Height: | Size: 627 B After Width: | Height: | Size: 627 B |
Before Width: | Height: | Size: 878 B After Width: | Height: | Size: 878 B |
Before Width: | Height: | Size: 302 B After Width: | Height: | Size: 302 B |
Before Width: | Height: | Size: 531 B After Width: | Height: | Size: 531 B |
Before Width: | Height: | Size: 415 B After Width: | Height: | Size: 415 B |
Before Width: | Height: | Size: 919 B After Width: | Height: | Size: 919 B |
Before Width: | Height: | Size: 807 B After Width: | Height: | Size: 807 B |
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 693 B After Width: | Height: | Size: 693 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
296
dist/workers/worker.js
vendored
|
@ -20,9 +20,12 @@ let forceProps = {};
|
|||
let images = {};
|
||||
let simulation = null;
|
||||
let Color = {
|
||||
bg: '#fff',
|
||||
text: '#2c2b27',
|
||||
link: {
|
||||
0: '#f3f2ec',
|
||||
1: '#2aa7ee',
|
||||
0: '#dfddd0',
|
||||
1: '#8c9ea5',
|
||||
'over': '#ffd15b',
|
||||
},
|
||||
node: {
|
||||
common: '#f3f2ec',
|
||||
|
@ -31,6 +34,7 @@ let Color = {
|
|||
over: '#d6f5f3',
|
||||
},
|
||||
};
|
||||
let LineWidth = 0.25;
|
||||
|
||||
addEventListener('message', ({ data }) => {
|
||||
if (this[data.id]) {
|
||||
|
@ -57,21 +61,13 @@ init = (data) => {
|
|||
if (d.isRoot) {
|
||||
d.fx = width / 2;
|
||||
d.fy = height / 2;
|
||||
d.radius = 10;
|
||||
};
|
||||
|
||||
let color = '#929082';
|
||||
if (forceProps.filter && d.name.match(forceProps.filter)) {
|
||||
color = '#000';
|
||||
};
|
||||
if (d.isRoot) {
|
||||
color = '#000';
|
||||
d.radius = 6;
|
||||
};
|
||||
|
||||
octx.save();
|
||||
octx.clearRect(0, 0, 250, 40);
|
||||
octx.font = '20px Arial';
|
||||
octx.fillStyle = color;
|
||||
octx.font = '20px Helvetica';
|
||||
octx.fillStyle = Color.text;
|
||||
octx.textAlign = 'center';
|
||||
octx.fillText(d.shortName, 125, 20);
|
||||
octx.restore();
|
||||
|
@ -83,6 +79,7 @@ init = (data) => {
|
|||
initForces();
|
||||
simulation.on('tick', () => { redraw(); });
|
||||
simulation.on('end', () => { simulation.alphaTarget(1); });
|
||||
simulation.tick(1000);
|
||||
};
|
||||
|
||||
image = ({ src, bitmap }) => {
|
||||
|
@ -156,8 +153,9 @@ draw = () => {
|
|||
return;
|
||||
};
|
||||
|
||||
drawBend(d, 0.05, 3, 2, false, forceProps.markers)
|
||||
drawLine(d, 1, 1, false, forceProps.markers);
|
||||
});
|
||||
|
||||
nodes.forEach(d => {
|
||||
if (!forceProps.orphans && d.isOrphan && !d.isRoot) {
|
||||
return;
|
||||
|
@ -165,6 +163,7 @@ draw = () => {
|
|||
|
||||
drawNode(d);
|
||||
});
|
||||
|
||||
ctx.restore();
|
||||
};
|
||||
|
||||
|
@ -172,173 +171,83 @@ redraw = () => {
|
|||
requestAnimationFrame(draw);
|
||||
};
|
||||
|
||||
drawBend = (d, bend, aLen, aWidth, sArrow, eArrow) => {
|
||||
drawLine = (d, aWidth, aLength, arrowStart, arrowEnd) => {
|
||||
let source = nodes.find(it => it.id == d.source.id);
|
||||
let x1 = d.source.x;
|
||||
let y1 = d.source.y;
|
||||
let r1 = d.source.radius + 3;
|
||||
let x2 = d.target.x;
|
||||
let y2 = d.target.y;
|
||||
let startRadius = d.source.radius;
|
||||
let endRadius = d.target.radius;
|
||||
let mx, my, dist, nx, ny, x3, y3, cx, cy, radius, a1, a2;
|
||||
let arrowAng, aa1, aa2, b1;
|
||||
let r2 = d.target.radius + 3;
|
||||
let bg = Color.link[d.type] || Color.link[0];
|
||||
|
||||
// find mid point
|
||||
mx = (x1 + x2) / 2;
|
||||
my = (y1 + y2) / 2;
|
||||
if (source.isOver) {
|
||||
bg = Color.link.over;
|
||||
};
|
||||
|
||||
// get vector from start to end
|
||||
nx = x2 - x1;
|
||||
ny = y2 - y1;
|
||||
|
||||
// find dist
|
||||
dist = Math.sqrt(nx * nx + ny * ny);
|
||||
|
||||
// normalise vector
|
||||
nx /= dist;
|
||||
ny /= dist;
|
||||
|
||||
// The next section has some optional behaviours
|
||||
// that set the dist from the line mid point to the arc mid point
|
||||
// You should only use one of the following sets
|
||||
|
||||
//-- Uncomment for behaviour of arcs
|
||||
// This make the lines flatten at distance
|
||||
//b1 = (bend * 300) / Math.pow(dist,1/4);
|
||||
let a1 = Math.atan2(y2 - y1, x2 - x1);
|
||||
let a2 = Math.atan2(y1 - y2, x1 - x2);
|
||||
|
||||
//-- Uncomment for behaviour of arcs
|
||||
// Arc bending amount close to constant
|
||||
// b1 = bend * dist * 0.5
|
||||
let sx1 = x1 + r1 * Math.cos(a1);
|
||||
let sy1 = y1 + r1 * Math.sin(a1);
|
||||
let sx2 = x2 + r2 * Math.cos(a2);
|
||||
let sy2 = y2 + r2 * Math.sin(a2);
|
||||
let mx = (x1 + x2) / 2;
|
||||
let my = (y1 + y2) / 2;
|
||||
|
||||
b1 = bend * dist;
|
||||
|
||||
// Arc amount bend more at dist
|
||||
x3 = mx + ny * b1;
|
||||
y3 = my - nx * b1;
|
||||
|
||||
// get the radius
|
||||
radius = (0.5 * ((x1-x3) * (x1-x3) + (y1-y3) * (y1-y3)) / (b1));
|
||||
|
||||
// use radius to get arc center
|
||||
cx = x3 - ny * radius;
|
||||
cy = y3 + nx * radius;
|
||||
|
||||
// radius needs to be positive for the rest of the code
|
||||
radius = Math.abs(radius);
|
||||
|
||||
// find angle from center to start and end
|
||||
a1 = Math.atan2(y1 - cy, x1 - cx);
|
||||
a2 = Math.atan2(y2 - cy, x2 - cx);
|
||||
|
||||
// normalise angles
|
||||
a1 = (a1 + Math.PI * 2) % (Math.PI * 2);
|
||||
a2 = (a2 + Math.PI * 2) % (Math.PI * 2);
|
||||
|
||||
// ensure angles are in correct directions
|
||||
if (bend < 0) {
|
||||
if (a1 < a2) {
|
||||
a1 += Math.PI * 2;
|
||||
};
|
||||
} else {
|
||||
if (a2 < a1) {
|
||||
a2 += Math.PI * 2;
|
||||
};
|
||||
};
|
||||
|
||||
// convert arrow length to angular len
|
||||
arrowAng = aLen / radius * Math.sign(bend);
|
||||
// get angular length of start and end circles and move arc start and ends
|
||||
|
||||
a1 += startRadius / radius * Math.sign(bend);
|
||||
a2 -= endRadius / radius * Math.sign(bend);
|
||||
aa1 = a1;
|
||||
aa2 = a2;
|
||||
|
||||
// check for too close and no room for arc
|
||||
if ((bend < 0 && a1 < a2) || (bend > 0 && a2 < a1)) {
|
||||
return;
|
||||
};
|
||||
|
||||
// is there a start arrow
|
||||
if (sArrow) { aa1 += arrowAng } // move arc start to inside arrow
|
||||
// is there an end arrow
|
||||
if (eArrow) { aa2 -= arrowAng } // move arc end to inside arrow
|
||||
|
||||
// check for too close and remove arrows if so
|
||||
if ((bend < 0 && aa1 < aa2) || (bend > 0 && aa2 < aa1)) {
|
||||
sArrow = false;
|
||||
eArrow = false;
|
||||
aa1 = a1;
|
||||
aa2 = a2;
|
||||
};
|
||||
|
||||
// draw arc
|
||||
ctx.beginPath();
|
||||
ctx.arc(cx, cy, radius, aa1, aa2, bend < 0);
|
||||
ctx.lineWidth = 0.5;
|
||||
ctx.lineCap = 'round';
|
||||
ctx.lineWidth = LineWidth;
|
||||
ctx.strokeStyle = bg;
|
||||
ctx.stroke();
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(sx1, sy1);
|
||||
ctx.lineTo(sx2, sy2);
|
||||
ctx.stroke();
|
||||
|
||||
ctx.beginPath();
|
||||
|
||||
// draw start arrow if needed
|
||||
if (sArrow){
|
||||
ctx.moveTo(
|
||||
Math.cos(a1) * radius + cx,
|
||||
Math.sin(a1) * radius + cy
|
||||
);
|
||||
ctx.lineTo(
|
||||
Math.cos(aa1) * (radius + aWidth / 2) + cx,
|
||||
Math.sin(aa1) * (radius + aWidth / 2) + cy
|
||||
);
|
||||
ctx.lineTo(
|
||||
Math.cos(aa1) * (radius - aWidth / 2) + cx,
|
||||
Math.sin(aa1) * (radius - aWidth / 2) + cy
|
||||
);
|
||||
ctx.closePath();
|
||||
};
|
||||
|
||||
// draw end arrow if needed
|
||||
if (eArrow){
|
||||
ctx.moveTo(
|
||||
Math.cos(a2) * radius + cx,
|
||||
Math.sin(a2) * radius + cy
|
||||
);
|
||||
ctx.lineTo(
|
||||
Math.cos(aa2) * (radius - aWidth / 2) + cx,
|
||||
Math.sin(aa2) * (radius - aWidth / 2) + cy
|
||||
);
|
||||
ctx.lineTo(
|
||||
Math.cos(aa2) * (radius + aWidth / 2) + cx,
|
||||
Math.sin(aa2) * (radius + aWidth / 2) + cy
|
||||
);
|
||||
ctx.closePath();
|
||||
if (arrowStart) {
|
||||
ctx.save();
|
||||
ctx.translate(sx1, sy1);
|
||||
ctx.rotate(a1);
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(aLength, -aWidth);
|
||||
ctx.lineTo(0, 0);
|
||||
ctx.lineTo(aLength, aWidth);
|
||||
ctx.stroke();
|
||||
ctx.restore();
|
||||
};
|
||||
|
||||
ctx.lineWidth = 0.5;
|
||||
ctx.fillStyle = bg;
|
||||
ctx.fill();
|
||||
if (arrowEnd) {
|
||||
ctx.save();
|
||||
ctx.translate(sx2, sy2);
|
||||
ctx.rotate(a2);
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(aLength, -aWidth);
|
||||
ctx.lineTo(0, 0);
|
||||
ctx.lineTo(aLength, aWidth);
|
||||
ctx.stroke();
|
||||
ctx.restore();
|
||||
};
|
||||
|
||||
// draw name
|
||||
if (d.name && forceProps.labels && (transform.k > 2.5)) {
|
||||
let angle = 0;
|
||||
let dy = 0;
|
||||
|
||||
if ((y1 > y2) && (x1 > x2)) {
|
||||
angle = Math.atan2(y1 - y2, x1 - x2);
|
||||
dy = b1;
|
||||
} else {
|
||||
angle = Math.atan2(y2 - y1, x2 - x1);
|
||||
dy = -b1;
|
||||
};
|
||||
|
||||
if (d.name && forceProps.labels && (transform.k > 1.5)) {
|
||||
ctx.save();
|
||||
ctx.translate(mx, my);
|
||||
ctx.rotate(angle);
|
||||
ctx.rotate(a2);
|
||||
ctx.font = 'italic 3px Helvetica';
|
||||
|
||||
const metrics = ctx.measureText(d.name);
|
||||
const left = metrics.actualBoundingBoxLeft * -1;
|
||||
const top = metrics.actualBoundingBoxAscent * -1;
|
||||
const right = metrics.actualBoundingBoxRight;
|
||||
const bottom = metrics.actualBoundingBoxDescent;
|
||||
const width = right - left;
|
||||
const height = bottom - top;
|
||||
|
||||
ctx.fillStyle = Color.bg;
|
||||
ctx.fillRect(left - width / 2 - 1, top + 0.5, width + 2, height + 1);
|
||||
|
||||
ctx.fillStyle = bg;
|
||||
ctx.textAlign = 'center';
|
||||
ctx.fillText(d.name, 0, dy - 1.5);
|
||||
ctx.fillText(d.name, 0, 1);
|
||||
|
||||
ctx.restore();
|
||||
};
|
||||
|
@ -348,11 +257,12 @@ drawNode = (d) => {
|
|||
let bg = Color.node.common;
|
||||
let stroke = '';
|
||||
let width = 0;
|
||||
let img = images[d.src];
|
||||
|
||||
if (forceProps.filter && d.name.match(forceProps.filter)) {
|
||||
bg = Color.node.filter;
|
||||
stroke = '#000';
|
||||
width = 0.5;
|
||||
width = LineWidth;
|
||||
};
|
||||
|
||||
if (d.isRoot) {
|
||||
|
@ -361,12 +271,18 @@ drawNode = (d) => {
|
|||
};
|
||||
|
||||
if (d.isOver) {
|
||||
bg = Color.node.over;
|
||||
stroke = Color.link.over;
|
||||
width = 1;
|
||||
};
|
||||
|
||||
ctx.beginPath();
|
||||
ctx.arc(d.x, d.y, d.radius, 0, 2 * Math.PI, true);
|
||||
ctx.fillStyle = bg;
|
||||
if ([ 1, 2 ].indexOf(d.layout) >= 0) {
|
||||
ctx.beginPath();
|
||||
ctx.arc(d.x, d.y, d.radius, 0, 2 * Math.PI, true);
|
||||
ctx.closePath();
|
||||
} else {
|
||||
const r = d.iconImage ? d.radius / 8 : d.radius / 4;
|
||||
roundedRect(d.x - d.radius, d.y - d.radius, d.radius * 2, d.radius * 2, r);
|
||||
};
|
||||
|
||||
if (stroke) {
|
||||
ctx.lineWidth = width;
|
||||
|
@ -374,39 +290,71 @@ drawNode = (d) => {
|
|||
ctx.stroke();
|
||||
};
|
||||
|
||||
ctx.fillStyle = bg;
|
||||
ctx.fill();
|
||||
|
||||
if (forceProps.labels && d.textBitmap && (transform.k > 1.5)) {
|
||||
ctx.drawImage(d.textBitmap, 0, 0, 250, 40, d.x - 14, d.y + d.radius + 1, 28, 5);
|
||||
const h = 5;
|
||||
const div = 6.25;
|
||||
ctx.drawImage(d.textBitmap, 0, 0, 250, 40, d.x - h * div / 2, d.y + d.radius + 1, h * div, h);
|
||||
};
|
||||
|
||||
if (!images[d.src]) {
|
||||
if (!img) {
|
||||
return;
|
||||
};
|
||||
|
||||
let x = d.x - d.radius / 2;
|
||||
let y = d.y - d.radius / 2;
|
||||
let w = d.radius;
|
||||
let h = d.radius;
|
||||
|
||||
ctx.save();
|
||||
|
||||
if (d.iconImage) {
|
||||
x = d.x - d.radius;
|
||||
y = d.y - d.radius;
|
||||
w = d.radius * 2;
|
||||
|
||||
ctx.beginPath();
|
||||
ctx.arc(d.x, d.y, d.radius, 0, 2 * Math.PI, true);
|
||||
ctx.closePath();
|
||||
if ([ 1, 2 ].indexOf(d.layout) >= 0) {
|
||||
ctx.beginPath();
|
||||
ctx.arc(d.x, d.y, d.radius, 0, 2 * Math.PI, true);
|
||||
ctx.closePath();
|
||||
} else {
|
||||
const r = d.iconImage ? d.radius / 8 : d.radius / 4;
|
||||
roundedRect(d.x - d.radius, d.y - d.radius, d.radius * 2, d.radius * 2, r);
|
||||
};
|
||||
|
||||
ctx.fill();
|
||||
|
||||
ctx.clip();
|
||||
|
||||
if (img.width > img.height) {
|
||||
h = d.radius * 2;
|
||||
w = h * (img.width / img.height)
|
||||
x -= (w - d.radius * 2) / 2;
|
||||
} else {
|
||||
w = d.radius * 2;
|
||||
h = w * (img.height / img.width);
|
||||
y -= (h - d.radius * 2) / 2;
|
||||
};
|
||||
};
|
||||
|
||||
ctx.drawImage(images[d.src], 0, 0, images[d.src].width, images[d.src].width, x, y, w, w);
|
||||
ctx.drawImage(img, 0, 0, img.width, img.height, x, y, w, h);
|
||||
ctx.restore();
|
||||
};
|
||||
|
||||
roundedRect = (x, y, width, height, radius) => {
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(x + radius, y);
|
||||
ctx.lineTo(x + width - radius, y);
|
||||
ctx.quadraticCurveTo(x + width, y, x + width, y + radius);
|
||||
ctx.lineTo(x + width, y + height - radius);
|
||||
ctx.quadraticCurveTo(x + width, y + height, x + width - radius, y + height);
|
||||
ctx.lineTo(x + radius, y + height);
|
||||
ctx.quadraticCurveTo(x, y + height, x, y + height - radius);
|
||||
ctx.lineTo(x, y + radius);
|
||||
ctx.quadraticCurveTo(x, y, x + radius, y);
|
||||
ctx.closePath();
|
||||
};
|
||||
|
||||
onZoom = (data) => {
|
||||
const { x, y, k } = data.transform;
|
||||
|
||||
|
|
19
electron.js
|
@ -309,6 +309,10 @@ function createWindow () {
|
|||
autoUpdater.downloadUpdate();
|
||||
});
|
||||
|
||||
ipcMain.on('updateConfirm', (e) => {
|
||||
exit(true);
|
||||
});
|
||||
|
||||
ipcMain.on('updateCancel', (e) => {
|
||||
isUpdating = false;
|
||||
clearTimeout(timeoutUpdate);
|
||||
|
@ -499,7 +503,7 @@ function menuInit () {
|
|||
click: () => { send('commandGlobal', 'id'); }
|
||||
},
|
||||
{
|
||||
label: 'Shortcuts',
|
||||
label: 'Shortcuts', accelerator: 'Ctrl+Space',
|
||||
click: () => { send('popup', 'shortcut'); }
|
||||
},
|
||||
{
|
||||
|
@ -594,11 +598,7 @@ function menuInit () {
|
|||
setConfig({ experimental: !config.experimental });
|
||||
win.reload();
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Graph',
|
||||
click: () => { send('popup', 'graph', {}); }
|
||||
},
|
||||
}
|
||||
]
|
||||
});
|
||||
};
|
||||
|
@ -700,7 +700,12 @@ function autoUpdaterInit () {
|
|||
isUpdating = false;
|
||||
Util.log('info', 'Update downloaded: ' + JSON.stringify(info, null, 3));
|
||||
send('update-downloaded');
|
||||
exit(true);
|
||||
|
||||
if (!autoUpdate) {
|
||||
exit(true);
|
||||
} else {
|
||||
send('update-confirm');
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
0.15.44
|
||||
0.16.0
|
28
package-lock.json
generated
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "anytype2",
|
||||
"version": "0.19.4-alpha",
|
||||
"version": "0.20.2",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "anytype2",
|
||||
"version": "0.19.4-alpha",
|
||||
"version": "0.20.2",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@dennisameling/keytar-temp": "^7.6.99-gh-desktop",
|
||||
|
@ -1301,9 +1301,9 @@
|
|||
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
|
||||
},
|
||||
"node_modules/about-window": {
|
||||
"version": "1.14.0",
|
||||
"resolved": "https://registry.npmjs.org/about-window/-/about-window-1.14.0.tgz",
|
||||
"integrity": "sha512-lKQtY2PzGGR0lq6121rkKotnWwccntQTAtEsDczwVhNgxtGaYqrXVFGnxzAm3V4AkyyqaVIG12/nqKdns01nVA=="
|
||||
"version": "1.15.0",
|
||||
"resolved": "https://registry.npmjs.org/about-window/-/about-window-1.15.0.tgz",
|
||||
"integrity": "sha512-bLyqvMc9OoHxsQYpm3xRw7v7axI2OMXiK3Qkhi1oimYPOLu60RrpTL5CbOk+RLoBzuYJve8YqZ20/TYgrTus3g=="
|
||||
},
|
||||
"node_modules/accepts": {
|
||||
"version": "1.3.7",
|
||||
|
@ -5439,9 +5439,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/electron": {
|
||||
"version": "15.0.0",
|
||||
"resolved": "https://registry.npmjs.org/electron/-/electron-15.0.0.tgz",
|
||||
"integrity": "sha512-LlBjN5nCJoC7EDrgfDQwEGSGSAo/o08nSP5uJxN2m+ZtNA69SxpnWv4yPgo1K08X/iQPoGhoZu6C8LYYlk1Dtg==",
|
||||
"version": "15.1.2",
|
||||
"resolved": "https://registry.npmjs.org/electron/-/electron-15.1.2.tgz",
|
||||
"integrity": "sha512-cU5x1ZvhwcTtzClJrsxqbvCocs40uhuXcdXbXFMpe6XnbnjruTbwrB2V0OxN01pStDrYihnfKo2yhfEvhO3zmw==",
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"@electron/get": "^1.13.0",
|
||||
|
@ -20982,9 +20982,9 @@
|
|||
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
|
||||
},
|
||||
"about-window": {
|
||||
"version": "1.14.0",
|
||||
"resolved": "https://registry.npmjs.org/about-window/-/about-window-1.14.0.tgz",
|
||||
"integrity": "sha512-lKQtY2PzGGR0lq6121rkKotnWwccntQTAtEsDczwVhNgxtGaYqrXVFGnxzAm3V4AkyyqaVIG12/nqKdns01nVA=="
|
||||
"version": "1.15.0",
|
||||
"resolved": "https://registry.npmjs.org/about-window/-/about-window-1.15.0.tgz",
|
||||
"integrity": "sha512-bLyqvMc9OoHxsQYpm3xRw7v7axI2OMXiK3Qkhi1oimYPOLu60RrpTL5CbOk+RLoBzuYJve8YqZ20/TYgrTus3g=="
|
||||
},
|
||||
"accepts": {
|
||||
"version": "1.3.7",
|
||||
|
@ -24395,9 +24395,9 @@
|
|||
}
|
||||
},
|
||||
"electron": {
|
||||
"version": "15.0.0",
|
||||
"resolved": "https://registry.npmjs.org/electron/-/electron-15.0.0.tgz",
|
||||
"integrity": "sha512-LlBjN5nCJoC7EDrgfDQwEGSGSAo/o08nSP5uJxN2m+ZtNA69SxpnWv4yPgo1K08X/iQPoGhoZu6C8LYYlk1Dtg==",
|
||||
"version": "15.1.2",
|
||||
"resolved": "https://registry.npmjs.org/electron/-/electron-15.1.2.tgz",
|
||||
"integrity": "sha512-cU5x1ZvhwcTtzClJrsxqbvCocs40uhuXcdXbXFMpe6XnbnjruTbwrB2V0OxN01pStDrYihnfKo2yhfEvhO3zmw==",
|
||||
"requires": {
|
||||
"@electron/get": "^1.13.0",
|
||||
"@types/node": "^14.6.2",
|
||||
|
|
10
package.json
|
@ -1,14 +1,18 @@
|
|||
{
|
||||
"name": "anytype2",
|
||||
"version": "0.19.4-alpha",
|
||||
"version": "0.20.2",
|
||||
"description": "Anytype",
|
||||
"main": "electron.js",
|
||||
"scripts": {
|
||||
"lint": "tslint -c tslint.json -p tsconfig.json",
|
||||
"electron": "npx electron .",
|
||||
"electron-win": "npx electron.cmd .",
|
||||
"update:addon": "./update.sh",
|
||||
"start:watch": "cross-env webpack-dev-server --progress --mode=development --env.NODE_ENV=development --env.SERVER_PORT=$SERVER_PORT --env.DATA_PATH=$DATA_PATH --history-api-fallback --cache",
|
||||
"start:electron-wait-webpack": "cross-env wait-for-localhost $SERVER_PORT && ./node_modules/.bin/electron .",
|
||||
"start:watch": "cross-env-shell webpack-dev-server --progress --mode=development --env.NODE_ENV=development --env.SERVER_PORT=$SERVER_PORT --env.DATA_PATH=$DATA_PATH --history-api-fallback --cache",
|
||||
"start:electron-wait-webpack": "cross-env-shell wait-for-localhost $SERVER_PORT && npm run electron",
|
||||
"start:electron-wait-webpack-win": "cross-env-shell wait-for-localhost $SERVER_PORT && npm run electron-win",
|
||||
"start:dev": "npm-run-all --parallel start:watch start:electron-wait-webpack",
|
||||
"start:dev-win": "npm-run-all --parallel start:watch start:electron-wait-webpack-win",
|
||||
"start:dev-addon": "ANYTYPE_USE_ADDON=1 npm-run-all start:dev",
|
||||
"build": "webpack --mode=production --env.NODE_ENV=production -p --config webpack.config.js",
|
||||
"build:deps": "webpack --config webpack.node.config.js --display-modules --display-cached | grep \"node_modules\" | sed 's/.*\\(node_modules\\/[^\\/]*\\).*/\\1/' | uniq | node save-node-deps.js",
|
||||
|
|
4
src/img/icon/graph/label.svg
Normal file
|
@ -0,0 +1,4 @@
|
|||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M16 2.5H4C3.72386 2.5 3.5 2.72386 3.5 3V13C3.5 13.2761 3.72386 13.5 4 13.5H16C16.2761 13.5 16.5 13.2761 16.5 13V3C16.5 2.72386 16.2761 2.5 16 2.5ZM4 1C2.89543 1 2 1.89543 2 3V13C2 14.1046 2.89543 15 4 15H16C17.1046 15 18 14.1046 18 13V3C18 1.89543 17.1046 1 16 1H4Z" fill="#ACA996"/>
|
||||
<path d="M4 17.25C4 16.8358 4.33579 16.5 4.75 16.5H15.25C15.6642 16.5 16 16.8358 16 17.25C16 17.6642 15.6642 18 15.25 18H4.75C4.33579 18 4 17.6642 4 17.25Z" fill="#ACA996"/>
|
||||
</svg>
|
After Width: | Height: | Size: 609 B |
11
src/img/icon/graph/link.svg
Normal file
|
@ -0,0 +1,11 @@
|
|||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="2" y="2" width="4" height="4" rx="2" fill="#ACA996"/>
|
||||
<path d="M13 3L7 3V4.5L13 4.5V3Z" fill="#ACA996"/>
|
||||
<path d="M12.9998 15H6.99976V16.5L12.9998 16.5V15Z" fill="#ACA996"/>
|
||||
<path d="M4.49976 13L4.49976 7H2.99976L2.99976 13H4.49976Z" fill="#ACA996"/>
|
||||
<path d="M16.4998 13V7H14.9998L14.9998 13H16.4998Z" fill="#ACA996"/>
|
||||
<path d="M5.87866 6.68188L13.6213 14.182L14.682 13.1213L6.93932 5.62122L5.87866 6.68188Z" fill="#ACA996"/>
|
||||
<rect x="14" y="14" width="4" height="4" rx="2" fill="#ACA996"/>
|
||||
<rect x="14" y="2" width="4" height="4" rx="2" fill="#ACA996"/>
|
||||
<rect x="2" y="14" width="4" height="4" rx="2" fill="#ACA996"/>
|
||||
</svg>
|
After Width: | Height: | Size: 732 B |
6
src/img/icon/graph/orphan.svg
Normal file
|
@ -0,0 +1,6 @@
|
|||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="14" y="2" width="4" height="4" rx="2" fill="#ACA996"/>
|
||||
<rect x="2" y="2" width="4" height="4" rx="2" fill="#ACA996"/>
|
||||
<rect x="2" y="14" width="4" height="4" rx="2" fill="#ACA996"/>
|
||||
<rect x="14" y="14" width="4" height="4" rx="2" fill="#ACA996"/>
|
||||
</svg>
|
After Width: | Height: | Size: 359 B |
5
src/img/icon/graph/relation.svg
Normal file
|
@ -0,0 +1,5 @@
|
|||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M16 4.5H4C3.72386 4.5 3.5 4.72386 3.5 5V7C3.5 7.27614 3.72386 7.5 4 7.5H16C16.2761 7.5 16.5 7.27614 16.5 7V5C16.5 4.72386 16.2761 4.5 16 4.5ZM4 3C2.89543 3 2 3.89543 2 5V7C2 8.10457 2.89543 9 4 9H16C17.1046 9 18 8.10457 18 7V5C18 3.89543 17.1046 3 16 3H4Z" fill="#ACA996"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.4384 10.2197C13.1455 10.5126 13.1455 10.9874 13.4384 11.2803L15.9081 13.75L13.4384 16.2197C13.1455 16.5126 13.1455 16.9874 13.4384 17.2803C13.7313 17.5732 14.2062 17.5732 14.4991 17.2803L18.0294 13.75L14.4991 10.2197C14.2062 9.92678 13.7313 9.92678 13.4384 10.2197Z" fill="#ACA996"/>
|
||||
<path d="M15.9688 13H2V14.5H15.9688V13Z" fill="#ACA996"/>
|
||||
</svg>
|
After Width: | Height: | Size: 821 B |
4
src/img/icon/graph/search.svg
Normal file
|
@ -0,0 +1,4 @@
|
|||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.0304 11.9697L17.7804 16.7197C18.0733 17.0126 18.0733 17.4875 17.7804 17.7804C17.4875 18.0733 17.0126 18.0733 16.7197 17.7804L11.9697 13.0304L13.0304 11.9697Z" fill="#ACA996"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.5 13.5C11.2614 13.5 13.5 11.2614 13.5 8.5C13.5 5.73858 11.2614 3.5 8.5 3.5C5.73858 3.5 3.5 5.73858 3.5 8.5C3.5 11.2614 5.73858 13.5 8.5 13.5ZM8.5 15C12.0899 15 15 12.0899 15 8.5C15 4.91015 12.0899 2 8.5 2C4.91015 2 2 4.91015 2 8.5C2 12.0899 4.91015 15 8.5 15Z" fill="#ACA996"/>
|
||||
</svg>
|
After Width: | Height: | Size: 662 B |
19
src/img/icon/header/graph.svg
Normal file
|
@ -0,0 +1,19 @@
|
|||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10.5 3.125C9.91421 3.125 9.4375 2.64829 9.4375 2.0625C9.4375 1.47671 9.91421 1 10.5 1C11.0858 1 11.5625 1.47671 11.5625 2.0625C11.5625 2.64829 11.0858 3.125 10.5 3.125Z" fill="#ACA996"/>
|
||||
<path d="M10.5 18C9.91421 18 9.4375 17.5233 9.4375 16.9375C9.4375 16.3517 9.91421 15.875 10.5 15.875C11.0858 15.875 11.5625 16.3517 11.5625 16.9375C11.5625 17.5233 11.0858 18 10.5 18Z" fill="#ACA996"/>
|
||||
<path d="M15.0078 4.99144C14.5935 4.57777 14.5921 3.90556 15.0078 3.48906C15.4073 3.08815 16.1086 3.08744 16.5102 3.48906C16.926 3.90486 16.926 4.57706 16.5102 4.99215C16.0944 5.40794 15.4229 5.40723 15.0078 4.99144Z" fill="#ACA996"/>
|
||||
<path d="M4.48982 15.5102C4.07403 15.0944 4.07403 14.4222 4.48982 14.0071C4.89074 13.6069 5.59199 13.6069 5.9922 14.0078C6.40657 14.4215 6.40799 15.0937 5.9922 15.5095C5.57711 15.926 4.90491 15.926 4.48982 15.5102Z" fill="#ACA996"/>
|
||||
<path d="M17.9375 10.5625C17.3517 10.5625 16.875 10.0858 16.875 9.5C16.875 8.91421 17.3517 8.4375 17.9375 8.4375C18.5233 8.4375 19 8.91421 19 9.5C19 10.0858 18.5233 10.5625 17.9375 10.5625Z" fill="#ACA996"/>
|
||||
<path d="M3.0625 10.5625C2.47671 10.5625 2 10.0858 2 9.5C2 8.91421 2.47671 8.4375 3.0625 8.4375C3.64829 8.4375 4.125 8.91421 4.125 9.5C4.125 10.0858 3.64829 10.5625 3.0625 10.5625Z" fill="#ACA996"/>
|
||||
<path d="M15.0078 15.5103C14.592 15.0945 14.5927 14.423 15.0085 14.0079C15.4073 13.6077 16.1092 13.607 16.5109 14.0079C16.9252 14.4216 16.9267 15.0945 16.5109 15.5103C16.0951 15.9261 15.4229 15.9261 15.0078 15.5103Z" fill="#ACA996"/>
|
||||
<path d="M4.48982 4.99225C4.07403 4.57716 4.07403 3.90496 4.48982 3.48916C4.89145 3.08825 5.59199 3.08825 5.99291 3.48916C6.40728 3.90425 6.4087 4.57646 5.99149 4.99225C5.57782 5.40733 4.90561 5.40804 4.48982 4.99225Z" fill="#ACA996"/>
|
||||
<path d="M10.5 5.427C10.2067 5.427 9.96875 5.189 9.96875 4.89575V2.77075C9.96875 2.4775 10.2067 2.2395 10.5 2.2395C10.7932 2.2395 11.0312 2.4775 11.0312 2.77075V4.89575C11.0312 5.189 10.7932 5.427 10.5 5.427Z" fill="#ACA996"/>
|
||||
<path d="M10.5 16.7605C10.2067 16.7605 9.96875 16.5225 9.96875 16.2292V14.1042C9.96875 13.811 10.2067 13.573 10.5 13.573C10.7932 13.573 11.0312 13.811 11.0312 14.1042V16.2292C11.0312 16.5225 10.7932 16.7605 10.5 16.7605Z" fill="#ACA996"/>
|
||||
<path d="M13.7556 6.77573C13.6196 6.77573 13.4836 6.72403 13.3801 6.6199C13.1726 6.41236 13.1726 6.0759 13.3801 5.86836L14.8825 4.36598C15.0901 4.15844 15.4265 4.15844 15.6341 4.36598C15.8416 4.57353 15.8416 4.90998 15.6341 5.11753L14.1317 6.6199C14.0276 6.72403 13.8916 6.77573 13.7556 6.77573Z" fill="#ACA996"/>
|
||||
<path d="M5.74201 14.789C5.60601 14.789 5.47001 14.7373 5.36659 14.6332C5.15905 14.4257 5.15905 14.0892 5.36659 13.8817L6.86897 12.3793C7.07651 12.1717 7.41297 12.1717 7.62051 12.3793C7.82805 12.5868 7.82805 12.9233 7.62051 13.1308L6.11814 14.6332C6.01401 14.7373 5.87801 14.789 5.74201 14.789Z" fill="#ACA996"/>
|
||||
<path d="M17.2292 10.0312H15.1042C14.811 10.0312 14.573 9.79325 14.573 9.5C14.573 9.20675 14.811 8.96875 15.1042 8.96875H17.2292C17.5225 8.96875 17.7605 9.20675 17.7605 9.5C17.7605 9.79325 17.5225 10.0312 17.2292 10.0312Z" fill="#ACA996"/>
|
||||
<path d="M5.89575 10.0312H3.77075C3.4775 10.0312 3.2395 9.79325 3.2395 9.5C3.2395 9.20675 3.4775 8.96875 3.77075 8.96875H5.89575C6.189 8.96875 6.427 9.20675 6.427 9.5C6.427 9.79325 6.189 10.0312 5.89575 10.0312Z" fill="#ACA996"/>
|
||||
<path d="M15.2579 14.789C15.1219 14.789 14.9859 14.7373 14.8825 14.6332L13.3801 13.1308C13.1726 12.9233 13.1726 12.5868 13.3801 12.3793C13.5877 12.1717 13.9241 12.1717 14.1317 12.3793L15.6341 13.8817C15.8416 14.0892 15.8416 14.4257 15.6341 14.6332C15.5299 14.7373 15.3939 14.789 15.2579 14.789Z" fill="#ACA996"/>
|
||||
<path d="M7.24448 6.77573C7.10848 6.77573 6.97248 6.72403 6.86907 6.6199L5.36598 5.11753C5.15844 4.90998 5.15844 4.57353 5.36598 4.36598C5.57353 4.15844 5.90998 4.15844 6.11753 4.36598L7.6199 5.86836C7.82744 6.0759 7.82744 6.41236 7.6199 6.6199C7.51648 6.72403 7.38048 6.77573 7.24448 6.77573Z" fill="#ACA996"/>
|
||||
<rect x="8.375" y="7.375" width="4.25" height="4.25" rx="2.125" fill="#ACA996"/>
|
||||
</svg>
|
After Width: | Height: | Size: 4 KiB |
|
@ -1,8 +0,0 @@
|
|||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M6 15C6 14.5858 6.33579 14.25 6.75 14.25H13.25C13.6642 14.25 14 14.5858 14 15C14 15.4142 13.6642 15.75 13.25 15.75H6.75C6.33579 15.75 6 15.4142 6 15Z" fill="#ACA996"/>
|
||||
<path d="M11.5 3C11.5 3.82843 10.8284 4.5 10 4.5C9.17157 4.5 8.5 3.82843 8.5 3C8.5 2.17157 9.17157 1.5 10 1.5C10.8284 1.5 11.5 2.17157 11.5 3Z" fill="#ACA996"/>
|
||||
<path d="M4.5 15C4.5 15.8284 3.82843 16.5 3 16.5C2.17157 16.5 1.5 15.8284 1.5 15C1.5 14.1716 2.17157 13.5 3 13.5C3.82843 13.5 4.5 14.1716 4.5 15Z" fill="#ACA996"/>
|
||||
<path d="M18.5 15C18.5 15.8284 17.8284 16.5 17 16.5C16.1716 16.5 15.5 15.8284 15.5 15C15.5 14.1716 16.1716 13.5 17 13.5C17.8284 13.5 18.5 14.1716 18.5 15Z" fill="#ACA996"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.83557 5.32934C8.20606 5.51459 8.35623 5.96509 8.17098 6.33557L5.17098 12.3356C4.98574 12.7061 4.53524 12.8562 4.16475 12.671C3.79427 12.4857 3.6441 12.0352 3.82934 11.6648L6.82934 5.66475C7.01459 5.29427 7.46509 5.1441 7.83557 5.32934Z" fill="#ACA996"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.1644 5.32934C11.7939 5.51459 11.6438 5.96509 11.829 6.33557L14.829 12.3356C15.0143 12.7061 15.4648 12.8562 15.8352 12.671C16.2057 12.4857 16.3559 12.0352 16.1707 11.6648L13.1707 5.66475C12.9854 5.29427 12.5349 5.1441 12.1644 5.32934Z" fill="#ACA996"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 1.4 KiB |
|
@ -85,6 +85,7 @@
|
|||
"id",
|
||||
"name",
|
||||
"description",
|
||||
"snippet",
|
||||
"iconEmoji",
|
||||
"iconImage",
|
||||
"relationFormat",
|
||||
|
@ -93,6 +94,7 @@
|
|||
"isHidden",
|
||||
"isArchived",
|
||||
"isReadonly",
|
||||
"isDraft",
|
||||
"done",
|
||||
"fileExt",
|
||||
"fileMimeType"
|
||||
|
@ -139,6 +141,7 @@
|
|||
"image": "_otimage",
|
||||
"file": "_otfile",
|
||||
"video": "_otvideo",
|
||||
"audio": "_otaudio",
|
||||
"relation": "_otrelation"
|
||||
},
|
||||
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
"name": "Templates",
|
||||
"children": [
|
||||
{
|
||||
"comment": "`e = m*c^2`"
|
||||
"comment": "`\\begin{align*} a&=b+c \\\\ d+e&=f \\end{align*}`"
|
||||
},
|
||||
{
|
||||
"comment": "`\\begin{align*} a&=b+c \\\\ d+e&=f \\end{align*}`"
|
||||
"comment": "`\\int_{-\\infty}^\\infty f(\\hat\\xi\\,)e^{2 \\pi i \\xi x}\\,d\\xi`"
|
||||
},
|
||||
{
|
||||
"comment": "`\\cfrac{a}{1 + b}`"
|
||||
|
@ -22,10 +22,7 @@
|
|||
"comment": "`\\begin{Bmatrix} 0 & -1 \\\\ -1 & 0 \\end{Bmatrix}`"
|
||||
},
|
||||
{
|
||||
"comment": "`\\sum_{\\begin{subarray}{l}i\\in\\Lambda\\\\0<j<n\\end{subarray}}`"
|
||||
},
|
||||
{
|
||||
"comment": "`\\sum_{\\mathclap{1\\le i\\le j\\le n}} x_{ij}`"
|
||||
"comment": "`\\sum_{\\mathclap{1\\le i\\le j\\le n}} x_{ij} + \\sum_{\\begin{subarray}{l}i\\in\\Lambda\\\\0<j<n\\end{subarray}}`"
|
||||
},
|
||||
{
|
||||
"comment": "`\\ce{C6H5-CHO}`"
|
||||
|
@ -37,163 +34,91 @@
|
|||
"children": [
|
||||
{
|
||||
"symbol": "\\!",
|
||||
"comment": "`n!`"
|
||||
},
|
||||
{
|
||||
"symbol": "\\\\\\!",
|
||||
"comment": "`a\\!b`"
|
||||
},
|
||||
{
|
||||
"symbol": "#",
|
||||
"comment": "`\\def\\bar#1{#1^2} \\bar{y}`"
|
||||
},
|
||||
{
|
||||
"symbol": "\\\\#",
|
||||
"symbol": "\\#",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"symbol": "%",
|
||||
"comment": "`%this is a comment`"
|
||||
},
|
||||
{
|
||||
"symbol": "\\\\%",
|
||||
"symbol": "\\%",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"symbol": "&",
|
||||
"comment": "`\\begin{matrix}``a & b \\\\``c & d``\\end{matrix}`"
|
||||
},
|
||||
{
|
||||
"symbol": "\\\\&",
|
||||
"symbol": "\\&",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"symbol": "'",
|
||||
"comment": ""
|
||||
"symbol": "\\'",
|
||||
"comment": "`\\'{a}`"
|
||||
},
|
||||
{
|
||||
"symbol": "\\\\\\'",
|
||||
"comment": "`\\text{\\'{a}}`"
|
||||
},
|
||||
{
|
||||
"symbol": "(",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"symbol": ")",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"symbol": "\\\\\\(…\\\\\\)",
|
||||
"symbol": "\\(…\\)",
|
||||
"comment": "`\\text{\\(\\frac a b\\)}`"
|
||||
},
|
||||
{
|
||||
"symbol": "\\\\",
|
||||
"symbol": "\\",
|
||||
"comment": "`a\\ b`"
|
||||
},
|
||||
{
|
||||
"symbol": "\\\\\"",
|
||||
"comment": "`\\text{\\\"{a}}`"
|
||||
"symbol": "\\\"",
|
||||
"comment": "\\text{\\\"{a}}"
|
||||
},
|
||||
{
|
||||
"symbol": "\\\\$",
|
||||
"symbol": "\\$",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"symbol": "\\\\,",
|
||||
"symbol": "\\,",
|
||||
"comment": "`a\\,\\,{b}`"
|
||||
},
|
||||
{
|
||||
"symbol": "\\\\.",
|
||||
"symbol": "\\.",
|
||||
"comment": "`\\text{\\.{a}}`"
|
||||
},
|
||||
{
|
||||
"symbol": "\\\\:",
|
||||
"symbol": "\\:",
|
||||
"comment": "`a\\:\\:{b}`"
|
||||
},
|
||||
{
|
||||
"symbol": "\\\\;",
|
||||
"symbol": "\\;",
|
||||
"comment": "a`\\;\\;{b}`"
|
||||
},
|
||||
{
|
||||
"symbol": "_",
|
||||
"comment": "`x_i`"
|
||||
},
|
||||
{
|
||||
"symbol": "\\\\_",
|
||||
"symbol": "\\_",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"symbol": "\\\\\\`",
|
||||
"comment": "`\\text{\\\\'{a}}`"
|
||||
"symbol": "\\\\`",
|
||||
"comment": "`\\text{\\\\`{a}}`"
|
||||
},
|
||||
{
|
||||
"symbol": "<",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"symbol": "\\\\=",
|
||||
"symbol": "\\=",
|
||||
"comment": "`\\text{\\\\={a}}`"
|
||||
},
|
||||
{
|
||||
"symbol": ">",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"symbol": "\\\\>",
|
||||
"symbol": "\\>",
|
||||
"comment": "`a\\>\\>{b}`"
|
||||
},
|
||||
{
|
||||
"symbol": "\\[",
|
||||
"symbol": "\\{",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"symbol": "\\]",
|
||||
"symbol": "\\}",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"symbol": "{",
|
||||
"comment": "`{a}`"
|
||||
},
|
||||
{
|
||||
"symbol": "}",
|
||||
"comment": "`{a}`"
|
||||
},
|
||||
{
|
||||
"symbol": "\\\\{",
|
||||
"symbol": "\\|",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"symbol": "\\\\}",
|
||||
"comment": ""
|
||||
"symbol": "\\~",
|
||||
"comment": "`\\text{\\~{a}}`"
|
||||
},
|
||||
{
|
||||
"symbol": "|",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"symbol": "\\\\|",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"symbol": "~",
|
||||
"comment": "`\\text{no~no~no~breaks}`"
|
||||
},
|
||||
{
|
||||
"symbol": "\\\\~",
|
||||
"comment": "`\\text{\\\\~{a}}`"
|
||||
},
|
||||
{
|
||||
"symbol": "\\\\\\\\",
|
||||
"comment": "`\\begin{matrix}``a & b \\\\``c & d`'`\\end{matrix}`"
|
||||
},
|
||||
{
|
||||
"symbol": "^",
|
||||
"comment": "`x^i`"
|
||||
},
|
||||
{
|
||||
"symbol": "\\\\^",
|
||||
"comment": "`\\text{\\\\^{a}}`"
|
||||
"symbol": "\\^",
|
||||
"comment": "`\\text{\\^{a}}`"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -236,30 +161,6 @@
|
|||
"symbol": "\\aleph",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"symbol": "{align}",
|
||||
"comment": "`\\begin{align}``a&=b+c \\\\``d+e&=f`'`\\end{align}`"
|
||||
},
|
||||
{
|
||||
"symbol": "{align\\*}",
|
||||
"comment": "`\\begin{align*}``a&=b+c \\\\``d+e&=f`'`\\end{align*}`"
|
||||
},
|
||||
{
|
||||
"symbol": "{aligned}",
|
||||
"comment": "`\\begin{aligned}``a&=b+c \\\\``d+e&=f`'`\\end{aligned}`"
|
||||
},
|
||||
{
|
||||
"symbol": "{alignat}",
|
||||
"comment": "`\\begin{alignat}{2}``10&x+ &3&y = 2 \\\\`` 3&x+&13&y = 4`'`\\end{alignat}`"
|
||||
},
|
||||
{
|
||||
"symbol": "{alignat\\*}",
|
||||
"comment": "`\\begin{alignat*}{2}``10&x+ &3&y = 2 \\\\`` 3&x+&13&y = 4`'`\\end{alignat*}`"
|
||||
},
|
||||
{
|
||||
"symbol": "{alignedat}",
|
||||
"comment": "`\\begin{alignedat}{2}``10&x+ &3&y = 2 \\\\`` 3&x+&13&y = 4`'`\\end{alignedat}`"
|
||||
},
|
||||
{
|
||||
"symbol": "\\allowbreak",
|
||||
"comment": ""
|
||||
|
@ -280,10 +181,6 @@
|
|||
"symbol": "\\And",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"symbol": "\\angl",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"symbol": "\\angln",
|
||||
"comment": ""
|
||||
|
@ -340,13 +237,9 @@
|
|||
"symbol": "\\argmin",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"symbol": "{array}",
|
||||
"comment": "`\\begin{array}{cc}``a & b \\\\``c & d`'`\\end{array}`"
|
||||
},
|
||||
{
|
||||
"symbol": "\\arraystretch",
|
||||
"comment": "`\\def\\arraystretch{1.5}`'`\\begin{array}{cc}``a & b \\\\``c & d`'`\\end{array}`"
|
||||
"comment": "`\\def\\arraystretch{1.5} \\begin{array}{cc} a & b \\\\ c & d \\end{array}`"
|
||||
},
|
||||
{
|
||||
"symbol": "\\ast",
|
||||
|
@ -395,7 +288,7 @@
|
|||
},
|
||||
{
|
||||
"symbol": "\\Bbb",
|
||||
"comment": "`\\Bbb{ABC}`'KaTeX supports A-Z & k"
|
||||
"comment": "`\\Bbb{ABC}`"
|
||||
},
|
||||
{
|
||||
"symbol": "\\Bbbk",
|
||||
|
@ -415,7 +308,7 @@
|
|||
},
|
||||
{
|
||||
"symbol": "\\begingroup",
|
||||
"comment": "`\\begingroup a}`"
|
||||
"comment": "`\\begingroup...\\endgroup`"
|
||||
},
|
||||
{
|
||||
"symbol": "\\Beta",
|
||||
|
@ -585,22 +478,6 @@
|
|||
"symbol": "\\bm",
|
||||
"comment": "`\\bm{AaBb}`"
|
||||
},
|
||||
{
|
||||
"symbol": "{Bmatrix}",
|
||||
"comment": "`\\begin{Bmatrix}``a & b \\\\``c & d`'`\\end{Bmatrix}`"
|
||||
},
|
||||
{
|
||||
"symbol": "{Bmatrix*}",
|
||||
"comment": "`\\begin{Bmatrix*}[r]``0 & -1 \\\\``-1 & 0`'`\\end{Bmatrix*}`"
|
||||
},
|
||||
{
|
||||
"symbol": "{bmatrix}",
|
||||
"comment": "`\\begin{bmatrix}``a & b \\\\``c & d`'`\\end{bmatrix}`"
|
||||
},
|
||||
{
|
||||
"symbol": "{bmatrix*}",
|
||||
"comment": "`\\begin{bmatrix*}[r]``0 & -1 \\\\``-1 & 0`'`\\end{bmatrix*}`"
|
||||
},
|
||||
{
|
||||
"symbol": "\\bmod",
|
||||
"comment": "`a \\bmod b`"
|
||||
|
@ -706,14 +583,6 @@
|
|||
"symbol": "\\cap",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"symbol": "{cases}",
|
||||
"comment": "`\\begin{cases}``a &\\text{if } b \\\\``c &\\text{if } d`'`\\end{cases}`"
|
||||
},
|
||||
{
|
||||
"symbol": "{CD}",
|
||||
"comment": "`\\begin{CD}``A @>a>> B \\\\`'`@VbVV @AAcA \\\\``C @= D`'`\\end{CD}`"
|
||||
},
|
||||
{
|
||||
"symbol": "\\cdot",
|
||||
"comment": ""
|
||||
|
@ -728,16 +597,12 @@
|
|||
},
|
||||
{
|
||||
"symbol": "\\ce",
|
||||
"comment": "`\\ce{C6H5-CHO}` Requires an [extension](https://github.com/KaTeX/KaTeX/tree/master/contrib/mhchem/)"
|
||||
"comment": "`\\ce{C6H5-CHO}`"
|
||||
},
|
||||
{
|
||||
"symbol": "\\centerdot",
|
||||
"comment": "`a\\centerdot b`"
|
||||
},
|
||||
{
|
||||
"symbol": "",
|
||||
"comment": null
|
||||
},
|
||||
{
|
||||
"symbol": "\\cfrac",
|
||||
"comment": "`\\cfrac{2}{1+\\cfrac{2}{1+\\cfrac{2}{1}}}`"
|
||||
|
@ -936,7 +801,7 @@
|
|||
},
|
||||
{
|
||||
"symbol": "\\cr",
|
||||
"comment": "`\\begin{matrix}``a & b \\cr``c & d`'`\\end{matrix}`"
|
||||
"comment": "`\\begin{matrix}``a & b \\cr ``c & d`'`\\end{matrix}`"
|
||||
},
|
||||
{
|
||||
"symbol": "\\csc",
|
||||
|
@ -1015,10 +880,6 @@
|
|||
"symbol": "\\darr",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"symbol": "$\\begin{darray}{cc}a&b\\\\c&d\\end{darray}$",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"symbol": "\\dashleftarrow",
|
||||
"comment": ""
|
||||
|
@ -1039,10 +900,6 @@
|
|||
"symbol": "\\dblcolon",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"symbol": "{dcases}",
|
||||
"comment": "`\\begin{dcases}``a &\\text{if } b \\\\``c &\\text{if } d`'`\\end{dcases}`"
|
||||
},
|
||||
{
|
||||
"symbol": "\\ddag",
|
||||
"comment": ""
|
||||
|
@ -1169,7 +1026,7 @@
|
|||
},
|
||||
{
|
||||
"symbol": "\\dotsm",
|
||||
"comment": "`$x_1 x_2 \\dotsm x_n`"
|
||||
"comment": "`x_1 x_2 \\dotsm x_n`"
|
||||
},
|
||||
{
|
||||
"symbol": "\\dotso",
|
||||
|
@ -1206,10 +1063,6 @@
|
|||
{
|
||||
"symbol": "\\downharpoonright",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"symbol": "{drcases}",
|
||||
"comment": "`\\begin{drcases}``a &\\text{if } b \\\\``c &\\text{if } d`'`\\end{drcases}`"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -1238,7 +1091,7 @@
|
|||
},
|
||||
{
|
||||
"symbol": "\\endgroup",
|
||||
"comment": "`{a\\endgroup`"
|
||||
"comment": "\\begingroup...\\endgroup"
|
||||
},
|
||||
{
|
||||
"symbol": "\\enspace",
|
||||
|
@ -1264,14 +1117,6 @@
|
|||
"symbol": "\\eqcolon",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"symbol": "{equation}",
|
||||
"comment": "`\\begin{equation}``a = b + c`'`\\end{equation}`"
|
||||
},
|
||||
{
|
||||
"symbol": "{equation*}",
|
||||
"comment": "`\\begin{equation*}``a = b + c`'`\\end{equation*}`"
|
||||
},
|
||||
{
|
||||
"symbol": "\\Eqqcolon",
|
||||
"comment": ""
|
||||
|
@ -1379,7 +1224,7 @@
|
|||
},
|
||||
{
|
||||
"symbol": "\\futurelet",
|
||||
"comment": ""
|
||||
"comment": "\\futurelet\\cs<token1><token2>"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -1398,14 +1243,6 @@
|
|||
"symbol": "\\gamma",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"symbol": "{gather}",
|
||||
"comment": "`\\begin{gather}``a=b \\\\ ``e=b+c`'`\\end{gather}`"
|
||||
},
|
||||
{
|
||||
"symbol": "{gathered}",
|
||||
"comment": "`\\begin{gathered}``a=b \\\\ ``e=b+c`'`\\end{gathered}`"
|
||||
},
|
||||
{
|
||||
"symbol": "\\gcd",
|
||||
"comment": ""
|
||||
|
@ -1545,7 +1382,7 @@
|
|||
},
|
||||
{
|
||||
"symbol": "\\hdashline",
|
||||
"comment": "`\\begin{matrix}``a & b \\\\``\\hdashline``c & d`'`\\end{matrix}`"
|
||||
"comment": "`\\begin{matrix} a & b \\\\ \\hdashline c & d \\end{matrix}`"
|
||||
},
|
||||
{
|
||||
"symbol": "\\hearts",
|
||||
|
@ -1557,7 +1394,7 @@
|
|||
},
|
||||
{
|
||||
"symbol": "\\hline",
|
||||
"comment": "`\\begin{matrix}``a & b \\\\ \\hline``c & d`'`\\end{matrix}`"
|
||||
"comment": "`\\begin{matrix}``a & b \\\\ \\hline`` c & d`'`\\end{matrix}`"
|
||||
},
|
||||
{
|
||||
"symbol": "\\hom",
|
||||
|
@ -1577,7 +1414,7 @@
|
|||
},
|
||||
{
|
||||
"symbol": "\\href",
|
||||
"comment": "`\\href{https://katex.org/}{\\KaTeX}` Requires `trust` [option](options.md)"
|
||||
"comment": "`\\href{https://www.anytype.io}{Anytype.io}`"
|
||||
},
|
||||
{
|
||||
"symbol": "\\hskip",
|
||||
|
@ -1591,22 +1428,6 @@
|
|||
"symbol": "\\hspace",
|
||||
"comment": "`s\\hspace7ex k`"
|
||||
},
|
||||
{
|
||||
"symbol": "\\htmlClass",
|
||||
"comment": "`\\htmlClass{foo}{x}` Must enable `trust` and disable `strict` [option](options.md)"
|
||||
},
|
||||
{
|
||||
"symbol": "\\htmlData",
|
||||
"comment": "`\\htmlData{foo=a, bar=b}{x}` Must enable `trust` and disable `strict` [option](options.md)"
|
||||
},
|
||||
{
|
||||
"symbol": "\\htmlId",
|
||||
"comment": "`\\htmlId{bar}{x}` Must enable `trust` and disable `strict` [option](options.md)"
|
||||
},
|
||||
{
|
||||
"symbol": "\\htmlStyle",
|
||||
"comment": "`\\htmlStyle{color: red;}{x}` Must enable `trust` and disable `strict` [option](options.md)"
|
||||
},
|
||||
{
|
||||
"symbol": "\\huge",
|
||||
"comment": "`\\huge huge`"
|
||||
|
@ -1666,7 +1487,7 @@
|
|||
},
|
||||
{
|
||||
"symbol": "\\includegraphics",
|
||||
"comment": "`\\includegraphics[height=0.8em, totalheight=0.9em, width=0.9em, alt=KA logo]{https://cdn.kastatic.org/images/apple-touch-icon-57x57-precomposed.new.png}` Requires `trust` [option](options.md)"
|
||||
"comment": "`\\includegraphics[height=0.8em, totalheight=0.9em, width=0.9em, alt=KA logo]{https://anytype.io/images/graph/avatar-10.png}"
|
||||
},
|
||||
{
|
||||
"symbol": "\\inf",
|
||||
|
@ -1928,7 +1749,7 @@
|
|||
},
|
||||
{
|
||||
"symbol": "\\let",
|
||||
"comment": ""
|
||||
"comment": "\\def\\bar{hello} \\let\\fooi\\bar \\fooi"
|
||||
},
|
||||
{
|
||||
"symbol": "\\lfloor",
|
||||
|
@ -2024,7 +1845,7 @@
|
|||
},
|
||||
{
|
||||
"symbol": "\\long",
|
||||
"comment": ""
|
||||
"comment": "\\long\\def\\dummy#1{#1} \\dummy{First paragraph}"
|
||||
},
|
||||
{
|
||||
"symbol": "\\Longleftarrow",
|
||||
|
@ -2235,14 +2056,6 @@
|
|||
"symbol": "\\mathtt",
|
||||
"comment": "`\\mathtt{AaBb123}`"
|
||||
},
|
||||
{
|
||||
"symbol": "{matrix}",
|
||||
"comment": "`\\begin{matrix}``a & b \\\\``c & d`'`\\end{matrix}`"
|
||||
},
|
||||
{
|
||||
"symbol": "{matrix*}",
|
||||
"comment": "`\\begin{matrix*}[r]``0 & -1 \\\\``-1 & 0`'`\\end{matrix*}`"
|
||||
},
|
||||
{
|
||||
"symbol": "\\max",
|
||||
"comment": ""
|
||||
|
@ -2766,14 +2579,6 @@
|
|||
"symbol": "\\pm",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"symbol": "{pmatrix}",
|
||||
"comment": "`\\begin{pmatrix}``a & b \\\\``c & d`'`\\end{pmatrix}`"
|
||||
},
|
||||
{
|
||||
"symbol": "{pmatrix*}",
|
||||
"comment": "`\\begin{pmatrix*}[r]``0 & -1 \\\\``-1 & 0`'`\\end{pmatrix*}`"
|
||||
},
|
||||
{
|
||||
"symbol": "\\pmb",
|
||||
"comment": "`\\pmb{\\mu}`"
|
||||
|
@ -2919,10 +2724,6 @@
|
|||
"symbol": "\\rbrack",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"symbol": "{rcases}",
|
||||
"comment": "`\\begin{rcases}``a &\\text{if } b \\\\``c &\\text{if } d`'`\\end{rcases}`"
|
||||
},
|
||||
{
|
||||
"symbol": "\\rceil",
|
||||
"comment": ""
|
||||
|
@ -2949,7 +2750,7 @@
|
|||
},
|
||||
{
|
||||
"symbol": "\\renewcommand",
|
||||
"comment": "`\\def\\hail{Hi!}`'`\\renewcommand\\hail{\\text{Ahoy!}}`'`\\hail`"
|
||||
"comment": "`\\providecommand\foo{} \\renewcommand\foo{...}`"
|
||||
},
|
||||
{
|
||||
"symbol": "\\restriction",
|
||||
|
@ -3180,10 +2981,6 @@
|
|||
"symbol": "\\smallint",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"symbol": "{smallmatrix}",
|
||||
"comment": "`\\begin{smallmatrix}``a & b \\\\``c & d`'`\\end{smallmatrix}`"
|
||||
},
|
||||
{
|
||||
"symbol": "\\smallsetminus",
|
||||
"comment": ""
|
||||
|
@ -3220,10 +3017,6 @@
|
|||
"symbol": "\\sphericalangle",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"symbol": "{split}",
|
||||
"comment": "`\\begin{equation}`'`\\begin{split}``a &=b+c\\\\` `&=e+f`'`\\end{split}`'`\\end{equation}`"
|
||||
},
|
||||
{
|
||||
"symbol": "\\sqcap",
|
||||
"comment": ""
|
||||
|
@ -3927,10 +3720,6 @@
|
|||
"symbol": "\\vcentcolon",
|
||||
"comment": "`\\mathrel{\\vcentcolon =}`"
|
||||
},
|
||||
{
|
||||
"symbol": "\\vcenter",
|
||||
"comment": "`a+\\left(\\vcenter{\\hbox{$\\frac{\\frac a b}c$}}\\right)`'TeX (strict) syntax"
|
||||
},
|
||||
{
|
||||
"symbol": "\\vcenter",
|
||||
"comment": "`a+\\left(\\vcenter{\\frac{\\frac a b}c}\\right)`'non-strict syntax"
|
||||
|
@ -3975,22 +3764,6 @@
|
|||
"symbol": "\\vert",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"symbol": "{Vmatrix}",
|
||||
"comment": "`\\begin{Vmatrix}``a & b \\\\``c & d`'`\\end{Vmatrix}`"
|
||||
},
|
||||
{
|
||||
"symbol": "{Vmatrix*}",
|
||||
"comment": "`\\begin{Vmatrix*}[r]``0 & -1 \\\\``-1 & 0`'`\\end{Vmatrix*}`"
|
||||
},
|
||||
{
|
||||
"symbol": "{vmatrix}",
|
||||
"comment": "`\\begin{vmatrix}``a & b \\\\``c & d`'`\\end{vmatrix}`"
|
||||
},
|
||||
{
|
||||
"symbol": "{vmatrix*}",
|
||||
"comment": "`\\begin{vmatrix*}[r]``0 & -1 \\\\``-1 & 0`'`\\end{vmatrix*}`"
|
||||
},
|
||||
{
|
||||
"symbol": "\\vphantom",
|
||||
"comment": "`\\overline{\\vphantom{M}a}`"
|
||||
|
@ -4152,4 +3925,4 @@
|
|||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
.side.left { width: 100%; border-radius: 0px; }
|
||||
.side.right {
|
||||
position: absolute; top: 0px; left: 0px; height: 112px; width: 100%; border-radius: 6px 6px 0px 0px;
|
||||
border-bottom: 1px solid #eae9e0;
|
||||
border-bottom: 1px solid $colorLightGrey;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -76,10 +76,12 @@
|
|||
}
|
||||
|
||||
.cellContent.isName {
|
||||
.flex { position: static; }
|
||||
.iconObject { z-index: 1; cursor: pointer; }
|
||||
.name { line-height: 20px; @include text-overflow-nw; width: 100%; }
|
||||
}
|
||||
.cellContent.isName.withIcon {
|
||||
.name { width: calc(100% - 24px); }
|
||||
}
|
||||
|
||||
.cellContent.c-link {
|
||||
.icon.user { margin-right: 5px; }
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
.viewItem.viewBoard {
|
||||
.columns { white-space: nowrap; }
|
||||
.column { width: 240px; margin-right: 24px; display: inline-block; vertical-align: top; overflow-x: visible; overflow-y: scroll; }
|
||||
.column { width: 240px; margin-right: 24px; display: inline-block; vertical-align: top; overflow-x: visible; overflow-y: overlay; }
|
||||
.column {
|
||||
.head { padding: 10px 4px; width: 100%; }
|
||||
}
|
||||
|
|
|
@ -2,20 +2,38 @@
|
|||
|
||||
.blocks {
|
||||
.block.blockDataview {
|
||||
|
||||
.viewItem.viewGrid,
|
||||
.viewItem.viewList {
|
||||
.cell.add { color: $colorMediumGrey; line-height: 20px; width: 100%; display: block; }
|
||||
.cell.add {
|
||||
.btn { display: inline-block; cursor: pointer; transition: $transitionFast; }
|
||||
.btn:hover { color: $colorBlack; }
|
||||
.btn:hover {
|
||||
.icon.plus { background-image: url('~img/icon/plus/menu1.svg'); }
|
||||
}
|
||||
|
||||
.icon { vertical-align: top; margin: 0px 4px 0px 0px; }
|
||||
.name { vertical-align: top; display: inline-block; line-height: 20px; height: 20px; vertical-align: top; width: calc(100% - 24px) }
|
||||
}
|
||||
}
|
||||
|
||||
.viewItem.viewGallery,
|
||||
.viewItem.viewBoard {
|
||||
.card { white-space: normal; }
|
||||
.card {
|
||||
.cellContent { cursor: pointer; margin-bottom: 6px; @include text-small; }
|
||||
.cellContent { cursor: pointer; margin-bottom: 6px; @include text-small; color: $colorDarkGrey; }
|
||||
.cellContent:empty, .cellContent.isEmpty { display: none; }
|
||||
.cellContent.last { margin: 0px; }
|
||||
|
||||
.cellContent.c-date { color: $colorVeryDarkGrey; }
|
||||
|
||||
.cellContent.isName { @include text-paragraph; }
|
||||
.cellContent.isName { @include text-paragraph; color: $colorBlack; }
|
||||
.cellContent.isName {
|
||||
.iconObject { margin-right: 6px; }
|
||||
.name { width: 100% !important; line-height: 24px; vertical-align: top; }
|
||||
.name { line-height: 24px; vertical-align: top; }
|
||||
}
|
||||
|
||||
.cellContent.isName.withIcon {
|
||||
.name { width: calc(100% - 30px); }
|
||||
}
|
||||
|
||||
.cellContent.c-select { line-height: 18px; }
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
.card {
|
||||
.cover {
|
||||
position: static; height: 144px; background-position: top center; border-radius: 12px 12px 0px 0px;
|
||||
background-color: #f5f5f8; box-shadow: 0px -1px #dfddd0 inset; width: calc(100% + 2px);
|
||||
background-color: rgba(134, 125, 66, 0.08); box-shadow: 0px -1px #dfddd0 inset; width: calc(100% + 2px);
|
||||
margin: -1px -1px 0px -1px;
|
||||
}
|
||||
.cover.type0 { box-shadow: 0px 0px 0px 1px #dfddd0 inset; }
|
||||
|
|
|
@ -87,18 +87,6 @@
|
|||
.cellContent { min-width: unset; }
|
||||
}
|
||||
|
||||
.cell.add { color: $colorMediumGrey; line-height: 20px; padding: 14px; width: 100%; display: block; }
|
||||
.cell.add {
|
||||
.btn { display: inline-block; cursor: pointer; transition: $transitionFast; }
|
||||
.btn:hover { color: $colorBlack; }
|
||||
.btn:hover {
|
||||
.icon.plus { background-image: url('~img/icon/plus/menu1.svg'); }
|
||||
}
|
||||
|
||||
.icon { vertical-align: top; margin: 0px 4px 0px 0px; }
|
||||
.name { vertical-align: top; display: inline-block; line-height: 20px; height: 20px; vertical-align: top; width: calc(100% - 24px) }
|
||||
}
|
||||
|
||||
.cellContent.c-select {
|
||||
.tagItem { margin-bottom: 0px; }
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
.cellContent {
|
||||
display: inline-block; vertical-align: top; @include text-small; line-height: 24px; height: 24px;
|
||||
cursor: default !important;
|
||||
cursor: default !important; color: $colorDarkGrey;
|
||||
}
|
||||
.cellContent:last-child { margin: 0px; }
|
||||
.cellContent:empty, .cellContent.isEmpty { display: none; }
|
||||
|
@ -20,15 +20,15 @@
|
|||
content: ""; width: 4px; height: 4px; border-radius: 100%; background: $colorDarkGrey; display: inline-block;
|
||||
vertical-align: middle; margin: 0px 6px;
|
||||
}
|
||||
.cellContent:first-child::before { display: none; }
|
||||
.cellContent.first::before { display: none; }
|
||||
|
||||
.cellContent {
|
||||
.name { @include text-overflow-nw; max-width: 200px; }
|
||||
}
|
||||
|
||||
.cellContent.isName { @include text-paragraph; }
|
||||
.cellContent.isName { @include text-paragraph; display: inline-block; color: $colorBlack; }
|
||||
.cellContent.isName {
|
||||
.name { display: inline-block; line-height: 24px; vertical-align: top; }
|
||||
.name { display: inline-block; line-height: 24px; vertical-align: top; max-width: 500px; }
|
||||
}
|
||||
|
||||
.cellContent.c-select,
|
||||
|
@ -54,7 +54,7 @@
|
|||
|
||||
.cellContent.c-url,
|
||||
.cellContent.c-email,
|
||||
.cellContent.c-phone { cursor: pointer !important; }
|
||||
.cellContent.c-phone { color: $colorDarkGrey; cursor: pointer !important; }
|
||||
|
||||
.cellContent.c-url:hover,
|
||||
.cellContent.c-email:hover,
|
||||
|
|
|
@ -28,6 +28,6 @@
|
|||
}
|
||||
|
||||
.katex-display { margin: 0px; text-align: inherit; }
|
||||
.katex { white-space: normal; line-height: 1.5em; text-align: inherit; }
|
||||
.katex { line-height: 1.5em; text-align: inherit; }
|
||||
}
|
||||
}
|
|
@ -79,16 +79,25 @@
|
|||
.archive { position: static; margin: 0px 0px 0px 8px; }
|
||||
}
|
||||
}
|
||||
.linkCard.c24.withIcon {
|
||||
.side.right { width: calc(100% - 30px); }
|
||||
}
|
||||
|
||||
.linkCard.c64 {
|
||||
.side.right { line-height: 64px; }
|
||||
.sides.bgColor .side.right { line-height: 56px; padding: 4px; }
|
||||
}
|
||||
.linkCard.c64.withIcon {
|
||||
.side.right { width: calc(100% - 80px); }
|
||||
}
|
||||
|
||||
.linkCard.c96 {
|
||||
.side.right { line-height: 96px; }
|
||||
.sides.bgColor .side.right { line-height: 88px; padding: 4px; }
|
||||
}
|
||||
.linkCard.c96.withIcon {
|
||||
.side.right { width: calc(100% - 116px); }
|
||||
}
|
||||
|
||||
.linkCard.card { margin: 3px 0px; }
|
||||
.linkCard.card {
|
||||
|
@ -105,6 +114,7 @@
|
|||
.linkCard.align1 {
|
||||
.sides { display: block; }
|
||||
.side.left { margin: 0px 0px 8px 0px; }
|
||||
.side.right { width: 100% !important; }
|
||||
.iconObject { display: inline-block; }
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
}
|
||||
|
||||
.cell.c-object, .cell.c-file {
|
||||
.column3 { column-count: 3; }
|
||||
.columns { column-count: 3; }
|
||||
}
|
||||
|
||||
.cell.c-object {
|
||||
|
|
|
@ -5,7 +5,7 @@ html, body { height: 100%; }
|
|||
|
||||
body {
|
||||
font-family: 'Inter'; font-size: 14px; line-height: 22px; letter-spacing: 0.2px; color: $colorBlack;
|
||||
overflow-x: hidden; overflow-y: scroll;
|
||||
overflow-x: hidden; overflow-y: overlay;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
backface-visibility: hidden;
|
||||
transform-style: flat;
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
.icon.add { background-image: url('~img/icon/header/add.svg'); }
|
||||
.icon.settings { background-image: url('~img/icon/header/settings.svg'); }
|
||||
.icon.expand { background-image: url('~img/icon/header/expand.svg'); }
|
||||
.icon.relation { background-image: url('~img/icon/header/relation.svg'); }
|
||||
.icon.graph { background-image: url('~img/icon/header/graph.svg'); }
|
||||
|
||||
.side { position: absolute; top: 5px; height: 28px; line-height: 28px; }
|
||||
|
||||
|
@ -75,9 +75,11 @@
|
|||
|
||||
.icon.big { width: 28px; height: 28px; background-size: 20px 20px; border-radius: 6px; }
|
||||
.icon.big.home, .icon.big.expand { width: 32px; margin-right: 10px; }
|
||||
.icon.big.nav { width: 32px; margin-left: 10px; }
|
||||
.icon.big.nav, .icon.big.graph { width: 32px; margin-left: 10px; }
|
||||
.icon.big:hover, .icon.big.hover { background-color: #f3f2ec; }
|
||||
|
||||
.icon.nm { margin: 0px !important; }
|
||||
|
||||
.path {
|
||||
border: 1px solid #fff; border-radius: 6px; display: inline-block; vertical-align: top; height: 28px;
|
||||
line-height: 24px; width: 100%; text-align: center; transition: $transitionFast; -webkit-app-region: no-drag;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
.img {
|
||||
width: 100%; height: 112px; background-repeat: no-repeat; background-size: cover; background-position: center center;
|
||||
border-bottom: 1px solid #eae9e0;
|
||||
border-bottom: 1px solid $colorLightGrey;
|
||||
}
|
||||
|
||||
.icon.fav { width: 16px; height: 16px; margin: -4px 6px 0px 0px; }
|
||||
|
@ -34,12 +34,12 @@
|
|||
}
|
||||
|
||||
.linkPreview.top {
|
||||
.head { border-top: 1px solid #eae9e0; bottom: 0px; padding-bottom: 11px; }
|
||||
.head { border-top: 1px solid $colorLightGrey; bottom: 0px; padding-bottom: 11px; }
|
||||
.content { padding-bottom: 44px; }
|
||||
.img { border-radius: 8px 8px 0px 0px; border-top: 0px; }
|
||||
}
|
||||
|
||||
.linkPreview.bottom {
|
||||
.head { border-bottom: 1px solid #eae9e0; top: 0px; padding-top: 11px; }
|
||||
.head { border-bottom: 1px solid $colorLightGrey; top: 0px; padding-top: 11px; }
|
||||
.content { padding-top: 44px; }
|
||||
}
|
|
@ -3,7 +3,7 @@
|
|||
.loaderWrapper { width: 24px; height: 24px; margin: 0px auto; position: relative; }
|
||||
.loaderWrapper {
|
||||
.loader {
|
||||
border: 2px solid #eae9e0; border-radius: 100%; width: 24px; height: 24px; border-left: 2px solid $colorMediumGrey; position: absolute;
|
||||
border: 2px solid $colorLightGrey; border-radius: 100%; width: 24px; height: 24px; border-left: 2px solid $colorMediumGrey; position: absolute;
|
||||
left: 50%; top: 50%; margin: -12px 0px 0px -12px; transform: translateZ(0); animation: load 0.8s infinite linear;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
.heading { display: block; margin-bottom: 14px; position: relative; z-index: 1; }
|
||||
.heading {
|
||||
.iconObject { display: inline-block; background-color: #f3f2ec; border-radius: 8px; margin-bottom: 10px; }
|
||||
.iconObject { display: inline-block; background-color: #f3f2ec; border-radius: 8px; margin-bottom: 10px; box-shadow: 0px 0px 0px 1px #fff inset; }
|
||||
.name { display: block; @include text-paragraph; @include text-overflow-nw; font-weight: bold; position: relative; }
|
||||
.icon.checkbox {
|
||||
position: absolute; top: 5px; left: -20px; width: 14px; height: 14px; background-image: url('~img/icon/object/checkbox0.svg') !important;
|
||||
|
@ -76,7 +76,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
.line { margin: 5px 0px; height: 6px; background: #eae9e0; display: inline-block; vertical-align: top; width: 100%; }
|
||||
.line { margin: 5px 0px; height: 6px; background: $colorLightGrey; display: inline-block; vertical-align: top; width: 100%; }
|
||||
.line.odd { width: 50%; }
|
||||
}
|
||||
.children { width: 100%; }
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
.pager { text-align: center; margin: 13px 0px 0px 0px; color: $colorMediumGrey; white-space: nowrap; @include text-common; }
|
||||
|
||||
.pager {
|
||||
.page {
|
||||
.pageItem {
|
||||
min-width: 24px; display: inline-block; padding: 0px 2px; transition: $transitionFast; text-align: center; margin-right: 8px;
|
||||
vertical-align: top; line-height: 24px; cursor: pointer;
|
||||
}
|
||||
.page:last-child { margin: 0px; }
|
||||
.page:hover, .page.active { color: $colorBlack; }
|
||||
.pageItem:last-child { margin: 0px; }
|
||||
.pageItem:hover, .pageItem.active { color: $colorBlack; }
|
||||
|
||||
.dots { min-width: 24px; display: inline-block; padding: 0px 2px; text-align: center; margin-right: 8px; vertical-align: top; line-height: 24px; }
|
||||
|
||||
|
|
|
@ -1,32 +1,59 @@
|
|||
@media print {
|
||||
@page {
|
||||
size: A4;
|
||||
margin: 0px 0px 2cm 0px;
|
||||
}
|
||||
@page { size: A4; margin: 1.5cm 0px; }
|
||||
@page:first { margin-top: 0px; }
|
||||
|
||||
body { -webkit-print-color-adjust: exact; }
|
||||
|
||||
#drag { display: none !important; }
|
||||
#linkPreview { display: none !important; }
|
||||
.menu { display: none !important; }
|
||||
.editorControls { display: none !important; }
|
||||
.controlButtons { display: none !important; }
|
||||
html.withPopup .page.isFull { display: none !important; }
|
||||
.header { display: none; }
|
||||
.footer { display: none; }
|
||||
|
||||
.block.blockCover { left: 0px; width: 100%; }
|
||||
|
||||
.pageMainEdit .blocks { padding: 0px 1.5cm 2cm 1.5cm }
|
||||
|
||||
.editorControls { display: none; }
|
||||
.overPopup, .overMenu { overflow: visible !important; }
|
||||
|
||||
.popups {
|
||||
.popup { position: relative; }
|
||||
.dimmer { display: none !important; }
|
||||
}
|
||||
|
||||
#editorWrapper { width: 100% !important; }
|
||||
|
||||
.pageMainEdit .blocks { padding: 0px 1.5cm; }
|
||||
.pageMainType, .pageMainRelation {
|
||||
.wrapper {
|
||||
.head {
|
||||
.side.center { margin: 0px; }
|
||||
.side.right { display: none; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.popupPage {
|
||||
#innerWrap {
|
||||
width: 100% !important; height: auto !important; margin: 0px !important; left: 0px; top: 0px;
|
||||
border-radius: 0px; box-shadow: 0px 0px; overflow: visible; position: static;
|
||||
}
|
||||
}
|
||||
|
||||
.block.blockCover { left: 0px; top: 0px; width: 100%; }
|
||||
|
||||
.blocks {
|
||||
#button-add { display: none; }
|
||||
|
||||
|
||||
.block {
|
||||
.icon.dnd { display: none; }
|
||||
}
|
||||
|
||||
.block.blockMedia { break-inside: avoid-page; }
|
||||
.block.blockMedia {
|
||||
.icon.play { display: none; }
|
||||
}
|
||||
|
||||
.block.blockText {
|
||||
#value { overflow: visible; break-inside: avoid-page; }
|
||||
.placeholder { display: none !important; }
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
.content { padding: 0px; overflow: visible; max-height: 366px; }
|
||||
.sections { overflow: auto; height: 370px; }
|
||||
|
||||
.head { border-bottom: 1px solid #eae9e0; padding: 11px 16px; font-weight: 500; color: $colorMediumGrey; }
|
||||
.head { border-bottom: 1px solid $colorLightGrey; padding: 11px 16px; font-weight: 500; color: $colorMediumGrey; }
|
||||
.head {
|
||||
.btn { display: inline-block; margin-right: 16px; transition: $transitionFast; cursor: pointer; }
|
||||
.btn:hover { color: $colorBlack }
|
||||
|
|
|
@ -36,5 +36,6 @@
|
|||
|
||||
.menu.menuPreviewLatex {
|
||||
.content { padding: 20px; }
|
||||
.example { padding: 0px; text-align: center; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
|
||||
#section-featured::after { display: block; }
|
||||
|
||||
.scrollWrap { padding: 22px 0px 16px 0px; height: calc(100% - 45px); overflow-x: hidden; overflow-y: scroll; }
|
||||
.scrollWrap { padding: 22px 0px 16px 0px; height: calc(100% - 45px); overflow-x: hidden; overflow-y: overlay; }
|
||||
.item { padding: 0px 32px; cursor: default; }
|
||||
.item {
|
||||
.icon.plus { margin-right: 4px; }
|
||||
|
@ -82,6 +82,7 @@
|
|||
.cell.c-select { padding: 5px 8px; }
|
||||
.cell.c-select {
|
||||
.tagItem { margin: 2px 6px 3px 0px; }
|
||||
.over { overflow: visible !important; width: 100%; }
|
||||
}
|
||||
|
||||
.cell.isEditing { padding: 0px; }
|
||||
|
@ -120,7 +121,7 @@
|
|||
}
|
||||
|
||||
.cell.c-object, .cell.c-file {
|
||||
.column3 { column-count: 3; }
|
||||
.columns { column-count: 2; }
|
||||
}
|
||||
|
||||
.cell.c-longText {
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
.menu.vertical { width: 224px; }
|
||||
.menu.vertical {
|
||||
.content { overflow-y: scroll; max-height: 450px; padding: 8px 0px; border-radius: inherit; transform: none; }
|
||||
.content { overflow-y: overlay; max-height: 450px; padding: 8px 0px; border-radius: inherit; transform: none; }
|
||||
.ReactVirtualized__Grid__innerScrollContainer { margin: 8px 0px; }
|
||||
|
||||
.loaderWrapper {
|
||||
|
@ -46,7 +46,7 @@
|
|||
background: rgba(255,255,255, 0.7);
|
||||
}
|
||||
|
||||
.tabs { padding: 10px 0px; border-bottom: 1px solid #eae9e0; margin: 0px 14px; white-space: nowrap; font-weight: 600; color: $colorMediumGrey; }
|
||||
.tabs { padding: 10px 0px; border-bottom: 1px solid $colorLightGrey; margin: 0px 14px; white-space: nowrap; font-weight: 600; color: $colorMediumGrey; }
|
||||
.tabs {
|
||||
.tab { display: inline-block; vertical-align: top; transition: $transitionFast; cursor: pointer; margin-right: 16px; position: relative; }
|
||||
.tab:hover, .tab.active { color: $colorBlack; }
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
.menu.menuDataviewFilterList { width: 360px; }
|
||||
.menu.menuDataviewFilterList {
|
||||
.content { overflow: visible; max-height: unset; padding: 0px; }
|
||||
.scrollWrap { padding: 8px 0px; overflow-x: hidden; overflow-y: scroll; max-height: 350px; }
|
||||
.scrollWrap { padding: 8px 0px; overflow-x: hidden; overflow-y: overlay; max-height: 350px; }
|
||||
|
||||
.item { padding: 4px 10px; position: relative; white-space: nowrap; display: flex; }
|
||||
.item {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
.menu.menuDataviewRelationList { width: 360px; }
|
||||
.menu.menuDataviewRelationList {
|
||||
.content { overflow: visible; max-height: unset; padding: 0px; }
|
||||
.scrollWrap { padding: 8px 0px; overflow-x: hidden; overflow-y: scroll; max-height: 350px; }
|
||||
.scrollWrap { padding: 8px 0px; overflow-x: hidden; overflow-y: overlay; max-height: 350px; }
|
||||
|
||||
.item { padding: 4px 10px; }
|
||||
.item {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
.menu.menuDataviewSort { width: 360px; }
|
||||
.menu.menuDataviewSort {
|
||||
.content { overflow: visible; max-height: unset; padding: 0px; }
|
||||
.scrollWrap { padding: 8px 0px; overflow-x: hidden; overflow-y: scroll; max-height: 350px; }
|
||||
.scrollWrap { padding: 8px 0px; overflow-x: hidden; overflow-y: overlay; max-height: 350px; }
|
||||
|
||||
.item { padding: 4px 40px 4px 10px; white-space: nowrap; }
|
||||
.item {
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
.menu.menuThreadList { width: 272px; }
|
||||
.menu.menuThreadList {
|
||||
.content { padding: 0px; }
|
||||
.item { padding: 11px 16px; border-bottom: 1px solid #eae9e0;}
|
||||
.item { padding: 11px 16px; border-bottom: 1px solid $colorLightGrey;}
|
||||
.item:hover::before { background: rgba(172, 169, 150, 0.1); }
|
||||
.item:last-child { border: 0px; }
|
||||
|
||||
|
|
119
src/scss/page/main/graph.scss
Normal file
|
@ -0,0 +1,119 @@
|
|||
@import "~scss/_vars";
|
||||
|
||||
.pageMainGraph {
|
||||
|
||||
.wrapper { display: flex; height: 100%; overflow: hidden; }
|
||||
.wrapper {
|
||||
.side { height: 100%; }
|
||||
.side.left { width: calc(100% - 268px); }
|
||||
.side.right {
|
||||
width: 268px; overflow: auto; border-left: 1px solid $colorLightGrey; position: relative;
|
||||
z-index: 21;
|
||||
}
|
||||
.side.right {
|
||||
.bottom {
|
||||
position: absolute; left: 0px; bottom: 0px; padding: 14px 16px; width: 100%; border-top: 1px solid $colorLightGrey;
|
||||
}
|
||||
.bottom {
|
||||
.icon.search {
|
||||
width: 20px; height: 20px; margin-right: 8px; vertical-align: top; background-image: url('~img/icon/graph/search.svg');
|
||||
}
|
||||
|
||||
.filter { padding: 0px; background: #fff; width: calc(100% - 28px); display: inline-block; vertical-align: top; }
|
||||
.filter {
|
||||
.inner { height: auto; }
|
||||
.input { height: 20px; line-height: 20px; }
|
||||
.icon.clear { top: 0px; }
|
||||
.line { display: none; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#graphWrapper { height: 100%; }
|
||||
#graph { width: 100%; height: 100%; }
|
||||
canvas { width: 100%; height: 100%; background: #fff; }
|
||||
|
||||
.tabs { padding: 0px 16px; border-bottom: 1px solid $colorLightGrey; white-space: nowrap; font-weight: 600; color: $colorMediumGrey; }
|
||||
.tabs {
|
||||
.tab { display: inline-block; vertical-align: middle; transition: $transitionFast; cursor: pointer; margin-right: 16px; position: relative; }
|
||||
.tab:hover, .tab.active { color: $colorBlack; }
|
||||
.tab:last-child { margin: 0px; }
|
||||
}
|
||||
|
||||
.sections { overflow: auto; padding: 14px 0px; }
|
||||
.section { padding: 11px 0px 0px 0px; }
|
||||
.section::after { content: ""; height: 1px; margin: 8px 16px 0px 16px; background: $colorLightGrey; display: block; }
|
||||
.section:first-child { padding: 0px; }
|
||||
.section:last-child { border: 0px; }
|
||||
.section:last-child::after { display: none; }
|
||||
.section > .name { padding: 3px 16px; margin-bottom: 2px; @include text-small; color: $colorDarkGrey; display: block; font-weight: 500; }
|
||||
.section {
|
||||
.item { padding: 4px 16px; @include text-common; line-height: 20px; position: relative; cursor: pointer; width: 100%; background: #fff; }
|
||||
.item::before {
|
||||
content: ""; position: absolute; left: 0px; top: 0px; width: 100%; height: 100%; background: rgba(172, 169, 150, 0); z-index: 1;
|
||||
transition: background 0.2s ease-in-out; pointer-events: none;
|
||||
}
|
||||
.item:hover::before { background: rgba(172, 169, 150, 0.1); }
|
||||
|
||||
.item {
|
||||
.name { display: inline-block; vertical-align: top; position: relative; line-height: 20px; }
|
||||
.icon { width: 20px; height: 20px; margin-right: 6px; vertical-align: top; transition: none; flex-shrink: 0; }
|
||||
.switch { position: absolute; right: 16px; top: 50%; margin-top: -8px; }
|
||||
}
|
||||
|
||||
.icon.label { background-image: url('~img/icon/graph/label.svg'); }
|
||||
.icon.link { background-image: url('~img/icon/graph/link.svg'); }
|
||||
.icon.relation { background-image: url('~img/icon/graph/relation.svg'); }
|
||||
.icon.orphan { background-image: url('~img/icon/graph/orphan.svg'); }
|
||||
}
|
||||
|
||||
.preview { padding: 24px; }
|
||||
.preview {
|
||||
.loaderWrapper { width: 100%; height: 100%; border: 1px solid $colorLightGrey; border-radius: 8px; }
|
||||
.cover { position: absolute; height: 86px; }
|
||||
|
||||
.block {
|
||||
.wrapMenu { display: none; }
|
||||
.wrapContent { width: 100%; }
|
||||
}
|
||||
.block.blockFeatured { padding: 0px; margin: 0px; line-height: 28px; @include text-small; }
|
||||
.block.blockFeatured {
|
||||
.cellContent { padding: 2px 6px; }
|
||||
.cellContent {
|
||||
.over { display: inline; }
|
||||
.tagItem { @include text-small; margin: 0px 6px 0px 0px; }
|
||||
}
|
||||
|
||||
.bullet { margin: 0px; }
|
||||
}
|
||||
|
||||
.heading { display: block; margin-bottom: 14px; position: relative; z-index: 1; }
|
||||
.heading {
|
||||
.iconObject { display: inline-block; background-color: #f3f2ec; border-radius: 8px; margin-bottom: 10px; box-shadow: 0px 0px 0px 1px #fff inset; }
|
||||
.title { display: block; @include text-header3; font-weight: bold; position: relative; }
|
||||
.icon.checkbox {
|
||||
position: absolute; top: 5px; left: -20px; width: 14px; height: 14px; background-image: url('~img/icon/object/checkbox0.svg') !important;
|
||||
}
|
||||
.icon.checkbox.active { background-image: url('~img/icon/object/checkbox1.svg') !important; }
|
||||
|
||||
.description { @include text-common; margin: 4px 0px 12px 0px; }
|
||||
.author { @include text-very-small; color: $colorMediumGrey; }
|
||||
}
|
||||
|
||||
.buttons { margin-top: 24px; }
|
||||
.buttons {
|
||||
.button { width: calc(50% - 4px); height: 32px; line-height: 32px; margin-right: 8px; border-radius: 4px; }
|
||||
.button:last-child { margin: 0px; }
|
||||
}
|
||||
}
|
||||
.preview.withCover { padding-top: 104px; }
|
||||
.preview.withIconAndCover { padding-top: 46px; }
|
||||
|
||||
.input-drag { height: 12px; }
|
||||
.input-drag {
|
||||
.icon { border-color: $colorBlack; background: $colorBlack; }
|
||||
.fill { background: $colorBlack; }
|
||||
.back { background: $colorLightGrey; }
|
||||
}
|
||||
}
|
|
@ -43,14 +43,15 @@
|
|||
.tabWrap { width: 100%; height: 44px; margin-bottom: 24px; position: relative; }
|
||||
.tabWrap {
|
||||
.tabs {
|
||||
line-height: 44px; height: 100%; background: rgba(0,0,0,0.3); border-radius: 12px; display: inline-block; @include text-paragraph;
|
||||
color: rgba(255,255,255,0.6); font-weight: 700; user-select: none; white-space: nowrap;
|
||||
height: 100%; background: rgba(0,0,0,0.3); border-radius: 12px; display: inline-block; @include text-paragraph;
|
||||
color: rgba(255,255,255,0.6); font-weight: 700; user-select: none; white-space: nowrap; line-height: 44px;
|
||||
}
|
||||
.tabs {
|
||||
.tab {
|
||||
line-height: 44px; display: inline-block; vertical-align: middle; padding: 0px 16px; border-radius: 12px; transition: $transitionFast;
|
||||
display: inline-block; vertical-align: top; padding: 0px 16px; border-radius: 12px; transition: $transitionFast;
|
||||
cursor: pointer;
|
||||
}
|
||||
.tab:hover { background: rgba(0,0,0,0.15); }
|
||||
.tab.active { background: rgba(0,0,0,0.3); color: #fff; }
|
||||
}
|
||||
|
||||
|
@ -116,7 +117,7 @@
|
|||
.iconObject { background: #f3f2ec; border-radius: 10px; margin-bottom: 15px; }
|
||||
.line { border-radius: 2px; }
|
||||
.line.lineName { width: 88px; height: 10px; background-color: $colorLightGrey; margin-bottom: 10px; }
|
||||
.line.lineType { width: 56px; height: 8px; background-color: #eae9e0; }
|
||||
.line.lineType { width: 56px; height: 8px; background-color: $colorLightGrey; }
|
||||
}
|
||||
|
||||
.item.isTask { padding-left: 40px; }
|
||||
|
|
80
src/scss/page/main/navigation.scss
Normal file
|
@ -0,0 +1,80 @@
|
|||
@import "~scss/_vars";
|
||||
|
||||
.pageMainNavigation {
|
||||
.wrapper > .loaderWrapper { position: fixed; left: 0px; top: 0px; width: 100%; height: 100%; background: rgba(255,255,255,0.5); }
|
||||
|
||||
.empty { height: 100%; line-height: 360px; padding: 16px; text-align: center; }
|
||||
.empty {
|
||||
b { display: block; font-weight: 400; color: $colorBlack; }
|
||||
.txt { line-height: 24px; color: $colorMediumGrey; }
|
||||
}
|
||||
|
||||
.items {
|
||||
.item {
|
||||
cursor: pointer; transition: $transitionFast; position: relative; line-height: 48px; margin-bottom: 16px; padding: 0px;
|
||||
height: 80px; border: 1px solid $colorLightGrey; border-radius: 8px;
|
||||
}
|
||||
.item {
|
||||
.inner { padding: 16px; }
|
||||
.iconObject { position: absolute; left: 16px; top: 16px; transition: $transitionFast; }
|
||||
.info { border: 0px; margin-top: -2px; padding: 0px 0px 0px 60px; display: inline-block; vertical-align: middle; width: 100%; }
|
||||
.name { width: 100%; line-height: 22px; height: 22px; @include text-overflow-nw; }
|
||||
.descr { width: 100%; @include text-small; max-height: 18px; @include text-overflow-nw; color: $colorVeryDarkGrey; }
|
||||
.icon.arrow {
|
||||
width: 24px; height: 24px; position: absolute; right: -24px; top: 50%; transform: translateY(-50%);
|
||||
background-image: url('~img/arrow/nav0.svg');
|
||||
}
|
||||
}
|
||||
|
||||
.item.active { background-color: rgba(172, 169, 150, 0.1); }
|
||||
}
|
||||
|
||||
.sides { display: flex; padding: 0px 16px; }
|
||||
|
||||
.items { width: 33.33%; padding: 4px 0px; }
|
||||
.items.center { padding: 39px 16px 4px 16px; }
|
||||
.items {
|
||||
.row { width: 100%; padding: 0px 32px 0px 16px; }
|
||||
.item {
|
||||
.icon.arrow {
|
||||
width: 24px; height: 24px; position: absolute; right: -24px; top: 50%; transform: translateY(-50%);
|
||||
background-image: url('~img/arrow/nav0.svg');
|
||||
}
|
||||
}
|
||||
|
||||
.item.active { background: none; border-color: $colorOrange !important; box-shadow: 0px 0px 0px 1px $colorOrange inset; }
|
||||
.item.active {
|
||||
.icon.arrow { background-image: url('~img/arrow/nav1.svg'); }
|
||||
}
|
||||
|
||||
.item.empty { line-height: 78px; cursor: default; }
|
||||
.item.empty {
|
||||
.name { display: inline-block; vertical-align: middle; }
|
||||
}
|
||||
}
|
||||
|
||||
.sideName { margin-bottom: 13px; @include text-common; font-weight: 500; padding: 0px 16px; }
|
||||
|
||||
.selected { padding: 16px 16px 12px 16px; border-radius: 8px; border: 1px solid $colorLightGrey; transition: $transitionFast; }
|
||||
.selected {
|
||||
.iconObject { margin-bottom: 8px; }
|
||||
.name { margin-bottom: 1px; @include text-overflow-nw; height: 22px; }
|
||||
.descr { @include text-small; color: $colorVeryDarkGrey; @include text-overflow; max-height: 54px; }
|
||||
.cover { position: static; height: 156px; margin-top: 11px; }
|
||||
.buttons { margin-top: 16px; display: flex; }
|
||||
.buttons {
|
||||
.button { width: 100%; height: 32px; line-height: 28px; }
|
||||
.button:first-child { margin-right: 8px; }
|
||||
.button {
|
||||
.icon.expand { background-image: url('~img/icon/expand.svg'); width: 20px; height: 20px; position: absolute; left: 8px; top: 6px; }
|
||||
}
|
||||
}
|
||||
}
|
||||
.selected.active { border-color: $colorOrange !important; box-shadow: 0px 0px 0px 1px $colorOrange; }
|
||||
|
||||
.items.right {
|
||||
.item {
|
||||
.icon.arrow { right: auto; left: -24px; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -6,11 +6,17 @@
|
|||
.wrapper {
|
||||
.head { display: flex; margin-bottom: 35px; }
|
||||
.head {
|
||||
.side.left { width: 96px; flex-shrink: 0; margin-right: 32px; }
|
||||
.side.right { width: calc(100% - 128px); }
|
||||
.side.left { flex-shrink: 0; margin-right: 32px; }
|
||||
.side.center { width: calc(100% - 100px); line-height: 96px; margin-right: 32px; }
|
||||
.side.right { flex-shrink: 0; text-align: right; }
|
||||
.side.right {
|
||||
.button { height: 36px; line-height: 34px; white-space: nowrap; margin-right: 10px; }
|
||||
.button:last-child { margin: 0px; }
|
||||
}
|
||||
|
||||
.title { @include text-header1; }
|
||||
.descr { @include text-paragraph; margin: 7px 0px; }
|
||||
.descr:empty { display: none; }
|
||||
}
|
||||
|
||||
.block {
|
||||
|
@ -39,7 +45,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
table { width: 100%; border-collapse: collapse; border-bottom: 1px solid #eae9e0; table-layout: fixed; border-top: 1px solid #eae9e0; }
|
||||
table { width: 100%; border-collapse: collapse; border-bottom: 1px solid $colorLightGrey; table-layout: fixed; border-top: 1px solid $colorLightGrey; }
|
||||
table {
|
||||
.cellHead {
|
||||
text-align: left; color: $colorVeryDarkGrey; padding: 14px 0px 14px 14px; white-space: nowrap; font-weight: 400; line-height: 20px; position: relative;
|
||||
|
@ -48,21 +54,21 @@
|
|||
.cellHead {
|
||||
.name {
|
||||
display: inline-block; line-height: 20px; height: 20px; vertical-align: top; width: 100%;
|
||||
@include text-overflow-nw; border-right: 1px solid #eae9e0;
|
||||
@include text-overflow-nw; border-right: 1px solid $colorLightGrey;
|
||||
}
|
||||
}
|
||||
.cellHead:last-child {
|
||||
.name { border: 0px; }
|
||||
}
|
||||
|
||||
tbody { border-top: 1px solid #eae9e0; }
|
||||
tbody { border-top: 1px solid $colorLightGrey; }
|
||||
|
||||
.cellContent { width: 100%; overflow: hidden; height: 20px; line-height: 20px; }
|
||||
.cellContent.c-object {
|
||||
.wrap { white-space: nowrap; }
|
||||
}
|
||||
|
||||
.cell { padding: 14px; border-bottom: 1px solid #eae9e0; vertical-align: top; position: relative; word-break: break-word; }
|
||||
.cell { padding: 14px; border-bottom: 1px solid $colorLightGrey; vertical-align: top; position: relative; word-break: break-word; }
|
||||
.cell.c-select { padding-bottom: 8px; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
.head { width: 100%; height: 40px; padding: 8px 0px; text-align: center; position: absolute; top: 0px; left: 0px; z-index: 1; background: #fff; }
|
||||
.head {
|
||||
.tabs {
|
||||
white-space: nowrap; background: #eae9e0; display: inline-block; height: 28px; padding: 2px; border-radius: 6px;
|
||||
white-space: nowrap; background: $colorLightGrey; display: inline-block; height: 28px; padding: 2px; border-radius: 6px;
|
||||
}
|
||||
.tabs {
|
||||
.item {
|
||||
|
@ -20,7 +20,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
.body { width: 100%; height: 100%; overflow-y: scroll; display: flex; flex-direction: column; }
|
||||
.body { width: 100%; height: 100%; overflow-y: overlay; display: flex; flex-direction: column; }
|
||||
.body {
|
||||
.mid { text-align: center; padding: 44px 0px 56px 0px; margin: 0px auto; }
|
||||
.mid {
|
||||
|
@ -61,7 +61,7 @@
|
|||
.name { @include text-overflow-nw; line-height: 22px; }
|
||||
.descr { width: 100%; @include text-small; color: $colorDarkGrey; @include text-overflow-nw; margin: 2px 0px; }
|
||||
.author { @include text-small; color: $colorDarkGrey; line-height: 18px; margin-bottom: 2px; }
|
||||
.line { width: 100%; height: 1px; background: #eae9e0; position: absolute; left: 0px; }
|
||||
.line { width: 100%; height: 1px; background: $colorLightGrey; position: absolute; left: 0px; }
|
||||
}
|
||||
|
||||
.button { height: 28px; line-height: 24px; position: absolute; right: 0px; top: 50%; margin-top: -14px; display: none; }
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
.name { display: inline-block; vertical-align: middle; }
|
||||
}
|
||||
|
||||
table { width: 100%; border-collapse: collapse; border-bottom: 1px solid #eae9e0; table-layout: fixed; border-top: 1px solid #eae9e0; }
|
||||
table { width: 100%; border-collapse: collapse; border-bottom: 1px solid $colorLightGrey; table-layout: fixed; border-top: 1px solid $colorLightGrey; }
|
||||
table {
|
||||
.cellHead {
|
||||
text-align: left; color: $colorVeryDarkGrey; padding: 14px 0px 14px 14px; white-space: nowrap; font-weight: 400; line-height: 20px; position: relative;
|
||||
|
@ -94,14 +94,14 @@
|
|||
.cellHead {
|
||||
.name {
|
||||
display: inline-block; line-height: 20px; height: 20px; vertical-align: top; width: 100%;
|
||||
@include text-overflow-nw; border-right: 1px solid #eae9e0;
|
||||
@include text-overflow-nw; border-right: 1px solid $colorLightGrey;
|
||||
}
|
||||
}
|
||||
.cellHead:last-child {
|
||||
.name { border: 0px; }
|
||||
}
|
||||
|
||||
tbody { border-top: 1px solid #eae9e0; }
|
||||
tbody { border-top: 1px solid $colorLightGrey; }
|
||||
|
||||
.cellContent { width: 100%; overflow: hidden; height: 20px; line-height: 20px; }
|
||||
|
||||
|
@ -109,7 +109,7 @@
|
|||
.wrap { white-space: nowrap; }
|
||||
}
|
||||
|
||||
.cell { padding: 14px; border-bottom: 1px solid #eae9e0; vertical-align: top; position: relative; word-break: break-word; }
|
||||
.cell { padding: 14px; border-bottom: 1px solid $colorLightGrey; vertical-align: top; position: relative; word-break: break-word; }
|
||||
.cell.c-select { padding-bottom: 8px; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
.popup {
|
||||
.innerWrap {
|
||||
position: absolute; left: 50%; top: 50%; z-index: 1; background: #fff; border-radius: 12px; box-shadow: 0px 2px 16px rgba(0, 0, 0, 0.35);
|
||||
opacity: 0; transform: scale3d(0.95,0.95,1); transition: opacity 0.05s ease-in-out, transform 0.05s ease-in-out; overflow-x: hidden; overflow-y: scroll;
|
||||
opacity: 0; transform: scale3d(0.95,0.95,1); transition: opacity 0.05s ease-in-out, transform 0.05s ease-in-out; overflow-x: hidden; overflow-y: overlay;
|
||||
}
|
||||
|
||||
.dimmer {
|
||||
|
|
|
@ -1,39 +0,0 @@
|
|||
@import "~scss/_vars";
|
||||
|
||||
.popups {
|
||||
.popup.popupGraph {
|
||||
.innerWrap { width: calc(100% - 32px); height: calc(100% - 32px); overflow: hidden; }
|
||||
.content { height: 100%; }
|
||||
|
||||
.sides { display: flex; height: 100%; }
|
||||
.side { height: 100%; }
|
||||
.side.left { width: calc(100% - 300px); }
|
||||
.side.right { width: 300px; background: rgba(134, 125, 66, 0.08); padding: 20px; overflow: auto; border-left: 1px solid $colorLightGrey; }
|
||||
|
||||
#graph { width: 100%; height: 100%; }
|
||||
canvas { width: 100%; height: 100%; background: #fff; }
|
||||
|
||||
.filter { padding: 0px; background: #fff; border-radius: 3px; border: 1px solid $colorLightGrey; }
|
||||
.filter {
|
||||
.inner { height: auto; padding: 0px 4px; }
|
||||
.line { display: none; }
|
||||
}
|
||||
|
||||
.section { margin-bottom: 24px; }
|
||||
.section {
|
||||
.item { margin-bottom: 10px; line-height: 24px; }
|
||||
|
||||
.name { @include text-header3; margin-bottom: 12px; line-height: 24px; }
|
||||
.label { @include text-common; margin-bottom: 6px; }
|
||||
|
||||
.icon.checkbox { vertical-align: top; margin-right: 6px; cursor: pointer; }
|
||||
}
|
||||
|
||||
.input-drag { height: 12px; }
|
||||
.input-drag {
|
||||
.icon { border-color: $colorBlack; background: $colorBlack; }
|
||||
.fill { background: $colorBlack; }
|
||||
.back { background: $colorLightGrey; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,84 +0,0 @@
|
|||
@import "~scss/_vars";
|
||||
|
||||
.popups {
|
||||
.popup.popupNavigation {
|
||||
.content { overflow: visible; transition: none; }
|
||||
.innerWrap { transform: scale3d(1,1,1); transition: none; }
|
||||
.dimmer { transition: none; }
|
||||
|
||||
.empty { height: 100%; line-height: 360px; padding: 16px; text-align: center; }
|
||||
.empty {
|
||||
b { display: block; font-weight: 400; color: $colorBlack; }
|
||||
.txt { line-height: 24px; color: $colorMediumGrey; }
|
||||
}
|
||||
|
||||
.items {
|
||||
.item {
|
||||
cursor: pointer; transition: $transitionFast; position: relative; line-height: 48px; margin-bottom: 16px; padding: 0px;
|
||||
height: 80px; border: 1px solid $colorLightGrey; border-radius: 8px;
|
||||
}
|
||||
.item {
|
||||
.inner { padding: 16px; }
|
||||
.iconObject { position: absolute; left: 16px; top: 16px; transition: $transitionFast; }
|
||||
.info { border: 0px; margin-top: -2px; padding: 0px 0px 0px 60px; display: inline-block; vertical-align: middle; width: 100%; }
|
||||
.name { width: 100%; line-height: 22px; height: 22px; @include text-overflow-nw; }
|
||||
.descr { width: 100%; @include text-small; max-height: 18px; @include text-overflow-nw; color: $colorVeryDarkGrey; }
|
||||
.icon.arrow {
|
||||
width: 24px; height: 24px; position: absolute; right: -24px; top: 50%; transform: translateY(-50%);
|
||||
background-image: url('~img/arrow/nav0.svg');
|
||||
}
|
||||
}
|
||||
|
||||
.item.active { background-color: rgba(172, 169, 150, 0.1); }
|
||||
}
|
||||
|
||||
.sides { display: flex; padding: 16px; }
|
||||
|
||||
.items { width: 33.33%; padding: 4px 0px; }
|
||||
.items.center { padding: 39px 16px 4px 16px; }
|
||||
.items {
|
||||
.row { width: 100%; padding: 0px 32px 0px 16px; }
|
||||
.item {
|
||||
.icon.arrow {
|
||||
width: 24px; height: 24px; position: absolute; right: -24px; top: 50%; transform: translateY(-50%);
|
||||
background-image: url('~img/arrow/nav0.svg');
|
||||
}
|
||||
}
|
||||
|
||||
.item.active { background: none; border-color: $colorOrange !important; box-shadow: 0px 0px 0px 1px $colorOrange inset; }
|
||||
.item.active {
|
||||
.icon.arrow { background-image: url('~img/arrow/nav1.svg'); }
|
||||
}
|
||||
|
||||
.item.empty { line-height: 78px; cursor: default; }
|
||||
.item.empty {
|
||||
.name { display: inline-block; vertical-align: middle; }
|
||||
}
|
||||
}
|
||||
|
||||
.sideName { margin-bottom: 13px; @include text-common; font-weight: 500; padding: 0px 16px; }
|
||||
|
||||
.selected { padding: 16px 16px 12px 16px; border-radius: 8px; border: 1px solid $colorLightGrey; transition: $transitionFast; }
|
||||
.selected {
|
||||
.iconObject { margin-bottom: 8px; }
|
||||
.name { margin-bottom: 1px; @include text-overflow-nw; height: 22px; }
|
||||
.descr { @include text-small; color: $colorVeryDarkGrey; @include text-overflow; max-height: 54px; }
|
||||
.cover { position: static; height: 156px; margin-top: 11px; }
|
||||
.buttons { margin-top: 16px; display: flex; }
|
||||
.buttons {
|
||||
.button { width: 100%; height: 32px; line-height: 28px; }
|
||||
.button:first-child { margin-right: 8px; }
|
||||
.button {
|
||||
.icon.expand { background-image: url('~img/icon/expand.svg'); width: 20px; height: 20px; position: absolute; left: 8px; top: 6px; }
|
||||
}
|
||||
}
|
||||
}
|
||||
.selected.active { border-color: $colorOrange !important; box-shadow: 0px 0px 0px 1px $colorOrange; }
|
||||
|
||||
.items.right {
|
||||
.item {
|
||||
.icon.arrow { right: auto; left: -24px; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3,7 +3,7 @@
|
|||
.popups {
|
||||
.popup.popupPreview {
|
||||
.innerWrap { padding: 10px; min-width: 50px; min-height: 50px; margin: -25px 0px 0px -25px; }
|
||||
.wrap { width: 100%; height: 100%; overflow-x: hidden; overflow-y: scroll; line-height: 0px; }
|
||||
.wrap { width: 100%; height: 100%; overflow-x: hidden; overflow-y: overlay; line-height: 0px; }
|
||||
.content { border-radius: 4px; display: block; }
|
||||
#content { border-radius: 6px; }
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
.tabIndex { padding: 45px 48px 28px 48px; }
|
||||
.tabIndex {
|
||||
.row {
|
||||
padding: 18px 0px 17px 0px; border-bottom: 1px solid #eae9e0; cursor: pointer; position: relative;
|
||||
padding: 18px 0px 17px 0px; border-bottom: 1px solid $colorLightGrey; cursor: pointer; position: relative;
|
||||
@include text-paragraph; line-height: 28px;
|
||||
}
|
||||
.row.flex { display: flex; }
|
||||
|
@ -57,7 +57,7 @@
|
|||
.logout:hover { color: $colorBlack; }
|
||||
}
|
||||
|
||||
.tabWallpaper { overflow-y: scroll; height: 520px; }
|
||||
.tabWallpaper { overflow-y: overlay; height: 520px; }
|
||||
|
||||
.tabWallpaper {
|
||||
.covers { margin-left: -2px; width: 596px; }
|
||||
|
@ -122,7 +122,7 @@
|
|||
|
||||
.button.blank {
|
||||
padding: 20px 0px; width: 100%; display: block; height: auto; line-height: 24px; background: none; color: #e89d00;
|
||||
border: 0px; border-radius: 0px; border-bottom: 1px solid #eae9e0; @include text-paragraph; font-weight: 400;
|
||||
border: 0px; border-radius: 0px; border-bottom: 1px solid $colorLightGrey; @include text-paragraph; font-weight: 400;
|
||||
}
|
||||
.button.blank:hover { color: $colorBlack; }
|
||||
|
||||
|
|
|
@ -16,15 +16,15 @@
|
|||
}
|
||||
}
|
||||
|
||||
.body { overflow-y: scroll; height: 100%; padding: 24px 48px 48px 48px; }
|
||||
.body { overflow-y: overlay; height: 100%; padding: 24px 48px 48px 48px; }
|
||||
.body {
|
||||
.section { margin-bottom: 25px; }
|
||||
.section:last-child { margin-bottom: 0px; }
|
||||
.section {
|
||||
.name { @include text-paragraph; font-weight: 600; padding-bottom: 12px; border-bottom: 1px solid #eae9e0; }
|
||||
.name { @include text-paragraph; font-weight: 600; padding-bottom: 12px; border-bottom: 1px solid $colorLightGrey; }
|
||||
|
||||
.items {
|
||||
.item { display: flex; padding: 12px 0px; border-bottom: 1px solid #eae9e0; }
|
||||
.item { display: flex; padding: 12px 0px; border-bottom: 1px solid $colorLightGrey; }
|
||||
.item {
|
||||
.key { width: 180px; font-weight: 500; color: $colorMediumGrey; }
|
||||
.descr { width: calc(100% - 180px); }
|
||||
|
@ -32,7 +32,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
.section > .descr { padding-bottom: 12px; border-bottom: 1px solid #eae9e0; }
|
||||
.section > .descr { padding-bottom: 12px; border-bottom: 1px solid $colorLightGrey; }
|
||||
|
||||
.section.separator { padding-top: 27px; margin-bottom: 41px; }
|
||||
.section.separator > .descr { border: 0px; }
|
||||
|
|
|
@ -55,6 +55,8 @@ import 'scss/page/main/type.scss';
|
|||
import 'scss/page/main/relation.scss';
|
||||
import 'scss/page/main/store.scss';
|
||||
import 'scss/page/main/media.scss';
|
||||
import 'scss/page/main/graph.scss';
|
||||
import 'scss/page/main/navigation.scss';
|
||||
|
||||
import 'scss/block/common.scss';
|
||||
import 'scss/block/dataview.scss';
|
||||
|
@ -81,7 +83,6 @@ import 'scss/block/latex.scss';
|
|||
|
||||
import 'scss/popup/common.scss';
|
||||
import 'scss/popup/settings.scss';
|
||||
import 'scss/popup/navigation.scss';
|
||||
import 'scss/popup/search.scss';
|
||||
import 'scss/popup/prompt.scss';
|
||||
import 'scss/popup/preview.scss';
|
||||
|
@ -90,7 +91,6 @@ import 'scss/popup/shortcut.scss';
|
|||
import 'scss/popup/confirm.scss';
|
||||
import 'scss/popup/page.scss';
|
||||
import 'scss/popup/template.scss';
|
||||
import 'scss/popup/graph.scss';
|
||||
|
||||
import 'emoji-mart/css/emoji-mart.css';
|
||||
import 'scss/menu/common.scss';
|
||||
|
@ -419,6 +419,27 @@ class App extends React.Component<Props, State> {
|
|||
};
|
||||
});
|
||||
|
||||
ipcRenderer.on('update-confirm', (e: any, auto: boolean) => {
|
||||
commonStore.progressClear();
|
||||
|
||||
if (!auto) {
|
||||
popupStore.open('confirm', {
|
||||
data: {
|
||||
title: 'Update available',
|
||||
text: 'Do you want to update on a new version?',
|
||||
textConfirm: 'Restart and update',
|
||||
textCancel: 'Later',
|
||||
onConfirm: () => {
|
||||
ipcRenderer.send('updateConfirm');
|
||||
},
|
||||
onCancel: () => {
|
||||
ipcRenderer.send('updateCancel');
|
||||
},
|
||||
},
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
ipcRenderer.on('update-not-available', (e: any, auto: boolean) => {
|
||||
commonStore.progressClear();
|
||||
|
||||
|
@ -606,7 +627,7 @@ class App extends React.Component<Props, State> {
|
|||
status: Util.sprintf('Downloading update... %s/%s', Util.fileSize(progress.transferred), Util.fileSize(progress.total)),
|
||||
current: progress.transferred,
|
||||
total: progress.total,
|
||||
isUnlocked: false,
|
||||
isUnlocked: true,
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -234,6 +234,8 @@ const BlockDataview = observer(class BlockDataview extends React.Component<Props
|
|||
},
|
||||
onSelect: (item: any) => {
|
||||
create(item);
|
||||
|
||||
window.setTimeout(() => { menuStore.close('previewObject'); }, Constant.delay.menu);
|
||||
},
|
||||
}
|
||||
});
|
||||
|
|
|
@ -42,7 +42,7 @@ const CellFile = observer(class CellFile extends React.Component<Props, State> {
|
|||
const length = value.length;
|
||||
|
||||
if (length >= 3) {
|
||||
cn.push('column3');
|
||||
cn.push('columns');
|
||||
};
|
||||
|
||||
if (arrayLimit) {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import * as React from 'react';
|
||||
import * as ReactDOM from 'react-dom';
|
||||
import { I, DataUtil, Util } from 'ts/lib';
|
||||
import { commonStore, menuStore, dbStore } from 'ts/store';
|
||||
import { observable } from 'mobx';
|
||||
|
@ -123,6 +124,24 @@ class Cell extends React.Component<Props, {}> {
|
|||
);
|
||||
};
|
||||
|
||||
componentDidMount () {
|
||||
this.checkIcon();
|
||||
};
|
||||
|
||||
componentDidUpdate () {
|
||||
this.checkIcon();
|
||||
};
|
||||
|
||||
checkIcon () {
|
||||
const relation = this.getRelation();
|
||||
if (relation && (relation.format == I.RelationType.ShortText)) {
|
||||
const node = $(ReactDOM.findDOMNode(this));
|
||||
const icon = node.find('.iconObject');
|
||||
|
||||
icon.length ? node.addClass('withIcon') : node.removeClass('withIcon');
|
||||
};
|
||||
};
|
||||
|
||||
onClick (e: any) {
|
||||
e.stopPropagation();
|
||||
|
||||
|
@ -294,11 +313,12 @@ class Cell extends React.Component<Props, {}> {
|
|||
onSelect: (event: any, item: any) => {
|
||||
let value = '';
|
||||
|
||||
if (this.ref) {
|
||||
if (this.ref && this.ref.ref) {
|
||||
value = this.ref.ref.getValue();
|
||||
};
|
||||
|
||||
const scheme = DataUtil.getRelationUrlScheme(relation.format, value);
|
||||
|
||||
if (item.id == 'go') {
|
||||
ipcRenderer.send('urlOpen', scheme + value);
|
||||
};
|
||||
|
|
|
@ -37,7 +37,7 @@ const CellObject = observer(class CellObject extends React.Component<Props, Stat
|
|||
let length = value.length;
|
||||
|
||||
if (length >= 3) {
|
||||
cn.push('column3');
|
||||
cn.push('columns');
|
||||
};
|
||||
|
||||
if (arrayLimit) {
|
||||
|
|
|
@ -176,7 +176,7 @@ const CellText = observer(class CellText extends React.Component<Props, State> {
|
|||
value = value || DataUtil.defaultName('page');
|
||||
|
||||
content = (
|
||||
<div className="flex">
|
||||
<React.Fragment>
|
||||
{!view || (view && !view.hideIcon) ? (
|
||||
<IconObject
|
||||
id={[ relation.relationKey, record.id ].join('-')}
|
||||
|
@ -195,7 +195,7 @@ const CellText = observer(class CellText extends React.Component<Props, State> {
|
|||
e.stopPropagation();
|
||||
onParentClick(e);
|
||||
}} />
|
||||
</div>
|
||||
</React.Fragment>
|
||||
);
|
||||
} else {
|
||||
content = <Name name={value} />;
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
import * as React from 'react';
|
||||
import * as ReactDOM from 'react-dom';
|
||||
import { Icon } from 'ts/component';
|
||||
import { I, Util } from 'ts/lib';
|
||||
import { C, I, Util, analytics } from 'ts/lib';
|
||||
import { menuStore, dbStore, blockStore } from 'ts/store';
|
||||
import { observer } from 'mobx-react';
|
||||
import { SortableContainer, SortableElement } from 'react-sortable-hoc';
|
||||
import arrayMove from 'array-move';
|
||||
|
||||
interface Props extends I.ViewComponent {
|
||||
className?: string;
|
||||
|
@ -31,7 +32,7 @@ const Controls = observer(class Controls extends React.Component<Props, State> {
|
|||
};
|
||||
|
||||
render () {
|
||||
const { className, getData, rootId, block, getView, readonly, onRowAdd } = this.props;
|
||||
const { className, rootId, block, getView, readonly, onRowAdd } = this.props;
|
||||
const views = dbStore.getViews(rootId, block.id);
|
||||
const view = getView();
|
||||
const { viewId } = dbStore.getMeta(rootId, block.id);
|
||||
|
@ -66,8 +67,8 @@ const Controls = observer(class Controls extends React.Component<Props, State> {
|
|||
<div
|
||||
id={'view-item-' + item.id}
|
||||
className={'viewItem ' + (item.active ? 'active' : '')}
|
||||
onClick={(e: any) => { getData(item.id, 0); }}
|
||||
onContextMenu={(e: any) => { this.onView(e, item); }}
|
||||
onClick={(e: any) => { this.onViewSet(item); }}
|
||||
onContextMenu={(e: any) => { this.onViewEdit(e, item); }}
|
||||
>
|
||||
{item.name}
|
||||
</div>
|
||||
|
@ -97,10 +98,9 @@ const Controls = observer(class Controls extends React.Component<Props, State> {
|
|||
id={'view-item-' + view.id}
|
||||
className="viewItem active"
|
||||
onClick={(e: any) => { this.onButton(e, `view-item-${view.id}`, 'dataviewViewList'); }}
|
||||
onContextMenu={(e: any) => { this.onView(e, view); }}
|
||||
onContextMenu={(e: any) => { this.onViewEdit(e, view); }}
|
||||
>
|
||||
{view.name}
|
||||
|
||||
<Icon className="arrow" />
|
||||
</div>
|
||||
</div>
|
||||
|
@ -215,7 +215,12 @@ const Controls = observer(class Controls extends React.Component<Props, State> {
|
|||
});
|
||||
};
|
||||
|
||||
onView (e: any, item: any) {
|
||||
onViewSet (item: any) {
|
||||
this.props.getData(item.id, 0);
|
||||
analytics.event('BlockDataviewViewSet', { type: item.type });
|
||||
};
|
||||
|
||||
onViewEdit (e: any, item: any) {
|
||||
e.stopPropagation();
|
||||
|
||||
const { rootId, block, getView } = this.props;
|
||||
|
@ -237,6 +242,14 @@ const Controls = observer(class Controls extends React.Component<Props, State> {
|
|||
|
||||
onSortEnd (result: any) {
|
||||
const { oldIndex, newIndex } = result;
|
||||
const { rootId, block } = this.props;
|
||||
|
||||
let views = dbStore.getViews(rootId, block.id);
|
||||
let view = views[oldIndex];
|
||||
let ids = arrayMove(views.map((it: any) => { return it.id; }), oldIndex, newIndex);
|
||||
|
||||
dbStore.viewsSort(rootId, block.id, ids);
|
||||
C.BlockDataviewViewSetPosition(rootId, block.id, view.id, newIndex);
|
||||
};
|
||||
|
||||
resize () {
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
import * as React from 'react';
|
||||
import { I } from 'ts/lib';
|
||||
import { observer } from 'mobx-react';
|
||||
import { dbStore } from 'ts/store';
|
||||
import { dbStore, blockStore } from 'ts/store';
|
||||
import { Icon } from 'ts/component';
|
||||
import { translate } from 'ts/lib';
|
||||
import { AutoSizer, WindowScroller, List } from 'react-virtualized';
|
||||
|
||||
import Row from './list/row';
|
||||
|
@ -13,11 +15,15 @@ const HEIGHT = 32;
|
|||
|
||||
const ViewList = observer(class ViewList extends React.Component<Props, {}> {
|
||||
|
||||
ref: any = null;
|
||||
|
||||
render () {
|
||||
const { rootId, block, getData, getView, isPopup } = this.props;
|
||||
const { rootId, block, getData, getView, isPopup, readonly, onRowAdd } = this.props;
|
||||
const view = getView();
|
||||
const data = dbStore.getData(rootId, block.id);
|
||||
const { offset, total } = dbStore.getMeta(rootId, block.id);
|
||||
const allowed = blockStore.isAllowed(rootId, block.id, [ I.RestrictionDataview.Object ]);
|
||||
const length = data.length;
|
||||
|
||||
return (
|
||||
<div className="wrap">
|
||||
|
@ -26,34 +32,42 @@ const ViewList = observer(class ViewList extends React.Component<Props, {}> {
|
|||
{({ height, isScrolling, registerChild, scrollTop }) => {
|
||||
return (
|
||||
<AutoSizer disableHeight>
|
||||
{({ width }) => {
|
||||
return (
|
||||
<div ref={registerChild}>
|
||||
<List
|
||||
autoHeight
|
||||
height={Number(height) || 0}
|
||||
width={Number(width) || 0}
|
||||
isScrolling={isScrolling}
|
||||
rowCount={data.length}
|
||||
rowHeight={HEIGHT}
|
||||
rowRenderer={({ key, index, style }) => (
|
||||
<div className="listItem" key={key} style={style}>
|
||||
<Row
|
||||
key={'grid-row-' + view.id + index}
|
||||
{...this.props}
|
||||
index={index}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
scrollTop={scrollTop}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}}
|
||||
{({ width }) => (
|
||||
<List
|
||||
ref={(ref: any) => { this.ref = ref; }}
|
||||
autoHeight
|
||||
height={Number(height) || 0}
|
||||
width={Number(width) || 0}
|
||||
isScrolling={isScrolling}
|
||||
rowCount={data.length}
|
||||
rowHeight={HEIGHT}
|
||||
rowRenderer={({ key, index, style }) => (
|
||||
<div className="listItem" key={key} style={style}>
|
||||
<Row
|
||||
key={'grid-row-' + view.id + index}
|
||||
{...this.props}
|
||||
index={index}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
scrollTop={scrollTop}
|
||||
/>
|
||||
)}
|
||||
</AutoSizer>
|
||||
);
|
||||
}}
|
||||
</WindowScroller>
|
||||
|
||||
{!readonly && allowed ? (
|
||||
<div className="row add">
|
||||
<div className="cell add">
|
||||
<div className="btn" onClick={(e: any) => { onRowAdd(e, 1); }}>
|
||||
<Icon className="plus" />
|
||||
<div className="name">{translate('blockDataviewNew')}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import * as React from 'react';
|
||||
import * as ReactDOM from 'react-dom';
|
||||
import { I, DataUtil } from 'ts/lib';
|
||||
import { observer } from 'mobx-react';
|
||||
import { Cell } from 'ts/component';
|
||||
|
@ -7,10 +8,14 @@ import { dbStore } from 'ts/store';
|
|||
interface Props extends I.ViewComponent {
|
||||
index: number;
|
||||
style?: any;
|
||||
}
|
||||
};
|
||||
|
||||
const $ = require('jquery');
|
||||
|
||||
const Row = observer(class Row extends React.Component<Props, {}> {
|
||||
|
||||
_isMounted: boolean = false;
|
||||
|
||||
render () {
|
||||
const { rootId, block, index, getView, onCellClick, onRef, style } = this.props;
|
||||
const view = getView();
|
||||
|
@ -18,6 +23,7 @@ const Row = observer(class Row extends React.Component<Props, {}> {
|
|||
return it.isVisible && dbStore.getRelation(rootId, block.id, it.relationKey);
|
||||
});
|
||||
const idPrefix = 'dataviewCell';
|
||||
const { hideIcon } = view;
|
||||
|
||||
return (
|
||||
<div className="row" style={style}>
|
||||
|
@ -44,6 +50,33 @@ const Row = observer(class Row extends React.Component<Props, {}> {
|
|||
);
|
||||
};
|
||||
|
||||
componentDidMount () {
|
||||
this._isMounted = true;
|
||||
this.resize();
|
||||
};
|
||||
|
||||
componentDidUpdate () {
|
||||
this.resize();
|
||||
};
|
||||
|
||||
componentWillUnmount () {
|
||||
this._isMounted = false;
|
||||
};
|
||||
|
||||
resize () {
|
||||
if (!this._isMounted) {
|
||||
return;
|
||||
};
|
||||
|
||||
const node = $(ReactDOM.findDOMNode(this));
|
||||
const first = node.find('.cellContent:not(.isEmpty)').first();
|
||||
|
||||
node.find('.cellContent').removeClass('first');
|
||||
if (first.length) {
|
||||
first.addClass('first');
|
||||
};
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
export default Row;
|
|
@ -512,28 +512,27 @@ const Block = observer(class Block extends React.Component<Props, {}> {
|
|||
};
|
||||
|
||||
const { rootId, block, readonly } = this.props;
|
||||
const { id } = block;
|
||||
const node = $(ReactDOM.findDOMNode(this));
|
||||
|
||||
if (!block.isLayoutRow() || keyboard.isDragging || readonly) {
|
||||
return;
|
||||
};
|
||||
|
||||
const sm = Constant.size.blockMenu;
|
||||
const node = $(ReactDOM.findDOMNode(this));
|
||||
const width = $('#editorWrapper').width();
|
||||
const childrenIds = blockStore.getChildrenIds(rootId, id);
|
||||
const childrenIds = blockStore.getChildrenIds(rootId, block.id);
|
||||
const length = childrenIds.length;
|
||||
const children = blockStore.getChildren(rootId, id);
|
||||
const children = blockStore.getChildren(rootId, block.id);
|
||||
const rect = node.get(0).getBoundingClientRect() as DOMRect;
|
||||
const p = (e.pageX - rect.x) / (width + Constant.size.blockMenu);
|
||||
|
||||
const p = e.pageX - rect.x - sm;
|
||||
|
||||
let c = 0;
|
||||
let num = 0;
|
||||
|
||||
for (let i in children) {
|
||||
const child = children[i];
|
||||
|
||||
|
||||
c += child.fields.width || 1 / length;
|
||||
if ((p >= c - 0.1) && (p <= c + 0.1)) {
|
||||
if ((p >= c * width - sm / 2) && (p <= c * width + sm / 2)) {
|
||||
num = Number(i) + 1;
|
||||
break;
|
||||
};
|
||||
|
|
|
@ -109,7 +109,10 @@ const BlockLatex = observer(class BlockLatex extends React.Component<Props, Stat
|
|||
};
|
||||
|
||||
componentDidUpdate () {
|
||||
const { block } = this.props;
|
||||
const { isEditing } = this.state;
|
||||
|
||||
this.text = String(block.content.text || '');
|
||||
|
||||
this.unbind();
|
||||
this.setValue(this.text);
|
||||
|
@ -151,7 +154,7 @@ const BlockLatex = observer(class BlockLatex extends React.Component<Props, Stat
|
|||
const node = $(ReactDOM.findDOMNode(this));
|
||||
const input = node.find('#input');
|
||||
|
||||
if (input.length) {
|
||||
if (input.length && this.range) {
|
||||
setRange(input.get(0), this.range);
|
||||
};
|
||||
};
|
||||
|
@ -164,8 +167,23 @@ const BlockLatex = observer(class BlockLatex extends React.Component<Props, Stat
|
|||
};
|
||||
|
||||
onKeyDownBlock (e: any) {
|
||||
const { onKeyDown } = this.props;
|
||||
const { rootId, onKeyDown } = this.props;
|
||||
const { isEditing } = this.state;
|
||||
const cmd = keyboard.ctrlKey();
|
||||
|
||||
if (isEditing) {
|
||||
// Undo
|
||||
keyboard.shortcut(`${cmd}+z`, e, (pressed: string) => {
|
||||
e.preventDefault();
|
||||
C.BlockUndo(rootId, (message: any) => { focus.clear(true); });
|
||||
});
|
||||
|
||||
// Redo
|
||||
keyboard.shortcut(`${cmd}+shift+z`, e, (pressed: string) => {
|
||||
e.preventDefault();
|
||||
C.BlockRedo(rootId, (message: any) => { focus.clear(true); });
|
||||
});
|
||||
};
|
||||
|
||||
if (onKeyDown && !isEditing) {
|
||||
onKeyDown(e, '', [], { from: 0, to: 0 });
|
||||
|
@ -366,7 +384,7 @@ const BlockLatex = observer(class BlockLatex extends React.Component<Props, Stat
|
|||
displayMode: true,
|
||||
throwOnError: false,
|
||||
output: 'html',
|
||||
trust: (context: any) => [ '\\url', '\\href' ].includes(context.command)
|
||||
trust: (context: any) => [ '\\url', '\\href', '\\includegraphics' ].includes(context.command),
|
||||
}) : '');
|
||||
};
|
||||
|
||||
|
@ -381,6 +399,7 @@ const BlockLatex = observer(class BlockLatex extends React.Component<Props, Stat
|
|||
|
||||
this.placeholderCheck(value);
|
||||
this.updateRect();
|
||||
this.resize();
|
||||
};
|
||||
|
||||
placeholderCheck (value: string) {
|
||||
|
@ -434,6 +453,14 @@ const BlockLatex = observer(class BlockLatex extends React.Component<Props, Stat
|
|||
win.unbind('mouseup.latex');
|
||||
});
|
||||
};
|
||||
|
||||
resize () {
|
||||
const node = $(ReactDOM.findDOMNode(this));
|
||||
const value = node.find('#value');
|
||||
|
||||
value.css({ height: 'auto' });
|
||||
value.css({ height: value.height() + 20 });
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
|
|
|
@ -165,27 +165,11 @@ const BlockLink = observer(class BlockLink extends React.Component<Props, {}> {
|
|||
};
|
||||
|
||||
resize () {
|
||||
const { block } = this.props;
|
||||
const node = $(ReactDOM.findDOMNode(this));
|
||||
const sides = node.find('#sides');
|
||||
const sideLeft = node.find('#sideLeft');
|
||||
const sideRight = node.find('#sideRight');
|
||||
const card = node.find('.linkCard');
|
||||
const icon = node.find('.iconObject');
|
||||
|
||||
if (!sides.length) {
|
||||
return;
|
||||
};
|
||||
|
||||
sideLeft.css({ width: 'auto' });
|
||||
sideRight.css({ width: 'auto' });
|
||||
|
||||
if (block.align == I.BlockAlign.Center) {
|
||||
return;
|
||||
};
|
||||
|
||||
raf(() => {
|
||||
sideLeft.css({ width: 'auto' });
|
||||
sideRight.css({ width: sides.width() - (sideLeft.length ? sideLeft.outerWidth(true) : 0) });
|
||||
});
|
||||
icon.length ? card.addClass('withIcon') : card.removeClass('withIcon');
|
||||
};
|
||||
|
||||
});
|
||||
|
|
|
@ -469,8 +469,12 @@ const BlockText = observer(class BlockText extends React.Component<Props, {}> {
|
|||
const menuOpenMention = menuStore.isOpen('blockMention');
|
||||
const menuOpenSmile = menuStore.isOpen('smile');
|
||||
|
||||
keyboard.shortcut('enter', e, (pressed: string) => {
|
||||
if (block.isTextCode() || menuOpen) {
|
||||
keyboard.shortcut('enter, shift+enter', e, (pressed: string) => {
|
||||
if (block.isTextCode() && (pressed == 'enter')) {
|
||||
return;
|
||||
};
|
||||
|
||||
if (menuOpen) {
|
||||
return;
|
||||
};
|
||||
|
||||
|
@ -976,7 +980,7 @@ const BlockText = observer(class BlockText extends React.Component<Props, {}> {
|
|||
|
||||
window.clearTimeout(this.timeoutContext);
|
||||
this.timeoutContext = window.setTimeout(() => {
|
||||
const pageContainer = $(isPopup ? '#popupPage #innerWrap' : '.page');
|
||||
const pageContainer = $(isPopup ? '#popupPage #innerWrap' : '.page.isFull');
|
||||
pageContainer.unbind('click.context').on('click.context', () => {
|
||||
pageContainer.unbind('click.context');
|
||||
menuStore.close('blockContext');
|
||||
|
|
|
@ -4,6 +4,7 @@ import { IconObject, Filter } from 'ts/component';
|
|||
import { I, C, DataUtil, Util, focus, keyboard, analytics } from 'ts/lib';
|
||||
import { dbStore, popupStore } from 'ts/store';
|
||||
import { observer } from 'mobx-react';
|
||||
import { crumbs } from '../../lib';
|
||||
|
||||
interface Props extends I.BlockComponent {}
|
||||
interface State {
|
||||
|
@ -92,12 +93,12 @@ const BlockType = observer(class BlockType extends React.Component<Props, State>
|
|||
let items = dbStore.getObjectTypesForSBType(I.SmartBlockType.Page);
|
||||
let set = dbStore.getObjectType(Constant.typeId.set);
|
||||
|
||||
if (set) {
|
||||
items.push(set);
|
||||
};
|
||||
|
||||
items.sort(DataUtil.sortByName);
|
||||
|
||||
if (set) {
|
||||
//items.unshift(set);
|
||||
};
|
||||
|
||||
if (filter) {
|
||||
const reg = new RegExp(Util.filterFix(filter), 'gi');
|
||||
|
||||
|
@ -265,7 +266,9 @@ const BlockType = observer(class BlockType extends React.Component<Props, State>
|
|||
};
|
||||
|
||||
if (item.id == Constant.typeId.set) {
|
||||
console.log('CREATE SET');
|
||||
C.ObjectToSet(rootId, [], (message: any) => {
|
||||
DataUtil.objectOpenEvent(e, { id: message.id, layout: I.ObjectLayout.Set });
|
||||
});
|
||||
} else {
|
||||
DataUtil.checkTemplateCnt([ item.id ], 2, (message: any) => {
|
||||
if (message.records.length > 1) {
|
||||
|
|