Fixes
gitea/hedera-web/pipeline/head This commit looks good
Details
gitea/hedera-web/pipeline/head This commit looks good
Details
This commit is contained in:
parent
7669dc0db0
commit
d1819118d8
|
@ -1,4 +1,4 @@
|
|||
hedera-web (1.407.78) stable; urgency=low
|
||||
hedera-web (1.407.79) stable; urgency=low
|
||||
|
||||
* Initial Release.
|
||||
|
||||
|
|
|
@ -105,6 +105,8 @@ Hedera.Catalog = new Class({
|
|||
|
||||
for (const tag of tags)
|
||||
$[`${tag}s`].lot = this.getFilter(params, tags, tag);
|
||||
|
||||
if (lot) this.hideMenu();
|
||||
}
|
||||
|
||||
,refreshTitle: function() {
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
.title ._subtitle {
|
||||
font-size: .7rem;
|
||||
color: #bbb;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Right panel */
|
||||
|
@ -78,10 +81,10 @@
|
|||
width: 25%;
|
||||
padding: .6em;
|
||||
box-sizing: border-box;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.right-panel .realms a:hover {
|
||||
background-color: rgba(1, 1, 1, .05);
|
||||
border-radius: .15em;
|
||||
}
|
||||
.right-panel .realms a > img {
|
||||
display: block;
|
||||
|
@ -98,12 +101,9 @@
|
|||
display: flex;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.item-box > htk-image {
|
||||
.item-box > .htk-image {
|
||||
flex: none;
|
||||
}
|
||||
.item-box > htk-image:hover {
|
||||
background-color: transparent;
|
||||
}
|
||||
.item-box > .item-info {
|
||||
flex: auto;
|
||||
position: relative;
|
||||
|
@ -212,8 +212,8 @@
|
|||
background-color: white;
|
||||
|
||||
flex-direction: column;
|
||||
width: 240px;
|
||||
height: 410px;
|
||||
width: 260px;
|
||||
height: 425px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.grid-view .item-box:hover {
|
||||
|
@ -223,8 +223,8 @@
|
|||
margin: 10px;
|
||||
}
|
||||
.grid-view .item-box > .htk-image {
|
||||
width: 240px;
|
||||
height: 240px;
|
||||
width: 260px;
|
||||
height: 260px;
|
||||
}
|
||||
.grid-view .item-box > .item-info {
|
||||
flex: auto;
|
||||
|
@ -254,7 +254,7 @@
|
|||
gap: 10px;
|
||||
margin: 0;
|
||||
padding: 10px;
|
||||
height: 120px;
|
||||
height: 130px;
|
||||
overflow: visible;
|
||||
border-bottom: 1px solid #DDD;
|
||||
}
|
||||
|
@ -262,15 +262,15 @@
|
|||
border-bottom: none;
|
||||
}
|
||||
.list-view .item-box > .htk-image {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
width: 110px;
|
||||
height: 110px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.list-view .item-info {
|
||||
overflow: hidden;
|
||||
}
|
||||
.list-view .item-info > h2 {
|
||||
font-size: 1em;
|
||||
font-size: 1rem;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.list-view .item-info > .color {
|
||||
|
|
|
@ -49,9 +49,9 @@ $navbar-height: 64px;
|
|||
flex: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 15px;
|
||||
gap: 12px;
|
||||
overflow: hidden;
|
||||
padding-left: 15px;
|
||||
padding-left: 12px;
|
||||
|
||||
& > .title {
|
||||
overflow: hidden;
|
||||
|
@ -74,9 +74,9 @@ $navbar-height: 64px;
|
|||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-right: $spacing-md;
|
||||
padding-left: $spacing-sm;
|
||||
gap: .5em;
|
||||
padding-right: 12px;
|
||||
padding-left: 4px;
|
||||
gap: 2px;
|
||||
|
||||
& > * {
|
||||
float: right;
|
||||
|
@ -84,7 +84,7 @@ $navbar-height: 64px;
|
|||
}
|
||||
button {
|
||||
margin: 0;
|
||||
padding: 10px 15px;
|
||||
padding: 8px 13px;
|
||||
|
||||
&:hover {
|
||||
background-color: rgba(2550, 255, 255, .2);
|
||||
|
@ -305,7 +305,7 @@ $navbar-height: 64px;
|
|||
|
||||
@media (max-width: 960px) {
|
||||
& > .navbar {
|
||||
padding-left: 16px;
|
||||
padding-left: 12px;
|
||||
left: 0;
|
||||
|
||||
& > .menu-button {
|
||||
|
@ -313,7 +313,7 @@ $navbar-height: 64px;
|
|||
}
|
||||
& > .action-bar {
|
||||
button {
|
||||
padding: 10px;
|
||||
padding: 8px;
|
||||
}
|
||||
span.label,
|
||||
button > .text {
|
||||
|
|
|
@ -21,9 +21,7 @@ module.exports = new Class({
|
|||
,month: null
|
||||
|
||||
,render: function() {
|
||||
var len = Vn.Date.WDays.length;
|
||||
|
||||
var node = this.createRoot('div');
|
||||
this.createRoot('div');
|
||||
|
||||
var table = this.createElement('table');
|
||||
this.node.appendChild(table);
|
||||
|
@ -31,6 +29,7 @@ module.exports = new Class({
|
|||
var colgroup = this.createElement('colgroup');
|
||||
table.appendChild(colgroup);
|
||||
|
||||
var len = Vn.Date.WDays.length;
|
||||
for (var i = 0; i < len; i++)
|
||||
colgroup.appendChild(this.createElement('col'));
|
||||
|
||||
|
|
|
@ -11,8 +11,6 @@ td.cell-button {
|
|||
height: 44px;
|
||||
width: 44px;
|
||||
margin: 0 auto;
|
||||
border-radius: 50%;
|
||||
padding: 10px;
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
box-sizing: border-box;
|
||||
|
|
|
@ -2,8 +2,8 @@ require('./style.scss');
|
|||
var Component = require('vn/component');
|
||||
|
||||
module.exports = new Class({
|
||||
Tag: 'htk-loader'
|
||||
,Extends: Component
|
||||
Extends: Component
|
||||
,Tag: 'htk-loader'
|
||||
,Properties: {
|
||||
form: {
|
||||
type: Db.Form
|
||||
|
|
|
@ -91,7 +91,7 @@ module.exports = new Class({
|
|||
bg.addEventListener('mousedown', this._bgMouseDownHandler);
|
||||
Htk.Toast.pushTop(bg);
|
||||
|
||||
Vn.Node.addClass(this.node, 'modal');
|
||||
this.node.classList.add('modal');
|
||||
bg.appendChild(this.node);
|
||||
|
||||
this.doc.body.appendChild(bg);
|
||||
|
@ -125,26 +125,23 @@ module.exports = new Class({
|
|||
style.height = '';
|
||||
style.width = '';
|
||||
|
||||
var margin = 20;
|
||||
var dblMargin = margin * 2;
|
||||
var width = node.offsetWidth;
|
||||
var height = node.offsetHeight;
|
||||
var innerWidth = window.innerWidth;
|
||||
var innerHeight = window.innerHeight;
|
||||
if (!this.isModal()) {
|
||||
var margin = 20;
|
||||
var dblMargin = margin * 2;
|
||||
var width = node.offsetWidth;
|
||||
var height = node.offsetHeight;
|
||||
var innerWidth = window.innerWidth;
|
||||
var innerHeight = window.innerHeight;
|
||||
|
||||
if (width + dblMargin > innerWidth) {
|
||||
width = innerWidth - dblMargin;
|
||||
style.width = width +'px';
|
||||
}
|
||||
if (height + dblMargin > innerHeight) {
|
||||
height = innerHeight - dblMargin;
|
||||
style.height = height +'px';
|
||||
}
|
||||
|
||||
if (width + dblMargin > innerWidth) {
|
||||
width = innerWidth - dblMargin;
|
||||
style.width = width +'px';
|
||||
}
|
||||
if (height + dblMargin > innerHeight) {
|
||||
height = innerHeight - dblMargin;
|
||||
style.height = height +'px';
|
||||
}
|
||||
|
||||
if (this.isModal()) {
|
||||
style.marginLeft = (-node.offsetWidth / 2) +'px';
|
||||
style.marginTop = (-node.offsetHeight / 2) +'px';
|
||||
} else {
|
||||
var spacing = 4;
|
||||
var rect = this._parent.getBoundingClientRect();
|
||||
var left = rect.left;
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
box-sizing: content-box;
|
||||
|
||||
&.modal {
|
||||
position: absolute;
|
||||
position: relative;
|
||||
font-size: 1.2em;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
& > * {
|
||||
border-radius: 0.1em;
|
||||
|
@ -21,11 +21,15 @@
|
|||
}
|
||||
.htk-background {
|
||||
position: fixed;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
z-index: 190;
|
||||
padding: 20px;
|
||||
background-color: rgba(1, 1, 1, 0.7);
|
||||
opacity: 0;
|
||||
transition: opacity 200ms ease-in-out;
|
||||
|
|
|
@ -4,51 +4,51 @@
|
|||
|
||||
/* Standard */
|
||||
@media screen {
|
||||
body { font-size: 10pt; }
|
||||
body { font-size: 14px; }
|
||||
}
|
||||
|
||||
/* Desktop - Laptop 1360x768 */
|
||||
@media (max-resolution: 119dpi) and (min-device-width: 1340px) and (max-device-width: 1899px) {
|
||||
body { font-size: 10pt; }
|
||||
body { font-size: 14px; }
|
||||
}
|
||||
|
||||
/* Desktop - FHD 1920x1080 */
|
||||
@media (max-resolution: 119dpi) and (min-device-width: 1900px) {
|
||||
body { font-size: 10pt; }
|
||||
body { font-size: 14px; }
|
||||
}
|
||||
|
||||
/* Mobile - Low DPI */
|
||||
@media
|
||||
(min-resolution: 120dpi),
|
||||
(-webkit-min-device-pixel-ratio: 1.5) {
|
||||
body { font-size: 10pt; }
|
||||
body { font-size: 14px; }
|
||||
}
|
||||
@media
|
||||
(min-resolution: 144dpi),
|
||||
(-webkit-min-device-pixel-ratio: 1.5) {
|
||||
body { font-size: 10pt; }
|
||||
body { font-size: 14px; }
|
||||
}
|
||||
|
||||
/* Mobile - Normal DPI */
|
||||
@media
|
||||
(max-device-width: 383px) and (min-resolution: 192dpi),
|
||||
(max-device-width: 383px) and (-webkit-min-device-pixel-ratio: 2) {
|
||||
body { font-size: 10pt; }
|
||||
body { font-size: 14px; }
|
||||
}
|
||||
@media
|
||||
(min-device-width: 384px) and (min-resolution: 192dpi),
|
||||
(min-device-width: 384px) and (-webkit-min-device-pixel-ratio: 2) {
|
||||
body { font-size: 10pt; }
|
||||
body { font-size: 14px; }
|
||||
}
|
||||
|
||||
/* Mobile - High DPI */
|
||||
@media
|
||||
(max-device-width: 411px) and (min-resolution: 249dpi),
|
||||
(max-device-width: 411px) and (-webkit-min-device-pixel-ratio: 3) {
|
||||
body { font-size: 10pt; }
|
||||
body { font-size: 14px; }
|
||||
}
|
||||
@media
|
||||
(min-device-width: 412px) and (min-resolution: 249dpi),
|
||||
(min-device-width: 412px) and (-webkit-min-device-pixel-ratio: 3) {
|
||||
body { font-size: 10pt; }
|
||||
(min-device-width: 414px) and (min-resolution: 249dpi),
|
||||
(min-device-width: 414px) and (-webkit-min-device-pixel-ratio: 3) {
|
||||
body { font-size: 14px; }
|
||||
}
|
||||
|
|
|
@ -170,9 +170,8 @@ button,
|
|||
@extend %clickable;
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
padding: 10px;
|
||||
padding: 8px;
|
||||
border-radius: 22px;
|
||||
margin: -0.5em;
|
||||
font-weight: normal;
|
||||
|
||||
&:disabled {
|
||||
|
|
|
@ -186,7 +186,7 @@ module.exports = new Class({
|
|||
return scope;
|
||||
}
|
||||
|
||||
,link: function(scope, exprScope) {
|
||||
,link: function(scope) {
|
||||
const objects = scope.objects;
|
||||
const links = this._links;
|
||||
|
||||
|
@ -211,30 +211,22 @@ module.exports = new Class({
|
|||
|
||||
// Post-link
|
||||
|
||||
const baseExprScope = [
|
||||
_,
|
||||
scope.$
|
||||
].concat(exprScope);
|
||||
|
||||
this.linkExpr(scope, baseExprScope);
|
||||
|
||||
const contexts = this._contexts;
|
||||
for (var i = 0; i < contexts.length; i++) {
|
||||
const context = contexts[i];
|
||||
const object = objects[i];
|
||||
|
||||
if (context.tagName)
|
||||
this.elementLink(context, object, objects, scope, baseExprScope);
|
||||
this.elementLink(context, object, objects, scope);
|
||||
else if (context.klass)
|
||||
this.objectLink(context, object, objects, scope, baseExprScope);
|
||||
this.objectLink(context, object, objects, scope);
|
||||
}
|
||||
}
|
||||
|
||||
,linkExpr(scope, baseScope, exprScope) {
|
||||
,digest(scope) {
|
||||
const contexts = this._contexts;
|
||||
const objects = scope.objects;
|
||||
|
||||
exprScope = baseScope.concat(exprScope);
|
||||
const exprScope = scope.exprScope;
|
||||
|
||||
for (let i = 0; i < contexts.length; i++) {
|
||||
const context = contexts[i];
|
||||
|
@ -242,10 +234,16 @@ module.exports = new Class({
|
|||
|
||||
if (context.exprs) {
|
||||
const values = [];
|
||||
let isEmpty = false;
|
||||
|
||||
for (expr of context.exprs) {
|
||||
let value = undefined;
|
||||
try {
|
||||
value = expr.apply(scope.thisArg, exprScope);
|
||||
if (value == null) {
|
||||
isEmpty = true;
|
||||
break;
|
||||
}
|
||||
} catch (e) {
|
||||
console.warn('Expression error:', e.message);
|
||||
continue;
|
||||
|
@ -253,10 +251,16 @@ module.exports = new Class({
|
|||
values.push(value);
|
||||
}
|
||||
|
||||
let k = 0;
|
||||
const text = context.text.replace(/{{\d+}}/g, function() {
|
||||
return values[k++];
|
||||
});
|
||||
let text;
|
||||
|
||||
if (!isEmpty) {
|
||||
let k = 0;
|
||||
text = context.text.replace(/{{\d+}}/g, function() {
|
||||
return values[k++];
|
||||
});
|
||||
} else
|
||||
text = '';
|
||||
|
||||
object.textContent = text;
|
||||
} else {
|
||||
const dynProps = context.dynProps;
|
||||
|
@ -524,7 +528,7 @@ module.exports = new Class({
|
|||
return object;
|
||||
}
|
||||
|
||||
,objectLink: function(context, object, objects, scope, exprScope) {
|
||||
,objectLink: function(context, object, objects, scope) {
|
||||
const objectProps = context.objectProps;
|
||||
for (const prop in objectProps)
|
||||
object[prop] = objects[objectProps[prop]];
|
||||
|
@ -546,7 +550,7 @@ module.exports = new Class({
|
|||
method = method.bind(scope.thisArg);
|
||||
} else {
|
||||
method = function() {
|
||||
handler.apply(scope.thisArg, exprScope);
|
||||
handler.apply(scope.thisArg, scope.exprScope);
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -566,7 +570,7 @@ module.exports = new Class({
|
|||
this.showError(`Function '${handler}' not found`);
|
||||
} else {
|
||||
listener = function() {
|
||||
handler.apply(scope.thisArg, exprScope.concat(arguments));
|
||||
handler.apply(scope.thisArg, scope.exprScope.concat(arguments));
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -641,7 +645,7 @@ module.exports = new Class({
|
|||
return object;
|
||||
}
|
||||
|
||||
,elementLink: function(context, object, objects, scope, exprScope) {
|
||||
,elementLink: function(context, object, objects, scope) {
|
||||
const childs = context.childs;
|
||||
for (var i = 0; i < childs.length; i++) {
|
||||
let child = objects[childs[i]];
|
||||
|
@ -664,7 +668,7 @@ module.exports = new Class({
|
|||
listener = listener.bind(scope.thisArg);
|
||||
} else {
|
||||
listener = function(e) {
|
||||
handler.apply(scope.thisArg, exprScope.concat(e));
|
||||
handler.apply(scope.thisArg, scope.exprScope.concat(e));
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ Mutators.Extends = function() {
|
|||
Mutators.Tag = function(tagName) {
|
||||
vnCustomTags[tagName] = this;
|
||||
this.extend({Tag: tagName});
|
||||
|
||||
|
||||
const parent = this.parent;
|
||||
if (parent && parent.Classes !== undefined) {
|
||||
let Classes = tagName
|
||||
|
|
|
@ -10,12 +10,14 @@ module.exports = new Class({
|
|||
this.builder = builder;
|
||||
this.objects = objects;
|
||||
this.thisArg = thisArg;
|
||||
this.parentScope = parent;
|
||||
this.parent = parent;
|
||||
this.uid = ++scopeUid;
|
||||
this.$ = parent ? Object.create(parent.$) : {};
|
||||
|
||||
if (!thisArg && parent)
|
||||
this.thisArg = parent.thisArg;
|
||||
if (parent) {
|
||||
parent.on('lot-change', this.onLotChange, this);
|
||||
if (!thisArg) this.thisArg = parent.thisArg;
|
||||
}
|
||||
}
|
||||
|
||||
,link: function(exprScope, extraObjects) {
|
||||
|
@ -26,7 +28,22 @@ module.exports = new Class({
|
|||
for (var id in contextMap)
|
||||
this.$[id] = this.objects[contextMap[id]];
|
||||
|
||||
this.builder.link(this, exprScope);
|
||||
this.exprScope = [
|
||||
_,
|
||||
this.$
|
||||
].concat(exprScope);
|
||||
|
||||
this.builder.link(this);
|
||||
this.builder.digest(this);
|
||||
|
||||
for (const object of this.objects)
|
||||
if (object.assignLot)
|
||||
object.on('change', this.onLotChange, this);
|
||||
}
|
||||
|
||||
,onLotChange() {
|
||||
this.emit('lot-change');
|
||||
this.builder.digest(this);
|
||||
}
|
||||
|
||||
,getMain: function() {
|
||||
|
@ -47,11 +64,15 @@ module.exports = new Class({
|
|||
}
|
||||
|
||||
,_destroy: function() {
|
||||
var objects = this.objects;
|
||||
|
||||
for (var i = 0; i < objects.length; i++)
|
||||
if (objects[i] instanceof VnObject)
|
||||
objects[i].unref();
|
||||
for (const object of this.objects)
|
||||
if (object instanceof VnObject) {
|
||||
object.disconnectByInstance(this);
|
||||
object.unref();
|
||||
}
|
||||
if (this.parent) {
|
||||
this.parent.disconnectByInstance(this);
|
||||
this.parent.unref();
|
||||
}
|
||||
|
||||
VnObject.prototype._destroy.call(this);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "hedera-web",
|
||||
"version": "1.407.78",
|
||||
"version": "1.407.79",
|
||||
"description": "Verdnatura web page",
|
||||
"license": "GPL-3.0",
|
||||
"repository": {
|
||||
|
|
Loading…
Reference in New Issue