Merge branch 'develop' of https://github.com/syuilo/misskey into develop

This commit is contained in:
syuilo
2018-09-06 04:28:42 +09:00
17 changed files with 59 additions and 25 deletions

View File

@ -1,2 +0,0 @@
const gcd = (a, b) => !b ? a : gcd(b, a % b);
export default gcd;

View File

@ -1,14 +1,20 @@
<template>
<span class="mk-acct">
<span class="name">@{{ user.username }}</span>
<span class="host" v-if="user.host">@{{ user.host }}</span>
<span class="host" v-if="user.host || detail">@{{ user.host || host }}</span>
</span>
</template>
<script lang="ts">
import Vue from 'vue';
import { host } from '../../../config';
export default Vue.extend({
props: ['user']
props: ['user', 'detail'],
data() {
return {
host
};
}
});
</script>

View File

@ -28,6 +28,7 @@
import Vue from 'vue';
import Menu from '../../../../common/views/components/menu.vue';
import contextmenu from '../../../api/contextmenu';
import { countIf } from '../../../../../../prelude/array';
export default Vue.extend({
props: {
@ -117,7 +118,7 @@ export default Vue.extend({
toggleActive() {
if (!this.isStacked) return;
const vms = this.$store.state.settings.deck.layout.find(ids => ids.indexOf(this.column.id) != -1).map(id => this.getColumnVm(id));
if (this.active && vms.filter(vm => vm.$el.classList.contains('active')).length == 1) return;
if (this.active && countIf(vm => vm.$el.classList.contains('active'), vms) == 1) return;
this.active = !this.active;
},

View File

@ -6,7 +6,7 @@
<div class="title">
<p class="name">{{ user | userName }}</p>
<div>
<span class="username"><mk-acct :user="user"/></span>
<span class="username"><mk-acct :user="user" :detail="true" /></span>
<span v-if="user.isBot" title="%i18n:@is-bot%">%fa:robot%</span>
<span class="location" v-if="user.host === null && user.profile.location">%fa:map-marker% {{ user.profile.location }}</span>
<span class="birthday" v-if="user.host === null && user.profile.birthday">%fa:birthday-cake% {{ user.profile.birthday.replace('-', '').replace('-', '') + '' }} ({{ age }})</span>

View File

@ -67,7 +67,7 @@
import Vue from 'vue';
import * as EXIF from 'exif-js';
import * as hljs from 'highlight.js';
import gcd from '../../../common/scripts/gcd';
import { gcd } from '../../../../../prelude/math';
export default Vue.extend({
props: ['file'],

View File

@ -16,7 +16,7 @@
</div>
<div class="title">
<h1>{{ user | userName }}</h1>
<span class="username"><mk-acct :user="user"/></span>
<span class="username"><mk-acct :user="user" :detail="true" /></span>
<span class="followed" v-if="user.isFollowed">%i18n:@follows-you%</span>
</div>
<div class="description">