Compare commits
25 Commits
Author | SHA1 | Date | |
---|---|---|---|
5f1b726bab | |||
ed130ca82c | |||
9f22f924f1 | |||
a8083eb52b | |||
665afccb45 | |||
372bfaceda | |||
1625b37b44 | |||
72c1352acf | |||
2f2a945905 | |||
9870e73069 | |||
f2874d778a | |||
e9940c9221 | |||
7797a0746a | |||
6df010a71e | |||
671c5e7c12 | |||
ec4ed8fb2d | |||
34786130b7 | |||
6cb520cd2c | |||
47ce59d555 | |||
985a105930 | |||
52560dd986 | |||
de81502fdf | |||
51876bac62 | |||
a5b994259e | |||
c85c825bad |
@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "misskey",
|
"name": "misskey",
|
||||||
"author": "syuilo <i@syuilo.com>",
|
"author": "syuilo <i@syuilo.com>",
|
||||||
"version": "1.2.0",
|
"version": "1.4.0",
|
||||||
"clientVersion": "1.0.5133",
|
"clientVersion": "1.0.5158",
|
||||||
"codename": "nighthike",
|
"codename": "nighthike",
|
||||||
"main": "./built/index.js",
|
"main": "./built/index.js",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
@ -94,13 +94,13 @@ export default Vue.extend({
|
|||||||
margin 0 auto -38px auto
|
margin 0 auto -38px auto
|
||||||
border solid 5px #fff
|
border solid 5px #fff
|
||||||
border-radius 100%
|
border-radius 100%
|
||||||
box-shadow 0 2px 2px rgba(0, 0, 0, 0.1)
|
box-shadow 0 2px 2px rgba(#000, 0.1)
|
||||||
|
|
||||||
> .app
|
> .app
|
||||||
padding 44px 16px 0 16px
|
padding 44px 16px 0 16px
|
||||||
color #555
|
color #555
|
||||||
background #eee
|
background #eee
|
||||||
box-shadow 0 2px 2px rgba(0, 0, 0, 0.1) inset
|
box-shadow 0 2px 2px rgba(#000, 0.1) inset
|
||||||
|
|
||||||
&:after
|
&:after
|
||||||
content ''
|
content ''
|
||||||
|
@ -94,7 +94,7 @@ export default Vue.extend({
|
|||||||
margin 0 auto
|
margin 0 auto
|
||||||
text-align center
|
text-align center
|
||||||
background #fff
|
background #fff
|
||||||
box-shadow 0px 4px 16px rgba(0, 0, 0, 0.2)
|
box-shadow 0px 4px 16px rgba(#000, 0.2)
|
||||||
|
|
||||||
> .fetching
|
> .fetching
|
||||||
margin 0
|
margin 0
|
||||||
|
@ -18,61 +18,65 @@ export default function<T extends object>(data: {
|
|||||||
default: false
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
id(): string {
|
id(): string {
|
||||||
return this.widget.id;
|
return this.widget.id;
|
||||||
|
},
|
||||||
|
|
||||||
|
props(): T {
|
||||||
|
return this.widget.data;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
props: data.props ? data.props() : {} as T,
|
bakedOldProps: null
|
||||||
bakedOldProps: null,
|
|
||||||
preventSave: false
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
if (this.props) {
|
this.mergeProps();
|
||||||
Object.keys(this.props).forEach(prop => {
|
|
||||||
if (this.widget.data.hasOwnProperty(prop)) {
|
this.$watch('props', () => {
|
||||||
this.props[prop] = this.widget.data[prop];
|
this.mergeProps();
|
||||||
}
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
this.bakeProps();
|
this.bakeProps();
|
||||||
|
},
|
||||||
|
|
||||||
this.$watch('props', newProps => {
|
methods: {
|
||||||
if (this.preventSave) {
|
bakeProps() {
|
||||||
this.preventSave = false;
|
this.bakedOldProps = JSON.stringify(this.props);
|
||||||
this.bakeProps();
|
},
|
||||||
return;
|
|
||||||
|
mergeProps() {
|
||||||
|
if (data.props) {
|
||||||
|
const defaultProps = data.props();
|
||||||
|
Object.keys(defaultProps).forEach(prop => {
|
||||||
|
if (!this.props.hasOwnProperty(prop)) {
|
||||||
|
Vue.set(this.props, prop, defaultProps[prop]);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
if (this.bakedOldProps == JSON.stringify(newProps)) return;
|
},
|
||||||
|
|
||||||
|
save() {
|
||||||
|
if (this.bakedOldProps == JSON.stringify(this.props)) return;
|
||||||
|
|
||||||
this.bakeProps();
|
this.bakeProps();
|
||||||
|
|
||||||
if (this.isMobile) {
|
if (this.isMobile) {
|
||||||
(this as any).api('i/update_mobile_home', {
|
(this as any).api('i/update_mobile_home', {
|
||||||
id: this.id,
|
id: this.id,
|
||||||
data: newProps
|
data: this.props
|
||||||
}).then(() => {
|
|
||||||
(this as any).os.i.clientSettings.mobileHome.find(w => w.id == this.id).data = newProps;
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
(this as any).api('i/update_home', {
|
(this as any).api('i/update_home', {
|
||||||
id: this.id,
|
id: this.id,
|
||||||
data: newProps
|
data: this.props
|
||||||
}).then(() => {
|
|
||||||
(this as any).os.i.clientSettings.home.find(w => w.id == this.id).data = newProps;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, {
|
|
||||||
deep: true
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
bakeProps() {
|
|
||||||
this.bakedOldProps = JSON.stringify(this.props);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -3,6 +3,7 @@ import { EventEmitter } from 'eventemitter3';
|
|||||||
import * as merge from 'object-assign-deep';
|
import * as merge from 'object-assign-deep';
|
||||||
import * as uuid from 'uuid';
|
import * as uuid from 'uuid';
|
||||||
|
|
||||||
|
import initStore from '../store';
|
||||||
import { hostname, apiUrl, swPublickey, version, lang, googleMapsApiKey } from '../config';
|
import { hostname, apiUrl, swPublickey, version, lang, googleMapsApiKey } from '../config';
|
||||||
import Progress from './scripts/loading';
|
import Progress from './scripts/loading';
|
||||||
import Connection from './scripts/streaming/stream';
|
import Connection from './scripts/streaming/stream';
|
||||||
@ -16,16 +17,6 @@ import Err from '../common/views/components/connect-failed.vue';
|
|||||||
import { LocalTimelineStreamManager } from './scripts/streaming/local-timeline';
|
import { LocalTimelineStreamManager } from './scripts/streaming/local-timeline';
|
||||||
import { GlobalTimelineStreamManager } from './scripts/streaming/global-timeline';
|
import { GlobalTimelineStreamManager } from './scripts/streaming/global-timeline';
|
||||||
|
|
||||||
const defaultSettings = {
|
|
||||||
fetchOnScroll: true,
|
|
||||||
showMaps: true,
|
|
||||||
showPostFormOnTopOfTl: false,
|
|
||||||
gradientWindowHeader: false,
|
|
||||||
showReplyTarget: true,
|
|
||||||
showMyRenotes: true,
|
|
||||||
showRenotedMyNotes: true
|
|
||||||
};
|
|
||||||
|
|
||||||
//#region api requests
|
//#region api requests
|
||||||
let spinner = null;
|
let spinner = null;
|
||||||
let pending = 0;
|
let pending = 0;
|
||||||
@ -117,6 +108,8 @@ export default class MiOS extends EventEmitter {
|
|||||||
return localStorage.getItem('enableSounds') == 'true';
|
return localStorage.getItem('enableSounds') == 'true';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public store: ReturnType<typeof initStore>;
|
||||||
|
|
||||||
public apis: API;
|
public apis: API;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -232,8 +225,14 @@ export default class MiOS extends EventEmitter {
|
|||||||
console.error.apply(null, args);
|
console.error.apply(null, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bakeMe() {
|
||||||
|
// ローカルストレージにキャッシュ
|
||||||
|
localStorage.setItem('me', JSON.stringify(this.i));
|
||||||
|
}
|
||||||
|
|
||||||
public signout() {
|
public signout() {
|
||||||
localStorage.removeItem('me');
|
localStorage.removeItem('me');
|
||||||
|
localStorage.removeItem('settings');
|
||||||
document.cookie = `i=; domain=${hostname}; expires=Thu, 01 Jan 1970 00:00:01 GMT;`;
|
document.cookie = `i=; domain=${hostname}; expires=Thu, 01 Jan 1970 00:00:01 GMT;`;
|
||||||
location.href = '/';
|
location.href = '/';
|
||||||
}
|
}
|
||||||
@ -243,6 +242,8 @@ export default class MiOS extends EventEmitter {
|
|||||||
* @param callback A function that call when initialized
|
* @param callback A function that call when initialized
|
||||||
*/
|
*/
|
||||||
public async init(callback) {
|
public async init(callback) {
|
||||||
|
this.store = initStore(this);
|
||||||
|
|
||||||
//#region Init stream managers
|
//#region Init stream managers
|
||||||
this.streams.serverStream = new ServerStreamManager(this);
|
this.streams.serverStream = new ServerStreamManager(this);
|
||||||
|
|
||||||
@ -307,16 +308,11 @@ export default class MiOS extends EventEmitter {
|
|||||||
|
|
||||||
// フェッチが完了したとき
|
// フェッチが完了したとき
|
||||||
const fetched = me => {
|
const fetched = me => {
|
||||||
if (me) {
|
|
||||||
// デフォルトの設定をマージ
|
|
||||||
me.clientSettings = Object.assign(defaultSettings, me.clientSettings);
|
|
||||||
|
|
||||||
// ローカルストレージにキャッシュ
|
|
||||||
localStorage.setItem('me', JSON.stringify(me));
|
|
||||||
}
|
|
||||||
|
|
||||||
this.i = me;
|
this.i = me;
|
||||||
|
|
||||||
|
// ローカルストレージにキャッシュ
|
||||||
|
this.bakeMe();
|
||||||
|
|
||||||
this.emit('signedin');
|
this.emit('signedin');
|
||||||
|
|
||||||
// Finish init
|
// Finish init
|
||||||
@ -333,6 +329,14 @@ export default class MiOS extends EventEmitter {
|
|||||||
// Get cached account data
|
// Get cached account data
|
||||||
const cachedMe = JSON.parse(localStorage.getItem('me'));
|
const cachedMe = JSON.parse(localStorage.getItem('me'));
|
||||||
|
|
||||||
|
//#region キャッシュされた設定を復元
|
||||||
|
const cachedSettings = JSON.parse(localStorage.getItem('settings'));
|
||||||
|
|
||||||
|
if (cachedSettings) {
|
||||||
|
this.store.dispatch('settings/merge', cachedSettings);
|
||||||
|
}
|
||||||
|
//#endregion
|
||||||
|
|
||||||
// キャッシュがあったとき
|
// キャッシュがあったとき
|
||||||
if (cachedMe) {
|
if (cachedMe) {
|
||||||
if (cachedMe.token == null) {
|
if (cachedMe.token == null) {
|
||||||
@ -346,12 +350,23 @@ export default class MiOS extends EventEmitter {
|
|||||||
// 後から新鮮なデータをフェッチ
|
// 後から新鮮なデータをフェッチ
|
||||||
fetchme(cachedMe.token, freshData => {
|
fetchme(cachedMe.token, freshData => {
|
||||||
merge(cachedMe, freshData);
|
merge(cachedMe, freshData);
|
||||||
|
|
||||||
|
this.store.dispatch('settings/merge', freshData.clientSettings);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// Get token from cookie
|
// Get token from cookie
|
||||||
const i = (document.cookie.match(/i=(!\w+)/) || [null, null])[1];
|
const i = (document.cookie.match(/i=(!\w+)/) || [null, null])[1];
|
||||||
|
|
||||||
fetchme(i, fetched);
|
fetchme(i, me => {
|
||||||
|
if (me) {
|
||||||
|
this.store.dispatch('settings/merge', me.clientSettings);
|
||||||
|
|
||||||
|
fetched(me);
|
||||||
|
} else {
|
||||||
|
// Finish init
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -456,7 +471,7 @@ export default class MiOS extends EventEmitter {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const promise = new Promise((resolve, reject) => {
|
const promise = new Promise((resolve, reject) => {
|
||||||
const viaStream = this.stream.hasConnection &&
|
const viaStream = this.stream && this.stream.hasConnection &&
|
||||||
(localStorage.getItem('apiViaStream') ? localStorage.getItem('apiViaStream') == 'true' : true);
|
(localStorage.getItem('apiViaStream') ? localStorage.getItem('apiViaStream') == 'true' : true);
|
||||||
|
|
||||||
if (viaStream) {
|
if (viaStream) {
|
||||||
|
@ -25,10 +25,31 @@ export class HomeStream extends Stream {
|
|||||||
console.log('I updated:', i);
|
console.log('I updated:', i);
|
||||||
}
|
}
|
||||||
merge(me, i);
|
merge(me, i);
|
||||||
|
|
||||||
|
// キャッシュ更新
|
||||||
|
os.bakeMe();
|
||||||
|
});
|
||||||
|
|
||||||
|
this.on('clientSettingUpdated', x => {
|
||||||
|
os.store.commit('settings/set', {
|
||||||
|
key: x.key,
|
||||||
|
value: x.value
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
this.on('home_updated', x => {
|
||||||
|
if (x.home) {
|
||||||
|
os.store.commit('settings/setHome', x.home);
|
||||||
|
} else {
|
||||||
|
os.store.commit('settings/setHomeWidget', {
|
||||||
|
id: x.id,
|
||||||
|
data: x.data
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// トークンが再生成されたとき
|
// トークンが再生成されたとき
|
||||||
// このままではAPIが利用できないので強制的にサインアウトさせる
|
// このままではMisskeyが利用できないので強制的にサインアウトさせる
|
||||||
this.on('my_token_regenerated', () => {
|
this.on('my_token_regenerated', () => {
|
||||||
alert('%i18n:!common.my-token-regenerated%');
|
alert('%i18n:!common.my-token-regenerated%');
|
||||||
os.signout();
|
os.signout();
|
||||||
|
@ -234,7 +234,7 @@ export default Vue.extend({
|
|||||||
margin-top calc(1em + 8px)
|
margin-top calc(1em + 8px)
|
||||||
overflow hidden
|
overflow hidden
|
||||||
background #fff
|
background #fff
|
||||||
border solid 1px rgba(0, 0, 0, 0.1)
|
border solid 1px rgba(#000, 0.1)
|
||||||
border-radius 4px
|
border-radius 4px
|
||||||
transition top 0.1s ease, left 0.1s ease
|
transition top 0.1s ease, left 0.1s ease
|
||||||
|
|
||||||
@ -253,7 +253,7 @@ export default Vue.extend({
|
|||||||
white-space nowrap
|
white-space nowrap
|
||||||
overflow hidden
|
overflow hidden
|
||||||
font-size 0.9em
|
font-size 0.9em
|
||||||
color rgba(0, 0, 0, 0.8)
|
color rgba(#000, 0.8)
|
||||||
cursor default
|
cursor default
|
||||||
|
|
||||||
&, *
|
&, *
|
||||||
@ -285,10 +285,10 @@ export default Vue.extend({
|
|||||||
|
|
||||||
.name
|
.name
|
||||||
margin 0 8px 0 0
|
margin 0 8px 0 0
|
||||||
color rgba(0, 0, 0, 0.8)
|
color rgba(#000, 0.8)
|
||||||
|
|
||||||
.username
|
.username
|
||||||
color rgba(0, 0, 0, 0.3)
|
color rgba(#000, 0.3)
|
||||||
|
|
||||||
> .emojis > li
|
> .emojis > li
|
||||||
|
|
||||||
@ -298,10 +298,10 @@ export default Vue.extend({
|
|||||||
width 24px
|
width 24px
|
||||||
|
|
||||||
.name
|
.name
|
||||||
color rgba(0, 0, 0, 0.8)
|
color rgba(#000, 0.8)
|
||||||
|
|
||||||
.alias
|
.alias
|
||||||
margin 0 0 0 8px
|
margin 0 0 0 8px
|
||||||
color rgba(0, 0, 0, 0.3)
|
color rgba(#000, 0.3)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
38
src/client/app/common/views/components/avatar.vue
Normal file
38
src/client/app/common/views/components/avatar.vue
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
<template>
|
||||||
|
<router-link class="mk-avatar" :to="user | userPage" :title="user | acct" :target="target" :style="{ borderRadius: clientSettings.circleIcons ? '100%' : null }">
|
||||||
|
<img v-if="disablePreview" :src="`${user.avatarUrl}?thumbnail&size=128`" alt=""/>
|
||||||
|
<img v-else :src="`${user.avatarUrl}?thumbnail&size=128`" alt="" v-user-preview="user.id"/>
|
||||||
|
</router-link>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
import Vue from 'vue';
|
||||||
|
export default Vue.extend({
|
||||||
|
props: {
|
||||||
|
user: {
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
target: {
|
||||||
|
required: false,
|
||||||
|
default: null
|
||||||
|
},
|
||||||
|
disablePreview: {
|
||||||
|
required: false,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="stylus" scoped>
|
||||||
|
.mk-avatar
|
||||||
|
display block
|
||||||
|
|
||||||
|
> img
|
||||||
|
display inline-block
|
||||||
|
width 100%
|
||||||
|
height 100%
|
||||||
|
margin 0
|
||||||
|
border-radius inherit
|
||||||
|
vertical-align bottom
|
||||||
|
</style>
|
@ -3,6 +3,7 @@ import Vue from 'vue';
|
|||||||
import signin from './signin.vue';
|
import signin from './signin.vue';
|
||||||
import signup from './signup.vue';
|
import signup from './signup.vue';
|
||||||
import forkit from './forkit.vue';
|
import forkit from './forkit.vue';
|
||||||
|
import avatar from './avatar.vue';
|
||||||
import nav from './nav.vue';
|
import nav from './nav.vue';
|
||||||
import noteHtml from './note-html';
|
import noteHtml from './note-html';
|
||||||
import poll from './poll.vue';
|
import poll from './poll.vue';
|
||||||
@ -28,6 +29,7 @@ import welcomeTimeline from './welcome-timeline.vue';
|
|||||||
Vue.component('mk-signin', signin);
|
Vue.component('mk-signin', signin);
|
||||||
Vue.component('mk-signup', signup);
|
Vue.component('mk-signup', signup);
|
||||||
Vue.component('mk-forkit', forkit);
|
Vue.component('mk-forkit', forkit);
|
||||||
|
Vue.component('mk-avatar', avatar);
|
||||||
Vue.component('mk-nav', nav);
|
Vue.component('mk-nav', nav);
|
||||||
Vue.component('mk-note-html', noteHtml);
|
Vue.component('mk-note-html', noteHtml);
|
||||||
Vue.component('mk-poll', poll);
|
Vue.component('mk-poll', poll);
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="message" :data-is-me="isMe">
|
<div class="message" :data-is-me="isMe">
|
||||||
<router-link class="avatar-anchor" :to="message.user | userPage" :title="message.user | acct" target="_blank">
|
<mk-avatar class="avatar" :user="message.user" target="_blank"/>
|
||||||
<img class="avatar" :src="`${message.user.avatarUrl}?thumbnail&size=80`" alt=""/>
|
|
||||||
</router-link>
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="balloon" :data-no-text="message.text == null">
|
<div class="balloon" :data-no-text="message.text == null">
|
||||||
<p class="read" v-if="isMe && message.isRead">%i18n:@is-read%</p>
|
<p class="read" v-if="isMe && message.isRead">%i18n:@is-read%</p>
|
||||||
@ -67,20 +65,14 @@ export default Vue.extend({
|
|||||||
padding 10px 12px 10px 12px
|
padding 10px 12px 10px 12px
|
||||||
background-color transparent
|
background-color transparent
|
||||||
|
|
||||||
> .avatar-anchor
|
> .avatar
|
||||||
display block
|
display block
|
||||||
position absolute
|
position absolute
|
||||||
top 10px
|
top 10px
|
||||||
|
width 54px
|
||||||
> .avatar
|
height 54px
|
||||||
display block
|
border-radius 8px
|
||||||
min-width 54px
|
transition all 0.1s ease
|
||||||
min-height 54px
|
|
||||||
max-width 54px
|
|
||||||
max-height 54px
|
|
||||||
margin 0
|
|
||||||
border-radius 8px
|
|
||||||
transition all 0.1s ease
|
|
||||||
|
|
||||||
> .content
|
> .content
|
||||||
|
|
||||||
@ -134,7 +126,7 @@ export default Vue.extend({
|
|||||||
bottom -4px
|
bottom -4px
|
||||||
left -12px
|
left -12px
|
||||||
margin 0
|
margin 0
|
||||||
color rgba(0, 0, 0, 0.5)
|
color rgba(#000, 0.5)
|
||||||
font-size 11px
|
font-size 11px
|
||||||
|
|
||||||
> .content
|
> .content
|
||||||
@ -146,7 +138,7 @@ export default Vue.extend({
|
|||||||
overflow hidden
|
overflow hidden
|
||||||
overflow-wrap break-word
|
overflow-wrap break-word
|
||||||
font-size 1em
|
font-size 1em
|
||||||
color rgba(0, 0, 0, 0.5)
|
color rgba(#000, 0.5)
|
||||||
|
|
||||||
> .text
|
> .text
|
||||||
display block
|
display block
|
||||||
@ -155,7 +147,7 @@ export default Vue.extend({
|
|||||||
overflow hidden
|
overflow hidden
|
||||||
overflow-wrap break-word
|
overflow-wrap break-word
|
||||||
font-size 1em
|
font-size 1em
|
||||||
color rgba(0, 0, 0, 0.8)
|
color rgba(#000, 0.8)
|
||||||
|
|
||||||
& + .file
|
& + .file
|
||||||
> a
|
> a
|
||||||
@ -195,13 +187,13 @@ export default Vue.extend({
|
|||||||
display block
|
display block
|
||||||
margin 2px 0 0 0
|
margin 2px 0 0 0
|
||||||
font-size 10px
|
font-size 10px
|
||||||
color rgba(0, 0, 0, 0.4)
|
color rgba(#000, 0.4)
|
||||||
|
|
||||||
> [data-fa]
|
> [data-fa]
|
||||||
margin-left 4px
|
margin-left 4px
|
||||||
|
|
||||||
&:not([data-is-me])
|
&:not([data-is-me])
|
||||||
> .avatar-anchor
|
> .avatar
|
||||||
left 12px
|
left 12px
|
||||||
|
|
||||||
> .content
|
> .content
|
||||||
@ -225,7 +217,7 @@ export default Vue.extend({
|
|||||||
text-align left
|
text-align left
|
||||||
|
|
||||||
&[data-is-me]
|
&[data-is-me]
|
||||||
> .avatar-anchor
|
> .avatar
|
||||||
right 12px
|
right 12px
|
||||||
|
|
||||||
> .content
|
> .content
|
||||||
|
@ -256,7 +256,7 @@ export default Vue.extend({
|
|||||||
padding 16px 8px 8px 8px
|
padding 16px 8px 8px 8px
|
||||||
text-align center
|
text-align center
|
||||||
font-size 0.8em
|
font-size 0.8em
|
||||||
color rgba(0, 0, 0, 0.4)
|
color rgba(#000, 0.4)
|
||||||
|
|
||||||
[data-fa]
|
[data-fa]
|
||||||
margin-right 4px
|
margin-right 4px
|
||||||
@ -267,7 +267,7 @@ export default Vue.extend({
|
|||||||
padding 16px 8px 8px 8px
|
padding 16px 8px 8px 8px
|
||||||
text-align center
|
text-align center
|
||||||
font-size 0.8em
|
font-size 0.8em
|
||||||
color rgba(0, 0, 0, 0.4)
|
color rgba(#000, 0.4)
|
||||||
|
|
||||||
[data-fa]
|
[data-fa]
|
||||||
margin-right 4px
|
margin-right 4px
|
||||||
@ -278,7 +278,7 @@ export default Vue.extend({
|
|||||||
padding 16px
|
padding 16px
|
||||||
text-align center
|
text-align center
|
||||||
font-size 0.8em
|
font-size 0.8em
|
||||||
color rgba(0, 0, 0, 0.4)
|
color rgba(#000, 0.4)
|
||||||
|
|
||||||
[data-fa]
|
[data-fa]
|
||||||
margin-right 4px
|
margin-right 4px
|
||||||
@ -289,14 +289,14 @@ export default Vue.extend({
|
|||||||
padding 0 12px
|
padding 0 12px
|
||||||
line-height 24px
|
line-height 24px
|
||||||
color #fff
|
color #fff
|
||||||
background rgba(0, 0, 0, 0.3)
|
background rgba(#000, 0.3)
|
||||||
border-radius 12px
|
border-radius 12px
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
background rgba(0, 0, 0, 0.4)
|
background rgba(#000, 0.4)
|
||||||
|
|
||||||
&:active
|
&:active
|
||||||
background rgba(0, 0, 0, 0.5)
|
background rgba(#000, 0.5)
|
||||||
|
|
||||||
&.fetching
|
&.fetching
|
||||||
cursor wait
|
cursor wait
|
||||||
@ -322,7 +322,7 @@ export default Vue.extend({
|
|||||||
left 0
|
left 0
|
||||||
right 0
|
right 0
|
||||||
margin 0 auto
|
margin 0 auto
|
||||||
background rgba(0, 0, 0, 0.1)
|
background rgba(#000, 0.1)
|
||||||
|
|
||||||
> span
|
> span
|
||||||
display inline-block
|
display inline-block
|
||||||
@ -330,7 +330,7 @@ export default Vue.extend({
|
|||||||
padding 0 16px
|
padding 0 16px
|
||||||
//font-weight bold
|
//font-weight bold
|
||||||
line-height 32px
|
line-height 32px
|
||||||
color rgba(0, 0, 0, 0.3)
|
color rgba(#000, 0.3)
|
||||||
background #fff
|
background #fff
|
||||||
|
|
||||||
> footer
|
> footer
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
@click="navigate(user)"
|
@click="navigate(user)"
|
||||||
tabindex="-1"
|
tabindex="-1"
|
||||||
>
|
>
|
||||||
<img class="avatar" :src="`${user.avatarUrl}?thumbnail&size=32`" alt=""/>
|
<mk-avatar class="avatar" :user="user"/>
|
||||||
<span class="name">{{ user | userName }}</span>
|
<span class="name">{{ user | userName }}</span>
|
||||||
<span class="username">@{{ user | acct }}</span>
|
<span class="username">@{{ user | acct }}</span>
|
||||||
</li>
|
</li>
|
||||||
@ -31,7 +31,7 @@
|
|||||||
:key="message.id"
|
:key="message.id"
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<img class="avatar" :src="`${isMe(message) ? message.recipient.avatarUrl : message.user.avatarUrl}?thumbnail&size=64`" alt=""/>
|
<mk-avatar class="avatar" :user="isMe(message) ? message.recipient : message.user"/>
|
||||||
<header>
|
<header>
|
||||||
<span class="name">{{ isMe(message) ? message.recipient : message.user | userName }}</span>
|
<span class="name">{{ isMe(message) ? message.recipient : message.user | userName }}</span>
|
||||||
<span class="username">@{{ isMe(message) ? message.recipient : message.user | acct }}</span>
|
<span class="username">@{{ isMe(message) ? message.recipient : message.user | acct }}</span>
|
||||||
@ -205,7 +205,7 @@ root(isDark)
|
|||||||
z-index 1
|
z-index 1
|
||||||
width 100%
|
width 100%
|
||||||
background #fff
|
background #fff
|
||||||
box-shadow 0 0px 2px rgba(0, 0, 0, 0.2)
|
box-shadow 0 0px 2px rgba(#000, 0.2)
|
||||||
|
|
||||||
> .form
|
> .form
|
||||||
padding 8px
|
padding 8px
|
||||||
@ -279,7 +279,7 @@ root(isDark)
|
|||||||
vertical-align top
|
vertical-align top
|
||||||
white-space nowrap
|
white-space nowrap
|
||||||
overflow hidden
|
overflow hidden
|
||||||
color rgba(0, 0, 0, 0.8)
|
color rgba(#000, 0.8)
|
||||||
text-decoration none
|
text-decoration none
|
||||||
transition none
|
transition none
|
||||||
cursor pointer
|
cursor pointer
|
||||||
@ -318,11 +318,11 @@ root(isDark)
|
|||||||
margin 0 8px 0 0
|
margin 0 8px 0 0
|
||||||
/*font-weight bold*/
|
/*font-weight bold*/
|
||||||
font-weight normal
|
font-weight normal
|
||||||
color rgba(0, 0, 0, 0.8)
|
color rgba(#000, 0.8)
|
||||||
|
|
||||||
.username
|
.username
|
||||||
font-weight normal
|
font-weight normal
|
||||||
color rgba(0, 0, 0, 0.3)
|
color rgba(#000, 0.3)
|
||||||
|
|
||||||
> .history
|
> .history
|
||||||
|
|
||||||
@ -383,17 +383,17 @@ root(isDark)
|
|||||||
overflow hidden
|
overflow hidden
|
||||||
text-overflow ellipsis
|
text-overflow ellipsis
|
||||||
font-size 1em
|
font-size 1em
|
||||||
color isDark ? #fff : rgba(0, 0, 0, 0.9)
|
color isDark ? #fff : rgba(#000, 0.9)
|
||||||
font-weight bold
|
font-weight bold
|
||||||
transition all 0.1s ease
|
transition all 0.1s ease
|
||||||
|
|
||||||
> .username
|
> .username
|
||||||
margin 0 8px
|
margin 0 8px
|
||||||
color isDark ? #606984 : rgba(0, 0, 0, 0.5)
|
color isDark ? #606984 : rgba(#000, 0.5)
|
||||||
|
|
||||||
> .mk-time
|
> .mk-time
|
||||||
margin 0 0 0 auto
|
margin 0 0 0 auto
|
||||||
color isDark ? #606984 : rgba(0, 0, 0, 0.5)
|
color isDark ? #606984 : rgba(#000, 0.5)
|
||||||
font-size 80%
|
font-size 80%
|
||||||
|
|
||||||
> .avatar
|
> .avatar
|
||||||
@ -413,10 +413,10 @@ root(isDark)
|
|||||||
overflow hidden
|
overflow hidden
|
||||||
overflow-wrap break-word
|
overflow-wrap break-word
|
||||||
font-size 1.1em
|
font-size 1.1em
|
||||||
color isDark ? #fff : rgba(0, 0, 0, 0.8)
|
color isDark ? #fff : rgba(#000, 0.8)
|
||||||
|
|
||||||
.me
|
.me
|
||||||
color isDark ? rgba(#fff, 0.7) : rgba(0, 0, 0, 0.4)
|
color isDark ? rgba(#fff, 0.7) : rgba(#000, 0.4)
|
||||||
|
|
||||||
> .image
|
> .image
|
||||||
display block
|
display block
|
||||||
|
@ -105,7 +105,7 @@ $border-color = rgba(27, 31, 35, 0.15)
|
|||||||
z-index 10000
|
z-index 10000
|
||||||
width 100%
|
width 100%
|
||||||
height 100%
|
height 100%
|
||||||
background rgba(0, 0, 0, 0.1)
|
background rgba(#000, 0.1)
|
||||||
opacity 0
|
opacity 0
|
||||||
|
|
||||||
> .popover
|
> .popover
|
||||||
|
@ -88,10 +88,10 @@ root(isDark)
|
|||||||
cursor pointer
|
cursor pointer
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
background rgba(0, 0, 0, 0.05)
|
background rgba(#000, 0.05)
|
||||||
|
|
||||||
&:active
|
&:active
|
||||||
background rgba(0, 0, 0, 0.1)
|
background rgba(#000, 0.1)
|
||||||
|
|
||||||
> .backdrop
|
> .backdrop
|
||||||
position absolute
|
position absolute
|
||||||
|
@ -91,7 +91,7 @@ export default Vue.extend({
|
|||||||
width 100%
|
width 100%
|
||||||
line-height 44px
|
line-height 44px
|
||||||
font-size 1em
|
font-size 1em
|
||||||
color rgba(0, 0, 0, 0.7)
|
color rgba(#000, 0.7)
|
||||||
background #fff
|
background #fff
|
||||||
outline none
|
outline none
|
||||||
border solid 1px #eee
|
border solid 1px #eee
|
||||||
@ -117,7 +117,7 @@ export default Vue.extend({
|
|||||||
margin -6px 0 0 0
|
margin -6px 0 0 0
|
||||||
width 100%
|
width 100%
|
||||||
font-size 1.2em
|
font-size 1.2em
|
||||||
color rgba(0, 0, 0, 0.5)
|
color rgba(#000, 0.5)
|
||||||
outline none
|
outline none
|
||||||
border none
|
border none
|
||||||
border-radius 0
|
border-radius 0
|
||||||
|
@ -234,13 +234,13 @@ export default Vue.extend({
|
|||||||
color #333 !important
|
color #333 !important
|
||||||
background #fff !important
|
background #fff !important
|
||||||
outline none
|
outline none
|
||||||
border solid 1px rgba(0, 0, 0, 0.1)
|
border solid 1px rgba(#000, 0.1)
|
||||||
border-radius 4px
|
border-radius 4px
|
||||||
box-shadow 0 0 0 114514px #fff inset
|
box-shadow 0 0 0 114514px #fff inset
|
||||||
transition all .3s ease
|
transition all .3s ease
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
border-color rgba(0, 0, 0, 0.2)
|
border-color rgba(#000, 0.2)
|
||||||
transition all .1s ease
|
transition all .1s ease
|
||||||
|
|
||||||
&:focus
|
&:focus
|
||||||
|
@ -73,7 +73,7 @@ export default Vue.extend({
|
|||||||
padding 6px 12px
|
padding 6px 12px
|
||||||
font-size 0.9em
|
font-size 0.9em
|
||||||
color #fff
|
color #fff
|
||||||
background rgba(0, 0, 0, 0.8)
|
background rgba(#000, 0.8)
|
||||||
border-radius 4px
|
border-radius 4px
|
||||||
|
|
||||||
> p
|
> p
|
||||||
|
223
src/client/app/common/views/components/visibility-chooser.vue
Normal file
223
src/client/app/common/views/components/visibility-chooser.vue
Normal file
@ -0,0 +1,223 @@
|
|||||||
|
<template>
|
||||||
|
<div class="mk-visibility-chooser">
|
||||||
|
<div class="backdrop" ref="backdrop" @click="close"></div>
|
||||||
|
<div class="popover" :class="{ compact }" ref="popover">
|
||||||
|
<div @click="choose('public')" :class="{ active: v == 'public' }">
|
||||||
|
<div>%fa:globe%</div>
|
||||||
|
<div>
|
||||||
|
<span>公開</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div @click="choose('home')" :class="{ active: v == 'home' }">
|
||||||
|
<div>%fa:home%</div>
|
||||||
|
<div>
|
||||||
|
<span>ホーム</span>
|
||||||
|
<span>ホームタイムラインにのみ公開</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div @click="choose('followers')" :class="{ active: v == 'followers' }">
|
||||||
|
<div>%fa:unlock%</div>
|
||||||
|
<div>
|
||||||
|
<span>フォロワー</span>
|
||||||
|
<span>自分のフォロワーにのみ公開</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div @click="choose('specified')" :class="{ active: v == 'specified' }">
|
||||||
|
<div>%fa:envelope%</div>
|
||||||
|
<div>
|
||||||
|
<span>ダイレクト</span>
|
||||||
|
<span>指定したユーザーにのみ公開</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div @click="choose('private')" :class="{ active: v == 'private' }">
|
||||||
|
<div>%fa:lock%</div>
|
||||||
|
<div>
|
||||||
|
<span>非公開</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
import Vue from 'vue';
|
||||||
|
import * as anime from 'animejs';
|
||||||
|
|
||||||
|
export default Vue.extend({
|
||||||
|
props: ['source', 'compact', 'v'],
|
||||||
|
mounted() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
const popover = this.$refs.popover as any;
|
||||||
|
|
||||||
|
const rect = this.source.getBoundingClientRect();
|
||||||
|
const width = popover.offsetWidth;
|
||||||
|
const height = popover.offsetHeight;
|
||||||
|
|
||||||
|
let left;
|
||||||
|
let top;
|
||||||
|
|
||||||
|
if (this.compact) {
|
||||||
|
const x = rect.left + window.pageXOffset + (this.source.offsetWidth / 2);
|
||||||
|
const y = rect.top + window.pageYOffset + (this.source.offsetHeight / 2);
|
||||||
|
left = (x - (width / 2));
|
||||||
|
top = (y - (height / 2));
|
||||||
|
} else {
|
||||||
|
const x = rect.left + window.pageXOffset + (this.source.offsetWidth / 2);
|
||||||
|
const y = rect.top + window.pageYOffset + this.source.offsetHeight;
|
||||||
|
left = (x - (width / 2));
|
||||||
|
top = y;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (left + width > window.innerWidth) {
|
||||||
|
left = window.innerWidth - width;
|
||||||
|
}
|
||||||
|
|
||||||
|
popover.style.left = left + 'px';
|
||||||
|
popover.style.top = top + 'px';
|
||||||
|
|
||||||
|
anime({
|
||||||
|
targets: this.$refs.backdrop,
|
||||||
|
opacity: 1,
|
||||||
|
duration: 100,
|
||||||
|
easing: 'linear'
|
||||||
|
});
|
||||||
|
|
||||||
|
anime({
|
||||||
|
targets: this.$refs.popover,
|
||||||
|
opacity: 1,
|
||||||
|
scale: [0.5, 1],
|
||||||
|
duration: 500
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
choose(visibility) {
|
||||||
|
this.$emit('chosen', visibility);
|
||||||
|
this.$destroy();
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
(this.$refs.backdrop as any).style.pointerEvents = 'none';
|
||||||
|
anime({
|
||||||
|
targets: this.$refs.backdrop,
|
||||||
|
opacity: 0,
|
||||||
|
duration: 200,
|
||||||
|
easing: 'linear'
|
||||||
|
});
|
||||||
|
|
||||||
|
(this.$refs.popover as any).style.pointerEvents = 'none';
|
||||||
|
anime({
|
||||||
|
targets: this.$refs.popover,
|
||||||
|
opacity: 0,
|
||||||
|
scale: 0.5,
|
||||||
|
duration: 200,
|
||||||
|
easing: 'easeInBack',
|
||||||
|
complete: () => this.$destroy()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="stylus" scoped>
|
||||||
|
@import '~const.styl'
|
||||||
|
|
||||||
|
$border-color = rgba(27, 31, 35, 0.15)
|
||||||
|
|
||||||
|
root(isDark)
|
||||||
|
position initial
|
||||||
|
|
||||||
|
> .backdrop
|
||||||
|
position fixed
|
||||||
|
top 0
|
||||||
|
left 0
|
||||||
|
z-index 10000
|
||||||
|
width 100%
|
||||||
|
height 100%
|
||||||
|
background isDark ? rgba(#000, 0.4) : rgba(#000, 0.1)
|
||||||
|
opacity 0
|
||||||
|
|
||||||
|
> .popover
|
||||||
|
$bgcolor = isDark ? #2c303c : #fff
|
||||||
|
position absolute
|
||||||
|
z-index 10001
|
||||||
|
width 240px
|
||||||
|
padding 8px 0
|
||||||
|
background $bgcolor
|
||||||
|
border 1px solid $border-color
|
||||||
|
border-radius 4px
|
||||||
|
box-shadow 0 3px 12px rgba(27, 31, 35, 0.15)
|
||||||
|
transform scale(0.5)
|
||||||
|
opacity 0
|
||||||
|
|
||||||
|
$balloon-size = 10px
|
||||||
|
|
||||||
|
&:not(.compact)
|
||||||
|
margin-top $balloon-size
|
||||||
|
transform-origin center -($balloon-size)
|
||||||
|
|
||||||
|
&:before
|
||||||
|
content ""
|
||||||
|
display block
|
||||||
|
position absolute
|
||||||
|
top -($balloon-size * 2)
|
||||||
|
left s('calc(50% - %s)', $balloon-size)
|
||||||
|
border-top solid $balloon-size transparent
|
||||||
|
border-left solid $balloon-size transparent
|
||||||
|
border-right solid $balloon-size transparent
|
||||||
|
border-bottom solid $balloon-size $border-color
|
||||||
|
|
||||||
|
&:after
|
||||||
|
content ""
|
||||||
|
display block
|
||||||
|
position absolute
|
||||||
|
top -($balloon-size * 2) + 1.5px
|
||||||
|
left s('calc(50% - %s)', $balloon-size)
|
||||||
|
border-top solid $balloon-size transparent
|
||||||
|
border-left solid $balloon-size transparent
|
||||||
|
border-right solid $balloon-size transparent
|
||||||
|
border-bottom solid $balloon-size $bgcolor
|
||||||
|
|
||||||
|
> div
|
||||||
|
display flex
|
||||||
|
padding 8px 14px
|
||||||
|
font-size 12px
|
||||||
|
color isDark ? #fff : #666
|
||||||
|
cursor pointer
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
background isDark ? #252731 : #eee
|
||||||
|
|
||||||
|
&:active
|
||||||
|
background isDark ? #21242b : #ddd
|
||||||
|
|
||||||
|
&.active
|
||||||
|
color $theme-color-foreground
|
||||||
|
background $theme-color
|
||||||
|
|
||||||
|
> *
|
||||||
|
user-select none
|
||||||
|
pointer-events none
|
||||||
|
|
||||||
|
> *:first-child
|
||||||
|
display flex
|
||||||
|
justify-content center
|
||||||
|
align-items center
|
||||||
|
margin-right 10px
|
||||||
|
|
||||||
|
> *:last-child
|
||||||
|
flex 1 1 auto
|
||||||
|
|
||||||
|
> span:first-child
|
||||||
|
display block
|
||||||
|
font-weight bold
|
||||||
|
|
||||||
|
> span:last-child:not(:first-child)
|
||||||
|
opacity 0.6
|
||||||
|
|
||||||
|
.mk-visibility-chooser[data-darkmode]
|
||||||
|
root(true)
|
||||||
|
|
||||||
|
.mk-visibility-chooser:not([data-darkmode])
|
||||||
|
root(false)
|
||||||
|
|
||||||
|
</style>
|
@ -1,9 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mk-welcome-timeline">
|
<div class="mk-welcome-timeline">
|
||||||
<div v-for="note in notes">
|
<div v-for="note in notes">
|
||||||
<router-link class="avatar-anchor" :to="note.user | userPage" v-user-preview="note.user.id">
|
<mk-avatar class="avatar" :user="note.user" target="_blank"/>
|
||||||
<img class="avatar" :src="`${note.user.avatarUrl}?thumbnail&size=96`" alt="avatar"/>
|
|
||||||
</router-link>
|
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<header>
|
<header>
|
||||||
<router-link class="name" :to="note.user | userPage" v-user-preview="note.user.id">{{ note.user | userName }}</router-link>
|
<router-link class="name" :to="note.user | userPage" v-user-preview="note.user.id">{{ note.user | userName }}</router-link>
|
||||||
@ -62,25 +60,22 @@ export default Vue.extend({
|
|||||||
overflow-wrap break-word
|
overflow-wrap break-word
|
||||||
font-size .9em
|
font-size .9em
|
||||||
color #4C4C4C
|
color #4C4C4C
|
||||||
border-bottom 1px solid rgba(0, 0, 0, 0.05)
|
border-bottom 1px solid rgba(#000, 0.05)
|
||||||
|
|
||||||
&:after
|
&:after
|
||||||
content ""
|
content ""
|
||||||
display block
|
display block
|
||||||
clear both
|
clear both
|
||||||
|
|
||||||
> .avatar-anchor
|
> .avatar
|
||||||
display block
|
display block
|
||||||
float left
|
float left
|
||||||
position -webkit-sticky
|
position -webkit-sticky
|
||||||
position sticky
|
position sticky
|
||||||
top 16px
|
top 16px
|
||||||
|
width 42px
|
||||||
> img
|
height 42px
|
||||||
display block
|
border-radius 6px
|
||||||
width 42px
|
|
||||||
height 42px
|
|
||||||
border-radius 6px
|
|
||||||
|
|
||||||
> .body
|
> .body
|
||||||
float right
|
float right
|
||||||
|
@ -61,6 +61,7 @@ export default define({
|
|||||||
} else {
|
} else {
|
||||||
this.props.design++;
|
this.props.design++;
|
||||||
}
|
}
|
||||||
|
this.save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -78,7 +79,7 @@ export default define({
|
|||||||
color #555
|
color #555
|
||||||
|
|
||||||
&:nth-child(odd)
|
&:nth-child(odd)
|
||||||
background rgba(0, 0, 0, 0.025)
|
background rgba(#000, 0.025)
|
||||||
|
|
||||||
> b
|
> b
|
||||||
margin-right 4px
|
margin-right 4px
|
||||||
|
@ -68,6 +68,7 @@ export default define({
|
|||||||
} else {
|
} else {
|
||||||
this.props.design++;
|
this.props.design++;
|
||||||
}
|
}
|
||||||
|
this.save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -73,6 +73,7 @@ export default define({
|
|||||||
} else {
|
} else {
|
||||||
this.props.design++;
|
this.props.design++;
|
||||||
}
|
}
|
||||||
|
this.save();
|
||||||
},
|
},
|
||||||
tick() {
|
tick() {
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
@ -113,7 +114,7 @@ root(isDark)
|
|||||||
padding 16px 0
|
padding 16px 0
|
||||||
color isDark ? #c5ced6 :#777
|
color isDark ? #c5ced6 :#777
|
||||||
background isDark ? #282C37 : #fff
|
background isDark ? #282C37 : #fff
|
||||||
border solid 1px rgba(0, 0, 0, 0.075)
|
border solid 1px rgba(#000, 0.075)
|
||||||
border-radius 6px
|
border-radius 6px
|
||||||
|
|
||||||
&[data-special='on-new-years-day']
|
&[data-special='on-new-years-day']
|
||||||
@ -126,7 +127,7 @@ root(isDark)
|
|||||||
&[data-mobile]
|
&[data-mobile]
|
||||||
border none
|
border none
|
||||||
border-radius 8px
|
border-radius 8px
|
||||||
box-shadow 0 0 0 1px rgba(0, 0, 0, 0.2)
|
box-shadow 0 0 0 1px rgba(#000, 0.2)
|
||||||
|
|
||||||
&:after
|
&:after
|
||||||
content ""
|
content ""
|
||||||
|
@ -46,7 +46,7 @@ root(isDark)
|
|||||||
border none
|
border none
|
||||||
background #ead8bb
|
background #ead8bb
|
||||||
border-radius 8px
|
border-radius 8px
|
||||||
box-shadow 0 0 0 1px rgba(0, 0, 0, 0.2)
|
box-shadow 0 0 0 1px rgba(#000, 0.2)
|
||||||
|
|
||||||
> article
|
> article
|
||||||
> h1
|
> h1
|
||||||
|
@ -59,6 +59,8 @@ export default define({
|
|||||||
} else {
|
} else {
|
||||||
this.props.design++;
|
this.props.design++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -40,6 +40,7 @@ export default define({
|
|||||||
methods: {
|
methods: {
|
||||||
func() {
|
func() {
|
||||||
this.props.compact = !this.props.compact;
|
this.props.compact = !this.props.compact;
|
||||||
|
this.save();
|
||||||
},
|
},
|
||||||
fetch() {
|
fetch() {
|
||||||
fetch(`https://api.rss2json.com/v1/api.json?rss_url=${this.url}`, {
|
fetch(`https://api.rss2json.com/v1/api.json?rss_url=${this.url}`, {
|
||||||
@ -92,7 +93,7 @@ root(isDark)
|
|||||||
padding 8px 16px
|
padding 8px 16px
|
||||||
|
|
||||||
&:nth-child(even)
|
&:nth-child(even)
|
||||||
background rgba(0, 0, 0, 0.05)
|
background rgba(#000, 0.05)
|
||||||
|
|
||||||
.mkw-rss[data-darkmode]
|
.mkw-rss[data-darkmode]
|
||||||
root(true)
|
root(true)
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
cx="50%" cy="50%"
|
cx="50%" cy="50%"
|
||||||
fill="none"
|
fill="none"
|
||||||
stroke-width="0.1"
|
stroke-width="0.1"
|
||||||
stroke="rgba(0, 0, 0, 0.05)"/>
|
stroke="rgba(#000, 0.05)"/>
|
||||||
<circle
|
<circle
|
||||||
:r="r"
|
:r="r"
|
||||||
cx="50%" cy="50%"
|
cx="50%" cy="50%"
|
||||||
@ -56,7 +56,7 @@ root(isDark)
|
|||||||
|
|
||||||
> text
|
> text
|
||||||
font-size 0.15px
|
font-size 0.15px
|
||||||
fill isDark ? rgba(#fff, 0.6) : rgba(0, 0, 0, 0.6)
|
fill isDark ? rgba(#fff, 0.6) : rgba(#000, 0.6)
|
||||||
|
|
||||||
svg[data-darkmode]
|
svg[data-darkmode]
|
||||||
root(true)
|
root(true)
|
||||||
|
@ -68,6 +68,7 @@ export default define({
|
|||||||
} else {
|
} else {
|
||||||
this.props.view++;
|
this.props.view++;
|
||||||
}
|
}
|
||||||
|
this.save();
|
||||||
},
|
},
|
||||||
func() {
|
func() {
|
||||||
if (this.props.design == 2) {
|
if (this.props.design == 2) {
|
||||||
@ -75,6 +76,7 @@ export default define({
|
|||||||
} else {
|
} else {
|
||||||
this.props.design++;
|
this.props.design++;
|
||||||
}
|
}
|
||||||
|
this.save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -64,6 +64,7 @@ export default define({
|
|||||||
} else {
|
} else {
|
||||||
this.props.size++;
|
this.props.size++;
|
||||||
}
|
}
|
||||||
|
this.save();
|
||||||
|
|
||||||
this.applySize();
|
this.applySize();
|
||||||
},
|
},
|
||||||
@ -111,6 +112,7 @@ export default define({
|
|||||||
choose() {
|
choose() {
|
||||||
(this as any).apis.chooseDriveFolder().then(folder => {
|
(this as any).apis.chooseDriveFolder().then(folder => {
|
||||||
this.props.folder = folder ? folder.id : null;
|
this.props.folder = folder ? folder.id : null;
|
||||||
|
this.save();
|
||||||
this.fetch();
|
this.fetch();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -122,13 +124,13 @@ export default define({
|
|||||||
.mkw-slideshow
|
.mkw-slideshow
|
||||||
overflow hidden
|
overflow hidden
|
||||||
background #fff
|
background #fff
|
||||||
border solid 1px rgba(0, 0, 0, 0.075)
|
border solid 1px rgba(#000, 0.075)
|
||||||
border-radius 6px
|
border-radius 6px
|
||||||
|
|
||||||
&[data-mobile]
|
&[data-mobile]
|
||||||
border none
|
border none
|
||||||
border-radius 8px
|
border-radius 8px
|
||||||
box-shadow 0 0 0 1px rgba(0, 0, 0, 0.2)
|
box-shadow 0 0 0 1px rgba(#000, 0.2)
|
||||||
|
|
||||||
> div
|
> div
|
||||||
width 100%
|
width 100%
|
||||||
|
@ -61,6 +61,6 @@ svg
|
|||||||
|
|
||||||
&.day
|
&.day
|
||||||
&:hover
|
&:hover
|
||||||
fill rgba(0, 0, 0, 0.05)
|
fill rgba(#000, 0.05)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -136,7 +136,7 @@ export default Vue.extend({
|
|||||||
root(isDark)
|
root(isDark)
|
||||||
color isDark ? #c5ced6 : #777
|
color isDark ? #c5ced6 : #777
|
||||||
background isDark ? #282C37 : #fff
|
background isDark ? #282C37 : #fff
|
||||||
border solid 1px rgba(0, 0, 0, 0.075)
|
border solid 1px rgba(#000, 0.075)
|
||||||
border-radius 6px
|
border-radius 6px
|
||||||
|
|
||||||
&[data-melt]
|
&[data-melt]
|
||||||
@ -152,7 +152,7 @@ root(isDark)
|
|||||||
font-size 0.9em
|
font-size 0.9em
|
||||||
font-weight bold
|
font-weight bold
|
||||||
color #888
|
color #888
|
||||||
box-shadow 0 1px rgba(0, 0, 0, 0.07)
|
box-shadow 0 1px rgba(#000, 0.07)
|
||||||
|
|
||||||
> [data-fa]
|
> [data-fa]
|
||||||
margin-right 4px
|
margin-right 4px
|
||||||
@ -214,10 +214,10 @@ root(isDark)
|
|||||||
border-radius 6px
|
border-radius 6px
|
||||||
|
|
||||||
&:hover > div
|
&:hover > div
|
||||||
background rgba(0, 0, 0, 0.025)
|
background rgba(#000, 0.025)
|
||||||
|
|
||||||
&:active > div
|
&:active > div
|
||||||
background rgba(0, 0, 0, 0.05)
|
background rgba(#000, 0.05)
|
||||||
|
|
||||||
&[data-is-donichi]
|
&[data-is-donichi]
|
||||||
color #ef95a0
|
color #ef95a0
|
||||||
@ -233,10 +233,10 @@ root(isDark)
|
|||||||
font-weight bold
|
font-weight bold
|
||||||
|
|
||||||
> div
|
> div
|
||||||
background rgba(0, 0, 0, 0.025)
|
background rgba(#000, 0.025)
|
||||||
|
|
||||||
&:active > div
|
&:active > div
|
||||||
background rgba(0, 0, 0, 0.05)
|
background rgba(#000, 0.05)
|
||||||
|
|
||||||
&[data-today]
|
&[data-today]
|
||||||
> div
|
> div
|
||||||
|
@ -106,7 +106,7 @@ root(isDark)
|
|||||||
width $width
|
width $width
|
||||||
background isDark ? #282c37 :#fff
|
background isDark ? #282c37 :#fff
|
||||||
border-radius 0 4px 4px 4px
|
border-radius 0 4px 4px 4px
|
||||||
box-shadow 2px 2px 8px rgba(0, 0, 0, 0.2)
|
box-shadow 2px 2px 8px rgba(#000, 0.2)
|
||||||
transition visibility 0s linear 0.2s
|
transition visibility 0s linear 0.2s
|
||||||
|
|
||||||
.menu[data-darkmode]
|
.menu[data-darkmode]
|
||||||
|
@ -68,7 +68,7 @@ root(isDark)
|
|||||||
font-size 0.8em
|
font-size 0.8em
|
||||||
background isDark ? #282c37 : #fff
|
background isDark ? #282c37 : #fff
|
||||||
border-radius 0 4px 4px 4px
|
border-radius 0 4px 4px 4px
|
||||||
box-shadow 2px 2px 8px rgba(0, 0, 0, 0.2)
|
box-shadow 2px 2px 8px rgba(#000, 0.2)
|
||||||
opacity 0
|
opacity 0
|
||||||
|
|
||||||
.context-menu[data-darkmode]
|
.context-menu[data-darkmode]
|
||||||
|
@ -102,7 +102,7 @@ export default Vue.extend({
|
|||||||
left 0
|
left 0
|
||||||
width 100%
|
width 100%
|
||||||
height 100%
|
height 100%
|
||||||
background rgba(0, 0, 0, 0.7)
|
background rgba(#000, 0.7)
|
||||||
opacity 0
|
opacity 0
|
||||||
pointer-events none
|
pointer-events none
|
||||||
|
|
||||||
|
@ -195,7 +195,7 @@ root(isDark)
|
|||||||
cursor pointer
|
cursor pointer
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
background rgba(0, 0, 0, 0.05)
|
background rgba(#000, 0.05)
|
||||||
|
|
||||||
> .label
|
> .label
|
||||||
&:before
|
&:before
|
||||||
@ -203,7 +203,7 @@ root(isDark)
|
|||||||
background #0b65a5
|
background #0b65a5
|
||||||
|
|
||||||
&:active
|
&:active
|
||||||
background rgba(0, 0, 0, 0.1)
|
background rgba(#000, 0.1)
|
||||||
|
|
||||||
> .label
|
> .label
|
||||||
&:before
|
&:before
|
||||||
|
@ -587,7 +587,7 @@ root(isDark)
|
|||||||
font-size 0.9em
|
font-size 0.9em
|
||||||
color isDark ? #d2d9dc : #555
|
color isDark ? #d2d9dc : #555
|
||||||
background isDark ? #282c37 : #fff
|
background isDark ? #282c37 : #fff
|
||||||
box-shadow 0 1px 0 rgba(0, 0, 0, 0.05)
|
box-shadow 0 1px 0 rgba(#000, 0.05)
|
||||||
|
|
||||||
&, *
|
&, *
|
||||||
user-select none
|
user-select none
|
||||||
@ -733,7 +733,7 @@ root(isDark)
|
|||||||
display inline-block
|
display inline-block
|
||||||
position absolute
|
position absolute
|
||||||
top 0
|
top 0
|
||||||
background-color rgba(0, 0, 0, 0.3)
|
background-color rgba(#000, 0.3)
|
||||||
border-radius 100%
|
border-radius 100%
|
||||||
|
|
||||||
animation sk-bounce 2.0s infinite ease-in-out
|
animation sk-bounce 2.0s infinite ease-in-out
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
display inline-block
|
display inline-block
|
||||||
width 18px
|
width 18px
|
||||||
height 18px
|
height 18px
|
||||||
background-color rgba(0, 0, 0, 0.3)
|
background-color rgba(#000, 0.3)
|
||||||
border-radius 100%
|
border-radius 100%
|
||||||
animation bounce 1.4s infinite ease-in-out both
|
animation bounce 1.4s infinite ease-in-out both
|
||||||
|
|
||||||
|
@ -3,9 +3,7 @@
|
|||||||
<p class="title">気になるユーザーをフォロー:</p>
|
<p class="title">気になるユーザーをフォロー:</p>
|
||||||
<div class="users" v-if="!fetching && users.length > 0">
|
<div class="users" v-if="!fetching && users.length > 0">
|
||||||
<div class="user" v-for="user in users" :key="user.id">
|
<div class="user" v-for="user in users" :key="user.id">
|
||||||
<router-link class="avatar-anchor" :to="user | userPage">
|
<mk-avatar class="avatar" :user="user" target="_blank"/>
|
||||||
<img class="avatar" :src="`${user.avatarUrl}?thumbnail&size=42`" alt="" v-user-preview="user.id"/>
|
|
||||||
</router-link>
|
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<router-link class="name" :to="user | userPage" v-user-preview="user.id">{{ user | userName }}</router-link>
|
<router-link class="name" :to="user | userPage" v-user-preview="user.id">{{ user | userName }}</router-link>
|
||||||
<p class="username">@{{ user | acct }}</p>
|
<p class="username">@{{ user | acct }}</p>
|
||||||
@ -86,18 +84,13 @@ export default Vue.extend({
|
|||||||
display block
|
display block
|
||||||
clear both
|
clear both
|
||||||
|
|
||||||
> .avatar-anchor
|
> .avatar
|
||||||
display block
|
display block
|
||||||
float left
|
float left
|
||||||
margin 0 12px 0 0
|
margin 0 12px 0 0
|
||||||
|
width 42px
|
||||||
> .avatar
|
height 42px
|
||||||
display block
|
border-radius 8px
|
||||||
width 42px
|
|
||||||
height 42px
|
|
||||||
margin 0
|
|
||||||
border-radius 8px
|
|
||||||
vertical-align bottom
|
|
||||||
|
|
||||||
> .body
|
> .body
|
||||||
float left
|
float left
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
<div class="main">
|
<div class="main">
|
||||||
<a @click="hint">カスタマイズのヒント</a>
|
<a @click="hint">カスタマイズのヒント</a>
|
||||||
<div>
|
<div>
|
||||||
<mk-post-form v-if="os.i.clientSettings.showPostFormOnTopOfTl"/>
|
<mk-post-form v-if="clientSettings.showPostFormOnTopOfTl"/>
|
||||||
<mk-timeline ref="tl" @loaded="onTlLoaded"/>
|
<mk-timeline ref="tl" @loaded="onTlLoaded"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -63,7 +63,7 @@
|
|||||||
<component v-for="widget in widgets[place]" :is="`mkw-${widget.name}`" :key="widget.id" :ref="widget.id" :widget="widget" @chosen="warp"/>
|
<component v-for="widget in widgets[place]" :is="`mkw-${widget.name}`" :key="widget.id" :ref="widget.id" :widget="widget" @chosen="warp"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<mk-post-form v-if="os.i.clientSettings.showPostFormOnTopOfTl"/>
|
<mk-post-form v-if="clientSettings.showPostFormOnTopOfTl"/>
|
||||||
<mk-timeline ref="tl" @loaded="onTlLoaded" v-if="mode == 'timeline'"/>
|
<mk-timeline ref="tl" @loaded="onTlLoaded" v-if="mode == 'timeline'"/>
|
||||||
<mk-mentions @loaded="onTlLoaded" v-if="mode == 'mentions'"/>
|
<mk-mentions @loaded="onTlLoaded" v-if="mode == 'mentions'"/>
|
||||||
</div>
|
</div>
|
||||||
@ -81,6 +81,7 @@ export default Vue.extend({
|
|||||||
components: {
|
components: {
|
||||||
XDraggable
|
XDraggable
|
||||||
},
|
},
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
customize: {
|
customize: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
@ -91,61 +92,43 @@ export default Vue.extend({
|
|||||||
default: 'timeline'
|
default: 'timeline'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
connection: null,
|
connection: null,
|
||||||
connectionId: null,
|
connectionId: null,
|
||||||
widgetAdderSelected: null,
|
widgetAdderSelected: null,
|
||||||
trash: [],
|
trash: []
|
||||||
widgets: {
|
|
||||||
left: [],
|
|
||||||
right: []
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
home: {
|
home(): any[] {
|
||||||
get(): any[] {
|
return this.$store.state.settings.data.home;
|
||||||
//#region 互換性のため
|
|
||||||
(this as any).os.i.clientSettings.home.forEach(w => {
|
|
||||||
if (w.name == 'rss-reader') w.name = 'rss';
|
|
||||||
if (w.name == 'user-recommendation') w.name = 'users';
|
|
||||||
if (w.name == 'recommended-polls') w.name = 'polls';
|
|
||||||
});
|
|
||||||
//#endregion
|
|
||||||
return (this as any).os.i.clientSettings.home;
|
|
||||||
},
|
|
||||||
set(value) {
|
|
||||||
(this as any).os.i.clientSettings.home = value;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
left(): any[] {
|
left(): any[] {
|
||||||
return this.home.filter(w => w.place == 'left');
|
return this.home.filter(w => w.place == 'left');
|
||||||
},
|
},
|
||||||
right(): any[] {
|
right(): any[] {
|
||||||
return this.home.filter(w => w.place == 'right');
|
return this.home.filter(w => w.place == 'right');
|
||||||
|
},
|
||||||
|
widgets(): any {
|
||||||
|
return {
|
||||||
|
left: this.left,
|
||||||
|
right: this.right
|
||||||
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
|
||||||
this.widgets.left = this.left;
|
|
||||||
this.widgets.right = this.right;
|
|
||||||
this.$watch('os.i.clientSettings', i => {
|
|
||||||
this.widgets.left = this.left;
|
|
||||||
this.widgets.right = this.right;
|
|
||||||
}, {
|
|
||||||
deep: true
|
|
||||||
});
|
|
||||||
},
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.connection = (this as any).os.stream.getConnection();
|
this.connection = (this as any).os.stream.getConnection();
|
||||||
this.connectionId = (this as any).os.stream.use();
|
this.connectionId = (this as any).os.stream.use();
|
||||||
|
|
||||||
this.connection.on('home_updated', this.onHomeUpdated);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
this.connection.off('home_updated', this.onHomeUpdated);
|
|
||||||
(this as any).os.stream.dispose(this.connectionId);
|
(this as any).os.stream.dispose(this.connectionId);
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
hint() {
|
hint() {
|
||||||
(this as any).apis.dialog({
|
(this as any).apis.dialog({
|
||||||
@ -159,56 +142,44 @@ export default Vue.extend({
|
|||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
onTlLoaded() {
|
onTlLoaded() {
|
||||||
this.$emit('loaded');
|
this.$emit('loaded');
|
||||||
},
|
},
|
||||||
onHomeUpdated(data) {
|
|
||||||
if (data.home) {
|
|
||||||
(this as any).os.i.clientSettings.home = data.home;
|
|
||||||
this.widgets.left = data.home.filter(w => w.place == 'left');
|
|
||||||
this.widgets.right = data.home.filter(w => w.place == 'right');
|
|
||||||
} else {
|
|
||||||
const w = (this as any).os.i.clientSettings.home.find(w => w.id == data.id);
|
|
||||||
if (w != null) {
|
|
||||||
w.data = data.data;
|
|
||||||
this.$refs[w.id][0].preventSave = true;
|
|
||||||
this.$refs[w.id][0].props = w.data;
|
|
||||||
this.widgets.left = (this as any).os.i.clientSettings.home.filter(w => w.place == 'left');
|
|
||||||
this.widgets.right = (this as any).os.i.clientSettings.home.filter(w => w.place == 'right');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onWidgetContextmenu(widgetId) {
|
onWidgetContextmenu(widgetId) {
|
||||||
const w = (this.$refs[widgetId] as any)[0];
|
const w = (this.$refs[widgetId] as any)[0];
|
||||||
if (w.func) w.func();
|
if (w.func) w.func();
|
||||||
},
|
},
|
||||||
|
|
||||||
onWidgetSort() {
|
onWidgetSort() {
|
||||||
this.saveHome();
|
this.saveHome();
|
||||||
},
|
},
|
||||||
|
|
||||||
onTrash(evt) {
|
onTrash(evt) {
|
||||||
this.saveHome();
|
this.saveHome();
|
||||||
},
|
},
|
||||||
|
|
||||||
addWidget() {
|
addWidget() {
|
||||||
const widget = {
|
this.$store.dispatch('settings/addHomeWidget', {
|
||||||
name: this.widgetAdderSelected,
|
name: this.widgetAdderSelected,
|
||||||
id: uuid(),
|
id: uuid(),
|
||||||
place: 'left',
|
place: 'left',
|
||||||
data: {}
|
data: {}
|
||||||
};
|
});
|
||||||
|
|
||||||
this.widgets.left.unshift(widget);
|
|
||||||
this.saveHome();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
saveHome() {
|
saveHome() {
|
||||||
const left = this.widgets.left;
|
const left = this.widgets.left;
|
||||||
const right = this.widgets.right;
|
const right = this.widgets.right;
|
||||||
this.home = left.concat(right);
|
this.$store.commit('settings/setHome', left.concat(right));
|
||||||
left.forEach(w => w.place = 'left');
|
left.forEach(w => w.place = 'left');
|
||||||
right.forEach(w => w.place = 'right');
|
right.forEach(w => w.place = 'right');
|
||||||
(this as any).api('i/update_home', {
|
(this as any).api('i/update_home', {
|
||||||
home: this.home
|
home: this.home
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
warp(date) {
|
warp(date) {
|
||||||
(this.$refs.tl as any).warp(date);
|
(this.$refs.tl as any).warp(date);
|
||||||
}
|
}
|
||||||
@ -251,7 +222,7 @@ root(isDark)
|
|||||||
height 48px
|
height 48px
|
||||||
color isDark ? #fff : #000
|
color isDark ? #fff : #000
|
||||||
background isDark ? #313543 : #f7f7f7
|
background isDark ? #313543 : #f7f7f7
|
||||||
box-shadow 0 1px 1px rgba(0, 0, 0, 0.075)
|
box-shadow 0 1px 1px rgba(#000, 0.075)
|
||||||
|
|
||||||
> a
|
> a
|
||||||
display block
|
display block
|
||||||
|
@ -52,7 +52,7 @@ export default Vue.extend({
|
|||||||
left 0
|
left 0
|
||||||
width 100%
|
width 100%
|
||||||
height 100%
|
height 100%
|
||||||
background rgba(0, 0, 0, 0.7)
|
background rgba(#000, 0.7)
|
||||||
|
|
||||||
> img
|
> img
|
||||||
position fixed
|
position fixed
|
||||||
|
@ -54,7 +54,7 @@ export default Vue.extend({
|
|||||||
left 0
|
left 0
|
||||||
width 100%
|
width 100%
|
||||||
height 100%
|
height 100%
|
||||||
background rgba(0, 0, 0, 0.7)
|
background rgba(#000, 0.7)
|
||||||
|
|
||||||
> video
|
> video
|
||||||
position fixed
|
position fixed
|
||||||
|
@ -85,7 +85,7 @@ export default Vue.extend({
|
|||||||
|
|
||||||
.mk-mentions
|
.mk-mentions
|
||||||
background #fff
|
background #fff
|
||||||
border solid 1px rgba(0, 0, 0, 0.075)
|
border solid 1px rgba(#000, 0.075)
|
||||||
border-radius 6px
|
border-radius 6px
|
||||||
|
|
||||||
> header
|
> header
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="sub" :title="title">
|
<div class="sub" :title="title">
|
||||||
<router-link class="avatar-anchor" :to="note.user | userPage">
|
<mk-avatar class="avatar" :user="note.user"/>
|
||||||
<img class="avatar" :src="`${note.user.avatarUrl}?thumbnail&size=64`" alt="avatar" v-user-preview="note.userId"/>
|
|
||||||
</router-link>
|
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<header>
|
<header>
|
||||||
<div class="left">
|
<div class="left">
|
||||||
@ -17,6 +15,7 @@
|
|||||||
</header>
|
</header>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<div class="text">
|
<div class="text">
|
||||||
|
<span v-if="note.isHidden" style="opacity: 0.5">(この投稿は非公開です)</span>
|
||||||
<mk-note-html v-if="note.text" :text="note.text" :i="os.i"/>
|
<mk-note-html v-if="note.text" :text="note.text" :i="os.i"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="media" v-if="note.mediaIds.length > 0">
|
<div class="media" v-if="note.mediaIds.length > 0">
|
||||||
@ -56,18 +55,13 @@ root(isDark)
|
|||||||
> .main > footer > button
|
> .main > footer > button
|
||||||
color #888
|
color #888
|
||||||
|
|
||||||
> .avatar-anchor
|
> .avatar
|
||||||
display block
|
display block
|
||||||
float left
|
float left
|
||||||
margin 0 16px 0 0
|
margin 0 16px 0 0
|
||||||
|
width 44px
|
||||||
> .avatar
|
height 44px
|
||||||
display block
|
border-radius 4px
|
||||||
width 44px
|
|
||||||
height 44px
|
|
||||||
margin 0
|
|
||||||
border-radius 4px
|
|
||||||
vertical-align bottom
|
|
||||||
|
|
||||||
> .main
|
> .main
|
||||||
float left
|
float left
|
||||||
|
@ -18,18 +18,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="renote" v-if="isRenote">
|
<div class="renote" v-if="isRenote">
|
||||||
<p>
|
<p>
|
||||||
<router-link class="avatar-anchor" :to="note.user | userPage" v-user-preview="note.userId">
|
<mk-avatar class="avatar" :user="note.user"/>
|
||||||
<img class="avatar" :src="`${note.user.avatarUrl}?thumbnail&size=32`" alt="avatar"/>
|
|
||||||
</router-link>
|
|
||||||
%fa:retweet%
|
%fa:retweet%
|
||||||
<router-link class="name" :href="note.user | userPage">{{ note.user | userName }}</router-link>
|
<router-link class="name" :href="note.user | userPage">{{ note.user | userName }}</router-link>
|
||||||
がRenote
|
がRenote
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<article>
|
<article>
|
||||||
<router-link class="avatar-anchor" :to="p.user | userPage">
|
<mk-avatar class="avatar" :user="p.user"/>
|
||||||
<img class="avatar" :src="`${p.user.avatarUrl}?thumbnail&size=64`" alt="avatar" v-user-preview="p.user.id"/>
|
|
||||||
</router-link>
|
|
||||||
<header>
|
<header>
|
||||||
<router-link class="name" :to="p.user | userPage" v-user-preview="p.user.id">{{ p.user | userName }}</router-link>
|
<router-link class="name" :to="p.user | userPage" v-user-preview="p.user.id">{{ p.user | userName }}</router-link>
|
||||||
<span class="username">@{{ p.user | acct }}</span>
|
<span class="username">@{{ p.user | acct }}</span>
|
||||||
@ -39,6 +35,7 @@
|
|||||||
</header>
|
</header>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<div class="text">
|
<div class="text">
|
||||||
|
<span v-if="p.isHidden" style="opacity: 0.5">(この投稿は非公開です)</span>
|
||||||
<mk-note-html v-if="p.text" :text="p.text" :i="os.i"/>
|
<mk-note-html v-if="p.text" :text="p.text" :i="os.i"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="media" v-if="p.media.length > 0">
|
<div class="media" v-if="p.media.length > 0">
|
||||||
@ -158,7 +155,7 @@ export default Vue.extend({
|
|||||||
|
|
||||||
// Draw map
|
// Draw map
|
||||||
if (this.p.geo) {
|
if (this.p.geo) {
|
||||||
const shouldShowMap = (this as any).os.isSignedIn ? (this as any).os.i.clientSettings.showMaps : true;
|
const shouldShowMap = (this as any).os.isSignedIn ? (this as any).clientSettings.showMaps : true;
|
||||||
if (shouldShowMap) {
|
if (shouldShowMap) {
|
||||||
(this as any).os.getGoogleMaps().then(maps => {
|
(this as any).os.getGoogleMaps().then(maps => {
|
||||||
const uluru = new maps.LatLng(this.p.geo.coordinates[1], this.p.geo.coordinates[0]);
|
const uluru = new maps.LatLng(this.p.geo.coordinates[1], this.p.geo.coordinates[0]);
|
||||||
@ -217,12 +214,12 @@ export default Vue.extend({
|
|||||||
@import '~const.styl'
|
@import '~const.styl'
|
||||||
|
|
||||||
root(isDark)
|
root(isDark)
|
||||||
margin 0
|
margin 0 auto
|
||||||
padding 0
|
padding 0
|
||||||
overflow hidden
|
overflow hidden
|
||||||
text-align left
|
text-align left
|
||||||
background isDark ? #282C37 : #fff
|
background isDark ? #282C37 : #fff
|
||||||
border solid 1px rgba(0, 0, 0, 0.1)
|
border solid 1px rgba(#000, 0.1)
|
||||||
border-radius 8px
|
border-radius 8px
|
||||||
|
|
||||||
> .read-more
|
> .read-more
|
||||||
@ -241,13 +238,13 @@ root(isDark)
|
|||||||
border-radius 6px 6px 0 0
|
border-radius 6px 6px 0 0
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
background #f6f6f6
|
background isDark ? #2e3440 : #f6f6f6
|
||||||
|
|
||||||
&:active
|
&:active
|
||||||
background #f0f0f0
|
background isDark ? #21242b : #f0f0f0
|
||||||
|
|
||||||
&:disabled
|
&:disabled
|
||||||
color #ccc
|
color isDark ? #21242b : #ccc
|
||||||
|
|
||||||
> .context
|
> .context
|
||||||
> *
|
> *
|
||||||
@ -261,17 +258,12 @@ root(isDark)
|
|||||||
margin 0
|
margin 0
|
||||||
padding 16px 32px
|
padding 16px 32px
|
||||||
|
|
||||||
.avatar-anchor
|
.avatar
|
||||||
display inline-block
|
display inline-block
|
||||||
|
width 28px
|
||||||
.avatar
|
height 28px
|
||||||
vertical-align bottom
|
margin 0 8px 0 0
|
||||||
min-width 28px
|
border-radius 6px
|
||||||
min-height 28px
|
|
||||||
max-width 28px
|
|
||||||
max-height 28px
|
|
||||||
margin 0 8px 0 0
|
|
||||||
border-radius 6px
|
|
||||||
|
|
||||||
[data-fa]
|
[data-fa]
|
||||||
margin-right 4px
|
margin-right 4px
|
||||||
@ -294,21 +286,13 @@ root(isDark)
|
|||||||
clear both
|
clear both
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
> .main > footer > button
|
> footer > button
|
||||||
color #888
|
color isDark ? #707b97 : #888
|
||||||
|
|
||||||
> .avatar-anchor
|
> .avatar
|
||||||
display block
|
|
||||||
width 60px
|
width 60px
|
||||||
height 60px
|
height 60px
|
||||||
|
border-radius 8px
|
||||||
> .avatar
|
|
||||||
display block
|
|
||||||
width 60px
|
|
||||||
height 60px
|
|
||||||
margin 0
|
|
||||||
border-radius 8px
|
|
||||||
vertical-align bottom
|
|
||||||
|
|
||||||
> header
|
> header
|
||||||
position absolute
|
position absolute
|
||||||
@ -340,7 +324,7 @@ root(isDark)
|
|||||||
top 0
|
top 0
|
||||||
right 32px
|
right 32px
|
||||||
font-size 1em
|
font-size 1em
|
||||||
color #c0c0c0
|
color isDark ? #606984 : #c0c0c0
|
||||||
|
|
||||||
> .body
|
> .body
|
||||||
padding 8px 0
|
padding 8px 0
|
||||||
@ -415,11 +399,11 @@ root(isDark)
|
|||||||
background transparent
|
background transparent
|
||||||
border none
|
border none
|
||||||
font-size 1em
|
font-size 1em
|
||||||
color #ddd
|
color isDark ? #606984 : #ccc
|
||||||
cursor pointer
|
cursor pointer
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
color #666
|
color isDark ? #9198af : #666
|
||||||
|
|
||||||
> .count
|
> .count
|
||||||
display inline
|
display inline
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mk-note-preview" :title="title">
|
<div class="mk-note-preview" :title="title">
|
||||||
<router-link class="avatar-anchor" :to="note.user | userPage">
|
<mk-avatar class="avatar" :user="note.user"/>
|
||||||
<img class="avatar" :src="`${note.user.avatarUrl}?thumbnail&size=64`" alt="avatar" v-user-preview="note.userId"/>
|
|
||||||
</router-link>
|
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<header>
|
<header>
|
||||||
<router-link class="name" :to="note.user | userPage" v-user-preview="note.userId">{{ note.user | userName }}</router-link>
|
<router-link class="name" :to="note.user | userPage" v-user-preview="note.userId">{{ note.user | userName }}</router-link>
|
||||||
@ -41,18 +39,13 @@ root(isDark)
|
|||||||
display block
|
display block
|
||||||
clear both
|
clear both
|
||||||
|
|
||||||
> .avatar-anchor
|
> .avatar
|
||||||
display block
|
display block
|
||||||
float left
|
float left
|
||||||
margin 0 16px 0 0
|
margin 0 16px 0 0
|
||||||
|
width 52px
|
||||||
> .avatar
|
height 52px
|
||||||
display block
|
border-radius 8px
|
||||||
width 52px
|
|
||||||
height 52px
|
|
||||||
margin 0
|
|
||||||
border-radius 8px
|
|
||||||
vertical-align bottom
|
|
||||||
|
|
||||||
> .main
|
> .main
|
||||||
float left
|
float left
|
||||||
|
@ -1,15 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="sub" :title="title">
|
<div class="sub" :title="title">
|
||||||
<router-link class="avatar-anchor" :to="note.user | userPage">
|
<mk-avatar class="avatar" :user="note.user"/>
|
||||||
<img class="avatar" :src="`${note.user.avatarUrl}?thumbnail&size=64`" alt="avatar" v-user-preview="note.userId"/>
|
|
||||||
</router-link>
|
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<header>
|
<header>
|
||||||
<router-link class="name" :to="note.user | userPage" v-user-preview="note.userId">{{ note.user | userName }}</router-link>
|
<router-link class="name" :to="note.user | userPage" v-user-preview="note.userId">{{ note.user | userName }}</router-link>
|
||||||
<span class="username">@{{ note.user | acct }}</span>
|
<span class="username">@{{ note.user | acct }}</span>
|
||||||
<router-link class="created-at" :to="note | notePage">
|
<div class="info">
|
||||||
<mk-time :time="note.createdAt"/>
|
<span class="mobile" v-if="note.viaMobile">%fa:mobile-alt%</span>
|
||||||
</router-link>
|
<router-link class="created-at" :to="note | notePage">
|
||||||
|
<mk-time :time="note.createdAt"/>
|
||||||
|
</router-link>
|
||||||
|
<span class="visibility" v-if="note.visibility != 'public'">
|
||||||
|
<template v-if="note.visibility == 'home'">%fa:home%</template>
|
||||||
|
<template v-if="note.visibility == 'followers'">%fa:unlock%</template>
|
||||||
|
<template v-if="note.visibility == 'specified'">%fa:envelope%</template>
|
||||||
|
<template v-if="note.visibility == 'private'">%fa:lock%</template>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<mk-sub-note-content class="text" :note="note"/>
|
<mk-sub-note-content class="text" :note="note"/>
|
||||||
@ -35,26 +42,22 @@ export default Vue.extend({
|
|||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
root(isDark)
|
root(isDark)
|
||||||
margin 0
|
margin 0
|
||||||
padding 16px
|
padding 16px 32px
|
||||||
font-size 0.9em
|
font-size 0.9em
|
||||||
|
background isDark ? #21242d : #fcfcfc
|
||||||
|
|
||||||
&:after
|
&:after
|
||||||
content ""
|
content ""
|
||||||
display block
|
display block
|
||||||
clear both
|
clear both
|
||||||
|
|
||||||
> .avatar-anchor
|
> .avatar
|
||||||
display block
|
display block
|
||||||
float left
|
float left
|
||||||
margin 0 14px 0 0
|
margin 0 14px 0 0
|
||||||
|
width 52px
|
||||||
> .avatar
|
height 52px
|
||||||
display block
|
border-radius 8px
|
||||||
width 52px
|
|
||||||
height 52px
|
|
||||||
margin 0
|
|
||||||
border-radius 8px
|
|
||||||
vertical-align bottom
|
|
||||||
|
|
||||||
> .main
|
> .main
|
||||||
float left
|
float left
|
||||||
@ -84,9 +87,18 @@ root(isDark)
|
|||||||
margin 0 .5em 0 0
|
margin 0 .5em 0 0
|
||||||
color isDark ? #606984 : #d1d8da
|
color isDark ? #606984 : #d1d8da
|
||||||
|
|
||||||
> .created-at
|
> .info
|
||||||
margin-left auto
|
margin-left auto
|
||||||
color isDark ? #606984 : #b2b8bb
|
font-size 0.9em
|
||||||
|
|
||||||
|
> *
|
||||||
|
color isDark ? #606984 : #b2b8bb
|
||||||
|
|
||||||
|
> .mobile
|
||||||
|
margin-right 6px
|
||||||
|
|
||||||
|
> .visibility
|
||||||
|
margin-left 6px
|
||||||
|
|
||||||
> .body
|
> .body
|
||||||
max-height 128px
|
max-height 128px
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="note" tabindex="-1" :title="title" @keydown="onKeydown">
|
<div class="note" tabindex="-1" :title="title" @keydown="onKeydown">
|
||||||
<div class="reply-to" v-if="p.reply && (!os.isSignedIn || os.i.clientSettings.showReplyTarget)">
|
<div class="reply-to" v-if="p.reply && (!os.isSignedIn || clientSettings.showReplyTarget)">
|
||||||
<x-sub :note="p.reply"/>
|
<x-sub :note="p.reply"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="renote" v-if="isRenote">
|
<div class="renote" v-if="isRenote">
|
||||||
<router-link class="avatar-anchor" :to="note.user | userPage" v-user-preview="note.userId">
|
<mk-avatar class="avatar" :user="note.user"/>
|
||||||
<img class="avatar" :src="`${note.user.avatarUrl}?thumbnail&size=32`" alt="avatar"/>
|
|
||||||
</router-link>
|
|
||||||
%fa:retweet%
|
%fa:retweet%
|
||||||
<span>{{ '%i18n:!@reposted-by%'.substr(0, '%i18n:!@reposted-by%'.indexOf('{')) }}</span>
|
<span>{{ '%i18n:!@reposted-by%'.substr(0, '%i18n:!@reposted-by%'.indexOf('{')) }}</span>
|
||||||
<a class="name" :href="note.user | userPage" v-user-preview="note.userId">{{ note.user | userName }}</a>
|
<a class="name" :href="note.user | userPage" v-user-preview="note.userId">{{ note.user | userName }}</a>
|
||||||
@ -14,9 +12,7 @@
|
|||||||
<mk-time :time="note.createdAt"/>
|
<mk-time :time="note.createdAt"/>
|
||||||
</div>
|
</div>
|
||||||
<article>
|
<article>
|
||||||
<router-link class="avatar-anchor" :to="p.user | userPage">
|
<mk-avatar class="avatar" :user="p.user"/>
|
||||||
<img class="avatar" :src="`${p.user.avatarUrl}?thumbnail&size=64`" alt="avatar" v-user-preview="p.user.id"/>
|
|
||||||
</router-link>
|
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<header>
|
<header>
|
||||||
<router-link class="name" :to="p.user | userPage" v-user-preview="p.user.id">{{ p.user | userName }}</router-link>
|
<router-link class="name" :to="p.user | userPage" v-user-preview="p.user.id">{{ p.user | userName }}</router-link>
|
||||||
@ -28,6 +24,12 @@
|
|||||||
<router-link class="created-at" :to="p | notePage">
|
<router-link class="created-at" :to="p | notePage">
|
||||||
<mk-time :time="p.createdAt"/>
|
<mk-time :time="p.createdAt"/>
|
||||||
</router-link>
|
</router-link>
|
||||||
|
<span class="visibility" v-if="p.visibility != 'public'">
|
||||||
|
<template v-if="p.visibility == 'home'">%fa:home%</template>
|
||||||
|
<template v-if="p.visibility == 'followers'">%fa:unlock%</template>
|
||||||
|
<template v-if="p.visibility == 'specified'">%fa:envelope%</template>
|
||||||
|
<template v-if="p.visibility == 'private'">%fa:lock%</template>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
@ -40,6 +42,7 @@
|
|||||||
</p>
|
</p>
|
||||||
<div class="content" v-show="p.cw == null || showContent">
|
<div class="content" v-show="p.cw == null || showContent">
|
||||||
<div class="text">
|
<div class="text">
|
||||||
|
<span v-if="p.isHidden" style="opacity: 0.5">(この投稿は非公開です)</span>
|
||||||
<a class="reply" v-if="p.reply">%fa:reply%</a>
|
<a class="reply" v-if="p.reply">%fa:reply%</a>
|
||||||
<mk-note-html v-if="p.text" :text="p.text" :i="os.i" :class="$style.text"/>
|
<mk-note-html v-if="p.text" :text="p.text" :i="os.i" :class="$style.text"/>
|
||||||
<a class="rp" v-if="p.renote">RP:</a>
|
<a class="rp" v-if="p.renote">RP:</a>
|
||||||
@ -175,7 +178,7 @@ export default Vue.extend({
|
|||||||
|
|
||||||
// Draw map
|
// Draw map
|
||||||
if (this.p.geo) {
|
if (this.p.geo) {
|
||||||
const shouldShowMap = (this as any).os.isSignedIn ? (this as any).os.i.clientSettings.showMaps : true;
|
const shouldShowMap = (this as any).os.isSignedIn ? (this as any).clientSettings.showMaps : true;
|
||||||
if (shouldShowMap) {
|
if (shouldShowMap) {
|
||||||
(this as any).os.getGoogleMaps().then(maps => {
|
(this as any).os.getGoogleMaps().then(maps => {
|
||||||
const uluru = new maps.LatLng(this.p.geo.coordinates[1], this.p.geo.coordinates[0]);
|
const uluru = new maps.LatLng(this.p.geo.coordinates[1], this.p.geo.coordinates[0]);
|
||||||
@ -336,15 +339,12 @@ root(isDark)
|
|||||||
color #9dbb00
|
color #9dbb00
|
||||||
background isDark ? linear-gradient(to bottom, #314027 0%, #282c37 100%) : linear-gradient(to bottom, #edfde2 0%, #fff 100%)
|
background isDark ? linear-gradient(to bottom, #314027 0%, #282c37 100%) : linear-gradient(to bottom, #edfde2 0%, #fff 100%)
|
||||||
|
|
||||||
.avatar-anchor
|
.avatar
|
||||||
display inline-block
|
display inline-block
|
||||||
|
width 28px
|
||||||
.avatar
|
height 28px
|
||||||
vertical-align bottom
|
margin 0 8px 0 0
|
||||||
width 28px
|
border-radius 6px
|
||||||
height 28px
|
|
||||||
margin 0 8px 0 0
|
|
||||||
border-radius 6px
|
|
||||||
|
|
||||||
[data-fa]
|
[data-fa]
|
||||||
margin-right 4px
|
margin-right 4px
|
||||||
@ -371,13 +371,6 @@ root(isDark)
|
|||||||
& + article
|
& + article
|
||||||
padding-top 8px
|
padding-top 8px
|
||||||
|
|
||||||
> .reply-to
|
|
||||||
padding 0 16px
|
|
||||||
background rgba(0, 0, 0, 0.0125)
|
|
||||||
|
|
||||||
> .mk-note-preview
|
|
||||||
background transparent
|
|
||||||
|
|
||||||
> article
|
> article
|
||||||
padding 28px 32px 18px 32px
|
padding 28px 32px 18px 32px
|
||||||
|
|
||||||
@ -390,22 +383,17 @@ root(isDark)
|
|||||||
> .main > footer > button
|
> .main > footer > button
|
||||||
color isDark ? #707b97 : #888
|
color isDark ? #707b97 : #888
|
||||||
|
|
||||||
> .avatar-anchor
|
> .avatar
|
||||||
display block
|
display block
|
||||||
float left
|
float left
|
||||||
margin 0 16px 10px 0
|
margin 0 16px 10px 0
|
||||||
|
width 58px
|
||||||
|
height 58px
|
||||||
|
border-radius 8px
|
||||||
//position -webkit-sticky
|
//position -webkit-sticky
|
||||||
//position sticky
|
//position sticky
|
||||||
//top 74px
|
//top 74px
|
||||||
|
|
||||||
> .avatar
|
|
||||||
display block
|
|
||||||
width 58px
|
|
||||||
height 58px
|
|
||||||
margin 0
|
|
||||||
border-radius 8px
|
|
||||||
vertical-align bottom
|
|
||||||
|
|
||||||
> .main
|
> .main
|
||||||
float left
|
float left
|
||||||
width calc(100% - 74px)
|
width calc(100% - 74px)
|
||||||
@ -448,18 +436,19 @@ root(isDark)
|
|||||||
margin-left auto
|
margin-left auto
|
||||||
font-size 0.9em
|
font-size 0.9em
|
||||||
|
|
||||||
|
> *
|
||||||
|
color isDark ? #606984 : #c0c0c0
|
||||||
|
|
||||||
> .mobile
|
> .mobile
|
||||||
margin-right 8px
|
margin-right 8px
|
||||||
color isDark ? #606984 : #ccc
|
|
||||||
|
|
||||||
> .app
|
> .app
|
||||||
margin-right 8px
|
margin-right 8px
|
||||||
padding-right 8px
|
padding-right 8px
|
||||||
color #ccc
|
|
||||||
border-right solid 1px #eaeaea
|
border-right solid 1px #eaeaea
|
||||||
|
|
||||||
> .created-at
|
> .visibility
|
||||||
color isDark ? #606984 : #c0c0c0
|
margin-left 8px
|
||||||
|
|
||||||
> .body
|
> .body
|
||||||
|
|
||||||
@ -613,7 +602,7 @@ root(isDark)
|
|||||||
|
|
||||||
> .detail
|
> .detail
|
||||||
padding-top 4px
|
padding-top 4px
|
||||||
background rgba(0, 0, 0, 0.0125)
|
background rgba(#000, 0.0125)
|
||||||
|
|
||||||
.note[data-darkmode]
|
.note[data-darkmode]
|
||||||
root(true)
|
root(true)
|
||||||
|
@ -121,13 +121,13 @@ export default Vue.extend({
|
|||||||
const isMyNote = note.userId == (this as any).os.i.id;
|
const isMyNote = note.userId == (this as any).os.i.id;
|
||||||
const isPureRenote = note.renoteId != null && note.text == null && note.mediaIds.length == 0 && note.poll == null;
|
const isPureRenote = note.renoteId != null && note.text == null && note.mediaIds.length == 0 && note.poll == null;
|
||||||
|
|
||||||
if ((this as any).os.i.clientSettings.showMyRenotes === false) {
|
if ((this as any).clientSettings.showMyRenotes === false) {
|
||||||
if (isMyNote && isPureRenote) {
|
if (isMyNote && isPureRenote) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((this as any).os.i.clientSettings.showRenotedMyNotes === false) {
|
if ((this as any).clientSettings.showRenotedMyNotes === false) {
|
||||||
if (isPureRenote && (note.renote.userId == (this as any).os.i.id)) {
|
if (isPureRenote && (note.renote.userId == (this as any).os.i.id)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -156,7 +156,7 @@ export default Vue.extend({
|
|||||||
this.notes = this.notes.slice(0, displayLimit);
|
this.notes = this.notes.slice(0, displayLimit);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.queue.unshift(note);
|
this.queue.push(note);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -199,7 +199,7 @@ export default Vue.extend({
|
|||||||
this.clearNotification();
|
this.clearNotification();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((this as any).os.i.clientSettings.fetchOnScroll !== false) {
|
if ((this as any).clientSettings.fetchOnScroll !== false) {
|
||||||
const current = window.scrollY + window.innerHeight;
|
const current = window.scrollY + window.innerHeight;
|
||||||
if (current > document.body.offsetHeight - 8) this.loadMore();
|
if (current > document.body.offsetHeight - 8) this.loadMore();
|
||||||
}
|
}
|
||||||
|
@ -6,9 +6,7 @@
|
|||||||
<div class="notification" :class="notification.type" :key="notification.id">
|
<div class="notification" :class="notification.type" :key="notification.id">
|
||||||
<mk-time :time="notification.createdAt"/>
|
<mk-time :time="notification.createdAt"/>
|
||||||
<template v-if="notification.type == 'reaction'">
|
<template v-if="notification.type == 'reaction'">
|
||||||
<router-link class="avatar-anchor" :to="notification.user | userPage" v-user-preview="notification.user.id">
|
<mk-avatar class="avatar" :user="notification.user"/>
|
||||||
<img class="avatar" :src="`${notification.user.avatarUrl}?thumbnail&size=48`" alt="avatar"/>
|
|
||||||
</router-link>
|
|
||||||
<div class="text">
|
<div class="text">
|
||||||
<p>
|
<p>
|
||||||
<mk-reaction-icon :reaction="notification.reaction"/>
|
<mk-reaction-icon :reaction="notification.reaction"/>
|
||||||
@ -20,9 +18,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="notification.type == 'renote'">
|
<template v-if="notification.type == 'renote'">
|
||||||
<router-link class="avatar-anchor" :to="notification.note.user | userPage" v-user-preview="notification.note.userId">
|
<mk-avatar class="avatar" :user="notification.note.user"/>
|
||||||
<img class="avatar" :src="`${notification.note.user.avatarUrl}?thumbnail&size=48`" alt="avatar"/>
|
|
||||||
</router-link>
|
|
||||||
<div class="text">
|
<div class="text">
|
||||||
<p>%fa:retweet%
|
<p>%fa:retweet%
|
||||||
<router-link :to="notification.note.user | userPage" v-user-preview="notification.note.userId">{{ notification.note.user | userName }}</router-link>
|
<router-link :to="notification.note.user | userPage" v-user-preview="notification.note.userId">{{ notification.note.user | userName }}</router-link>
|
||||||
@ -33,9 +29,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="notification.type == 'quote'">
|
<template v-if="notification.type == 'quote'">
|
||||||
<router-link class="avatar-anchor" :to="notification.note.user | userPage" v-user-preview="notification.note.userId">
|
<mk-avatar class="avatar" :user="notification.note.user"/>
|
||||||
<img class="avatar" :src="`${notification.note.user.avatarUrl}?thumbnail&size=48`" alt="avatar"/>
|
|
||||||
</router-link>
|
|
||||||
<div class="text">
|
<div class="text">
|
||||||
<p>%fa:quote-left%
|
<p>%fa:quote-left%
|
||||||
<router-link :to="notification.note.user | userPage" v-user-preview="notification.note.userId">{{ notification.note.user | userName }}</router-link>
|
<router-link :to="notification.note.user | userPage" v-user-preview="notification.note.userId">{{ notification.note.user | userName }}</router-link>
|
||||||
@ -44,9 +38,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="notification.type == 'follow'">
|
<template v-if="notification.type == 'follow'">
|
||||||
<router-link class="avatar-anchor" :to="notification.user | userPage" v-user-preview="notification.user.id">
|
<mk-avatar class="avatar" :user="notification.user"/>
|
||||||
<img class="avatar" :src="`${notification.user.avatarUrl}?thumbnail&size=48`" alt="avatar"/>
|
|
||||||
</router-link>
|
|
||||||
<div class="text">
|
<div class="text">
|
||||||
<p>%fa:user-plus%
|
<p>%fa:user-plus%
|
||||||
<router-link :to="notification.user | userPage" v-user-preview="notification.user.id">{{ notification.user | userName }}</router-link>
|
<router-link :to="notification.user | userPage" v-user-preview="notification.user.id">{{ notification.user | userName }}</router-link>
|
||||||
@ -54,9 +46,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="notification.type == 'reply'">
|
<template v-if="notification.type == 'reply'">
|
||||||
<router-link class="avatar-anchor" :to="notification.note.user | userPage" v-user-preview="notification.note.userId">
|
<mk-avatar class="avatar" :user="notification.note.user"/>
|
||||||
<img class="avatar" :src="`${notification.note.user.avatarUrl}?thumbnail&size=48`" alt="avatar"/>
|
|
||||||
</router-link>
|
|
||||||
<div class="text">
|
<div class="text">
|
||||||
<p>%fa:reply%
|
<p>%fa:reply%
|
||||||
<router-link :to="notification.note.user | userPage" v-user-preview="notification.note.userId">{{ notification.note.user | userName }}</router-link>
|
<router-link :to="notification.note.user | userPage" v-user-preview="notification.note.userId">{{ notification.note.user | userName }}</router-link>
|
||||||
@ -65,9 +55,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="notification.type == 'mention'">
|
<template v-if="notification.type == 'mention'">
|
||||||
<router-link class="avatar-anchor" :to="notification.note.user | userPage" v-user-preview="notification.note.userId">
|
<mk-avatar class="avatar" :user="notification.note.user"/>
|
||||||
<img class="avatar" :src="`${notification.note.user.avatarUrl}?thumbnail&size=48`" alt="avatar"/>
|
|
||||||
</router-link>
|
|
||||||
<div class="text">
|
<div class="text">
|
||||||
<p>%fa:at%
|
<p>%fa:at%
|
||||||
<router-link :to="notification.note.user | userPage" v-user-preview="notification.note.userId">{{ notification.note.user | userName }}</router-link>
|
<router-link :to="notification.note.user | userPage" v-user-preview="notification.note.userId">{{ notification.note.user | userName }}</router-link>
|
||||||
@ -76,9 +64,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="notification.type == 'poll_vote'">
|
<template v-if="notification.type == 'poll_vote'">
|
||||||
<router-link class="avatar-anchor" :to="notification.user | userPage" v-user-preview="notification.user.id">
|
<mk-avatar class="avatar" :user="notification.user"/>
|
||||||
<img class="avatar" :src="`${notification.user.avatarUrl}?thumbnail&size=48`" alt="avatar"/>
|
|
||||||
</router-link>
|
|
||||||
<div class="text">
|
<div class="text">
|
||||||
<p>%fa:chart-pie%<a :href="notification.user | userPage" v-user-preview="notification.user.id">{{ notification.user | userName }}</a></p>
|
<p>%fa:chart-pie%<a :href="notification.user | userPage" v-user-preview="notification.user.id">{{ notification.user | userName }}</a></p>
|
||||||
<router-link class="note-ref" :to="notification.note | notePage">
|
<router-link class="note-ref" :to="notification.note | notePage">
|
||||||
@ -204,7 +190,7 @@ root(isDark)
|
|||||||
padding 16px
|
padding 16px
|
||||||
overflow-wrap break-word
|
overflow-wrap break-word
|
||||||
font-size 0.9em
|
font-size 0.9em
|
||||||
border-bottom solid 1px isDark ? #1c2023 : rgba(0, 0, 0, 0.05)
|
border-bottom solid 1px isDark ? #1c2023 : rgba(#000, 0.05)
|
||||||
|
|
||||||
&:last-child
|
&:last-child
|
||||||
border-bottom none
|
border-bottom none
|
||||||
@ -215,7 +201,7 @@ root(isDark)
|
|||||||
top 16px
|
top 16px
|
||||||
right 12px
|
right 12px
|
||||||
vertical-align top
|
vertical-align top
|
||||||
color isDark ? #606984 : rgba(0, 0, 0, 0.6)
|
color isDark ? #606984 : rgba(#000, 0.6)
|
||||||
font-size small
|
font-size small
|
||||||
|
|
||||||
&:after
|
&:after
|
||||||
@ -223,20 +209,15 @@ root(isDark)
|
|||||||
display block
|
display block
|
||||||
clear both
|
clear both
|
||||||
|
|
||||||
> .avatar-anchor
|
> .avatar
|
||||||
display block
|
display block
|
||||||
float left
|
float left
|
||||||
position -webkit-sticky
|
position -webkit-sticky
|
||||||
position sticky
|
position sticky
|
||||||
top 16px
|
top 16px
|
||||||
|
width 36px
|
||||||
> img
|
height 36px
|
||||||
display block
|
border-radius 6px
|
||||||
min-width 36px
|
|
||||||
min-height 36px
|
|
||||||
max-width 36px
|
|
||||||
max-height 36px
|
|
||||||
border-radius 6px
|
|
||||||
|
|
||||||
> .text
|
> .text
|
||||||
float right
|
float right
|
||||||
@ -250,10 +231,10 @@ root(isDark)
|
|||||||
margin-right 4px
|
margin-right 4px
|
||||||
|
|
||||||
.note-preview
|
.note-preview
|
||||||
color isDark ? #c2cad4 : rgba(0, 0, 0, 0.7)
|
color isDark ? #c2cad4 : rgba(#000, 0.7)
|
||||||
|
|
||||||
.note-ref
|
.note-ref
|
||||||
color isDark ? #c2cad4 : rgba(0, 0, 0, 0.7)
|
color isDark ? #c2cad4 : rgba(#000, 0.7)
|
||||||
|
|
||||||
[data-fa]
|
[data-fa]
|
||||||
font-size 1em
|
font-size 1em
|
||||||
@ -282,7 +263,7 @@ root(isDark)
|
|||||||
font-size 0.8em
|
font-size 0.8em
|
||||||
color isDark ? #666b79 : #aaa
|
color isDark ? #666b79 : #aaa
|
||||||
background isDark ? #242731 : #fdfdfd
|
background isDark ? #242731 : #fdfdfd
|
||||||
border-bottom solid 1px isDark ? #1c2023 : rgba(0, 0, 0, 0.05)
|
border-bottom solid 1px isDark ? #1c2023 : rgba(#000, 0.05)
|
||||||
|
|
||||||
span
|
span
|
||||||
margin 0 16px
|
margin 0 16px
|
||||||
@ -295,13 +276,13 @@ root(isDark)
|
|||||||
width 100%
|
width 100%
|
||||||
padding 16px
|
padding 16px
|
||||||
color #555
|
color #555
|
||||||
border-top solid 1px rgba(0, 0, 0, 0.05)
|
border-top solid 1px rgba(#000, 0.05)
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
background rgba(0, 0, 0, 0.025)
|
background rgba(#000, 0.025)
|
||||||
|
|
||||||
&:active
|
&:active
|
||||||
background rgba(0, 0, 0, 0.05)
|
background rgba(#000, 0.05)
|
||||||
|
|
||||||
&.fetching
|
&.fetching
|
||||||
cursor wait
|
cursor wait
|
||||||
|
@ -6,6 +6,10 @@
|
|||||||
@drop.stop="onDrop"
|
@drop.stop="onDrop"
|
||||||
>
|
>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
<div v-if="visibility == 'specified'" class="visibleUsers">
|
||||||
|
<span v-for="u in visibleUsers">{{ u | userName }}<a @click="removeVisibleUser(u)">[x]</a></span>
|
||||||
|
<a @click="addVisibleUser">+ユーザーを追加</a>
|
||||||
|
</div>
|
||||||
<input v-show="useCw" v-model="cw" placeholder="内容への注釈 (オプション)">
|
<input v-show="useCw" v-model="cw" placeholder="内容への注釈 (オプション)">
|
||||||
<textarea :class="{ with: (files.length != 0 || poll) }"
|
<textarea :class="{ with: (files.length != 0 || poll) }"
|
||||||
ref="text" v-model="text" :disabled="posting"
|
ref="text" v-model="text" :disabled="posting"
|
||||||
@ -30,7 +34,8 @@
|
|||||||
<button class="poll" title="%i18n:@create-poll%" @click="poll = true">%fa:chart-pie%</button>
|
<button class="poll" title="%i18n:@create-poll%" @click="poll = true">%fa:chart-pie%</button>
|
||||||
<button class="poll" title="内容を隠す" @click="useCw = !useCw">%fa:eye-slash%</button>
|
<button class="poll" title="内容を隠す" @click="useCw = !useCw">%fa:eye-slash%</button>
|
||||||
<button class="geo" title="位置情報を添付する" @click="geo ? removeGeo() : setGeo()">%fa:map-marker-alt%</button>
|
<button class="geo" title="位置情報を添付する" @click="geo ? removeGeo() : setGeo()">%fa:map-marker-alt%</button>
|
||||||
<p class="text-count" :class="{ over: text.length > 1000 }">{{ '%i18n:!@text-remain%'.replace('{}', 1000 - text.length) }}</p>
|
<button class="visibility" title="公開範囲" @click="setVisibility" ref="visibilityButton">%fa:lock%</button>
|
||||||
|
<p class="text-count" :class="{ over: text.length > 1000 }">{{ 1000 - text.length }}</p>
|
||||||
<button :class="{ posting }" class="submit" :disabled="!canPost" @click="post">
|
<button :class="{ posting }" class="submit" :disabled="!canPost" @click="post">
|
||||||
{{ posting ? '%i18n:!@posting%' : submitText }}<mk-ellipsis v-if="posting"/>
|
{{ posting ? '%i18n:!@posting%' : submitText }}<mk-ellipsis v-if="posting"/>
|
||||||
</button>
|
</button>
|
||||||
@ -43,10 +48,12 @@
|
|||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import * as XDraggable from 'vuedraggable';
|
import * as XDraggable from 'vuedraggable';
|
||||||
import getKao from '../../../common/scripts/get-kao';
|
import getKao from '../../../common/scripts/get-kao';
|
||||||
|
import MkVisibilityChooser from '../../../common/views/components/visibility-chooser.vue';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
components: {
|
components: {
|
||||||
XDraggable
|
XDraggable,
|
||||||
|
MkVisibilityChooser
|
||||||
},
|
},
|
||||||
|
|
||||||
props: ['reply', 'renote'],
|
props: ['reply', 'renote'],
|
||||||
@ -61,6 +68,8 @@ export default Vue.extend({
|
|||||||
useCw: false,
|
useCw: false,
|
||||||
cw: null,
|
cw: null,
|
||||||
geo: null,
|
geo: null,
|
||||||
|
visibility: 'public',
|
||||||
|
visibleUsers: [],
|
||||||
autocomplete: null,
|
autocomplete: null,
|
||||||
draghover: false
|
draghover: false
|
||||||
};
|
};
|
||||||
@ -246,6 +255,32 @@ export default Vue.extend({
|
|||||||
this.$emit('geo-dettached');
|
this.$emit('geo-dettached');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
setVisibility() {
|
||||||
|
const w = (this as any).os.new(MkVisibilityChooser, {
|
||||||
|
source: this.$refs.visibilityButton,
|
||||||
|
v: this.visibility
|
||||||
|
});
|
||||||
|
w.$once('chosen', v => {
|
||||||
|
this.visibility = v;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
addVisibleUser() {
|
||||||
|
(this as any).apis.input({
|
||||||
|
title: 'ユーザー名を入力してください'
|
||||||
|
}).then(username => {
|
||||||
|
(this as any).api('users/show', {
|
||||||
|
username
|
||||||
|
}).then(user => {
|
||||||
|
this.visibleUsers.push(user);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
removeVisibleUser(user) {
|
||||||
|
this.visibleUsers = this.visibleUsers.filter(u => u != user);
|
||||||
|
},
|
||||||
|
|
||||||
post() {
|
post() {
|
||||||
this.posting = true;
|
this.posting = true;
|
||||||
|
|
||||||
@ -256,6 +291,8 @@ export default Vue.extend({
|
|||||||
renoteId: this.renote ? this.renote.id : undefined,
|
renoteId: this.renote ? this.renote.id : undefined,
|
||||||
poll: this.poll ? (this.$refs.poll as any).get() : undefined,
|
poll: this.poll ? (this.$refs.poll as any).get() : undefined,
|
||||||
cw: this.useCw ? this.cw || '' : undefined,
|
cw: this.useCw ? this.cw || '' : undefined,
|
||||||
|
visibility: this.visibility,
|
||||||
|
visibleUserIds: this.visibility == 'specified' ? this.visibleUsers.map(u => u.id) : undefined,
|
||||||
geo: this.geo ? {
|
geo: this.geo ? {
|
||||||
coordinates: [this.geo.longitude, this.geo.latitude],
|
coordinates: [this.geo.longitude, this.geo.latitude],
|
||||||
altitude: this.geo.altitude,
|
altitude: this.geo.altitude,
|
||||||
@ -328,7 +365,6 @@ root(isDark)
|
|||||||
clear both
|
clear both
|
||||||
|
|
||||||
> .content
|
> .content
|
||||||
|
|
||||||
> input
|
> input
|
||||||
> textarea
|
> textarea
|
||||||
display block
|
display block
|
||||||
@ -381,6 +417,14 @@ root(isDark)
|
|||||||
border-bottom solid 1px rgba($theme-color, 0.1) !important
|
border-bottom solid 1px rgba($theme-color, 0.1) !important
|
||||||
border-radius 4px 4px 0 0
|
border-radius 4px 4px 0 0
|
||||||
|
|
||||||
|
> .visibleUsers
|
||||||
|
margin-bottom 8px
|
||||||
|
font-size 14px
|
||||||
|
|
||||||
|
> span
|
||||||
|
margin-right 16px
|
||||||
|
color isDark ? #fff : #666
|
||||||
|
|
||||||
> .medias
|
> .medias
|
||||||
margin 0
|
margin 0
|
||||||
padding 0
|
padding 0
|
||||||
@ -450,19 +494,6 @@ root(isDark)
|
|||||||
input[type='file']
|
input[type='file']
|
||||||
display none
|
display none
|
||||||
|
|
||||||
.text-count
|
|
||||||
pointer-events none
|
|
||||||
display block
|
|
||||||
position absolute
|
|
||||||
bottom 16px
|
|
||||||
right 138px
|
|
||||||
margin 0
|
|
||||||
line-height 40px
|
|
||||||
color rgba($theme-color, 0.5)
|
|
||||||
|
|
||||||
&.over
|
|
||||||
color #ec3828
|
|
||||||
|
|
||||||
.submit
|
.submit
|
||||||
display block
|
display block
|
||||||
position absolute
|
position absolute
|
||||||
@ -527,11 +558,25 @@ root(isDark)
|
|||||||
from {background-position: 0 0;}
|
from {background-position: 0 0;}
|
||||||
to {background-position: -64px 32px;}
|
to {background-position: -64px 32px;}
|
||||||
|
|
||||||
|
> .text-count
|
||||||
|
pointer-events none
|
||||||
|
display block
|
||||||
|
position absolute
|
||||||
|
bottom 16px
|
||||||
|
right 138px
|
||||||
|
margin 0
|
||||||
|
line-height 40px
|
||||||
|
color rgba($theme-color, 0.5)
|
||||||
|
|
||||||
|
&.over
|
||||||
|
color #ec3828
|
||||||
|
|
||||||
> .upload
|
> .upload
|
||||||
> .drive
|
> .drive
|
||||||
> .kao
|
> .kao
|
||||||
> .poll
|
> .poll
|
||||||
> .geo
|
> .geo
|
||||||
|
> .visibility
|
||||||
display inline-block
|
display inline-block
|
||||||
cursor pointer
|
cursor pointer
|
||||||
padding 0
|
padding 0
|
||||||
@ -553,7 +598,7 @@ root(isDark)
|
|||||||
color rgba($theme-color, 0.6)
|
color rgba($theme-color, 0.6)
|
||||||
background isDark ? transparent : linear-gradient(to bottom, lighten($theme-color, 80%) 0%, lighten($theme-color, 90%) 100%)
|
background isDark ? transparent : linear-gradient(to bottom, lighten($theme-color, 80%) 0%, lighten($theme-color, 90%) 100%)
|
||||||
border-color rgba($theme-color, 0.5)
|
border-color rgba($theme-color, 0.5)
|
||||||
box-shadow 0 2px 4px rgba(0, 0, 0, 0.15) inset
|
box-shadow 0 2px 4px rgba(#000, 0.15) inset
|
||||||
|
|
||||||
&:focus
|
&:focus
|
||||||
&:after
|
&:after
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
<section class="web" v-show="page == 'web'">
|
<section class="web" v-show="page == 'web'">
|
||||||
<h1>動作</h1>
|
<h1>動作</h1>
|
||||||
<mk-switch v-model="os.i.clientSettings.fetchOnScroll" @change="onChangeFetchOnScroll" text="スクロールで自動読み込み">
|
<mk-switch v-model="clientSettings.fetchOnScroll" @change="onChangeFetchOnScroll" text="スクロールで自動読み込み">
|
||||||
<span>ページを下までスクロールしたときに自動で追加のコンテンツを読み込みます。</span>
|
<span>ページを下までスクロールしたときに自動で追加のコンテンツを読み込みます。</span>
|
||||||
</mk-switch>
|
</mk-switch>
|
||||||
<mk-switch v-model="autoPopout" text="ウィンドウの自動ポップアウト">
|
<mk-switch v-model="autoPopout" text="ウィンドウの自動ポップアウト">
|
||||||
@ -41,13 +41,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="div">
|
<div class="div">
|
||||||
<mk-switch v-model="darkmode" text="ダークモード"/>
|
<mk-switch v-model="darkmode" text="ダークモード"/>
|
||||||
<mk-switch v-model="os.i.clientSettings.gradientWindowHeader" @change="onChangeGradientWindowHeader" text="ウィンドウのタイトルバーにグラデーションを使用"/>
|
<mk-switch v-model="clientSettings.circleIcons" @change="onChangeCircleIcons" text="円形のアイコンを使用"/>
|
||||||
|
<mk-switch v-model="clientSettings.gradientWindowHeader" @change="onChangeGradientWindowHeader" text="ウィンドウのタイトルバーにグラデーションを使用"/>
|
||||||
</div>
|
</div>
|
||||||
<mk-switch v-model="os.i.clientSettings.showPostFormOnTopOfTl" @change="onChangeShowPostFormOnTopOfTl" text="タイムライン上部に投稿フォームを表示する"/>
|
<mk-switch v-model="clientSettings.showPostFormOnTopOfTl" @change="onChangeShowPostFormOnTopOfTl" text="タイムライン上部に投稿フォームを表示する"/>
|
||||||
<mk-switch v-model="os.i.clientSettings.showReplyTarget" @change="onChangeShowReplyTarget" text="リプライ先を表示する"/>
|
<mk-switch v-model="clientSettings.showReplyTarget" @change="onChangeShowReplyTarget" text="リプライ先を表示する"/>
|
||||||
<mk-switch v-model="os.i.clientSettings.showMyRenotes" @change="onChangeShowMyRenotes" text="自分の行ったRenoteをタイムラインに表示する"/>
|
<mk-switch v-model="clientSettings.showMyRenotes" @change="onChangeShowMyRenotes" text="自分の行ったRenoteをタイムラインに表示する"/>
|
||||||
<mk-switch v-model="os.i.clientSettings.showRenotedMyNotes" @change="onChangeShowRenotedMyNotes" text="Renoteされた自分の投稿をタイムラインに表示する"/>
|
<mk-switch v-model="clientSettings.showRenotedMyNotes" @change="onChangeShowRenotedMyNotes" text="Renoteされた自分の投稿をタイムラインに表示する"/>
|
||||||
<mk-switch v-model="os.i.clientSettings.showMaps" @change="onChangeShowMaps" text="マップの自動展開">
|
<mk-switch v-model="clientSettings.showMaps" @change="onChangeShowMaps" text="マップの自動展開">
|
||||||
<span>位置情報が添付された投稿のマップを自動的に展開します。</span>
|
<span>位置情報が添付された投稿のマップを自動的に展開します。</span>
|
||||||
</mk-switch>
|
</mk-switch>
|
||||||
</section>
|
</section>
|
||||||
@ -69,7 +70,7 @@
|
|||||||
|
|
||||||
<section class="web" v-show="page == 'web'">
|
<section class="web" v-show="page == 'web'">
|
||||||
<h1>モバイル</h1>
|
<h1>モバイル</h1>
|
||||||
<mk-switch v-model="os.i.clientSettings.disableViaMobile" @change="onChangeDisableViaMobile" text="「モバイルからの投稿」フラグを付けない"/>
|
<mk-switch v-model="clientSettings.disableViaMobile" @change="onChangeDisableViaMobile" text="「モバイルからの投稿」フラグを付けない"/>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="web" v-show="page == 'web'">
|
<section class="web" v-show="page == 'web'">
|
||||||
@ -297,8 +298,8 @@ export default Vue.extend({
|
|||||||
this.$emit('done');
|
this.$emit('done');
|
||||||
},
|
},
|
||||||
onChangeFetchOnScroll(v) {
|
onChangeFetchOnScroll(v) {
|
||||||
(this as any).api('i/update_client_setting', {
|
this.$store.dispatch('settings/set', {
|
||||||
name: 'fetchOnScroll',
|
key: 'fetchOnScroll',
|
||||||
value: v
|
value: v
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -308,50 +309,56 @@ export default Vue.extend({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
onChangeDark(v) {
|
onChangeDark(v) {
|
||||||
(this as any).api('i/update_client_setting', {
|
this.$store.dispatch('settings/set', {
|
||||||
name: 'dark',
|
key: 'dark',
|
||||||
value: v
|
value: v
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onChangeShowPostFormOnTopOfTl(v) {
|
onChangeShowPostFormOnTopOfTl(v) {
|
||||||
(this as any).api('i/update_client_setting', {
|
this.$store.dispatch('settings/set', {
|
||||||
name: 'showPostFormOnTopOfTl',
|
key: 'showPostFormOnTopOfTl',
|
||||||
value: v
|
value: v
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onChangeShowReplyTarget(v) {
|
onChangeShowReplyTarget(v) {
|
||||||
(this as any).api('i/update_client_setting', {
|
this.$store.dispatch('settings/set', {
|
||||||
name: 'showReplyTarget',
|
key: 'showReplyTarget',
|
||||||
value: v
|
value: v
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onChangeShowMyRenotes(v) {
|
onChangeShowMyRenotes(v) {
|
||||||
(this as any).api('i/update_client_setting', {
|
this.$store.dispatch('settings/set', {
|
||||||
name: 'showMyRenotes',
|
key: 'showMyRenotes',
|
||||||
value: v
|
value: v
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onChangeShowRenotedMyNotes(v) {
|
onChangeShowRenotedMyNotes(v) {
|
||||||
(this as any).api('i/update_client_setting', {
|
this.$store.dispatch('settings/set', {
|
||||||
name: 'showRenotedMyNotes',
|
key: 'showRenotedMyNotes',
|
||||||
value: v
|
value: v
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onChangeShowMaps(v) {
|
onChangeShowMaps(v) {
|
||||||
(this as any).api('i/update_client_setting', {
|
this.$store.dispatch('settings/set', {
|
||||||
name: 'showMaps',
|
key: 'showMaps',
|
||||||
|
value: v
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onChangeCircleIcons(v) {
|
||||||
|
this.$store.dispatch('settings/set', {
|
||||||
|
key: 'circleIcons',
|
||||||
value: v
|
value: v
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onChangeGradientWindowHeader(v) {
|
onChangeGradientWindowHeader(v) {
|
||||||
(this as any).api('i/update_client_setting', {
|
this.$store.dispatch('settings/set', {
|
||||||
name: 'gradientWindowHeader',
|
key: 'gradientWindowHeader',
|
||||||
value: v
|
value: v
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onChangeDisableViaMobile(v) {
|
onChangeDisableViaMobile(v) {
|
||||||
(this as any).api('i/update_client_setting', {
|
this.$store.dispatch('settings/set', {
|
||||||
name: 'disableViaMobile',
|
key: 'disableViaMobile',
|
||||||
value: v
|
value: v
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mk-sub-note-content">
|
<div class="mk-sub-note-content">
|
||||||
<div class="body">
|
<div class="body">
|
||||||
|
<span v-if="note.isHidden" style="opacity: 0.5">(この投稿は非公開です)</span>
|
||||||
<a class="reply" v-if="note.replyId">%fa:reply%</a>
|
<a class="reply" v-if="note.replyId">%fa:reply%</a>
|
||||||
<mk-note-html :text="note.text" :i="os.i"/>
|
<mk-note-html :text="note.text" :i="os.i"/>
|
||||||
<a class="rp" v-if="note.renoteId" :href="`/note:${note.renoteId}`">RP: ...</a>
|
<a class="rp" v-if="note.renoteId" :href="`/note:${note.renoteId}`">RP: ...</a>
|
||||||
|
@ -101,8 +101,8 @@ export default Vue.extend({
|
|||||||
(this as any).api(this.endpoint, {
|
(this as any).api(this.endpoint, {
|
||||||
limit: fetchLimit + 1,
|
limit: fetchLimit + 1,
|
||||||
untilDate: this.date ? this.date.getTime() : undefined,
|
untilDate: this.date ? this.date.getTime() : undefined,
|
||||||
includeMyRenotes: (this as any).os.i.clientSettings.showMyRenotes,
|
includeMyRenotes: (this as any).clientSettings.showMyRenotes,
|
||||||
includeRenotedMyNotes: (this as any).os.i.clientSettings.showRenotedMyNotes
|
includeRenotedMyNotes: (this as any).clientSettings.showRenotedMyNotes
|
||||||
}).then(notes => {
|
}).then(notes => {
|
||||||
if (notes.length == fetchLimit + 1) {
|
if (notes.length == fetchLimit + 1) {
|
||||||
notes.pop();
|
notes.pop();
|
||||||
@ -123,8 +123,8 @@ export default Vue.extend({
|
|||||||
(this as any).api(this.endpoint, {
|
(this as any).api(this.endpoint, {
|
||||||
limit: fetchLimit + 1,
|
limit: fetchLimit + 1,
|
||||||
untilId: (this.$refs.timeline as any).tail().id,
|
untilId: (this.$refs.timeline as any).tail().id,
|
||||||
includeMyRenotes: (this as any).os.i.clientSettings.showMyRenotes,
|
includeMyRenotes: (this as any).clientSettings.showMyRenotes,
|
||||||
includeRenotedMyNotes: (this as any).os.i.clientSettings.showRenotedMyNotes
|
includeRenotedMyNotes: (this as any).clientSettings.showRenotedMyNotes
|
||||||
}).then(notes => {
|
}).then(notes => {
|
||||||
if (notes.length == fetchLimit + 1) {
|
if (notes.length == fetchLimit + 1) {
|
||||||
notes.pop();
|
notes.pop();
|
||||||
|
@ -59,7 +59,7 @@ export default Vue.extend({
|
|||||||
|
|
||||||
root(isDark)
|
root(isDark)
|
||||||
background isDark ? #282C37 : #fff
|
background isDark ? #282C37 : #fff
|
||||||
border solid 1px rgba(0, 0, 0, 0.075)
|
border solid 1px rgba(#000, 0.075)
|
||||||
border-radius 6px
|
border-radius 6px
|
||||||
|
|
||||||
> header
|
> header
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<div class="account">
|
<div class="account">
|
||||||
<button class="header" :data-active="isOpen" @click="toggle">
|
<button class="header" :data-active="isOpen" @click="toggle">
|
||||||
<span class="username">{{ os.i.username }}<template v-if="!isOpen">%fa:angle-down%</template><template v-if="isOpen">%fa:angle-up%</template></span>
|
<span class="username">{{ os.i.username }}<template v-if="!isOpen">%fa:angle-down%</template><template v-if="isOpen">%fa:angle-up%</template></span>
|
||||||
<img class="avatar" :src="`${ os.i.avatarUrl }?thumbnail&size=64`" alt="avatar"/>
|
<mk-avatar class="avatar" :user="os.i"/>
|
||||||
</button>
|
</button>
|
||||||
<transition name="zoom-in-top">
|
<transition name="zoom-in-top">
|
||||||
<div class="menu" v-if="isOpen">
|
<div class="menu" v-if="isOpen">
|
||||||
@ -22,7 +22,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a href="/i/customize-home">%fa:wrench%<span>%i18n:@customize%</span>%fa:angle-right%</a>
|
<router-link to="/i/customize-home">%fa:wrench%<span>%i18n:@customize%</span>%fa:angle-right%</router-link>
|
||||||
</li>
|
</li>
|
||||||
<li @click="settings">
|
<li @click="settings">
|
||||||
<p>%fa:cog%<span>%i18n:@settings%</span>%fa:angle-right%</p>
|
<p>%fa:cog%<span>%i18n:@settings%</span>%fa:angle-right%</p>
|
||||||
@ -165,7 +165,7 @@ root(isDark)
|
|||||||
font-size 0.8em
|
font-size 0.8em
|
||||||
background $bgcolor
|
background $bgcolor
|
||||||
border-radius 4px
|
border-radius 4px
|
||||||
box-shadow 0 1px 4px rgba(0, 0, 0, 0.25)
|
box-shadow 0 1px 4px rgba(#000, 0.25)
|
||||||
|
|
||||||
&:before
|
&:before
|
||||||
content ""
|
content ""
|
||||||
@ -176,7 +176,7 @@ root(isDark)
|
|||||||
right 12px
|
right 12px
|
||||||
border-top solid 14px transparent
|
border-top solid 14px transparent
|
||||||
border-right solid 14px transparent
|
border-right solid 14px transparent
|
||||||
border-bottom solid 14px rgba(0, 0, 0, 0.1)
|
border-bottom solid 14px rgba(#000, 0.1)
|
||||||
border-left solid 14px transparent
|
border-left solid 14px transparent
|
||||||
|
|
||||||
&:after
|
&:after
|
||||||
|
@ -125,7 +125,7 @@ root(isDark)
|
|||||||
width 300px
|
width 300px
|
||||||
background $bgcolor
|
background $bgcolor
|
||||||
border-radius 4px
|
border-radius 4px
|
||||||
box-shadow 0 1px 4px rgba(0, 0, 0, 0.25)
|
box-shadow 0 1px 4px rgba(#000, 0.25)
|
||||||
|
|
||||||
&:before
|
&:before
|
||||||
content ""
|
content ""
|
||||||
@ -136,7 +136,7 @@ root(isDark)
|
|||||||
right 74px
|
right 74px
|
||||||
border-top solid 14px transparent
|
border-top solid 14px transparent
|
||||||
border-right solid 14px transparent
|
border-right solid 14px transparent
|
||||||
border-bottom solid 14px rgba(0, 0, 0, 0.1)
|
border-bottom solid 14px rgba(#000, 0.1)
|
||||||
border-left solid 14px transparent
|
border-left solid 14px transparent
|
||||||
|
|
||||||
&:after
|
&:after
|
||||||
|
@ -50,7 +50,7 @@ export default Vue.extend({
|
|||||||
width 14em
|
width 14em
|
||||||
height 32px
|
height 32px
|
||||||
font-size 1em
|
font-size 1em
|
||||||
background rgba(0, 0, 0, 0.05)
|
background rgba(#000, 0.05)
|
||||||
outline none
|
outline none
|
||||||
//border solid 1px #ddd
|
//border solid 1px #ddd
|
||||||
border none
|
border none
|
||||||
@ -62,7 +62,7 @@ export default Vue.extend({
|
|||||||
color #9eaba8
|
color #9eaba8
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
background rgba(0, 0, 0, 0.08)
|
background rgba(#000, 0.08)
|
||||||
|
|
||||||
&:focus
|
&:focus
|
||||||
box-shadow 0 0 0 2px rgba($theme-color, 0.5) !important
|
box-shadow 0 0 0 2px rgba($theme-color, 0.5) !important
|
||||||
|
@ -103,7 +103,7 @@ root(isDark)
|
|||||||
top 0
|
top 0
|
||||||
z-index 1000
|
z-index 1000
|
||||||
width 100%
|
width 100%
|
||||||
box-shadow 0 1px 1px rgba(0, 0, 0, 0.075)
|
box-shadow 0 1px 1px rgba(#000, 0.075)
|
||||||
|
|
||||||
> .main
|
> .main
|
||||||
height 48px
|
height 48px
|
||||||
|
@ -46,8 +46,8 @@ export default Vue.extend({
|
|||||||
(this as any).api('notes/user-list-timeline', {
|
(this as any).api('notes/user-list-timeline', {
|
||||||
listId: this.list.id,
|
listId: this.list.id,
|
||||||
limit: fetchLimit + 1,
|
limit: fetchLimit + 1,
|
||||||
includeMyRenotes: (this as any).os.i.clientSettings.showMyRenotes,
|
includeMyRenotes: (this as any).clientSettings.showMyRenotes,
|
||||||
includeRenotedMyNotes: (this as any).os.i.clientSettings.showRenotedMyNotes
|
includeRenotedMyNotes: (this as any).clientSettings.showRenotedMyNotes
|
||||||
}).then(notes => {
|
}).then(notes => {
|
||||||
if (notes.length == fetchLimit + 1) {
|
if (notes.length == fetchLimit + 1) {
|
||||||
notes.pop();
|
notes.pop();
|
||||||
@ -66,8 +66,8 @@ export default Vue.extend({
|
|||||||
listId: this.list.id,
|
listId: this.list.id,
|
||||||
limit: fetchLimit + 1,
|
limit: fetchLimit + 1,
|
||||||
untilId: (this.$refs.timeline as any).tail().id,
|
untilId: (this.$refs.timeline as any).tail().id,
|
||||||
includeMyRenotes: (this as any).os.i.clientSettings.showMyRenotes,
|
includeMyRenotes: (this as any).clientSettings.showMyRenotes,
|
||||||
includeRenotedMyNotes: (this as any).os.i.clientSettings.showRenotedMyNotes
|
includeRenotedMyNotes: (this as any).clientSettings.showRenotedMyNotes
|
||||||
}).then(notes => {
|
}).then(notes => {
|
||||||
if (notes.length == fetchLimit + 1) {
|
if (notes.length == fetchLimit + 1) {
|
||||||
notes.pop();
|
notes.pop();
|
||||||
|
@ -2,9 +2,7 @@
|
|||||||
<div class="mk-user-preview">
|
<div class="mk-user-preview">
|
||||||
<template v-if="u != null">
|
<template v-if="u != null">
|
||||||
<div class="banner" :style="u.bannerUrl ? `background-image: url(${u.bannerUrl}?thumbnail&size=512)` : ''"></div>
|
<div class="banner" :style="u.bannerUrl ? `background-image: url(${u.bannerUrl}?thumbnail&size=512)` : ''"></div>
|
||||||
<router-link class="avatar" :to="u | userPage">
|
<mk-avatar class="avatar" :user="u" :disable-preview="true"/>
|
||||||
<img :src="`${u.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
|
|
||||||
</router-link>
|
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<router-link class="name" :to="u | userPage">{{ u | userName }}</router-link>
|
<router-link class="name" :to="u | userPage">{{ u | userName }}</router-link>
|
||||||
<p class="username">@{{ u | acct }}</p>
|
<p class="username">@{{ u | acct }}</p>
|
||||||
@ -94,7 +92,7 @@ root(isDark)
|
|||||||
width 250px
|
width 250px
|
||||||
background isDark ? #282c37 : #fff
|
background isDark ? #282c37 : #fff
|
||||||
background-clip content-box
|
background-clip content-box
|
||||||
border solid 1px rgba(0, 0, 0, 0.1)
|
border solid 1px rgba(#000, 0.1)
|
||||||
border-radius 4px
|
border-radius 4px
|
||||||
overflow hidden
|
overflow hidden
|
||||||
opacity 0
|
opacity 0
|
||||||
@ -111,14 +109,10 @@ root(isDark)
|
|||||||
top 62px
|
top 62px
|
||||||
left 13px
|
left 13px
|
||||||
z-index 2
|
z-index 2
|
||||||
|
width 58px
|
||||||
> img
|
height 58px
|
||||||
display block
|
border solid 3px isDark ? #282c37 : #fff
|
||||||
width 58px
|
border-radius 8px
|
||||||
height 58px
|
|
||||||
margin 0
|
|
||||||
border solid 3px isDark ? #282c37 : #fff
|
|
||||||
border-radius 8px
|
|
||||||
|
|
||||||
> .title
|
> .title
|
||||||
display block
|
display block
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="root item">
|
<div class="root item">
|
||||||
<router-link class="avatar-anchor" :to="user | userPage" v-user-preview="user.id">
|
<mk-avatar class="avatar" :user="user"/>
|
||||||
<img class="avatar" :src="`${user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
|
|
||||||
</router-link>
|
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<header>
|
<header>
|
||||||
<router-link class="name" :to="user | userPage" v-user-preview="user.id">{{ user | userName }}</router-link>
|
<router-link class="name" :to="user | userPage" v-user-preview="user.id">{{ user | userName }}</router-link>
|
||||||
@ -35,18 +33,13 @@ export default Vue.extend({
|
|||||||
display block
|
display block
|
||||||
clear both
|
clear both
|
||||||
|
|
||||||
> .avatar-anchor
|
> .avatar
|
||||||
display block
|
display block
|
||||||
float left
|
float left
|
||||||
margin 0 16px 0 0
|
margin 0 16px 0 0
|
||||||
|
width 58px
|
||||||
> .avatar
|
height 58px
|
||||||
display block
|
border-radius 8px
|
||||||
width 58px
|
|
||||||
height 58px
|
|
||||||
margin 0
|
|
||||||
border-radius 8px
|
|
||||||
vertical-align bottom
|
|
||||||
|
|
||||||
> .main
|
> .main
|
||||||
float left
|
float left
|
||||||
|
@ -119,7 +119,7 @@ export default Vue.extend({
|
|||||||
overflow auto
|
overflow auto
|
||||||
|
|
||||||
> *
|
> *
|
||||||
border-bottom solid 1px rgba(0, 0, 0, 0.05)
|
border-bottom solid 1px rgba(#000, 0.05)
|
||||||
|
|
||||||
> *
|
> *
|
||||||
max-width 600px
|
max-width 600px
|
||||||
|
@ -24,8 +24,8 @@ export default Vue.extend({
|
|||||||
computed: {
|
computed: {
|
||||||
withGradient(): boolean {
|
withGradient(): boolean {
|
||||||
return (this as any).os.isSignedIn
|
return (this as any).os.isSignedIn
|
||||||
? (this as any).os.i.clientSettings.gradientWindowHeader != null
|
? (this as any).clientSettings.gradientWindowHeader != null
|
||||||
? (this as any).os.i.clientSettings.gradientWindowHeader
|
? (this as any).clientSettings.gradientWindowHeader
|
||||||
: false
|
: false
|
||||||
: false;
|
: false;
|
||||||
}
|
}
|
||||||
@ -36,7 +36,7 @@ export default Vue.extend({
|
|||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
root(isDark)
|
root(isDark)
|
||||||
background isDark ? #282C37 : #fff
|
background isDark ? #282C37 : #fff
|
||||||
border solid 1px rgba(0, 0, 0, 0.075)
|
border solid 1px rgba(#000, 0.075)
|
||||||
border-radius 6px
|
border-radius 6px
|
||||||
overflow hidden
|
overflow hidden
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ root(isDark)
|
|||||||
font-size 0.9em
|
font-size 0.9em
|
||||||
font-weight bold
|
font-weight bold
|
||||||
color isDark ? #e3e5e8 : #888
|
color isDark ? #e3e5e8 : #888
|
||||||
box-shadow 0 1px rgba(0, 0, 0, 0.07)
|
box-shadow 0 1px rgba(#000, 0.07)
|
||||||
|
|
||||||
> [data-fa]
|
> [data-fa]
|
||||||
margin-right 6px
|
margin-right 6px
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<div class="main" ref="main" tabindex="-1" :data-is-modal="isModal" @mousedown="onBodyMousedown" @keydown="onKeydown" :style="{ width, height }">
|
<div class="main" ref="main" tabindex="-1" :data-is-modal="isModal" @mousedown="onBodyMousedown" @keydown="onKeydown" :style="{ width, height }">
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<header ref="header"
|
<header ref="header"
|
||||||
:class="{ withGradient }"
|
:class="{ withGradient: clientSettings.gradientWindowHeader }"
|
||||||
@contextmenu.prevent="() => {}" @mousedown.prevent="onHeaderMousedown"
|
@contextmenu.prevent="() => {}" @mousedown.prevent="onHeaderMousedown"
|
||||||
>
|
>
|
||||||
<h1><slot name="header"></slot></h1>
|
<h1><slot name="header"></slot></h1>
|
||||||
@ -17,14 +17,16 @@
|
|||||||
<slot></slot>
|
<slot></slot>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="handle top" v-if="canResize" @mousedown.prevent="onTopHandleMousedown"></div>
|
<template v-if="canResize">
|
||||||
<div class="handle right" v-if="canResize" @mousedown.prevent="onRightHandleMousedown"></div>
|
<div class="handle top" @mousedown.prevent="onTopHandleMousedown"></div>
|
||||||
<div class="handle bottom" v-if="canResize" @mousedown.prevent="onBottomHandleMousedown"></div>
|
<div class="handle right" @mousedown.prevent="onRightHandleMousedown"></div>
|
||||||
<div class="handle left" v-if="canResize" @mousedown.prevent="onLeftHandleMousedown"></div>
|
<div class="handle bottom" @mousedown.prevent="onBottomHandleMousedown"></div>
|
||||||
<div class="handle top-left" v-if="canResize" @mousedown.prevent="onTopLeftHandleMousedown"></div>
|
<div class="handle left" @mousedown.prevent="onLeftHandleMousedown"></div>
|
||||||
<div class="handle top-right" v-if="canResize" @mousedown.prevent="onTopRightHandleMousedown"></div>
|
<div class="handle top-left" @mousedown.prevent="onTopLeftHandleMousedown"></div>
|
||||||
<div class="handle bottom-right" v-if="canResize" @mousedown.prevent="onBottomRightHandleMousedown"></div>
|
<div class="handle top-right" @mousedown.prevent="onTopRightHandleMousedown"></div>
|
||||||
<div class="handle bottom-left" v-if="canResize" @mousedown.prevent="onBottomLeftHandleMousedown"></div>
|
<div class="handle bottom-right" @mousedown.prevent="onBottomRightHandleMousedown"></div>
|
||||||
|
<div class="handle bottom-left" @mousedown.prevent="onBottomLeftHandleMousedown"></div>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -85,17 +87,10 @@ export default Vue.extend({
|
|||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
isFlexible(): boolean {
|
isFlexible(): boolean {
|
||||||
return this.height == null;
|
return this.height == 'auto';
|
||||||
},
|
},
|
||||||
canResize(): boolean {
|
canResize(): boolean {
|
||||||
return !this.isFlexible;
|
return !this.isFlexible;
|
||||||
},
|
|
||||||
withGradient(): boolean {
|
|
||||||
return (this as any).os.isSignedIn
|
|
||||||
? (this as any).os.i.clientSettings.gradientWindowHeader != null
|
|
||||||
? (this as any).os.i.clientSettings.gradientWindowHeader
|
|
||||||
: false
|
|
||||||
: false;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -476,7 +471,7 @@ root(isDark)
|
|||||||
left 0
|
left 0
|
||||||
width 100%
|
width 100%
|
||||||
height 100%
|
height 100%
|
||||||
background rgba(0, 0, 0, 0.7)
|
background rgba(#000, 0.7)
|
||||||
opacity 0
|
opacity 0
|
||||||
pointer-events none
|
pointer-events none
|
||||||
|
|
||||||
@ -493,7 +488,7 @@ root(isDark)
|
|||||||
&:focus
|
&:focus
|
||||||
&:not([data-is-modal])
|
&:not([data-is-modal])
|
||||||
> .body
|
> .body
|
||||||
box-shadow 0 0 0px 1px rgba($theme-color, 0.5), 0 2px 6px 0 rgba(0, 0, 0, 0.2)
|
box-shadow 0 0 0px 1px rgba($theme-color, 0.5), 0 2px 6px 0 rgba(#000, 0.2)
|
||||||
|
|
||||||
> .handle
|
> .handle
|
||||||
$size = 8px
|
$size = 8px
|
||||||
@ -561,7 +556,7 @@ root(isDark)
|
|||||||
overflow hidden
|
overflow hidden
|
||||||
background isDark ? #282C37 : #fff
|
background isDark ? #282C37 : #fff
|
||||||
border-radius 6px
|
border-radius 6px
|
||||||
box-shadow 0 2px 6px 0 rgba(0, 0, 0, 0.2)
|
box-shadow 0 2px 6px 0 rgba(#000, 0.2)
|
||||||
|
|
||||||
> header
|
> header
|
||||||
$header-height = 40px
|
$header-height = 40px
|
||||||
|
@ -114,7 +114,7 @@ export default Vue.extend({
|
|||||||
.notes
|
.notes
|
||||||
max-width 600px
|
max-width 600px
|
||||||
margin 0 auto
|
margin 0 auto
|
||||||
border solid 1px rgba(0, 0, 0, 0.075)
|
border solid 1px rgba(#000, 0.075)
|
||||||
border-radius 6px
|
border-radius 6px
|
||||||
overflow hidden
|
overflow hidden
|
||||||
|
|
||||||
|
@ -8,9 +8,7 @@
|
|||||||
<p class="fetching" v-if="fetching">%fa:spinner .pulse .fw% %i18n:common.loading%<mk-ellipsis/></p>
|
<p class="fetching" v-if="fetching">%fa:spinner .pulse .fw% %i18n:common.loading%<mk-ellipsis/></p>
|
||||||
<template v-else-if="users.length != 0">
|
<template v-else-if="users.length != 0">
|
||||||
<div class="user" v-for="_user in users">
|
<div class="user" v-for="_user in users">
|
||||||
<router-link class="avatar-anchor" :to="_user | userPage">
|
<mk-avatar class="avatar" :user="_user"/>
|
||||||
<img class="avatar" :src="`${_user.avatarUrl}?thumbnail&size=42`" alt="" v-user-preview="_user.id"/>
|
|
||||||
</router-link>
|
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<router-link class="name" :to="_user | userPage" v-user-preview="_user.id">{{ _user | userName }}</router-link>
|
<router-link class="name" :to="_user | userPage" v-user-preview="_user.id">{{ _user | userName }}</router-link>
|
||||||
<p class="username">@{{ _user | acct }}</p>
|
<p class="username">@{{ _user | acct }}</p>
|
||||||
@ -80,18 +78,13 @@ root(isDark)
|
|||||||
display block
|
display block
|
||||||
clear both
|
clear both
|
||||||
|
|
||||||
> .avatar-anchor
|
> .avatar
|
||||||
display block
|
display block
|
||||||
float left
|
float left
|
||||||
margin 0 12px 0 0
|
margin 0 12px 0 0
|
||||||
|
width 42px
|
||||||
> .avatar
|
height 42px
|
||||||
display block
|
border-radius 8px
|
||||||
width 42px
|
|
||||||
height 42px
|
|
||||||
margin 0
|
|
||||||
border-radius 8px
|
|
||||||
vertical-align bottom
|
|
||||||
|
|
||||||
> .body
|
> .body
|
||||||
float left
|
float left
|
||||||
|
@ -38,7 +38,7 @@ export default Vue.extend({
|
|||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
.followers-you-know
|
.followers-you-know
|
||||||
background #fff
|
background #fff
|
||||||
border solid 1px rgba(0, 0, 0, 0.075)
|
border solid 1px rgba(#000, 0.075)
|
||||||
border-radius 6px
|
border-radius 6px
|
||||||
|
|
||||||
> .title
|
> .title
|
||||||
@ -49,7 +49,7 @@ export default Vue.extend({
|
|||||||
font-size 0.9em
|
font-size 0.9em
|
||||||
font-weight bold
|
font-weight bold
|
||||||
color #888
|
color #888
|
||||||
box-shadow 0 1px rgba(0, 0, 0, 0.07)
|
box-shadow 0 1px rgba(#000, 0.07)
|
||||||
|
|
||||||
> i
|
> i
|
||||||
margin-right 4px
|
margin-right 4px
|
||||||
|
@ -4,9 +4,7 @@
|
|||||||
<p class="initializing" v-if="fetching">%fa:spinner .pulse .fw%%i18n:@loading%<mk-ellipsis/></p>
|
<p class="initializing" v-if="fetching">%fa:spinner .pulse .fw%%i18n:@loading%<mk-ellipsis/></p>
|
||||||
<template v-if="!fetching && users.length != 0">
|
<template v-if="!fetching && users.length != 0">
|
||||||
<div class="user" v-for="friend in users">
|
<div class="user" v-for="friend in users">
|
||||||
<router-link class="avatar-anchor" :to="friend | userPage">
|
<mk-avatar class="avatar" :user="friend"/>
|
||||||
<img class="avatar" :src="`${friend.avatarUrl}?thumbnail&size=42`" alt="" v-user-preview="friend.id"/>
|
|
||||||
</router-link>
|
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<router-link class="name" :to="friend | userPage" v-user-preview="friend.id">{{ friend.name }}</router-link>
|
<router-link class="name" :to="friend | userPage" v-user-preview="friend.id">{{ friend.name }}</router-link>
|
||||||
<p class="username">@{{ friend | acct }}</p>
|
<p class="username">@{{ friend | acct }}</p>
|
||||||
@ -44,7 +42,7 @@ export default Vue.extend({
|
|||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
.friends
|
.friends
|
||||||
background #fff
|
background #fff
|
||||||
border solid 1px rgba(0, 0, 0, 0.075)
|
border solid 1px rgba(#000, 0.075)
|
||||||
border-radius 6px
|
border-radius 6px
|
||||||
|
|
||||||
> .title
|
> .title
|
||||||
@ -55,7 +53,7 @@ export default Vue.extend({
|
|||||||
font-size 0.9em
|
font-size 0.9em
|
||||||
font-weight bold
|
font-weight bold
|
||||||
color #888
|
color #888
|
||||||
box-shadow 0 1px rgba(0, 0, 0, 0.07)
|
box-shadow 0 1px rgba(#000, 0.07)
|
||||||
|
|
||||||
> i
|
> i
|
||||||
margin-right 4px
|
margin-right 4px
|
||||||
@ -82,18 +80,13 @@ export default Vue.extend({
|
|||||||
display block
|
display block
|
||||||
clear both
|
clear both
|
||||||
|
|
||||||
> .avatar-anchor
|
> .avatar
|
||||||
display block
|
display block
|
||||||
float left
|
float left
|
||||||
margin 0 12px 0 0
|
margin 0 12px 0 0
|
||||||
|
width 42px
|
||||||
> .avatar
|
height 42px
|
||||||
display block
|
border-radius 8px
|
||||||
width 42px
|
|
||||||
height 42px
|
|
||||||
margin 0
|
|
||||||
border-radius 8px
|
|
||||||
vertical-align bottom
|
|
||||||
|
|
||||||
> .body
|
> .body
|
||||||
float left
|
float left
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<div class="fade"></div>
|
<div class="fade"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<img class="avatar" :src="`${user.avatarUrl}?thumbnail&size=150`" alt="avatar"/>
|
<mk-avatar class="avatar" :user="user" :disable-preview="true"/>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<p class="name">{{ user | userName }}</p>
|
<p class="name">{{ user | userName }}</p>
|
||||||
<p class="username">@{{ user | acct }}</p>
|
<p class="username">@{{ user | acct }}</p>
|
||||||
@ -72,7 +72,7 @@ export default Vue.extend({
|
|||||||
|
|
||||||
overflow hidden
|
overflow hidden
|
||||||
background #f7f7f7
|
background #f7f7f7
|
||||||
box-shadow 0 1px 1px rgba(0, 0, 0, 0.075)
|
box-shadow 0 1px 1px rgba(#000, 0.075)
|
||||||
|
|
||||||
> .is-suspended
|
> .is-suspended
|
||||||
> .is-remote
|
> .is-remote
|
||||||
@ -99,7 +99,7 @@ export default Vue.extend({
|
|||||||
background-color #383838
|
background-color #383838
|
||||||
|
|
||||||
> .fade
|
> .fade
|
||||||
background linear-gradient(transparent, rgba(0, 0, 0, 0.7))
|
background linear-gradient(transparent, rgba(#000, 0.7))
|
||||||
|
|
||||||
> .container
|
> .container
|
||||||
> .title
|
> .title
|
||||||
@ -139,10 +139,9 @@ export default Vue.extend({
|
|||||||
z-index 2
|
z-index 2
|
||||||
width 160px
|
width 160px
|
||||||
height 160px
|
height 160px
|
||||||
margin 0
|
|
||||||
border solid 3px #fff
|
border solid 3px #fff
|
||||||
border-radius 8px
|
border-radius 8px
|
||||||
box-shadow 1px 1px 3px rgba(0, 0, 0, 0.2)
|
box-shadow 1px 1px 3px rgba(#000, 0.2)
|
||||||
|
|
||||||
> .title
|
> .title
|
||||||
position absolute
|
position absolute
|
||||||
|
@ -65,7 +65,7 @@ export default Vue.extend({
|
|||||||
width calc(100% - 275px * 2)
|
width calc(100% - 275px * 2)
|
||||||
|
|
||||||
> .timeline
|
> .timeline
|
||||||
border solid 1px rgba(0, 0, 0, 0.075)
|
border solid 1px rgba(#000, 0.075)
|
||||||
border-radius 6px
|
border-radius 6px
|
||||||
|
|
||||||
> div
|
> div
|
||||||
@ -91,7 +91,7 @@ export default Vue.extend({
|
|||||||
font-size 12px
|
font-size 12px
|
||||||
color #aaa
|
color #aaa
|
||||||
background #fff
|
background #fff
|
||||||
border solid 1px rgba(0, 0, 0, 0.075)
|
border solid 1px rgba(#000, 0.075)
|
||||||
border-radius 6px
|
border-radius 6px
|
||||||
|
|
||||||
a
|
a
|
||||||
|
@ -41,7 +41,7 @@ export default Vue.extend({
|
|||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
.photos
|
.photos
|
||||||
background #fff
|
background #fff
|
||||||
border solid 1px rgba(0, 0, 0, 0.075)
|
border solid 1px rgba(#000, 0.075)
|
||||||
border-radius 6px
|
border-radius 6px
|
||||||
|
|
||||||
> .title
|
> .title
|
||||||
@ -52,7 +52,7 @@ export default Vue.extend({
|
|||||||
font-size 0.9em
|
font-size 0.9em
|
||||||
font-weight bold
|
font-weight bold
|
||||||
color #888
|
color #888
|
||||||
box-shadow 0 1px rgba(0, 0, 0, 0.07)
|
box-shadow 0 1px rgba(#000, 0.07)
|
||||||
|
|
||||||
> i
|
> i
|
||||||
margin-right 4px
|
margin-right 4px
|
||||||
|
@ -118,7 +118,7 @@ export default Vue.extend({
|
|||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
.profile
|
.profile
|
||||||
background #fff
|
background #fff
|
||||||
border solid 1px rgba(0, 0, 0, 0.075)
|
border solid 1px rgba(#000, 0.075)
|
||||||
border-radius 6px
|
border-radius 6px
|
||||||
|
|
||||||
> *:first-child
|
> *:first-child
|
||||||
|
@ -8,9 +8,7 @@
|
|||||||
<p>ようこそ! <b>Misskey</b>はTwitter風ミニブログSNSです。思ったことや皆と共有したいことを投稿しましょう。タイムラインを見れば、皆の関心事をすぐにチェックすることもできます。<a :href="aboutUrl">詳しく...</a></p>
|
<p>ようこそ! <b>Misskey</b>はTwitter風ミニブログSNSです。思ったことや皆と共有したいことを投稿しましょう。タイムラインを見れば、皆の関心事をすぐにチェックすることもできます。<a :href="aboutUrl">詳しく...</a></p>
|
||||||
<p><button class="signup" @click="signup">はじめる</button><button class="signin" @click="signin">ログイン</button></p>
|
<p><button class="signup" @click="signup">はじめる</button><button class="signin" @click="signin">ログイン</button></p>
|
||||||
<div class="users">
|
<div class="users">
|
||||||
<router-link v-for="user in users" :key="user.id" class="avatar-anchor" :to="user | userPage" v-user-preview="user.id">
|
<mk-avatar class="avatar" v-for="user in users" :key="user.id" :user="user"/>
|
||||||
<img class="avatar" :src="`${user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
|
|
||||||
</router-link>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@ -217,13 +215,9 @@ export default Vue.extend({
|
|||||||
> *
|
> *
|
||||||
display inline-block
|
display inline-block
|
||||||
margin 4px
|
margin 4px
|
||||||
|
width 38px
|
||||||
> *
|
height 38px
|
||||||
display inline-block
|
border-radius 6px
|
||||||
width 38px
|
|
||||||
height 38px
|
|
||||||
vertical-align top
|
|
||||||
border-radius 6px
|
|
||||||
|
|
||||||
> div:last-child
|
> div:last-child
|
||||||
|
|
||||||
@ -231,14 +225,14 @@ export default Vue.extend({
|
|||||||
width 410px
|
width 410px
|
||||||
background #fff
|
background #fff
|
||||||
border-radius 8px
|
border-radius 8px
|
||||||
box-shadow 0 0 0 12px rgba(0, 0, 0, 0.1)
|
box-shadow 0 0 0 12px rgba(#000, 0.1)
|
||||||
overflow hidden
|
overflow hidden
|
||||||
|
|
||||||
> header
|
> header
|
||||||
z-index 1
|
z-index 1
|
||||||
padding 12px 16px
|
padding 12px 16px
|
||||||
color #888d94
|
color #888d94
|
||||||
box-shadow 0 1px 0px rgba(0, 0, 0, 0.1)
|
box-shadow 0 1px 0px rgba(#000, 0.1)
|
||||||
|
|
||||||
> div
|
> div
|
||||||
position absolute
|
position absolute
|
||||||
|
@ -22,9 +22,11 @@ export default define({
|
|||||||
} else {
|
} else {
|
||||||
this.props.design++;
|
this.props.design++;
|
||||||
}
|
}
|
||||||
|
this.save();
|
||||||
},
|
},
|
||||||
viewChanged(view) {
|
viewChanged(view) {
|
||||||
this.props.view = view;
|
this.props.view = view;
|
||||||
|
this.save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -37,6 +37,7 @@ export default define({
|
|||||||
methods: {
|
methods: {
|
||||||
func() {
|
func() {
|
||||||
this.props.compact = !this.props.compact;
|
this.props.compact = !this.props.compact;
|
||||||
|
this.save();
|
||||||
},
|
},
|
||||||
settings() {
|
settings() {
|
||||||
const id = window.prompt('チャンネルID');
|
const id = window.prompt('チャンネルID');
|
||||||
@ -61,7 +62,7 @@ export default define({
|
|||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
.mkw-channel
|
.mkw-channel
|
||||||
background #fff
|
background #fff
|
||||||
border solid 1px rgba(0, 0, 0, 0.075)
|
border solid 1px rgba(#000, 0.075)
|
||||||
border-radius 6px
|
border-radius 6px
|
||||||
overflow hidden
|
overflow hidden
|
||||||
|
|
||||||
@ -73,7 +74,7 @@ export default define({
|
|||||||
font-size 0.9em
|
font-size 0.9em
|
||||||
font-weight bold
|
font-weight bold
|
||||||
color #888
|
color #888
|
||||||
box-shadow 0 1px rgba(0, 0, 0, 0.07)
|
box-shadow 0 1px rgba(#000, 0.07)
|
||||||
|
|
||||||
> [data-fa]
|
> [data-fa]
|
||||||
margin-right 4px
|
margin-right 4px
|
||||||
|
@ -35,6 +35,7 @@ export default define({
|
|||||||
} else {
|
} else {
|
||||||
this.props.design++;
|
this.props.design++;
|
||||||
}
|
}
|
||||||
|
this.save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -23,6 +23,7 @@ export default define({
|
|||||||
},
|
},
|
||||||
func() {
|
func() {
|
||||||
this.props.compact = !this.props.compact;
|
this.props.compact = !this.props.compact;
|
||||||
|
this.save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -39,6 +39,7 @@ export default define({
|
|||||||
methods: {
|
methods: {
|
||||||
func() {
|
func() {
|
||||||
this.props.compact = !this.props.compact;
|
this.props.compact = !this.props.compact;
|
||||||
|
this.save();
|
||||||
},
|
},
|
||||||
fetch() {
|
fetch() {
|
||||||
this.fetching = true;
|
this.fetching = true;
|
||||||
|
@ -29,6 +29,7 @@ export default define({
|
|||||||
} else {
|
} else {
|
||||||
this.props.design++;
|
this.props.design++;
|
||||||
}
|
}
|
||||||
|
this.save();
|
||||||
},
|
},
|
||||||
onKeydown(e) {
|
onKeydown(e) {
|
||||||
if ((e.which == 10 || e.which == 13) && (e.ctrlKey || e.metaKey)) this.post();
|
if ((e.which == 10 || e.which == 13) && (e.ctrlKey || e.metaKey)) this.post();
|
||||||
@ -59,7 +60,7 @@ export default define({
|
|||||||
.mkw-post-form
|
.mkw-post-form
|
||||||
background #fff
|
background #fff
|
||||||
overflow hidden
|
overflow hidden
|
||||||
border solid 1px rgba(0, 0, 0, 0.075)
|
border solid 1px rgba(#000, 0.075)
|
||||||
border-radius 6px
|
border-radius 6px
|
||||||
|
|
||||||
> .title
|
> .title
|
||||||
@ -70,7 +71,7 @@ export default define({
|
|||||||
font-size 0.9em
|
font-size 0.9em
|
||||||
font-weight bold
|
font-weight bold
|
||||||
color #888
|
color #888
|
||||||
box-shadow 0 1px rgba(0, 0, 0, 0.07)
|
box-shadow 0 1px rgba(#000, 0.07)
|
||||||
|
|
||||||
> [data-fa]
|
> [data-fa]
|
||||||
margin-right 4px
|
margin-right 4px
|
||||||
|
@ -8,12 +8,9 @@
|
|||||||
title="クリックでバナー編集"
|
title="クリックでバナー編集"
|
||||||
@click="os.apis.updateBanner"
|
@click="os.apis.updateBanner"
|
||||||
></div>
|
></div>
|
||||||
<img class="avatar"
|
<mk-avatar class="avatar" :user="os.i"
|
||||||
:src="`${os.i.avatarUrl}?thumbnail&size=96`"
|
|
||||||
@click="os.apis.updateAvatar"
|
@click="os.apis.updateAvatar"
|
||||||
alt="avatar"
|
|
||||||
title="クリックでアバター編集"
|
title="クリックでアバター編集"
|
||||||
v-user-preview="os.i.id"
|
|
||||||
/>
|
/>
|
||||||
<router-link class="name" :to="os.i | userPage">{{ os.i | userName }}</router-link>
|
<router-link class="name" :to="os.i | userPage">{{ os.i | userName }}</router-link>
|
||||||
<p class="username">@{{ os.i | acct }}</p>
|
<p class="username">@{{ os.i | acct }}</p>
|
||||||
@ -36,6 +33,7 @@ export default define({
|
|||||||
} else {
|
} else {
|
||||||
this.props.design++;
|
this.props.design++;
|
||||||
}
|
}
|
||||||
|
this.save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -45,7 +43,7 @@ export default define({
|
|||||||
root(isDark)
|
root(isDark)
|
||||||
overflow hidden
|
overflow hidden
|
||||||
background isDark ? #282c37 : #fff
|
background isDark ? #282c37 : #fff
|
||||||
border solid 1px rgba(0, 0, 0, 0.075)
|
border solid 1px rgba(#000, 0.075)
|
||||||
border-radius 6px
|
border-radius 6px
|
||||||
|
|
||||||
&[data-compact]
|
&[data-compact]
|
||||||
@ -54,14 +52,14 @@ root(isDark)
|
|||||||
display block
|
display block
|
||||||
width 100%
|
width 100%
|
||||||
height 100%
|
height 100%
|
||||||
background rgba(0, 0, 0, 0.5)
|
background rgba(#000, 0.5)
|
||||||
|
|
||||||
> .avatar
|
> .avatar
|
||||||
top ((100px - 58px) / 2)
|
top ((100px - 58px) / 2)
|
||||||
left ((100px - 58px) / 2)
|
left ((100px - 58px) / 2)
|
||||||
border none
|
border none
|
||||||
border-radius 100%
|
border-radius 100%
|
||||||
box-shadow 0 0 16px rgba(0, 0, 0, 0.5)
|
box-shadow 0 0 16px rgba(#000, 0.5)
|
||||||
|
|
||||||
> .name
|
> .name
|
||||||
position absolute
|
position absolute
|
||||||
@ -70,7 +68,7 @@ root(isDark)
|
|||||||
margin 0
|
margin 0
|
||||||
line-height 100px
|
line-height 100px
|
||||||
color #fff
|
color #fff
|
||||||
text-shadow 0 0 8px rgba(0, 0, 0, 0.5)
|
text-shadow 0 0 8px rgba(#000, 0.5)
|
||||||
|
|
||||||
> .username
|
> .username
|
||||||
display none
|
display none
|
||||||
@ -103,10 +101,8 @@ root(isDark)
|
|||||||
left 16px
|
left 16px
|
||||||
width 58px
|
width 58px
|
||||||
height 58px
|
height 58px
|
||||||
margin 0
|
|
||||||
border solid 3px isDark ? #282c37 : #fff
|
border solid 3px isDark ? #282c37 : #fff
|
||||||
border-radius 8px
|
border-radius 8px
|
||||||
vertical-align bottom
|
|
||||||
cursor pointer
|
cursor pointer
|
||||||
|
|
||||||
> .name
|
> .name
|
||||||
|
@ -22,6 +22,7 @@ export default define({
|
|||||||
} else {
|
} else {
|
||||||
this.props.design++;
|
this.props.design++;
|
||||||
}
|
}
|
||||||
|
this.save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -38,6 +38,7 @@ export default define({
|
|||||||
methods: {
|
methods: {
|
||||||
func() {
|
func() {
|
||||||
this.props.compact = !this.props.compact;
|
this.props.compact = !this.props.compact;
|
||||||
|
this.save();
|
||||||
},
|
},
|
||||||
fetch() {
|
fetch() {
|
||||||
this.fetching = true;
|
this.fetching = true;
|
||||||
|
@ -8,9 +8,7 @@
|
|||||||
<p class="fetching" v-if="fetching">%fa:spinner .pulse .fw%%i18n:common.loading%<mk-ellipsis/></p>
|
<p class="fetching" v-if="fetching">%fa:spinner .pulse .fw%%i18n:common.loading%<mk-ellipsis/></p>
|
||||||
<template v-else-if="users.length != 0">
|
<template v-else-if="users.length != 0">
|
||||||
<div class="user" v-for="_user in users">
|
<div class="user" v-for="_user in users">
|
||||||
<router-link class="avatar-anchor" :to="_user | userPage">
|
<mk-avatar class="avatar" :user="_user"/>
|
||||||
<img class="avatar" :src="`${_user.avatarUrl}?thumbnail&size=42`" alt="" v-user-preview="_user.id"/>
|
|
||||||
</router-link>
|
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<router-link class="name" :to="_user | userPage" v-user-preview="_user.id">{{ _user | userName }}</router-link>
|
<router-link class="name" :to="_user | userPage" v-user-preview="_user.id">{{ _user | userName }}</router-link>
|
||||||
<p class="username">@{{ _user | acct }}</p>
|
<p class="username">@{{ _user | acct }}</p>
|
||||||
@ -48,6 +46,7 @@ export default define({
|
|||||||
methods: {
|
methods: {
|
||||||
func() {
|
func() {
|
||||||
this.props.compact = !this.props.compact;
|
this.props.compact = !this.props.compact;
|
||||||
|
this.save();
|
||||||
},
|
},
|
||||||
fetch() {
|
fetch() {
|
||||||
this.fetching = true;
|
this.fetching = true;
|
||||||
@ -88,18 +87,13 @@ root(isDark)
|
|||||||
display block
|
display block
|
||||||
clear both
|
clear both
|
||||||
|
|
||||||
> .avatar-anchor
|
> .avatar
|
||||||
display block
|
display block
|
||||||
float left
|
float left
|
||||||
margin 0 12px 0 0
|
margin 0 12px 0 0
|
||||||
|
width 42px
|
||||||
> .avatar
|
height 42px
|
||||||
display block
|
border-radius 8px
|
||||||
width 42px
|
|
||||||
height 42px
|
|
||||||
margin 0
|
|
||||||
border-radius 8px
|
|
||||||
vertical-align bottom
|
|
||||||
|
|
||||||
> .body
|
> .body
|
||||||
float left
|
float left
|
||||||
|
@ -41,17 +41,6 @@ require('./common/views/widgets');
|
|||||||
// Register global filters
|
// Register global filters
|
||||||
require('./common/views/filters');
|
require('./common/views/filters');
|
||||||
|
|
||||||
const store = new Vuex.Store({
|
|
||||||
state: {
|
|
||||||
uiHeaderHeight: 0
|
|
||||||
},
|
|
||||||
mutations: {
|
|
||||||
setUiHeaderHeight(state, height) {
|
|
||||||
state.uiHeaderHeight = height;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
Vue.mixin({
|
Vue.mixin({
|
||||||
destroyed(this: any) {
|
destroyed(this: any) {
|
||||||
if (this.$el.parentNode) {
|
if (this.$el.parentNode) {
|
||||||
@ -157,22 +146,15 @@ export default (callback: (launch: (router: VueRouter, api?: (os: MiOS) => API)
|
|||||||
return {
|
return {
|
||||||
os,
|
os,
|
||||||
api: os.api,
|
api: os.api,
|
||||||
apis: os.apis
|
apis: os.apis,
|
||||||
|
clientSettings: os.store.state.settings.data
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const app = new Vue({
|
const app = new Vue({
|
||||||
store,
|
store: os.store,
|
||||||
router,
|
router,
|
||||||
created() {
|
|
||||||
this.$watch('os.i', i => {
|
|
||||||
// キャッシュ更新
|
|
||||||
localStorage.setItem('me', JSON.stringify(i));
|
|
||||||
}, {
|
|
||||||
deep: true
|
|
||||||
});
|
|
||||||
},
|
|
||||||
render: createEl => createEl(App)
|
render: createEl => createEl(App)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ export default Vue.extend({
|
|||||||
width 100%
|
width 100%
|
||||||
height 100%
|
height 100%
|
||||||
padding 8px
|
padding 8px
|
||||||
background rgba(0, 0, 0, 0.2)
|
background rgba(#000, 0.2)
|
||||||
|
|
||||||
> .body
|
> .body
|
||||||
width 100%
|
width 100%
|
||||||
|
@ -38,7 +38,7 @@ export default Vue.extend({
|
|||||||
width 100%
|
width 100%
|
||||||
height 100%
|
height 100%
|
||||||
padding 8px
|
padding 8px
|
||||||
background rgba(0, 0, 0, 0.2)
|
background rgba(#000, 0.2)
|
||||||
|
|
||||||
> .body
|
> .body
|
||||||
width 100%
|
width 100%
|
||||||
|
@ -139,7 +139,7 @@ export default Vue.extend({
|
|||||||
max-width 100%
|
max-width 100%
|
||||||
max-height 300px
|
max-height 300px
|
||||||
margin 0 auto
|
margin 0 auto
|
||||||
box-shadow 1px 1px 4px rgba(0, 0, 0, 0.2)
|
box-shadow 1px 1px 4px rgba(#000, 0.2)
|
||||||
|
|
||||||
> footer
|
> footer
|
||||||
padding 8px 8px 0 8px
|
padding 8px 8px 0 8px
|
||||||
@ -226,7 +226,7 @@ export default Vue.extend({
|
|||||||
background-color #767676
|
background-color #767676
|
||||||
background-image none
|
background-image none
|
||||||
border-color #444
|
border-color #444
|
||||||
box-shadow 0 1px 3px rgba(0, 0, 0, 0.075), inset 0 0 5px rgba(0, 0, 0, 0.2)
|
box-shadow 0 1px 3px rgba(#000, 0.075), inset 0 0 5px rgba(#000, 0.2)
|
||||||
|
|
||||||
> [data-fa]
|
> [data-fa]
|
||||||
margin-right 4px
|
margin-right 4px
|
||||||
|
@ -474,11 +474,11 @@ export default Vue.extend({
|
|||||||
overflow auto
|
overflow auto
|
||||||
white-space nowrap
|
white-space nowrap
|
||||||
font-size 0.9em
|
font-size 0.9em
|
||||||
color rgba(0, 0, 0, 0.67)
|
color rgba(#000, 0.67)
|
||||||
-webkit-backdrop-filter blur(12px)
|
-webkit-backdrop-filter blur(12px)
|
||||||
backdrop-filter blur(12px)
|
backdrop-filter blur(12px)
|
||||||
background-color rgba(#fff, 0.75)
|
background-color rgba(#fff, 0.75)
|
||||||
border-bottom solid 1px rgba(0, 0, 0, 0.13)
|
border-bottom solid 1px rgba(#000, 0.13)
|
||||||
|
|
||||||
> p
|
> p
|
||||||
> a
|
> a
|
||||||
@ -555,7 +555,7 @@ export default Vue.extend({
|
|||||||
display inline-block
|
display inline-block
|
||||||
position absolute
|
position absolute
|
||||||
top 0
|
top 0
|
||||||
background rgba(0, 0, 0, 0.2)
|
background rgba(#000, 0.2)
|
||||||
border-radius 100%
|
border-radius 100%
|
||||||
|
|
||||||
animation sk-bounce 2.0s infinite ease-in-out
|
animation sk-bounce 2.0s infinite ease-in-out
|
||||||
|
@ -57,7 +57,7 @@ export default Vue.extend({
|
|||||||
.mk-friends-maker
|
.mk-friends-maker
|
||||||
background #fff
|
background #fff
|
||||||
border-radius 8px
|
border-radius 8px
|
||||||
box-shadow 0 0 0 1px rgba(0, 0, 0, 0.2)
|
box-shadow 0 0 0 1px rgba(#000, 0.2)
|
||||||
|
|
||||||
> .title
|
> .title
|
||||||
margin 0
|
margin 0
|
||||||
|
@ -27,17 +27,17 @@ export default Vue.extend({
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
.mk-note-card
|
root(isDark)
|
||||||
display inline-block
|
display inline-block
|
||||||
width 150px
|
width 150px
|
||||||
//height 120px
|
//height 120px
|
||||||
font-size 12px
|
font-size 12px
|
||||||
background #fff
|
background isDark ? #282c37 : #fff
|
||||||
border-radius 4px
|
border-radius 4px
|
||||||
|
|
||||||
> a
|
> a
|
||||||
display block
|
display block
|
||||||
color #2c3940
|
color isDark ? #fff : #2c3940
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
text-decoration none
|
text-decoration none
|
||||||
@ -75,11 +75,17 @@ export default Vue.extend({
|
|||||||
left 0
|
left 0
|
||||||
width 100%
|
width 100%
|
||||||
height 20px
|
height 20px
|
||||||
background linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, #fff 100%)
|
background isDark ? linear-gradient(to bottom, rgba(#282c37, 0) 0%, #282c37 100%) : linear-gradient(to bottom, rgba(#fff, 0) 0%, #fff 100%)
|
||||||
|
|
||||||
> .mk-time
|
> .mk-time
|
||||||
display inline-block
|
display inline-block
|
||||||
padding 8px
|
padding 8px
|
||||||
color #aaa
|
color #aaa
|
||||||
|
|
||||||
|
.mk-note-card[data-darkmode]
|
||||||
|
root(true)
|
||||||
|
|
||||||
|
.mk-note-card:not([data-darkmode])
|
||||||
|
root(false)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="root sub">
|
<div class="root sub">
|
||||||
<router-link class="avatar-anchor" :to="note.user | userPage">
|
<mk-avatar class="avatar" :user="note.user"/>
|
||||||
<img class="avatar" :src="`${note.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
|
|
||||||
</router-link>
|
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<header>
|
<header>
|
||||||
<router-link class="name" :to="note.user | userPage">{{ note.user | userName }}</router-link>
|
<router-link class="name" :to="note.user | userPage">{{ note.user | userName }}</router-link>
|
||||||
@ -43,18 +41,13 @@ root(isDark)
|
|||||||
display block
|
display block
|
||||||
clear both
|
clear both
|
||||||
|
|
||||||
> .avatar-anchor
|
> .avatar
|
||||||
display block
|
display block
|
||||||
float left
|
float left
|
||||||
margin 0 12px 0 0
|
margin 0 12px 0 0
|
||||||
|
width 48px
|
||||||
> .avatar
|
height 48px
|
||||||
display block
|
border-radius 8px
|
||||||
width 48px
|
|
||||||
height 48px
|
|
||||||
margin 0
|
|
||||||
border-radius 8px
|
|
||||||
vertical-align bottom
|
|
||||||
|
|
||||||
> .main
|
> .main
|
||||||
float left
|
float left
|
||||||
|
@ -17,17 +17,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="renote" v-if="isRenote">
|
<div class="renote" v-if="isRenote">
|
||||||
<p>
|
<p>
|
||||||
<router-link class="avatar-anchor" :to="note.user | userPage">
|
<mk-avatar class="avatar" :user="note.user"/>%fa:retweet%<router-link class="name" :to="note.user | userPage">{{ note.user | userName }}</router-link>がRenote
|
||||||
<img class="avatar" :src="`${note.user.avatarUrl}?thumbnail&size=32`" alt="avatar"/>
|
|
||||||
</router-link>
|
|
||||||
%fa:retweet%<router-link class="name" :to="note.user | userPage">{{ note.user | userName }}</router-link>がRenote
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<article>
|
<article>
|
||||||
<header>
|
<header>
|
||||||
<router-link class="avatar-anchor" :to="p.user | userPage">
|
<mk-avatar class="avatar" :user="p.user"/>
|
||||||
<img class="avatar" :src="`${p.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
|
|
||||||
</router-link>
|
|
||||||
<div>
|
<div>
|
||||||
<router-link class="name" :to="p.user | userPage">{{ p.user | userName }}</router-link>
|
<router-link class="name" :to="p.user | userPage">{{ p.user | userName }}</router-link>
|
||||||
<span class="username">@{{ p.user | acct }}</span>
|
<span class="username">@{{ p.user | acct }}</span>
|
||||||
@ -35,6 +30,7 @@
|
|||||||
</header>
|
</header>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<div class="text">
|
<div class="text">
|
||||||
|
<span v-if="p.isHidden" style="opacity: 0.5">(この投稿は非公開です)</span>
|
||||||
<mk-note-html v-if="p.text" :text="p.text" :i="os.i"/>
|
<mk-note-html v-if="p.text" :text="p.text" :i="os.i"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="tags" v-if="p.tags && p.tags.length > 0">
|
<div class="tags" v-if="p.tags && p.tags.length > 0">
|
||||||
@ -151,7 +147,7 @@ export default Vue.extend({
|
|||||||
|
|
||||||
// Draw map
|
// Draw map
|
||||||
if (this.p.geo) {
|
if (this.p.geo) {
|
||||||
const shouldShowMap = (this as any).os.isSignedIn ? (this as any).os.i.clientSettings.showMaps : true;
|
const shouldShowMap = (this as any).os.isSignedIn ? (this as any).clientSettings.showMaps : true;
|
||||||
if (shouldShowMap) {
|
if (shouldShowMap) {
|
||||||
(this as any).os.getGoogleMaps().then(maps => {
|
(this as any).os.getGoogleMaps().then(maps => {
|
||||||
const uluru = new maps.LatLng(this.p.geo.coordinates[1], this.p.geo.coordinates[0]);
|
const uluru = new maps.LatLng(this.p.geo.coordinates[1], this.p.geo.coordinates[0]);
|
||||||
@ -261,17 +257,12 @@ root(isDark)
|
|||||||
margin 0
|
margin 0
|
||||||
padding 16px 32px
|
padding 16px 32px
|
||||||
|
|
||||||
.avatar-anchor
|
.avatar
|
||||||
display inline-block
|
display inline-block
|
||||||
|
width 28px
|
||||||
.avatar
|
height 28px
|
||||||
vertical-align bottom
|
margin 0 8px 0 0
|
||||||
min-width 28px
|
border-radius 6px
|
||||||
min-height 28px
|
|
||||||
max-width 28px
|
|
||||||
max-height 28px
|
|
||||||
margin 0 8px 0 0
|
|
||||||
border-radius 6px
|
|
||||||
|
|
||||||
[data-fa]
|
[data-fa]
|
||||||
margin-right 4px
|
margin-right 4px
|
||||||
@ -300,21 +291,16 @@ root(isDark)
|
|||||||
display flex
|
display flex
|
||||||
line-height 1.1em
|
line-height 1.1em
|
||||||
|
|
||||||
> .avatar-anchor
|
> .avatar
|
||||||
display block
|
display block
|
||||||
padding 0 12px 0 0
|
margin 0 12px 0 0
|
||||||
|
width 54px
|
||||||
|
height 54px
|
||||||
|
border-radius 8px
|
||||||
|
|
||||||
> .avatar
|
@media (min-width 500px)
|
||||||
display block
|
width 60px
|
||||||
width 54px
|
height 60px
|
||||||
height 54px
|
|
||||||
margin 0
|
|
||||||
border-radius 8px
|
|
||||||
vertical-align bottom
|
|
||||||
|
|
||||||
@media (min-width 500px)
|
|
||||||
width 60px
|
|
||||||
height 60px
|
|
||||||
|
|
||||||
> div
|
> div
|
||||||
|
|
||||||
@ -405,7 +391,7 @@ root(isDark)
|
|||||||
|
|
||||||
> .time
|
> .time
|
||||||
font-size 16px
|
font-size 16px
|
||||||
color #c0c0c0
|
color isDark ? #606984 : #c0c0c0
|
||||||
|
|
||||||
> footer
|
> footer
|
||||||
font-size 1.2em
|
font-size 1.2em
|
||||||
@ -417,14 +403,14 @@ root(isDark)
|
|||||||
border none
|
border none
|
||||||
box-shadow none
|
box-shadow none
|
||||||
font-size 1em
|
font-size 1em
|
||||||
color #ddd
|
color isDark ? #606984 : #ddd
|
||||||
cursor pointer
|
cursor pointer
|
||||||
|
|
||||||
&:not(:last-child)
|
&:not(:last-child)
|
||||||
margin-right 28px
|
margin-right 28px
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
color #666
|
color isDark ? #9198af : #666
|
||||||
|
|
||||||
> .count
|
> .count
|
||||||
display inline
|
display inline
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mk-note-preview">
|
<div class="mk-note-preview">
|
||||||
<router-link class="avatar-anchor" :to="note.user | userPage">
|
<mk-avatar class="avatar" :user="note.user"/>
|
||||||
<img class="avatar" :src="`${note.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
|
|
||||||
</router-link>
|
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<header>
|
<header>
|
||||||
<router-link class="name" :to="note.user | userPage">{{ note.user | userName }}</router-link>
|
<router-link class="name" :to="note.user | userPage">{{ note.user | userName }}</router-link>
|
||||||
@ -27,33 +25,23 @@ export default Vue.extend({
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
.mk-note-preview
|
root(isDark)
|
||||||
margin 0
|
margin 0
|
||||||
padding 0
|
padding 0
|
||||||
font-size 0.9em
|
font-size 0.9em
|
||||||
background #fff
|
|
||||||
|
|
||||||
&:after
|
&:after
|
||||||
content ""
|
content ""
|
||||||
display block
|
display block
|
||||||
clear both
|
clear both
|
||||||
|
|
||||||
&:hover
|
> .avatar
|
||||||
> .main > footer > button
|
|
||||||
color #888
|
|
||||||
|
|
||||||
> .avatar-anchor
|
|
||||||
display block
|
display block
|
||||||
float left
|
float left
|
||||||
margin 0 12px 0 0
|
margin 0 12px 0 0
|
||||||
|
width 48px
|
||||||
> .avatar
|
height 48px
|
||||||
display block
|
border-radius 8px
|
||||||
width 48px
|
|
||||||
height 48px
|
|
||||||
margin 0
|
|
||||||
border-radius 8px
|
|
||||||
vertical-align bottom
|
|
||||||
|
|
||||||
> .main
|
> .main
|
||||||
float left
|
float left
|
||||||
@ -69,7 +57,7 @@ export default Vue.extend({
|
|||||||
margin 0 .5em 0 0
|
margin 0 .5em 0 0
|
||||||
padding 0
|
padding 0
|
||||||
overflow hidden
|
overflow hidden
|
||||||
color #607073
|
color isDark ? #fff : #607073
|
||||||
font-size 1em
|
font-size 1em
|
||||||
font-weight 700
|
font-weight 700
|
||||||
text-align left
|
text-align left
|
||||||
@ -82,11 +70,11 @@ export default Vue.extend({
|
|||||||
> .username
|
> .username
|
||||||
text-align left
|
text-align left
|
||||||
margin 0 .5em 0 0
|
margin 0 .5em 0 0
|
||||||
color #d1d8da
|
color isDark ? #606984 : #d1d8da
|
||||||
|
|
||||||
> .time
|
> .time
|
||||||
margin-left auto
|
margin-left auto
|
||||||
color #b2b8bb
|
color isDark ? #606984 : #b2b8bb
|
||||||
|
|
||||||
> .body
|
> .body
|
||||||
|
|
||||||
@ -95,6 +83,12 @@ export default Vue.extend({
|
|||||||
margin 0
|
margin 0
|
||||||
padding 0
|
padding 0
|
||||||
font-size 1.1em
|
font-size 1.1em
|
||||||
color #717171
|
color isDark ? #959ba7 : #717171
|
||||||
|
|
||||||
|
.mk-note-preview[data-darkmode]
|
||||||
|
root(true)
|
||||||
|
|
||||||
|
.mk-note-preview:not([data-darkmode])
|
||||||
|
root(false)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,15 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="sub">
|
<div class="sub">
|
||||||
<router-link class="avatar-anchor" :to="note.user | userPage">
|
<mk-avatar class="avatar" :user="note.user"/>
|
||||||
<img class="avatar" :src="`${note.user.avatarUrl}?thumbnail&size=96`" alt="avatar"/>
|
|
||||||
</router-link>
|
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<header>
|
<header>
|
||||||
<router-link class="name" :to="note.user | userPage">{{ note.user | userName }}</router-link>
|
<router-link class="name" :to="note.user | userPage">{{ note.user | userName }}</router-link>
|
||||||
<span class="username">@{{ note.user | acct }}</span>
|
<span class="username">@{{ note.user | acct }}</span>
|
||||||
<router-link class="created-at" :to="note | notePage">
|
<div class="info">
|
||||||
<mk-time :time="note.createdAt"/>
|
<span class="mobile" v-if="note.viaMobile">%fa:mobile-alt%</span>
|
||||||
</router-link>
|
<router-link class="created-at" :to="note | notePage">
|
||||||
|
<mk-time :time="note.createdAt"/>
|
||||||
|
</router-link>
|
||||||
|
<span class="visibility" v-if="note.visibility != 'public'">
|
||||||
|
<template v-if="note.visibility == 'home'">%fa:home%</template>
|
||||||
|
<template v-if="note.visibility == 'followers'">%fa:unlock%</template>
|
||||||
|
<template v-if="note.visibility == 'specified'">%fa:envelope%</template>
|
||||||
|
<template v-if="note.visibility == 'private'">%fa:lock%</template>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<mk-sub-note-content class="text" :note="note"/>
|
<mk-sub-note-content class="text" :note="note"/>
|
||||||
@ -28,8 +35,9 @@ export default Vue.extend({
|
|||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
root(isDark)
|
root(isDark)
|
||||||
font-size 0.9em
|
|
||||||
padding 16px
|
padding 16px
|
||||||
|
font-size 0.9em
|
||||||
|
background isDark ? #21242d : #fcfcfc
|
||||||
|
|
||||||
@media (min-width 600px)
|
@media (min-width 600px)
|
||||||
padding 24px 32px
|
padding 24px 32px
|
||||||
@ -39,25 +47,18 @@ root(isDark)
|
|||||||
display block
|
display block
|
||||||
clear both
|
clear both
|
||||||
|
|
||||||
> .avatar-anchor
|
> .avatar
|
||||||
display block
|
display block
|
||||||
float left
|
float left
|
||||||
margin 0 10px 0 0
|
margin 0 10px 0 0
|
||||||
|
width 44px
|
||||||
|
height 44px
|
||||||
|
border-radius 8px
|
||||||
|
|
||||||
@media (min-width 500px)
|
@media (min-width 500px)
|
||||||
margin-right 16px
|
margin-right 16px
|
||||||
|
width 52px
|
||||||
> .avatar
|
height 52px
|
||||||
display block
|
|
||||||
width 44px
|
|
||||||
height 44px
|
|
||||||
margin 0
|
|
||||||
border-radius 8px
|
|
||||||
vertical-align bottom
|
|
||||||
|
|
||||||
@media (min-width 500px)
|
|
||||||
width 52px
|
|
||||||
height 52px
|
|
||||||
|
|
||||||
> .main
|
> .main
|
||||||
float left
|
float left
|
||||||
@ -91,9 +92,18 @@ root(isDark)
|
|||||||
margin 0
|
margin 0
|
||||||
color isDark ? #606984 : #d1d8da
|
color isDark ? #606984 : #d1d8da
|
||||||
|
|
||||||
> .created-at
|
> .info
|
||||||
margin-left auto
|
margin-left auto
|
||||||
color isDark ? #606984 : #b2b8bb
|
font-size 0.9em
|
||||||
|
|
||||||
|
> *
|
||||||
|
color isDark ? #606984 : #b2b8bb
|
||||||
|
|
||||||
|
> .mobile
|
||||||
|
margin-right 6px
|
||||||
|
|
||||||
|
> .visibility
|
||||||
|
margin-left 6px
|
||||||
|
|
||||||
> .body
|
> .body
|
||||||
max-height 128px
|
max-height 128px
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="note" :class="{ renote: isRenote }">
|
<div class="note" :class="{ renote: isRenote }">
|
||||||
<div class="reply-to" v-if="p.reply && (!os.isSignedIn || os.i.clientSettings.showReplyTarget)">
|
<div class="reply-to" v-if="p.reply && (!os.isSignedIn || clientSettings.showReplyTarget)">
|
||||||
<x-sub :note="p.reply"/>
|
<x-sub :note="p.reply"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="renote" v-if="isRenote">
|
<div class="renote" v-if="isRenote">
|
||||||
<router-link class="avatar-anchor" :to="note.user | userPage">
|
<mk-avatar class="avatar" :user="note.user"/>
|
||||||
<img class="avatar" :src="`${note.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
|
|
||||||
</router-link>
|
|
||||||
%fa:retweet%
|
%fa:retweet%
|
||||||
<span>{{ '%i18n:!@reposted-by%'.substr(0, '%i18n:!@reposted-by%'.indexOf('{')) }}</span>
|
<span>{{ '%i18n:!@reposted-by%'.substr(0, '%i18n:!@reposted-by%'.indexOf('{')) }}</span>
|
||||||
<router-link class="name" :to="note.user | userPage">{{ note.user | userName }}</router-link>
|
<router-link class="name" :to="note.user | userPage">{{ note.user | userName }}</router-link>
|
||||||
@ -14,9 +12,7 @@
|
|||||||
<mk-time :time="note.createdAt"/>
|
<mk-time :time="note.createdAt"/>
|
||||||
</div>
|
</div>
|
||||||
<article>
|
<article>
|
||||||
<router-link class="avatar-anchor" :to="p.user | userPage">
|
<mk-avatar class="avatar" :user="p.user"/>
|
||||||
<img class="avatar" :src="`${p.user.avatarUrl}?thumbnail&size=96`" alt="avatar"/>
|
|
||||||
</router-link>
|
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<header>
|
<header>
|
||||||
<router-link class="name" :to="p.user | userPage">{{ p.user | userName }}</router-link>
|
<router-link class="name" :to="p.user | userPage">{{ p.user | userName }}</router-link>
|
||||||
@ -27,6 +23,12 @@
|
|||||||
<router-link class="created-at" :to="p | notePage">
|
<router-link class="created-at" :to="p | notePage">
|
||||||
<mk-time :time="p.createdAt"/>
|
<mk-time :time="p.createdAt"/>
|
||||||
</router-link>
|
</router-link>
|
||||||
|
<span class="visibility" v-if="p.visibility != 'public'">
|
||||||
|
<template v-if="p.visibility == 'home'">%fa:home%</template>
|
||||||
|
<template v-if="p.visibility == 'followers'">%fa:unlock%</template>
|
||||||
|
<template v-if="p.visibility == 'specified'">%fa:envelope%</template>
|
||||||
|
<template v-if="p.visibility == 'private'">%fa:lock%</template>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
@ -37,9 +39,8 @@
|
|||||||
</p>
|
</p>
|
||||||
<div class="content" v-show="p.cw == null || showContent">
|
<div class="content" v-show="p.cw == null || showContent">
|
||||||
<div class="text">
|
<div class="text">
|
||||||
<a class="reply" v-if="p.reply">
|
<span v-if="p.isHidden" style="opacity: 0.5">(この投稿は非公開です)</span>
|
||||||
%fa:reply%
|
<a class="reply" v-if="p.reply">%fa:reply%</a>
|
||||||
</a>
|
|
||||||
<mk-note-html v-if="p.text" :text="p.text" :i="os.i" :class="$style.text"/>
|
<mk-note-html v-if="p.text" :text="p.text" :i="os.i" :class="$style.text"/>
|
||||||
<a class="rp" v-if="p.renote != null">RP:</a>
|
<a class="rp" v-if="p.renote != null">RP:</a>
|
||||||
</div>
|
</div>
|
||||||
@ -149,7 +150,7 @@ export default Vue.extend({
|
|||||||
|
|
||||||
// Draw map
|
// Draw map
|
||||||
if (this.p.geo) {
|
if (this.p.geo) {
|
||||||
const shouldShowMap = (this as any).os.isSignedIn ? (this as any).os.i.clientSettings.showMaps : true;
|
const shouldShowMap = (this as any).os.isSignedIn ? (this as any).clientSettings.showMaps : true;
|
||||||
if (shouldShowMap) {
|
if (shouldShowMap) {
|
||||||
(this as any).os.getGoogleMaps().then(maps => {
|
(this as any).os.getGoogleMaps().then(maps => {
|
||||||
const uluru = new maps.LatLng(this.p.geo.coordinates[1], this.p.geo.coordinates[0]);
|
const uluru = new maps.LatLng(this.p.geo.coordinates[1], this.p.geo.coordinates[0]);
|
||||||
@ -240,12 +241,6 @@ root(isDark)
|
|||||||
font-size 12px
|
font-size 12px
|
||||||
border-bottom solid 1px isDark ? #1c2023 : #eaeaea
|
border-bottom solid 1px isDark ? #1c2023 : #eaeaea
|
||||||
|
|
||||||
&:first-child
|
|
||||||
border-radius 8px 8px 0 0
|
|
||||||
|
|
||||||
> .renote
|
|
||||||
border-radius 8px 8px 0 0
|
|
||||||
|
|
||||||
&:last-of-type
|
&:last-of-type
|
||||||
border-bottom none
|
border-bottom none
|
||||||
|
|
||||||
@ -269,15 +264,12 @@ root(isDark)
|
|||||||
@media (min-width 600px)
|
@media (min-width 600px)
|
||||||
padding 16px 32px
|
padding 16px 32px
|
||||||
|
|
||||||
.avatar-anchor
|
.avatar
|
||||||
display inline-block
|
display inline-block
|
||||||
|
width 28px
|
||||||
.avatar
|
height 28px
|
||||||
vertical-align bottom
|
margin 0 8px 0 0
|
||||||
width 28px
|
border-radius 6px
|
||||||
height 28px
|
|
||||||
margin 0 8px 0 0
|
|
||||||
border-radius 6px
|
|
||||||
|
|
||||||
[data-fa]
|
[data-fa]
|
||||||
margin-right 4px
|
margin-right 4px
|
||||||
@ -304,12 +296,6 @@ root(isDark)
|
|||||||
& + article
|
& + article
|
||||||
padding-top 8px
|
padding-top 8px
|
||||||
|
|
||||||
> .reply-to
|
|
||||||
background rgba(0, 0, 0, 0.0125)
|
|
||||||
|
|
||||||
> .mk-note-preview
|
|
||||||
background transparent
|
|
||||||
|
|
||||||
> article
|
> article
|
||||||
padding 16px 16px 9px
|
padding 16px 16px 9px
|
||||||
|
|
||||||
@ -321,29 +307,22 @@ root(isDark)
|
|||||||
display block
|
display block
|
||||||
clear both
|
clear both
|
||||||
|
|
||||||
> .avatar-anchor
|
> .avatar
|
||||||
display block
|
display block
|
||||||
float left
|
float left
|
||||||
margin 0 10px 8px 0
|
margin 0 10px 8px 0
|
||||||
|
width 48px
|
||||||
|
height 48px
|
||||||
|
border-radius 6px
|
||||||
//position -webkit-sticky
|
//position -webkit-sticky
|
||||||
//position sticky
|
//position sticky
|
||||||
//top 62px
|
//top 62px
|
||||||
|
|
||||||
@media (min-width 500px)
|
@media (min-width 500px)
|
||||||
margin-right 16px
|
margin-right 16px
|
||||||
|
width 58px
|
||||||
> .avatar
|
height 58px
|
||||||
display block
|
border-radius 8px
|
||||||
width 48px
|
|
||||||
height 48px
|
|
||||||
margin 0
|
|
||||||
border-radius 6px
|
|
||||||
vertical-align bottom
|
|
||||||
|
|
||||||
@media (min-width 500px)
|
|
||||||
width 58px
|
|
||||||
height 58px
|
|
||||||
border-radius 8px
|
|
||||||
|
|
||||||
> .main
|
> .main
|
||||||
float left
|
float left
|
||||||
@ -392,12 +371,14 @@ root(isDark)
|
|||||||
margin-left auto
|
margin-left auto
|
||||||
font-size 0.9em
|
font-size 0.9em
|
||||||
|
|
||||||
> .mobile
|
> *
|
||||||
margin-right 6px
|
|
||||||
color isDark ? #606984 : #c0c0c0
|
color isDark ? #606984 : #c0c0c0
|
||||||
|
|
||||||
> .created-at
|
> .mobile
|
||||||
color isDark ? #606984 : #c0c0c0
|
margin-right 6px
|
||||||
|
|
||||||
|
> .visibility
|
||||||
|
margin-left 6px
|
||||||
|
|
||||||
> .body
|
> .body
|
||||||
|
|
||||||
|
@ -116,13 +116,13 @@ export default Vue.extend({
|
|||||||
const isMyNote = note.userId == (this as any).os.i.id;
|
const isMyNote = note.userId == (this as any).os.i.id;
|
||||||
const isPureRenote = note.renoteId != null && note.text == null && note.mediaIds.length == 0 && note.poll == null;
|
const isPureRenote = note.renoteId != null && note.text == null && note.mediaIds.length == 0 && note.poll == null;
|
||||||
|
|
||||||
if ((this as any).os.i.clientSettings.showMyRenotes === false) {
|
if ((this as any).clientSettings.showMyRenotes === false) {
|
||||||
if (isMyNote && isPureRenote) {
|
if (isMyNote && isPureRenote) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((this as any).os.i.clientSettings.showRenotedMyNotes === false) {
|
if ((this as any).clientSettings.showRenotedMyNotes === false) {
|
||||||
if (isPureRenote && (note.renote.userId == (this as any).os.i.id)) {
|
if (isPureRenote && (note.renote.userId == (this as any).os.i.id)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -144,7 +144,7 @@ export default Vue.extend({
|
|||||||
this.notes = this.notes.slice(0, displayLimit);
|
this.notes = this.notes.slice(0, displayLimit);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.queue.unshift(note);
|
this.queue.push(note);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -187,7 +187,7 @@ export default Vue.extend({
|
|||||||
this.clearNotification();
|
this.clearNotification();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((this as any).os.i.clientSettings.fetchOnScroll !== false) {
|
if ((this as any).clientSettings.fetchOnScroll !== false) {
|
||||||
const current = window.scrollY + window.innerHeight;
|
const current = window.scrollY + window.innerHeight;
|
||||||
if (current > document.body.offsetHeight - 8) this.loadMore();
|
if (current > document.body.offsetHeight - 8) this.loadMore();
|
||||||
}
|
}
|
||||||
@ -200,6 +200,7 @@ export default Vue.extend({
|
|||||||
@import '~const.styl'
|
@import '~const.styl'
|
||||||
|
|
||||||
root(isDark)
|
root(isDark)
|
||||||
|
overflow hidden
|
||||||
background isDark ? #282C37 : #fff
|
background isDark ? #282C37 : #fff
|
||||||
border-radius 8px
|
border-radius 8px
|
||||||
box-shadow 0 0 2px rgba(#000, 0.1)
|
box-shadow 0 0 2px rgba(#000, 0.1)
|
||||||
@ -262,9 +263,7 @@ root(isDark)
|
|||||||
|
|
||||||
> footer
|
> footer
|
||||||
text-align center
|
text-align center
|
||||||
border-top solid 1px #eaeaea
|
border-top solid 1px isDark ? #1c2023 : #eaeaea
|
||||||
border-bottom-left-radius 8px
|
|
||||||
border-bottom-right-radius 8px
|
|
||||||
|
|
||||||
&:empty
|
&:empty
|
||||||
display none
|
display none
|
||||||
@ -273,7 +272,7 @@ root(isDark)
|
|||||||
margin 0
|
margin 0
|
||||||
padding 16px
|
padding 16px
|
||||||
width 100%
|
width 100%
|
||||||
border-radius 0 0 8px 8px
|
color #ccc
|
||||||
|
|
||||||
@media (min-width 500px)
|
@media (min-width 500px)
|
||||||
padding 20px
|
padding 20px
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mk-notification">
|
<div class="mk-notification">
|
||||||
<div class="notification reaction" v-if="notification.type == 'reaction'">
|
<div class="notification reaction" v-if="notification.type == 'reaction'">
|
||||||
<router-link class="avatar-anchor" :to="notification.user | userPage">
|
<mk-avatar class="avatar" :user="notification.user"/>
|
||||||
<img class="avatar" :src="`${notification.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
|
|
||||||
</router-link>
|
|
||||||
<div>
|
<div>
|
||||||
<header>
|
<header>
|
||||||
<mk-reaction-icon :reaction="notification.reaction"/>
|
<mk-reaction-icon :reaction="notification.reaction"/>
|
||||||
@ -18,9 +16,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="notification renote" v-if="notification.type == 'renote'">
|
<div class="notification renote" v-if="notification.type == 'renote'">
|
||||||
<router-link class="avatar-anchor" :to="notification.user | userPage">
|
<mk-avatar class="avatar" :user="notification.user"/>
|
||||||
<img class="avatar" :src="`${notification.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
|
|
||||||
</router-link>
|
|
||||||
<div>
|
<div>
|
||||||
<header>
|
<header>
|
||||||
%fa:retweet%
|
%fa:retweet%
|
||||||
@ -34,9 +30,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="notification follow" v-if="notification.type == 'follow'">
|
<div class="notification follow" v-if="notification.type == 'follow'">
|
||||||
<router-link class="avatar-anchor" :to="notification.user | userPage">
|
<mk-avatar class="avatar" :user="notification.user"/>
|
||||||
<img class="avatar" :src="`${notification.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
|
|
||||||
</router-link>
|
|
||||||
<div>
|
<div>
|
||||||
<header>
|
<header>
|
||||||
%fa:user-plus%
|
%fa:user-plus%
|
||||||
@ -47,9 +41,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="notification poll_vote" v-if="notification.type == 'poll_vote'">
|
<div class="notification poll_vote" v-if="notification.type == 'poll_vote'">
|
||||||
<router-link class="avatar-anchor" :to="notification.user | userPage">
|
<mk-avatar class="avatar" :user="notification.user"/>
|
||||||
<img class="avatar" :src="`${notification.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
|
|
||||||
</router-link>
|
|
||||||
<div>
|
<div>
|
||||||
<header>
|
<header>
|
||||||
%fa:chart-pie%
|
%fa:chart-pie%
|
||||||
@ -111,18 +103,16 @@ root(isDark)
|
|||||||
display block
|
display block
|
||||||
clear both
|
clear both
|
||||||
|
|
||||||
> .avatar-anchor
|
> .avatar
|
||||||
display block
|
display block
|
||||||
float left
|
float left
|
||||||
|
width 36px
|
||||||
|
height 36px
|
||||||
|
border-radius 6px
|
||||||
|
|
||||||
img
|
@media (min-width 500px)
|
||||||
width 36px
|
width 42px
|
||||||
height 36px
|
height 42px
|
||||||
border-radius 6px
|
|
||||||
|
|
||||||
@media (min-width 500px)
|
|
||||||
width 42px
|
|
||||||
height 42px
|
|
||||||
|
|
||||||
> div
|
> div
|
||||||
float right
|
float right
|
||||||
|
@ -107,10 +107,11 @@ root(isDark)
|
|||||||
margin 0 auto
|
margin 0 auto
|
||||||
background isDark ? #282C37 :#fff
|
background isDark ? #282C37 :#fff
|
||||||
border-radius 8px
|
border-radius 8px
|
||||||
box-shadow 0 0 2px rgba(0, 0, 0, 0.1)
|
box-shadow 0 0 2px rgba(#000, 0.1)
|
||||||
|
overflow hidden
|
||||||
|
|
||||||
@media (min-width 500px)
|
@media (min-width 500px)
|
||||||
box-shadow 0 8px 32px rgba(0, 0, 0, 0.1)
|
box-shadow 0 8px 32px rgba(#000, 0.1)
|
||||||
|
|
||||||
.transition
|
.transition
|
||||||
.mk-notifications-enter
|
.mk-notifications-enter
|
||||||
@ -147,7 +148,7 @@ root(isDark)
|
|||||||
width 100%
|
width 100%
|
||||||
padding 16px
|
padding 16px
|
||||||
color #555
|
color #555
|
||||||
border-top solid 1px rgba(0, 0, 0, 0.05)
|
border-top solid 1px rgba(#000, 0.05)
|
||||||
|
|
||||||
> [data-fa]
|
> [data-fa]
|
||||||
margin-right 4px
|
margin-right 4px
|
||||||
|
@ -10,6 +10,10 @@
|
|||||||
</header>
|
</header>
|
||||||
<div class="form">
|
<div class="form">
|
||||||
<mk-note-preview v-if="reply" :note="reply"/>
|
<mk-note-preview v-if="reply" :note="reply"/>
|
||||||
|
<div v-if="visibility == 'specified'" class="visibleUsers">
|
||||||
|
<span v-for="u in visibleUsers">{{ u | userName }}<a @click="removeVisibleUser(u)">[x]</a></span>
|
||||||
|
<a @click="addVisibleUser">+ユーザーを追加</a>
|
||||||
|
</div>
|
||||||
<input v-show="useCw" v-model="cw" placeholder="内容への注釈 (オプション)">
|
<input v-show="useCw" v-model="cw" placeholder="内容への注釈 (オプション)">
|
||||||
<textarea v-model="text" ref="text" :disabled="posting" :placeholder="reply ? '%i18n:!@reply-placeholder%' : '%i18n:!@note-placeholder%'"></textarea>
|
<textarea v-model="text" ref="text" :disabled="posting" :placeholder="reply ? '%i18n:!@reply-placeholder%' : '%i18n:!@note-placeholder%'"></textarea>
|
||||||
<div class="attaches" v-show="files.length != 0">
|
<div class="attaches" v-show="files.length != 0">
|
||||||
@ -27,6 +31,7 @@
|
|||||||
<button class="poll" @click="poll = true">%fa:chart-pie%</button>
|
<button class="poll" @click="poll = true">%fa:chart-pie%</button>
|
||||||
<button class="poll" @click="useCw = !useCw">%fa:eye-slash%</button>
|
<button class="poll" @click="useCw = !useCw">%fa:eye-slash%</button>
|
||||||
<button class="geo" @click="geo ? removeGeo() : setGeo()">%fa:map-marker-alt%</button>
|
<button class="geo" @click="geo ? removeGeo() : setGeo()">%fa:map-marker-alt%</button>
|
||||||
|
<button class="visibility" @click="setVisibility" ref="visibilityButton">%fa:lock%</button>
|
||||||
<input ref="file" class="file" type="file" accept="image/*" multiple="multiple" @change="onChangeFile"/>
|
<input ref="file" class="file" type="file" accept="image/*" multiple="multiple" @change="onChangeFile"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -35,11 +40,13 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import * as XDraggable from 'vuedraggable';
|
import * as XDraggable from 'vuedraggable';
|
||||||
|
import MkVisibilityChooser from '../../../common/views/components/visibility-chooser.vue';
|
||||||
import getKao from '../../../common/scripts/get-kao';
|
import getKao from '../../../common/scripts/get-kao';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
components: {
|
components: {
|
||||||
XDraggable
|
XDraggable,
|
||||||
|
MkVisibilityChooser
|
||||||
},
|
},
|
||||||
|
|
||||||
props: ['reply'],
|
props: ['reply'],
|
||||||
@ -52,6 +59,8 @@ export default Vue.extend({
|
|||||||
files: [],
|
files: [],
|
||||||
poll: false,
|
poll: false,
|
||||||
geo: null,
|
geo: null,
|
||||||
|
visibility: 'public',
|
||||||
|
visibleUsers: [],
|
||||||
useCw: false,
|
useCw: false,
|
||||||
cw: null
|
cw: null
|
||||||
};
|
};
|
||||||
@ -121,6 +130,33 @@ export default Vue.extend({
|
|||||||
this.geo = null;
|
this.geo = null;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
setVisibility() {
|
||||||
|
const w = (this as any).os.new(MkVisibilityChooser, {
|
||||||
|
source: this.$refs.visibilityButton,
|
||||||
|
compact: true,
|
||||||
|
v: this.visibility
|
||||||
|
});
|
||||||
|
w.$once('chosen', v => {
|
||||||
|
this.visibility = v;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
addVisibleUser() {
|
||||||
|
(this as any).apis.input({
|
||||||
|
title: 'ユーザー名を入力してください'
|
||||||
|
}).then(username => {
|
||||||
|
(this as any).api('users/show', {
|
||||||
|
username
|
||||||
|
}).then(user => {
|
||||||
|
this.visibleUsers.push(user);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
removeVisibleUser(user) {
|
||||||
|
this.visibleUsers = this.visibleUsers.filter(u => u != user);
|
||||||
|
},
|
||||||
|
|
||||||
clear() {
|
clear() {
|
||||||
this.text = '';
|
this.text = '';
|
||||||
this.files = [];
|
this.files = [];
|
||||||
@ -130,7 +166,7 @@ export default Vue.extend({
|
|||||||
|
|
||||||
post() {
|
post() {
|
||||||
this.posting = true;
|
this.posting = true;
|
||||||
const viaMobile = (this as any).os.i.clientSettings.disableViaMobile !== true;
|
const viaMobile = (this as any).clientSettings.disableViaMobile !== true;
|
||||||
(this as any).api('notes/create', {
|
(this as any).api('notes/create', {
|
||||||
text: this.text == '' ? undefined : this.text,
|
text: this.text == '' ? undefined : this.text,
|
||||||
mediaIds: this.files.length > 0 ? this.files.map(f => f.id) : undefined,
|
mediaIds: this.files.length > 0 ? this.files.map(f => f.id) : undefined,
|
||||||
@ -145,6 +181,8 @@ export default Vue.extend({
|
|||||||
heading: isNaN(this.geo.heading) ? null : this.geo.heading,
|
heading: isNaN(this.geo.heading) ? null : this.geo.heading,
|
||||||
speed: this.geo.speed,
|
speed: this.geo.speed,
|
||||||
} : null,
|
} : null,
|
||||||
|
visibility: this.visibility,
|
||||||
|
visibleUserIds: this.visibility == 'specified' ? this.visibleUsers.map(u => u.id) : undefined,
|
||||||
viaMobile: viaMobile
|
viaMobile: viaMobile
|
||||||
}).then(data => {
|
}).then(data => {
|
||||||
this.$emit('note');
|
this.$emit('note');
|
||||||
@ -169,33 +207,33 @@ export default Vue.extend({
|
|||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
@import '~const.styl'
|
@import '~const.styl'
|
||||||
|
|
||||||
.mk-post-form
|
root(isDark)
|
||||||
max-width 500px
|
max-width 500px
|
||||||
width calc(100% - 16px)
|
width calc(100% - 16px)
|
||||||
margin 8px auto
|
margin 8px auto
|
||||||
background #fff
|
background isDark ? #282C37 : #fff
|
||||||
border-radius 8px
|
border-radius 8px
|
||||||
box-shadow 0 0 2px rgba(0, 0, 0, 0.1)
|
box-shadow 0 0 2px rgba(#000, 0.1)
|
||||||
|
|
||||||
@media (min-width 500px)
|
@media (min-width 500px)
|
||||||
margin 16px auto
|
margin 16px auto
|
||||||
width calc(100% - 32px)
|
width calc(100% - 32px)
|
||||||
box-shadow 0 8px 32px rgba(0, 0, 0, 0.1)
|
box-shadow 0 8px 32px rgba(#000, 0.1)
|
||||||
|
|
||||||
@media (min-width 600px)
|
@media (min-width 600px)
|
||||||
margin 32px auto
|
margin 32px auto
|
||||||
|
|
||||||
> header
|
> header
|
||||||
z-index 1
|
z-index 1000
|
||||||
height 50px
|
height 50px
|
||||||
box-shadow 0 1px 0 0 rgba(0, 0, 0, 0.1)
|
box-shadow 0 1px 0 0 isDark ? rgba(#000, 0.2) : rgba(#000, 0.1)
|
||||||
|
|
||||||
> .cancel
|
> .cancel
|
||||||
padding 0
|
padding 0
|
||||||
width 50px
|
width 50px
|
||||||
line-height 50px
|
line-height 50px
|
||||||
font-size 24px
|
font-size 24px
|
||||||
color #555
|
color isDark ? #9baec8 : #555
|
||||||
|
|
||||||
> div
|
> div
|
||||||
position absolute
|
position absolute
|
||||||
@ -229,6 +267,38 @@ export default Vue.extend({
|
|||||||
> .mk-note-preview
|
> .mk-note-preview
|
||||||
padding 16px
|
padding 16px
|
||||||
|
|
||||||
|
> .visibleUsers
|
||||||
|
margin-bottom 8px
|
||||||
|
font-size 14px
|
||||||
|
|
||||||
|
> span
|
||||||
|
margin-right 16px
|
||||||
|
color isDark ? #fff : #666
|
||||||
|
|
||||||
|
> input
|
||||||
|
z-index 1
|
||||||
|
|
||||||
|
> input
|
||||||
|
> textarea
|
||||||
|
display block
|
||||||
|
padding 12px
|
||||||
|
margin 0
|
||||||
|
width 100%
|
||||||
|
font-size 16px
|
||||||
|
color isDark ? #fff : #333
|
||||||
|
background isDark ? #191d23 : #fff
|
||||||
|
border none
|
||||||
|
border-radius 0
|
||||||
|
box-shadow 0 1px 0 0 isDark ? rgba(#000, 0.2) : rgba(#000, 0.1)
|
||||||
|
|
||||||
|
&:disabled
|
||||||
|
opacity 0.5
|
||||||
|
|
||||||
|
> textarea
|
||||||
|
max-width 100%
|
||||||
|
min-width 100%
|
||||||
|
min-height 80px
|
||||||
|
|
||||||
> .attaches
|
> .attaches
|
||||||
|
|
||||||
> .files
|
> .files
|
||||||
@ -262,31 +332,12 @@ export default Vue.extend({
|
|||||||
> .file
|
> .file
|
||||||
display none
|
display none
|
||||||
|
|
||||||
> input
|
|
||||||
> textarea
|
|
||||||
display block
|
|
||||||
padding 12px
|
|
||||||
margin 0
|
|
||||||
width 100%
|
|
||||||
font-size 16px
|
|
||||||
color #333
|
|
||||||
border none
|
|
||||||
border-bottom solid 1px #ddd
|
|
||||||
border-radius 0
|
|
||||||
|
|
||||||
&:disabled
|
|
||||||
opacity 0.5
|
|
||||||
|
|
||||||
> textarea
|
|
||||||
max-width 100%
|
|
||||||
min-width 100%
|
|
||||||
min-height 80px
|
|
||||||
|
|
||||||
> .upload
|
> .upload
|
||||||
> .drive
|
> .drive
|
||||||
> .kao
|
> .kao
|
||||||
> .poll
|
> .poll
|
||||||
> .geo
|
> .geo
|
||||||
|
> .visibility
|
||||||
display inline-block
|
display inline-block
|
||||||
padding 0
|
padding 0
|
||||||
margin 0
|
margin 0
|
||||||
@ -300,5 +351,10 @@ export default Vue.extend({
|
|||||||
border-radius 0
|
border-radius 0
|
||||||
box-shadow none
|
box-shadow none
|
||||||
|
|
||||||
</style>
|
.mk-post-form[data-darkmode]
|
||||||
|
root(true)
|
||||||
|
|
||||||
|
.mk-post-form:not([data-darkmode])
|
||||||
|
root(false)
|
||||||
|
|
||||||
|
</style>
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mk-sub-note-content">
|
<div class="mk-sub-note-content">
|
||||||
<div class="body">
|
<div class="body">
|
||||||
|
<span v-if="note.isHidden" style="opacity: 0.5">(この投稿は非公開です)</span>
|
||||||
<a class="reply" v-if="note.replyId">%fa:reply%</a>
|
<a class="reply" v-if="note.replyId">%fa:reply%</a>
|
||||||
<mk-note-html v-if="note.text" :text="note.text" :i="os.i"/>
|
<mk-note-html v-if="note.text" :text="note.text" :i="os.i"/>
|
||||||
<a class="rp" v-if="note.renoteId">RP: ...</a>
|
<a class="rp" v-if="note.renoteId">RP: ...</a>
|
||||||
|
@ -219,6 +219,7 @@ root(isDark)
|
|||||||
font-size 1.2em
|
font-size 1.2em
|
||||||
line-height calc(1rem + 30px)
|
line-height calc(1rem + 30px)
|
||||||
color $color
|
color $color
|
||||||
|
opacity 0.5
|
||||||
|
|
||||||
.about
|
.about
|
||||||
margin 0
|
margin 0
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user