Last login tooltip and v-tooltip server compatibility css

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ (skjnldsv) 2018-04-21 10:02:32 +02:00
parent 72a76060bf
commit f0586b2eb1
No known key found for this signature in database
GPG Key ID: 60C25B8C072916CF
6 changed files with 219 additions and 173 deletions

View File

@ -11,119 +11,128 @@
*/
.tooltip {
position: absolute;
display: block;
font-family: 'Open Sans', Frutiger, Calibri, 'Myriad Pro', Myriad, sans-serif;
font-style: normal;
font-weight: 400;
letter-spacing: normal;
line-break: auto;
line-height: 1.6;
text-align: left;
text-align: start;
text-decoration: none;
text-shadow: none;
text-transform: none;
white-space: normal;
word-break: normal;
word-spacing: normal;
word-wrap: normal;
font-size: 12px;
opacity: 0;
z-index: 100000;
filter: drop-shadow(0 1px 10px $color-box-shadow);
&.in {
opacity: 1;
}
&.top {
margin-top: -3px;
padding: 10px 0;
}
&.bottom {
margin-top: 3px;
padding: 10px 0;
}
&.right {
margin-left: 3px;
padding: 0 10px;
.tooltip-arrow {
top: 50%;
left: 0;
margin-top: -10px;
border-width: 10px 10px 10px 0;
border-right-color: $color-main-background;
}
}
&.left {
margin-left: -3px;
padding: 0 5px;
.tooltip-arrow {
top: 50%;
right: 0;
margin-top: -10px;
border-width: 10px 0 10px 10px;
border-left-color: $color-main-background;
}
}
/* TOP */
&.top .tooltip-arrow,
&.top-left .tooltip-arrow,
&.top-right .tooltip-arrow {
bottom: 0;
border-width: 10px 10px 0;
border-top-color: $color-main-background;
}
&.top .tooltip-arrow {
left: 50%;
margin-left: -10px;
}
&.top-left .tooltip-arrow {
right: 10px;
margin-bottom: -10px;
}
&.top-right .tooltip-arrow {
left: 10px;
margin-bottom: -10px;
}
/* BOTTOM */
&.bottom .tooltip-arrow,
&.bottom-left .tooltip-arrow,
&.bottom-right .tooltip-arrow {
top: 0;
border-width: 0 10px 10px;
border-bottom-color: $color-main-background;
}
&.bottom .tooltip-arrow {
left: 50%;
margin-left: -10px;
}
&.bottom-left .tooltip-arrow {
right: 10px;
margin-top: -10px;
}
&.bottom-right .tooltip-arrow {
left: 10px;
margin-top: -10px;
}
position: absolute;
display: block;
font-family: 'Open Sans', Frutiger, Calibri, 'Myriad Pro', Myriad, sans-serif;
font-style: normal;
font-weight: 400;
letter-spacing: normal;
line-break: auto;
line-height: 1.6;
text-align: left;
text-align: start;
text-decoration: none;
text-shadow: none;
text-transform: none;
white-space: normal;
word-break: normal;
word-spacing: normal;
word-wrap: normal;
font-size: 12px;
opacity: 0;
z-index: 100000;
/* default to top */
margin-top: -3px;
padding: 10px 0;
filter: drop-shadow(0 1px 10px $color-box-shadow);
&.in,
&.tooltip[aria-hidden='false'] {
visibility: visible;
opacity: 1;
transition: opacity .15s;
}
&.top .tooltip-arrow,
&[x-placement^='top'] {
left: 50%;
margin-left: -10px;
}
&.bottom,
&[x-placement^='bottom'] {
margin-top: 3px;
padding: 10px 0;
}
&.right,
&[x-placement^='right'] {
margin-left: 3px;
padding: 0 10px;
.tooltip-arrow {
top: 50%;
left: 0;
margin-top: -10px;
border-width: 10px 10px 10px 0;
border-right-color: $color-main-background;
}
}
&.left,
&[x-placement^='left'] {
margin-left: -3px;
padding: 0 5px;
.tooltip-arrow {
top: 50%;
right: 0;
margin-top: -10px;
border-width: 10px 0 10px 10px;
border-left-color: $color-main-background;
}
}
/* TOP */
&.top,
&.top-left,
&[x-placement^='top'],
&.top-right {
.tooltip-arrow {
bottom: 0;
border-width: 10px 10px 0;
border-top-color: $color-main-background;
}
}
&.top-left .tooltip-arrow {
right: 10px;
margin-bottom: -10px;
}
&.top-right .tooltip-arrow {
left: 10px;
margin-bottom: -10px;
}
/* BOTTOM */
&.bottom,
&[x-placement^='bottom'],
&.bottom-left,
&.bottom-right {
.tooltip-arrow {
top: 0;
border-width: 0 10px 10px;
border-bottom-color: $color-main-background;
}
}
&[x-placement^='bottom'] .tooltip-arrow,
&.bottom .tooltip-arrow {
left: 50%;
margin-left: -10px;
}
&.bottom-left .tooltip-arrow {
right: 10px;
margin-top: -10px;
}
&.bottom-right .tooltip-arrow {
left: 10px;
margin-top: -10px;
}
}
.tooltip-inner {
max-width: 350px;
padding: 5px 8px;
background-color: $color-main-background;
color: $color-main-text;
text-align: center;
border-radius: $border-radius;
max-width: 350px;
padding: 5px 8px;
background-color: $color-main-background;
color: $color-main-text;
text-align: center;
border-radius: $border-radius;
}
.tooltip-arrow {
position: absolute;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
}
position: absolute;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
}

File diff suppressed because one or more lines are too long

View File

@ -4312,6 +4312,11 @@
"integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=",
"dev": true
},
"lodash.merge": {
"version": "4.6.1",
"resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.1.tgz",
"integrity": "sha512-AOYza4+Hf5z1/0Hztxpm2/xiPZgi/cjMqdnKTUWTBSKchJlxXXuUSxCCl8rJlf4g6yww/j6mA8nC8Hw/EZWxKQ=="
},
"lodash.mergewith": {
"version": "4.6.1",
"resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz",
@ -5089,6 +5094,11 @@
"find-up": "2.1.0"
}
},
"popper.js": {
"version": "1.14.3",
"resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.14.3.tgz",
"integrity": "sha1-FDj5jQRqz3tNeM1QK/QYrGTU8JU="
},
"posix-character-classes": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz",
@ -7068,6 +7078,16 @@
"integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==",
"dev": true
},
"v-tooltip": {
"version": "2.0.0-rc.31",
"resolved": "https://registry.npmjs.org/v-tooltip/-/v-tooltip-2.0.0-rc.31.tgz",
"integrity": "sha512-nfACIdUAn1tU5Rc2WAYV0rox6wl7njjHPCbuasIdifV/weGqdN+9wt79iAHw9LIkE4Xn1sVfZXdrQiFzhK/+nw==",
"requires": {
"lodash.merge": "4.6.1",
"popper.js": "1.14.3",
"vue-resize": "0.4.4"
}
},
"validate-npm-package-license": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz",
@ -7218,6 +7238,11 @@
"resolved": "https://registry.npmjs.org/vue-multiselect/-/vue-multiselect-2.1.0.tgz",
"integrity": "sha512-mEhApxZ6MUISGLuGDy0RF5UlAKUgG/Qq0DWYE/C+CA1h6ZszM3cHfpNFfFm2AMWLclY2SAWpY1HlQLjsw8WnvQ=="
},
"vue-resize": {
"version": "0.4.4",
"resolved": "https://registry.npmjs.org/vue-resize/-/vue-resize-0.4.4.tgz",
"integrity": "sha512-Lb/cnE2N9Y42ZJPw8wpjkpuX5a9ReerWNGcQRcbNCwfCnkHG6++FurNNmLIdU8dcCTH4c5rtTPdxBqFoRMK2cQ=="
},
"vue-router": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.0.1.tgz",

View File

@ -12,6 +12,7 @@
},
"dependencies": {
"axios": "^0.18.0",
"v-tooltip": "^2.0.0-rc.31",
"vue": "^2.5.11",
"vue-click-outside": "^1.0.7",
"vue-infinite-loading": "^2.2.3",

View File

@ -68,7 +68,7 @@
</div>
<div class="storageLocation" v-if="showConfig.showStoragePath">{{user.storageLocation}}</div>
<div class="userBackend" v-if="showConfig.showUserBackend">{{user.backend}}</div>
<div class="lastLogin" v-if="showConfig.showLastLogin" :title="user.lastLogin>0 ? OC.Util.formatDate(user.lastLogin) : ''">
<div class="lastLogin" v-if="showConfig.showLastLogin" v-tooltip.auto="user.lastLogin>0 ? OC.Util.formatDate(user.lastLogin) : ''">
{{user.lastLogin>0 ? OC.Util.relativeModifiedDate(user.lastLogin) : t('settings','Never')}}
</div>
<div class="userActions">
@ -86,6 +86,10 @@
import popoverMenu from '../popoverMenu';
import ClickOutside from 'vue-click-outside';
import Multiselect from 'vue-multiselect';
import Vue from 'vue'
import VTooltip from 'v-tooltip'
Vue.use(VTooltip)
export default {
name: 'userRow',

View File

@ -63,7 +63,7 @@ export default {
orderBy: this.$store.getters.getServerData.sortGroups,
userCount: this.$store.getters.getServerData.userCount
});
//this.$store.dispatch('getPasswordPolicyMinLength');
this.$store.dispatch('getPasswordPolicyMinLength');
},
data() {
return {