slove-conflict

This commit is contained in:
Hakaba Hitoyo 2018-02-04 08:36:10 +09:00
commit 013f11497f
17 changed files with 1780 additions and 1594 deletions

View file

@ -1,5 +1,5 @@
const FavoriteButton = {
props: ['status'],
props: ['status', 'loggedIn'],
data () {
return {
animated: false

View file

@ -1,6 +1,10 @@
<template>
<div>
<i :class='classes' class='favorite-button base09' @click.prevent='favorite()'/>
<div v-if="loggedIn">
<i :class='classes' class='favorite-button fav-active base09' @click.prevent='favorite()'/>
<span v-if='status.fave_num > 0'>{{status.fave_num}}</span>
</div>
<div v-else>
<i :class='classes' class='favorite-button base09'/>
<span v-if='status.fave_num > 0'>{{status.fave_num}}</span>
</div>
</template>
@ -8,7 +12,7 @@
<script src="./favorite_button.js" ></script>
<style lang='scss'>
.favorite-button {
.fav-active {
cursor: pointer;
animation-duration: 0.6s;
&:hover {

View file

@ -64,14 +64,15 @@ const PostStatusForm = {
img: profile_image_url_original
}))
} else if (firstchar === ':') {
const matchedEmoji = filter(this.emoji, (emoji) => emoji.shortcode.match(this.textAtCaret.slice(1)))
const matchedEmoji = filter(this.emoji.concat(this.customEmoji), (emoji) => emoji.shortcode.match(this.textAtCaret.slice(1)))
if (matchedEmoji.length <= 0) {
return false
}
return map(take(matchedEmoji, 5), ({shortcode, image_url}) => ({
return map(take(matchedEmoji, 5), ({shortcode, image_url, utf}) => ({
// eslint-disable-next-line camelcase
screen_name: `:${shortcode}:`,
name: '',
utf: utf || '',
img: image_url
}))
} else {
@ -90,6 +91,9 @@ const PostStatusForm = {
},
emoji () {
return this.$store.state.config.emoji || []
},
customEmoji () {
return this.$store.state.config.customEmoji || []
}
},
methods: {
@ -104,6 +108,7 @@ const PostStatusForm = {
},
postStatus (newStatus) {
if (this.posting) { return }
if (this.submitDisabled) { return }
if (this.newStatus.status === '') {
if (this.newStatus.files.length > 0) {

View file

@ -6,8 +6,9 @@
</div>
<div style="position:relative;" v-if="candidates">
<div class="autocomplete-panel base05-background">
<div v-for="candidate in candidates" @click="replace(candidate.screen_name + ' ')" class="autocomplete base02">
<img :src="candidate.img"></img>
<div v-for="candidate in candidates" @click="replace(candidate.utf || (candidate.screen_name + ' '))" class="autocomplete base02">
<span v-if="candidate.img"><img :src="candidate.img"></img></span>
<span v-else>{{candidate.utf}}</span>
<span>
{{candidate.screen_name}}
<small class="base02">{{candidate.name}}</small>

View file

@ -1,5 +1,5 @@
const RetweetButton = {
props: ['status'],
props: ['status', 'loggedIn'],
data () {
return {
animated: false

View file

@ -1,6 +1,10 @@
<template>
<div>
<i :class='classes' class='icon-retweet base09' v-on:click.prevent='retweet()'></i>
<div v-if="loggedIn">
<i :class='classes' class='icon-retweet rt-active base09' v-on:click.prevent='retweet()'></i>
<span v-if='status.repeat_num > 0'>{{status.repeat_num}}</span>
</div>
<div v-else>
<i :class='classes' class='icon-retweet base09'></i>
<span v-if='status.repeat_num > 0'>{{status.repeat_num}}</span>
</div>
</template>
@ -9,7 +13,7 @@
<style lang='scss'>
@import '../../_variables.scss';
.icon-retweet {
.rt-active {
cursor: pointer;
animation-duration: 0.6s;
&:hover {

View file

@ -8,8 +8,8 @@
<i class="base09 icon-reply" :class="{'icon-reply-active': replying}"></i>
</a>
</div>
<retweet-button :status=status></retweet-button>
<favorite-button :status=status></favorite-button>
<retweet-button :loggedIn="loggedIn" :status=status></retweet-button>
<favorite-button :loggedIn="loggedIn" :status=status></favorite-button>
</div>
</div>
<post-status-form class="reply-body" :reply-to="status.id" :attentions="status.attentions" :repliedUser="status.user" v-on:posted="toggleReplying" v-if="replying"/>
@ -105,17 +105,15 @@
</div>
</div>
<div v-if="loggedIn">
<div class='status-actions'>
<div>
<a href="#" v-on:click.prevent="toggleReplying">
<i class="base09 icon-reply" :class="{'icon-reply-active': replying}"></i>
</a>
</div>
<retweet-button :status=status></retweet-button>
<favorite-button :status=status></favorite-button>
<delete-button :status=status></delete-button>
<div class='status-actions'>
<div v-if="loggedIn">
<a href="#" v-on:click.prevent="toggleReplying">
<i class="base09 icon-reply" :class="{'icon-reply-active': replying}"></i>
</a>
</div>
<retweet-button :loggedIn="loggedIn" :status=status></retweet-button>
<favorite-button :loggedIn="loggedIn" :status=status></favorite-button>
<delete-button :status=status></delete-button>
</div>
</div>
</div>
@ -248,6 +246,7 @@
img, video {
max-width: 100%;
max-height: 400px;
vertical-align: middle;
object-fit: contain;
}

View file

@ -22,6 +22,11 @@ export default {
isOtherUser () {
return this.user.id !== this.$store.state.users.currentUser.id
},
subscribeUrl () {
// eslint-disable-next-line no-undef
const serverUrl = new URL(this.user.statusnet_profile_url)
return `${serverUrl.protocol}//${serverUrl.host}/main/ostatus`
},
loggedIn () {
return this.$store.state.users.currentUser
},

View file

@ -46,6 +46,15 @@
</button>
</span>
</div>
<div class="remote-follow" v-if='!loggedIn && user.is_local'>
<form method="POST" :action='subscribeUrl'>
<input type="hidden" name="nickname" :value="user.screen_name">
<input type="hidden" name="profile" value="">
<button click="submit" class="remote-button base05 base02-background">
{{ $t('user_card.remote_follow') }}
</button>
</form>
</div>
<div class='block' v-if='isOtherUser && loggedIn'>
<span v-if='user.statusnet_blocking'>
<button @click="unblockUser" class="base04 base00-background pressed">
@ -182,6 +191,11 @@
min-height: 28px;
}
.remote-follow {
max-width: 220px;
min-height: 28px;
}
.follow {
max-width: 220px;
min-height: 28px;
@ -191,6 +205,12 @@
width: 92%;
height: 100%;
}
.remote-button {
height: 28px !important;
width: 92%;
}
.pressed {
border-bottom-color: rgba(255, 255, 255, 0.2);
border-top-color: rgba(0, 0, 0, 0.2);

View file

@ -7,7 +7,7 @@
<div class="setting-item">
<h3>{{$t('settings.name_bio')}}</h3>
<p>{{$t('settings.name')}}</p>
<input class='name-changer base03-border' id='username' v-model="newname" :value="user.screen_name"></input>
<input class='name-changer base03-border' id='username' v-model="newname"></input>
<p>{{$t('settings.bio')}}</p>
<textarea class="bio base03-border" v-model="newbio"></textarea>
<button :disabled='newname.length <= 0' class="btn btn-default base05 base02-background" @click="updateProfile">{{$t('general.submit')}}</button>