Merge branch 'feature/compount-metadata-type-refactor' of https://github.com/tainacan/tainacan into feature/compount-metadata-type-refactor

This commit is contained in:
vnmedeiros 2020-03-27 14:35:38 -03:00
commit ef9b17f43e
11 changed files with 127 additions and 33 deletions

View File

@ -47,6 +47,7 @@
<b-input
type="textarea"
name="description"
:rows="3"
v-model="editForm.description"
@focus="clearErrors('description')" />
</b-field>
@ -68,6 +69,9 @@
name="status"
v-model="editForm.status"
native-value="publish">
<span class="icon has-text-gray3">
<i class="tainacan-icon tainacan-icon-public"/>
</span>
{{ $i18n.get('publish_visibility') }}
</b-radio>
<br>
@ -77,6 +81,9 @@
name="status"
v-model="editForm.status"
native-value="private">
<span class="icon has-text-gray3">
<i class="tainacan-icon tainacan-icon-private"/>
</span>
{{ $i18n.get('private_visibility') }}
</b-radio>
</div>
@ -325,13 +332,23 @@ export default {
column-count: 2;
column-gap: 4em;
column-rule: none;
padding-bottom: 1.5em;
padding-bottom: 0.5em;
&>.field, &>section {
-webkit-column-break-inside: avoid;
page-break-inside: avoid;
break-inside: avoid;
}
.field > .field:not(:last-child) {
margin-bottom: 0em;
}
.help-wrapper {
font-size: 1.25em;
}
}
.form-submit {
margin-bottom: 0.75em;
}
}

View File

@ -1571,7 +1571,7 @@ export default {
}
.icon {
font-size: 1.125em !important;
color: var(--tainacan-gray3);
color: var(--tainacan-info-color);
}
}
}

View File

@ -48,6 +48,7 @@
<b-input
type="textarea"
name="description"
rows="3"
v-model="editForm.description"
@focus="clearErrors('description')"/>
</b-field>
@ -85,6 +86,9 @@
name="status"
v-model="editForm.status"
native-value="publish">
<span class="icon has-text-gray3">
<i class="tainacan-icon tainacan-icon-public"/>
</span>
{{ $i18n.get('publish_visibility') }}
</b-radio>
</b-field>
@ -95,6 +99,9 @@
name="status"
v-model="editForm.status"
native-value="private">
<span class="icon has-text-gray3">
<i class="tainacan-icon tainacan-icon-private"/>
</span>
{{ $i18n.get('private_visibility') }}
</b-radio>
</b-field>
@ -385,31 +392,43 @@
<style lang="scss" scoped>
form#metadatumEditForm.inCollapse {
padding: 1.5em var(--tainacan-one-column) 0.5em var(--tainacan-one-column);
border-top: 1px solid var(--tainacan-gray2);
border-bottom: 1px solid var(--tainacan-gray2);
margin-top: 1.0em;
font-size: 1.1em;
}
form#metadatumEditForm .options-columns {
-moz-column-count: 2;
-moz-column-gap: 0;
-moz-column-rule: none;
-webkit-column-count: 2;
-webkit-column-gap: 0;
-webkit-column-rule: none;
column-count: 2;
column-gap: 4em;
column-rule: none;
padding-bottom: 1.5em;
form#metadatumEditForm {
&>.field, &>section {
-webkit-column-break-inside: avoid;
page-break-inside: avoid;
break-inside: avoid;
&.inCollapse {
padding: 1.5em var(--tainacan-one-column) 0.5em var(--tainacan-one-column);
border-top: 1px solid var(--tainacan-gray2);
border-bottom: 1px solid var(--tainacan-gray2);
margin-top: 1.0em;
font-size: 1.1em;
}
.options-columns {
-moz-column-count: 2;
-moz-column-gap: 0;
-moz-column-rule: none;
-webkit-column-count: 2;
-webkit-column-gap: 0;
-webkit-column-rule: none;
column-count: 2;
column-gap: 4em;
column-rule: none;
padding-bottom: 0.25em;
&>.field, &>section {
-webkit-column-break-inside: avoid;
page-break-inside: avoid;
break-inside: avoid;
}
.field > .field:not(:last-child) {
margin-bottom: 0em;
}
.help-wrapper {
font-size: 1.25em;
}
}
.form-submit {
margin-bottom: 0.75em;
}
}
</style>

View File

@ -531,7 +531,7 @@
align-items: center;
}
.tainacan-form>.columns {
margin-bottom: 76px;
margin-bottom: var(--tainacan-container-padding);
}
.tainacan-form .column {
padding: 1em var(--tainacan-one-column);

View File

@ -92,6 +92,11 @@
v-if="(editForms[metadatum.id] != undefined && editForms[metadatum.id].saved != true) || metadatum.status == 'auto-draft'">
{{ $i18n.get('info_not_saved') }}
</span>
<span
v-if="metadatum.status == 'private'"
class="icon">
<i class="tainacan-icon tainacan-icon-private"/>
</span>
</span>
<span
class="loading-spinner"

View File

@ -624,7 +624,7 @@ export default {
position: relative;
}
.exposer-copy-popup {
animation-name: appear-from-top;
animation-name: appear-from-top-tooltip;
animation-duration: 0.3s;
position: absolute;
background: var(--tainacan-gray1);

View File

@ -291,7 +291,7 @@ export default {
top: 48px;
right: 40px;
border-radius: 5px;
animation-name: appear-from-top;
animation-name: appear-from-top-tooltip;
animation-duration: 0.3s;
font-size: 0.75em;

View File

@ -95,6 +95,11 @@
v-if="(editForms[filter.id] != undefined && editForms[filter.id].saved != true) ||filter.status == 'auto-draft'">
{{ $i18n.get('info_not_saved') }}
</span>
<span
v-if="filter.status == 'private'"
class="icon">
<i class="tainacan-icon tainacan-icon-private"/>
</span>
</span>
<span
class="loading-spinner"

View File

@ -1200,11 +1200,26 @@
}, 500),
handleMouseMoveOverList: _.debounce( function($event) {
// Handles search control bar
if (this.$refs['search-control']) {
const bounding = this.$refs['search-control'].getBoundingClientRect();
const isHidden = !(bounding.top >= 0 && bounding.bottom <= ((window.innerHeight || document.documentElement.clientHeight) + 136));
if (isHidden && ($event.screenY <= 286)) {
if (!(this.$refs['search-control'].classList.contains('floating-search-control')))
this.$refs['search-control'].classList.add('floating-search-control');
} else {
if ((this.$refs['search-control'].classList.contains('floating-search-control')))
this.$refs['search-control'].classList.remove('floating-search-control');
}
}
// Handles pagination bar
if (this.$refs['items-pagination']) {
const bounding = this.$refs['items-pagination'].getBoundingClientRect();
const isHidden = !(bounding.top >= 0 && bounding.bottom <= (window.innerHeight || document.documentElement.clientHeight));
if (isHidden && ($event.screenY + 150 >= window.screen.height)) {
if (isHidden && ($event.screenY + 100 >= window.screen.height)) {
if (!(this.$refs['items-pagination'].classList.contains('floating-pagination'))) {
this.$refs['items-pagination'].classList.add('floating-pagination');
if (this.$refs['items-pagination'].children[0]) {
@ -1396,7 +1411,7 @@
}
}
}
.search-control {
min-height: 42px;
height: auto;
@ -1405,6 +1420,26 @@
display: flex;
justify-content: space-between;
flex-wrap: wrap;
transition: top 0.3s, opacity 0.3s, padding 0.3s, height 0.3s, position 0.3s;
&.floating-search-control {
position: sticky;
top: 0;
z-index: 99999999;
background: var(--tainacan-background-color);
animation: appear-from-top 0.2s;
opacity: 0.85;
border-bottom: 1px solid var(--tainacan-gray2);
padding: 20px var(--tainacan-one-column) 2px var(--tainacan-one-column);
&:hover {
opacity: 1;
}
.search-area .is-pulled-right {
display: none;
}
}
.search-control-item {
display: inline-block;
@ -1606,7 +1641,7 @@
min-height: 42px;
.pagination-area {
opacity: 0.75;
opacity: 0.85;
background: var(--tainacan-background-color);
position: fixed;
z-index: 99999;

View File

@ -113,6 +113,11 @@
v-if="(editForms[metadatum.id] != undefined && editForms[metadatum.id].saved != true) || metadatum.status == 'auto-draft'">
{{ $i18n.get('info_not_saved') }}
</span>
<span
v-if="metadatum.status == 'private'"
class="icon">
<i class="tainacan-icon tainacan-icon-private"/>
</span>
</span>
<span
class="loading-spinner"
@ -593,7 +598,7 @@ export default {
padding-bottom: 0;
.tainacan-page-title {
margin-bottom: 32px;
margin-bottom: 18px;
display: flex;
flex-wrap: wrap;
align-items: flex-end;

View File

@ -280,7 +280,7 @@ $modal-z: 9999999;
}
// Animations for background processes popup and url copy popup
@keyframes appear-from-top {
@keyframes appear-from-top-tooltip {
from {
top: 24px;
opacity: 0;
@ -290,6 +290,14 @@ $modal-z: 9999999;
opacity: 1;
}
}
@keyframes appear-from-top {
from {
top: -48px;
}
to {
top: 0px;
}
}
@keyframes appear-from-bottom {
from {
bottom: -48px;