Merge branch 'develop' of ssh.gitgud.io:lambadalambda/pleroma-fe into feature/profile-editing
This commit is contained in:
commit
c4920f2d86
@ -27,7 +27,8 @@
|
||||
"vue-router": "^2.5.3",
|
||||
"vue-template-compiler": "^2.3.4",
|
||||
"vue-timeago": "^3.1.2",
|
||||
"vuex": "^2.3.1"
|
||||
"vuex": "^2.3.1",
|
||||
"whatwg-fetch": "^2.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"autoprefixer": "^6.4.0",
|
||||
|
@ -29,6 +29,9 @@ export default {
|
||||
},
|
||||
scrollToTop () {
|
||||
window.scrollTo(0, 0)
|
||||
},
|
||||
logout () {
|
||||
this.$store.dispatch('logout')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8,6 +8,7 @@
|
||||
<div class='item right'>
|
||||
<user-finder></user-finder>
|
||||
<router-link :to="{ name: 'settings'}"><i class="icon-cog"></i></router-link>
|
||||
<a href="#" v-if="currentUser" @click.prevent="logout"><i class="icon-logout" title="Logout" ></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { find, filter, sortBy } from 'lodash'
|
||||
import { reduce, find, filter, sortBy } from 'lodash'
|
||||
import { statusType } from '../../modules/statuses.js'
|
||||
import Status from '../status/status.vue'
|
||||
|
||||
@ -33,6 +33,21 @@ const conversation = {
|
||||
const statuses = this.$store.state.statuses.allStatuses
|
||||
const conversation = filter(statuses, { statusnet_conversation_id: conversationId })
|
||||
return sortAndFilterConversation(conversation)
|
||||
},
|
||||
replies () {
|
||||
let i = 1
|
||||
return reduce(this.conversation, (result, {id, in_reply_to_status_id}) => {
|
||||
const irid = Number(in_reply_to_status_id)
|
||||
if (irid) {
|
||||
result[irid] = result[irid] || []
|
||||
result[irid].push({
|
||||
name: `#${i}`,
|
||||
id: id
|
||||
})
|
||||
}
|
||||
i++
|
||||
return result
|
||||
}, {})
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@ -59,18 +74,8 @@ const conversation = {
|
||||
}
|
||||
},
|
||||
getReplies (id) {
|
||||
let res = []
|
||||
id = Number(id)
|
||||
let i
|
||||
for (i = 0; i < this.conversation.length; i++) {
|
||||
if (Number(this.conversation[i].in_reply_to_status_id) === id) {
|
||||
res.push({
|
||||
name: `#${i}`,
|
||||
id: this.conversation[i].id
|
||||
})
|
||||
}
|
||||
}
|
||||
return res
|
||||
return this.replies[id] || []
|
||||
},
|
||||
focused (id) {
|
||||
if (this.statusoid.retweeted_status) {
|
||||
|
@ -49,6 +49,10 @@
|
||||
color: $green;
|
||||
}
|
||||
|
||||
.icon-user-plus.lit {
|
||||
color: $blue;
|
||||
}
|
||||
|
||||
.icon-reply.lit {
|
||||
color: $blue;
|
||||
}
|
||||
|
@ -36,6 +36,15 @@
|
||||
</h1>
|
||||
<status :compact="true" :statusoid="notification.status"></status>
|
||||
</div>
|
||||
<div v-if="notification.type === 'follow'">
|
||||
<h1>
|
||||
<span :title="'@'+notification.action.user.screen_name">{{ notification.action.user.name }}</span>
|
||||
<i class="fa icon-user-plus lit"></i>
|
||||
</h1>
|
||||
<div>
|
||||
<router-link :to="{ name: 'user-profile', params: { id: notification.action.user.id } }">@{{ notification.action.user.screen_name }}</router-link> followed you
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -8,8 +8,10 @@
|
||||
<div class='container'>
|
||||
<img :src="user.profile_image_url">
|
||||
<span class="glyphicon glyphicon-user"></span>
|
||||
<div class='user-name'>{{user.name}}</div>
|
||||
<div class='user-screen-name'>@{{user.screen_name}}</div>
|
||||
<div class="name-and-screen-name">
|
||||
<div class='user-name'>{{user.name}}</div>
|
||||
<div class='user-screen-name'>@{{user.screen_name}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="isOtherUser" class="user-interactions">
|
||||
<div v-if="user.follows_you && loggedIn" class="following base06">
|
||||
@ -124,6 +126,8 @@
|
||||
.profile-panel-body {
|
||||
top: -0em;
|
||||
padding-top: 4em;
|
||||
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.user-info {
|
||||
@ -143,33 +147,37 @@
|
||||
align-content: flex-start;
|
||||
justify-content: center;
|
||||
max-height: 60px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
img {
|
||||
border: 2px solid;
|
||||
border-radius: 5px;
|
||||
flex: 1 0 100%;
|
||||
max-width: 48px;
|
||||
max-height: 48px;
|
||||
border: 2px solid;
|
||||
border-radius: 5px;
|
||||
flex: 1 0 100%;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
text-shadow: 0px 1px 1.5px rgba(0, 0, 0, 1.0);
|
||||
|
||||
.user-name{
|
||||
margin-top: 0.0em;
|
||||
.name-and-screen-name {
|
||||
display: block;
|
||||
margin-top: 0.0em;
|
||||
margin-left: 0.6em;
|
||||
flex: 0 0 auto;
|
||||
align-self: flex-start;
|
||||
text-align: left;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.user-name{
|
||||
}
|
||||
|
||||
.user-screen-name {
|
||||
margin-top: 0.0em;
|
||||
margin-left: 0.6em;
|
||||
font-weight: lighter;
|
||||
font-size: 15px;
|
||||
padding-right: 0.1em;
|
||||
flex: 0 0 auto;
|
||||
align-self: flex-start;
|
||||
}
|
||||
|
||||
.user-interactions {
|
||||
|
@ -105,6 +105,10 @@ export const statusType = (status) => {
|
||||
return 'deletion'
|
||||
}
|
||||
|
||||
if (status.text.match(/started following/)) {
|
||||
return 'follow'
|
||||
}
|
||||
|
||||
return 'unknown'
|
||||
}
|
||||
|
||||
@ -253,6 +257,9 @@ const addNewStatuses = (state, { statuses, showImmediately = false, timeline, us
|
||||
favoriteStatus(favorite)
|
||||
}
|
||||
},
|
||||
'follow': (status) => {
|
||||
addNotification({ type: 'follow', status: status, action: status })
|
||||
},
|
||||
'deletion': (deletion) => {
|
||||
const uri = deletion.uri
|
||||
updateMaxId(deletion)
|
||||
|
@ -26,6 +26,9 @@ export const mutations = {
|
||||
setCurrentUser (state, user) {
|
||||
state.currentUser = merge(state.currentUser || {}, user)
|
||||
},
|
||||
clearCurrentUser (state) {
|
||||
state.currentUser = false
|
||||
},
|
||||
beginLogin (state) {
|
||||
state.loggingIn = true
|
||||
},
|
||||
@ -66,6 +69,11 @@ const users = {
|
||||
store.commit('setUserForStatus', status)
|
||||
})
|
||||
},
|
||||
logout (store) {
|
||||
store.commit('clearCurrentUser')
|
||||
store.dispatch('stopFetching', 'friends')
|
||||
store.commit('setBackendInteractor', backendInteractorService())
|
||||
},
|
||||
loginUser (store, userCredentials) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const commit = store.commit
|
||||
|
@ -27,6 +27,7 @@ const QVITTER_USER_TIMELINE_URL = '/api/qvitter/statuses/user_timeline.json'
|
||||
// const USER_URL = '/api/users/show.json'
|
||||
|
||||
import { each, map } from 'lodash'
|
||||
import 'whatwg-fetch'
|
||||
|
||||
const oldfetch = window.fetch
|
||||
|
||||
|
@ -89,6 +89,12 @@
|
||||
"css": "menu",
|
||||
"code": 61641,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "0d20938846444af8deb1920dc85a29fb",
|
||||
"css": "logout",
|
||||
"code": 59400,
|
||||
"src": "fontawesome"
|
||||
}
|
||||
]
|
||||
}
|
1
static/font/css/fontello-codes.css
vendored
1
static/font/css/fontello-codes.css
vendored
@ -7,6 +7,7 @@
|
||||
.icon-eye-off:before { content: '\e805'; } /* '' */
|
||||
.icon-plus-squared:before { content: '\e806'; } /* '' */
|
||||
.icon-cog:before { content: '\e807'; } /* '' */
|
||||
.icon-logout:before { content: '\e808'; } /* '' */
|
||||
.icon-spin3:before { content: '\e832'; } /* '' */
|
||||
.icon-spin4:before { content: '\e834'; } /* '' */
|
||||
.icon-menu:before { content: '\f0c9'; } /* '' */
|
||||
|
13
static/font/css/fontello-embedded.css
vendored
13
static/font/css/fontello-embedded.css
vendored
File diff suppressed because one or more lines are too long
1
static/font/css/fontello-ie7-codes.css
vendored
1
static/font/css/fontello-ie7-codes.css
vendored
@ -7,6 +7,7 @@
|
||||
.icon-eye-off { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-plus-squared { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-cog { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-logout { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-spin3 { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-spin4 { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-menu { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
|
1
static/font/css/fontello-ie7.css
vendored
1
static/font/css/fontello-ie7.css
vendored
@ -18,6 +18,7 @@
|
||||
.icon-eye-off { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-plus-squared { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-cog { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-logout { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-spin3 { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-spin4 { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-menu { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
|
15
static/font/css/fontello.css
vendored
15
static/font/css/fontello.css
vendored
@ -1,11 +1,11 @@
|
||||
@font-face {
|
||||
font-family: 'fontello';
|
||||
src: url('../font/fontello.eot?79576261');
|
||||
src: url('../font/fontello.eot?79576261#iefix') format('embedded-opentype'),
|
||||
url('../font/fontello.woff2?79576261') format('woff2'),
|
||||
url('../font/fontello.woff?79576261') format('woff'),
|
||||
url('../font/fontello.ttf?79576261') format('truetype'),
|
||||
url('../font/fontello.svg?79576261#fontello') format('svg');
|
||||
src: url('../font/fontello.eot?64848116');
|
||||
src: url('../font/fontello.eot?64848116#iefix') format('embedded-opentype'),
|
||||
url('../font/fontello.woff2?64848116') format('woff2'),
|
||||
url('../font/fontello.woff?64848116') format('woff'),
|
||||
url('../font/fontello.ttf?64848116') format('truetype'),
|
||||
url('../font/fontello.svg?64848116#fontello') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
@ -15,7 +15,7 @@
|
||||
@media screen and (-webkit-min-device-pixel-ratio:0) {
|
||||
@font-face {
|
||||
font-family: 'fontello';
|
||||
src: url('../font/fontello.svg?79576261#fontello') format('svg');
|
||||
src: url('../font/fontello.svg?64848116#fontello') format('svg');
|
||||
}
|
||||
}
|
||||
*/
|
||||
@ -63,6 +63,7 @@
|
||||
.icon-eye-off:before { content: '\e805'; } /* '' */
|
||||
.icon-plus-squared:before { content: '\e806'; } /* '' */
|
||||
.icon-cog:before { content: '\e807'; } /* '' */
|
||||
.icon-logout:before { content: '\e808'; } /* '' */
|
||||
.icon-spin3:before { content: '\e832'; } /* '' */
|
||||
.icon-spin4:before { content: '\e834'; } /* '' */
|
||||
.icon-menu:before { content: '\f0c9'; } /* '' */
|
||||
|
@ -229,11 +229,11 @@ body {
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'fontello';
|
||||
src: url('./font/fontello.eot?13861244');
|
||||
src: url('./font/fontello.eot?13861244#iefix') format('embedded-opentype'),
|
||||
url('./font/fontello.woff?13861244') format('woff'),
|
||||
url('./font/fontello.ttf?13861244') format('truetype'),
|
||||
url('./font/fontello.svg?13861244#fontello') format('svg');
|
||||
src: url('./font/fontello.eot?1253892');
|
||||
src: url('./font/fontello.eot?1253892#iefix') format('embedded-opentype'),
|
||||
url('./font/fontello.woff?1253892') format('woff'),
|
||||
url('./font/fontello.ttf?1253892') format('truetype'),
|
||||
url('./font/fontello.svg?1253892#fontello') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
@ -313,12 +313,13 @@ body {
|
||||
<div title="Code: 0xe807" class="the-icons span3"><i class="demo-icon icon-cog"></i> <span class="i-name">icon-cog</span><span class="i-code">0xe807</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div title="Code: 0xe808" class="the-icons span3"><i class="demo-icon icon-logout"></i> <span class="i-name">icon-logout</span><span class="i-code">0xe808</span></div>
|
||||
<div title="Code: 0xe832" class="the-icons span3"><i class="demo-icon icon-spin3 animate-spin"></i> <span class="i-name">icon-spin3</span><span class="i-code">0xe832</span></div>
|
||||
<div title="Code: 0xe834" class="the-icons span3"><i class="demo-icon icon-spin4 animate-spin"></i> <span class="i-name">icon-spin4</span><span class="i-code">0xe834</span></div>
|
||||
<div title="Code: 0xf0c9" class="the-icons span3"><i class="demo-icon icon-menu"></i> <span class="i-name">icon-menu</span><span class="i-code">0xf0c9</span></div>
|
||||
<div title="Code: 0xf112" class="the-icons span3"><i class="demo-icon icon-reply"></i> <span class="i-name">icon-reply</span><span class="i-code">0xf112</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div title="Code: 0xf112" class="the-icons span3"><i class="demo-icon icon-reply"></i> <span class="i-name">icon-reply</span><span class="i-code">0xf112</span></div>
|
||||
<div title="Code: 0xf1e5" class="the-icons span3"><i class="demo-icon icon-binoculars"></i> <span class="i-name">icon-binoculars</span><span class="i-code">0xf1e5</span></div>
|
||||
<div title="Code: 0xf234" class="the-icons span3"><i class="demo-icon icon-user-plus"></i> <span class="i-name">icon-user-plus</span><span class="i-code">0xf234</span></div>
|
||||
</div>
|
||||
|
Binary file not shown.
@ -22,6 +22,8 @@
|
||||
|
||||
<glyph glyph-name="cog" unicode="" d="M571 350q0 59-41 101t-101 42-101-42-42-101 42-101 101-42 101 42 41 101z m286 61v-124q0-7-4-13t-11-7l-104-16q-10-30-21-51 19-27 59-77 6-6 6-13t-5-13q-15-21-55-61t-53-39q-7 0-14 5l-77 60q-25-13-51-21-9-76-16-104-4-16-20-16h-124q-8 0-14 5t-6 12l-16 103q-27 9-50 21l-79-60q-6-5-14-5-8 0-14 6-70 64-92 94-4 5-4 13 0 6 5 12 8 12 28 37t30 40q-15 28-23 55l-102 15q-7 1-11 7t-5 13v124q0 7 5 13t10 7l104 16q8 25 22 51-23 32-60 77-6 7-6 14 0 5 5 12 15 20 55 60t53 40q7 0 15-5l77-60q24 13 50 21 9 76 17 104 3 16 20 16h124q7 0 13-5t7-12l15-103q28-9 51-20l79 59q5 5 13 5 7 0 14-5 72-67 92-95 4-5 4-12 0-7-4-13-9-12-29-37t-30-40q15-28 23-54l102-16q7-1 12-7t4-13z" horiz-adv-x="857.1" />
|
||||
|
||||
<glyph glyph-name="logout" unicode="" d="M357 46q0-2 1-11t0-14-2-14-5-11-12-3h-178q-67 0-114 47t-47 114v392q0 67 47 114t114 47h178q8 0 13-5t5-13q0-2 1-11t0-15-2-13-5-11-12-3h-178q-37 0-63-26t-27-64v-392q0-37 27-63t63-27h174t6 0 7-2 4-3 4-5 1-8z m518 304q0-14-11-25l-303-304q-11-10-25-10t-25 10-11 25v161h-250q-14 0-25 11t-11 25v214q0 15 11 25t25 11h250v161q0 14 11 25t25 10 25-10l303-304q11-10 11-25z" horiz-adv-x="928.6" />
|
||||
|
||||
<glyph glyph-name="spin3" unicode="" d="M494 850c-266 0-483-210-494-472-1-19 13-20 13-20l84 0c16 0 19 10 19 18 10 199 176 358 378 358 107 0 205-45 273-118l-58-57c-11-12-11-27 5-31l247-50c21-5 46 11 37 44l-58 227c-2 9-16 22-29 13l-65-60c-89 91-214 148-352 148z m409-508c-16 0-19-10-19-18-10-199-176-358-377-358-108 0-205 45-274 118l59 57c10 12 10 27-5 31l-248 50c-21 5-46-11-37-44l58-227c2-9 16-22 30-13l64 60c89-91 214-148 353-148 265 0 482 210 493 473 1 18-13 19-13 19l-84 0z" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="spin4" unicode="" d="M498 850c-114 0-228-39-320-116l0 0c173 140 428 130 588-31 134-134 164-332 89-495-10-29-5-50 12-68 21-20 61-23 84 0 3 3 12 15 15 24 71 180 33 393-112 539-99 98-228 147-356 147z m-409-274c-14 0-29-5-39-16-3-3-13-15-15-24-71-180-34-393 112-539 185-185 479-195 676-31l0 0c-173-140-428-130-589 31-134 134-163 333-89 495 11 29 6 50-12 68-11 11-27 17-44 16z" horiz-adv-x="1001" />
|
||||
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 7.0 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -5816,6 +5816,10 @@ webpack@^1.13.2:
|
||||
watchpack "^0.2.1"
|
||||
webpack-core "~0.6.9"
|
||||
|
||||
whatwg-fetch@^2.0.3:
|
||||
version "2.0.3"
|
||||
resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz#9c84ec2dcf68187ff00bc64e1274b442176e1c84"
|
||||
|
||||
whet.extend@~0.9.9:
|
||||
version "0.9.9"
|
||||
resolved "https://registry.yarnpkg.com/whet.extend/-/whet.extend-0.9.9.tgz#f877d5bf648c97e5aa542fadc16d6a259b9c11a1"
|
||||
|
Loading…
Reference in New Issue
Block a user