Compare commits

...

51 Commits
1.0.0 ... 1.6.0

Author SHA1 Message Date
7be88b7816 1.6.0 2018-05-03 20:51:50 +09:00
faabb039a5 ✌️ 2018-05-03 20:12:08 +09:00
15e4cf1243 サムネイルを予め生成するように 2018-05-03 20:03:14 +09:00
75764e59e1 oops 2018-05-03 19:49:04 +09:00
f664cf09c0 Update cafy to 8.0.0 🚀 2018-05-02 18:06:16 +09:00
0c3e9dd5e0 oops 2018-04-30 14:05:16 +09:00
0bc7d28f58 🎨 2018-04-30 11:59:58 +09:00
17bb34941b 1.5.0 2018-04-29 22:10:10 +09:00
04cd3377ee oops 2018-04-29 22:04:51 +09:00
326bd5e094 oops 2018-04-29 21:41:48 +09:00
987799e9db Refactor 2018-04-29 21:37:51 +09:00
19c846afaf 🎨 2018-04-29 21:35:18 +09:00
ea9265b30b Fix bug 2018-04-29 21:28:45 +09:00
0516353afd Disable http2
Use https instead
2018-04-29 21:21:32 +09:00
5f1b726bab 1.4.0 2018-04-29 18:17:33 +09:00
ed130ca82c Fix bug 2018-04-29 18:16:02 +09:00
9f22f924f1 ✌️ 2018-04-29 17:55:57 +09:00
a8083eb52b バグ修正など 2018-04-29 17:54:50 +09:00
665afccb45 ✌️ 2018-04-29 17:22:45 +09:00
372bfaceda リファクタリングなど 2018-04-29 17:17:15 +09:00
1625b37b44 Merge pull request #1559 from syuilo/visibility
Implement Visibility
2018-04-29 09:30:00 +09:00
72c1352acf wip 2018-04-29 09:29:39 +09:00
2f2a945905 wip 2018-04-29 09:19:05 +09:00
9870e73069 wip 2018-04-29 09:00:41 +09:00
f2874d778a wip 2018-04-29 08:51:17 +09:00
e9940c9221 wip 2018-04-29 07:01:47 +09:00
7797a0746a wip 2018-04-29 05:28:34 +09:00
6df010a71e wip 2018-04-29 04:51:19 +09:00
671c5e7c12 wip 2018-04-29 04:44:58 +09:00
ec4ed8fb2d wip 2018-04-29 04:30:51 +09:00
34786130b7 ✌️ 2018-04-28 17:29:46 +09:00
6cb520cd2c oops 2018-04-28 17:27:41 +09:00
47ce59d555 wip 2018-04-28 17:25:56 +09:00
985a105930 1.3.0 2018-04-28 12:05:39 +09:00
52560dd986 🎨 2018-04-28 12:04:31 +09:00
de81502fdf 🎨 2018-04-28 12:00:58 +09:00
51876bac62 🎨 2018-04-28 10:59:37 +09:00
a5b994259e Fix bug 2018-04-28 10:27:53 +09:00
c85c825bad 🎨 2018-04-28 10:27:43 +09:00
1cd1c31467 1.2.0 2018-04-28 02:30:27 +09:00
8984e3131d モバイル版のダークモード
など
2018-04-28 02:29:17 +09:00
93fa28991e 🎨 2018-04-28 00:47:52 +09:00
b694bf1f41 1.1.0 2018-04-27 21:37:00 +09:00
0bbfbfc762 Merge pull request #1558 from syuilo/better-mobile-design
Better mobile design
2018-04-27 21:34:03 +09:00
319f525199 wip 2018-04-27 21:33:18 +09:00
ee62f6e356 wip 2018-04-27 21:06:28 +09:00
0f27b62924 Update dependencies 🚀 2018-04-27 19:12:15 +09:00
6274f6f2f6 Update README.md 2018-04-27 10:36:05 +09:00
32da569ef6 #1029 2018-04-26 20:30:49 +09:00
1625fdc2f4 ✌️ 2018-04-26 20:22:51 +09:00
a0795b1afe Fix #1552 2018-04-26 18:24:14 +09:00
254 changed files with 2485 additions and 1812 deletions

View File

@ -18,10 +18,11 @@ ultimately sophisticated new type of mini-blog based SNS.
:sparkles: Features
----------------------------------------------------------------
* Automatically updated timeline
* Reactions
* User lists
* Private messages
* ServiceWorker support
* Mute
* Real time contents
* ActivityPub compatible
and more! You can touch with your own eyes at https://misskey.xyz/.

View File

@ -1,8 +1,8 @@
{
"name": "misskey",
"author": "syuilo <i@syuilo.com>",
"version": "1.0.0",
"clientVersion": "1.0.0",
"version": "1.6.0",
"clientVersion": "1.0.5172",
"codename": "nighthike",
"main": "./built/index.js",
"private": true,
@ -31,7 +31,7 @@
"@prezzemolo/rap": "0.1.2",
"@prezzemolo/zip": "0.0.3",
"@types/bcryptjs": "2.4.1",
"@types/chai": "4.1.2",
"@types/chai": "4.1.3",
"@types/chai-http": "3.0.4",
"@types/debug": "0.0.30",
"@types/deep-equal": "1.0.1",
@ -51,22 +51,22 @@
"@types/js-yaml": "3.11.1",
"@types/koa": "2.0.45",
"@types/koa-bodyparser": "4.2.0",
"@types/koa-compress": "^2.0.8",
"@types/koa-compress": "2.0.8",
"@types/koa-favicon": "2.0.19",
"@types/koa-logger": "^3.1.0",
"@types/koa-logger": "3.1.0",
"@types/koa-mount": "3.0.1",
"@types/koa-multer": "1.0.0",
"@types/koa-router": "7.0.27",
"@types/koa-router": "7.0.28",
"@types/koa-send": "4.1.1",
"@types/koa__cors": "2.2.2",
"@types/kue": "0.11.8",
"@types/license-checker": "15.0.0",
"@types/mkdirp": "0.5.2",
"@types/mocha": "5.0.0",
"@types/mocha": "5.2.0",
"@types/mongodb": "3.0.15",
"@types/monk": "6.0.0",
"@types/ms": "0.7.30",
"@types/node": "9.6.5",
"@types/node": "9.6.6",
"@types/nopt": "3.0.29",
"@types/pug": "2.0.4",
"@types/qrcode": "0.8.1",
@ -79,7 +79,7 @@
"@types/speakeasy": "2.0.2",
"@types/tmp": "0.0.33",
"@types/uuid": "3.4.3",
"@types/webpack": "4.1.3",
"@types/webpack": "4.1.4",
"@types/webpack-stream": "3.2.10",
"@types/websocket": "0.0.38",
"@types/ws": "4.0.2",
@ -88,10 +88,10 @@
"autwh": "0.1.0",
"bcryptjs": "2.4.3",
"bootstrap-vue": "2.0.0-rc.6",
"cafy": "6.0.0",
"cafy": "8.0.0",
"chai": "4.1.2",
"chai-http": "4.0.0",
"chalk": "2.4.0",
"chalk": "2.4.1",
"crc-32": "1.2.0",
"css-loader": "0.28.11",
"debug": "3.1.0",
@ -100,12 +100,12 @@
"diskusage": "0.2.4",
"dompurify": "1.0.3",
"elasticsearch": "14.2.2",
"element-ui": "2.3.4",
"element-ui": "2.3.6",
"emojilib": "2.2.12",
"escape-regexp": "0.0.1",
"eslint": "4.19.1",
"eslint-plugin-vue": "4.4.0",
"eventemitter3": "3.0.1",
"eslint-plugin-vue": "4.5.0",
"eventemitter3": "3.1.0",
"exif-js": "2.3.0",
"file-loader": "1.1.11",
"file-type": "7.6.0",
@ -133,30 +133,30 @@
"is-root": "2.0.0",
"is-url": "1.2.4",
"js-yaml": "3.11.0",
"jsdom": "11.8.0",
"koa": "2.5.0",
"jsdom": "11.9.0",
"koa": "2.5.1",
"koa-bodyparser": "4.2.0",
"koa-compress": "3.0.0",
"koa-favicon": "2.0.1",
"koa-json-body": "^5.3.0",
"koa-logger": "^3.2.0",
"koa-json-body": "5.3.0",
"koa-logger": "3.2.0",
"koa-mount": "3.0.0",
"koa-multer": "1.0.2",
"koa-router": "7.4.0",
"koa-send": "4.1.3",
"koa-slow": "^2.1.0",
"koa-slow": "2.1.0",
"kue": "0.11.6",
"license-checker": "18.0.0",
"loader-utils": "1.1.0",
"mecab-async": "0.1.2",
"mkdirp": "0.5.1",
"mocha": "5.1.0",
"mocha": "5.1.1",
"moji": "0.5.1",
"mongodb": "3.0.7",
"monk": "6.0.5",
"ms": "2.1.1",
"nan": "2.10.0",
"node-sass": "4.8.3",
"node-sass": "4.9.0",
"node-sass-json-importer": "3.2.0",
"nopt": "4.0.1",
"nprogress": "0.2.0",
@ -190,9 +190,9 @@
"textarea-caret": "3.1.0",
"tmp": "0.0.33",
"ts-loader": "4.2.0",
"ts-node": "6.0.0",
"ts-node": "6.0.1",
"tslint": "5.9.1",
"typescript": "2.8.1",
"typescript": "2.8.3",
"typescript-eslint-parser": "15.0.0",
"uglify-es": "3.3.9",
"url-loader": "1.0.1",
@ -201,18 +201,18 @@
"vue": "2.5.16",
"vue-cropperjs": "2.2.0",
"vue-js-modal": "1.3.13",
"vue-json-tree-view": "2.1.3",
"vue-loader": "14.2.2",
"vue-json-tree-view": "2.1.4",
"vue-loader": "15.0.3",
"vue-router": "3.0.1",
"vue-template-compiler": "2.5.16",
"vuedraggable": "2.16.0",
"vuex": "^3.0.1",
"vuex": "3.0.1",
"web-push": "3.3.0",
"webfinger.js": "2.6.6",
"webpack": "4.6.0",
"webpack-cli": "2.0.14",
"webpack-cli": "2.0.15",
"webpack-replace-loader": "1.3.0",
"websocket": "1.0.25",
"websocket": "1.0.26",
"ws": "5.1.1",
"xev": "2.0.0"
}

View File

@ -8,8 +8,8 @@ export const isNotAnId = x => !isAnId(x);
* ID
*/
export default class ID extends Query<mongo.ObjectID> {
constructor(...args) {
super(...args);
constructor() {
super();
this.transform = v => {
if (isAnId(v) && !mongo.ObjectID.prototype.isPrototypeOf(v)) {
@ -19,7 +19,7 @@ export default class ID extends Query<mongo.ObjectID> {
}
};
this.pushValidator(v => {
this.push(v => {
if (!mongo.ObjectID.prototype.isPrototypeOf(v) && isNotAnId(v)) {
return new Error('must-be-an-id');
}

View File

@ -94,13 +94,13 @@ export default Vue.extend({
margin 0 auto -38px auto
border solid 5px #fff
border-radius 100%
box-shadow 0 2px 2px rgba(0, 0, 0, 0.1)
box-shadow 0 2px 2px rgba(#000, 0.1)
> .app
padding 44px 16px 0 16px
color #555
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
content ''

View File

@ -94,7 +94,7 @@ export default Vue.extend({
margin 0 auto
text-align center
background #fff
box-shadow 0px 4px 16px rgba(0, 0, 0, 0.2)
box-shadow 0px 4px 16px rgba(#000, 0.2)
> .fetching
margin 0

View File

@ -18,61 +18,65 @@ export default function<T extends object>(data: {
default: false
}
},
computed: {
id(): string {
return this.widget.id;
},
props(): T {
return this.widget.data;
}
},
data() {
return {
props: data.props ? data.props() : {} as T,
bakedOldProps: null,
preventSave: false
bakedOldProps: null
};
},
created() {
if (this.props) {
Object.keys(this.props).forEach(prop => {
if (this.widget.data.hasOwnProperty(prop)) {
this.props[prop] = this.widget.data[prop];
}
});
}
this.mergeProps();
this.$watch('props', () => {
this.mergeProps();
});
this.bakeProps();
},
this.$watch('props', newProps => {
if (this.preventSave) {
this.preventSave = false;
this.bakeProps();
return;
methods: {
bakeProps() {
this.bakedOldProps = JSON.stringify(this.props);
},
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();
if (this.isMobile) {
(this as any).api('i/update_mobile_home', {
id: this.id,
data: newProps
}).then(() => {
(this as any).os.i.clientSettings.mobileHome.find(w => w.id == this.id).data = newProps;
data: this.props
});
} else {
(this as any).api('i/update_home', {
id: this.id,
data: newProps
}).then(() => {
(this as any).os.i.clientSettings.home.find(w => w.id == this.id).data = newProps;
data: this.props
});
}
}, {
deep: true
});
},
methods: {
bakeProps() {
this.bakedOldProps = JSON.stringify(this.props);
}
}
});

View File

@ -1,4 +1,4 @@
import MiOS from '../mios';
import MiOS from '../../mios';
import { version as current } from '../../config';
export default async function(mios: MiOS, force = false, silent = false) {

View File

@ -1,5 +1,5 @@
import Stream from './stream';
import MiOS from '../../mios';
import MiOS from '../../../mios';
/**
* Channel stream connection

View File

@ -1,6 +1,6 @@
import Stream from './stream';
import StreamManager from './stream-manager';
import MiOS from '../../mios';
import MiOS from '../../../mios';
/**
* Drive stream connection

View File

@ -1,6 +1,6 @@
import Stream from './stream';
import StreamManager from './stream-manager';
import MiOS from '../../mios';
import MiOS from '../../../mios';
/**
* Global timeline stream connection

View File

@ -2,7 +2,7 @@ import * as merge from 'object-assign-deep';
import Stream from './stream';
import StreamManager from './stream-manager';
import MiOS from '../../mios';
import MiOS from '../../../mios';
/**
* Home stream connection
@ -25,10 +25,31 @@ export class HomeStream extends Stream {
console.log('I updated:', 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', () => {
alert('%i18n:!common.my-token-regenerated%');
os.signout();

View File

@ -1,6 +1,6 @@
import Stream from './stream';
import StreamManager from './stream-manager';
import MiOS from '../../mios';
import MiOS from '../../../mios';
/**
* Local timeline stream connection

View File

@ -1,6 +1,6 @@
import Stream from './stream';
import StreamManager from './stream-manager';
import MiOS from '../../mios';
import MiOS from '../../../mios';
/**
* Messaging index stream connection

View File

@ -1,5 +1,5 @@
import Stream from './stream';
import MiOS from '../../mios';
import MiOS from '../../../mios';
/**
* Messaging stream connection

View File

@ -1,5 +1,5 @@
import Stream from './stream';
import MiOS from '../../mios';
import MiOS from '../../../mios';
export class OthelloGameStream extends Stream {
constructor(os: MiOS, me, game) {

View File

@ -1,6 +1,6 @@
import StreamManager from './stream-manager';
import Stream from './stream';
import MiOS from '../../mios';
import MiOS from '../../../mios';
export class OthelloStream extends Stream {
constructor(os: MiOS, me) {

View File

@ -1,6 +1,6 @@
import Stream from './stream';
import StreamManager from './stream-manager';
import MiOS from '../../mios';
import MiOS from '../../../mios';
/**
* Server stream connection

View File

@ -2,7 +2,7 @@ import { EventEmitter } from 'eventemitter3';
import * as uuid from 'uuid';
import * as ReconnectingWebsocket from 'reconnecting-websocket';
import { wsUrl } from '../../../config';
import MiOS from '../../mios';
import MiOS from '../../../mios';
/**
* Misskey stream connection

View File

@ -234,7 +234,7 @@ export default Vue.extend({
margin-top calc(1em + 8px)
overflow hidden
background #fff
border solid 1px rgba(0, 0, 0, 0.1)
border solid 1px rgba(#000, 0.1)
border-radius 4px
transition top 0.1s ease, left 0.1s ease
@ -253,7 +253,7 @@ export default Vue.extend({
white-space nowrap
overflow hidden
font-size 0.9em
color rgba(0, 0, 0, 0.8)
color rgba(#000, 0.8)
cursor default
&, *
@ -285,10 +285,10 @@ export default Vue.extend({
.name
margin 0 8px 0 0
color rgba(0, 0, 0, 0.8)
color rgba(#000, 0.8)
.username
color rgba(0, 0, 0, 0.3)
color rgba(#000, 0.3)
> .emojis > li
@ -298,10 +298,10 @@ export default Vue.extend({
width 24px
.name
color rgba(0, 0, 0, 0.8)
color rgba(#000, 0.8)
.alias
margin 0 0 0 8px
color rgba(0, 0, 0, 0.3)
color rgba(#000, 0.3)
</style>

View File

@ -0,0 +1,39 @@
<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
transition border-radius 1s ease
</style>

View File

@ -3,6 +3,7 @@ import Vue from 'vue';
import signin from './signin.vue';
import signup from './signup.vue';
import forkit from './forkit.vue';
import avatar from './avatar.vue';
import nav from './nav.vue';
import noteHtml from './note-html';
import poll from './poll.vue';
@ -28,6 +29,7 @@ import welcomeTimeline from './welcome-timeline.vue';
Vue.component('mk-signin', signin);
Vue.component('mk-signup', signup);
Vue.component('mk-forkit', forkit);
Vue.component('mk-avatar', avatar);
Vue.component('mk-nav', nav);
Vue.component('mk-note-html', noteHtml);
Vue.component('mk-poll', poll);

View File

@ -1,8 +1,6 @@
<template>
<div class="message" :data-is-me="isMe">
<router-link class="avatar-anchor" :to="message.user | userPage" :title="message.user | acct" target="_blank">
<img class="avatar" :src="`${message.user.avatarUrl}?thumbnail&size=80`" alt=""/>
</router-link>
<mk-avatar class="avatar" :user="message.user" target="_blank"/>
<div class="content">
<div class="balloon" :data-no-text="message.text == null">
<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
background-color transparent
> .avatar-anchor
> .avatar
display block
position absolute
top 10px
> .avatar
display block
min-width 54px
min-height 54px
max-width 54px
max-height 54px
margin 0
border-radius 8px
transition all 0.1s ease
width 54px
height 54px
border-radius 8px
transition all 0.1s ease
> .content
@ -134,7 +126,7 @@ export default Vue.extend({
bottom -4px
left -12px
margin 0
color rgba(0, 0, 0, 0.5)
color rgba(#000, 0.5)
font-size 11px
> .content
@ -146,7 +138,7 @@ export default Vue.extend({
overflow hidden
overflow-wrap break-word
font-size 1em
color rgba(0, 0, 0, 0.5)
color rgba(#000, 0.5)
> .text
display block
@ -155,7 +147,7 @@ export default Vue.extend({
overflow hidden
overflow-wrap break-word
font-size 1em
color rgba(0, 0, 0, 0.8)
color rgba(#000, 0.8)
& + .file
> a
@ -195,13 +187,13 @@ export default Vue.extend({
display block
margin 2px 0 0 0
font-size 10px
color rgba(0, 0, 0, 0.4)
color rgba(#000, 0.4)
> [data-fa]
margin-left 4px
&:not([data-is-me])
> .avatar-anchor
> .avatar
left 12px
> .content
@ -225,7 +217,7 @@ export default Vue.extend({
text-align left
&[data-is-me]
> .avatar-anchor
> .avatar
right 12px
> .content

View File

@ -256,7 +256,7 @@ export default Vue.extend({
padding 16px 8px 8px 8px
text-align center
font-size 0.8em
color rgba(0, 0, 0, 0.4)
color rgba(#000, 0.4)
[data-fa]
margin-right 4px
@ -267,7 +267,7 @@ export default Vue.extend({
padding 16px 8px 8px 8px
text-align center
font-size 0.8em
color rgba(0, 0, 0, 0.4)
color rgba(#000, 0.4)
[data-fa]
margin-right 4px
@ -278,7 +278,7 @@ export default Vue.extend({
padding 16px
text-align center
font-size 0.8em
color rgba(0, 0, 0, 0.4)
color rgba(#000, 0.4)
[data-fa]
margin-right 4px
@ -289,14 +289,14 @@ export default Vue.extend({
padding 0 12px
line-height 24px
color #fff
background rgba(0, 0, 0, 0.3)
background rgba(#000, 0.3)
border-radius 12px
&:hover
background rgba(0, 0, 0, 0.4)
background rgba(#000, 0.4)
&:active
background rgba(0, 0, 0, 0.5)
background rgba(#000, 0.5)
&.fetching
cursor wait
@ -322,7 +322,7 @@ export default Vue.extend({
left 0
right 0
margin 0 auto
background rgba(0, 0, 0, 0.1)
background rgba(#000, 0.1)
> span
display inline-block
@ -330,7 +330,7 @@ export default Vue.extend({
padding 0 16px
//font-weight bold
line-height 32px
color rgba(0, 0, 0, 0.3)
color rgba(#000, 0.3)
background #fff
> footer

View File

@ -13,7 +13,7 @@
@click="navigate(user)"
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="username">@{{ user | acct }}</span>
</li>
@ -31,7 +31,7 @@
:key="message.id"
>
<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>
<span class="name">{{ isMe(message) ? message.recipient : message.user | userName }}</span>
<span class="username">@{{ isMe(message) ? message.recipient : message.user | acct }}</span>
@ -205,7 +205,7 @@ root(isDark)
z-index 1
width 100%
background #fff
box-shadow 0 0px 2px rgba(0, 0, 0, 0.2)
box-shadow 0 0px 2px rgba(#000, 0.2)
> .form
padding 8px
@ -279,7 +279,7 @@ root(isDark)
vertical-align top
white-space nowrap
overflow hidden
color rgba(0, 0, 0, 0.8)
color rgba(#000, 0.8)
text-decoration none
transition none
cursor pointer
@ -318,11 +318,11 @@ root(isDark)
margin 0 8px 0 0
/*font-weight bold*/
font-weight normal
color rgba(0, 0, 0, 0.8)
color rgba(#000, 0.8)
.username
font-weight normal
color rgba(0, 0, 0, 0.3)
color rgba(#000, 0.3)
> .history
@ -383,17 +383,17 @@ root(isDark)
overflow hidden
text-overflow ellipsis
font-size 1em
color isDark ? #fff : rgba(0, 0, 0, 0.9)
color isDark ? #fff : rgba(#000, 0.9)
font-weight bold
transition all 0.1s ease
> .username
margin 0 8px
color isDark ? #606984 : rgba(0, 0, 0, 0.5)
color isDark ? #606984 : rgba(#000, 0.5)
> .mk-time
margin 0 0 0 auto
color isDark ? #606984 : rgba(0, 0, 0, 0.5)
color isDark ? #606984 : rgba(#000, 0.5)
font-size 80%
> .avatar
@ -413,10 +413,10 @@ root(isDark)
overflow hidden
overflow-wrap break-word
font-size 1.1em
color isDark ? #fff : rgba(0, 0, 0, 0.8)
color isDark ? #fff : rgba(#000, 0.8)
.me
color isDark ? rgba(#fff, 0.7) : rgba(0, 0, 0, 0.4)
color isDark ? rgba(#fff, 0.7) : rgba(#000, 0.4)
> .image
display block

View File

@ -105,7 +105,7 @@ $border-color = rgba(27, 31, 35, 0.15)
z-index 10000
width 100%
height 100%
background rgba(0, 0, 0, 0.1)
background rgba(#000, 0.1)
opacity 0
> .popover

View File

@ -88,10 +88,10 @@ root(isDark)
cursor pointer
&:hover
background rgba(0, 0, 0, 0.05)
background rgba(#000, 0.05)
&:active
background rgba(0, 0, 0, 0.1)
background rgba(#000, 0.1)
> .backdrop
position absolute

View File

@ -120,7 +120,7 @@ root(isDark)
z-index 10000
width 100%
height 100%
background rgba(0, 0, 0, 0.1)
background isDark ? rgba(#000, 0.4) : rgba(#000, 0.1)
opacity 0
> .popover

View File

@ -91,7 +91,7 @@ export default Vue.extend({
width 100%
line-height 44px
font-size 1em
color rgba(0, 0, 0, 0.7)
color rgba(#000, 0.7)
background #fff
outline none
border solid 1px #eee
@ -117,7 +117,7 @@ export default Vue.extend({
margin -6px 0 0 0
width 100%
font-size 1.2em
color rgba(0, 0, 0, 0.5)
color rgba(#000, 0.5)
outline none
border none
border-radius 0

View File

@ -234,13 +234,13 @@ export default Vue.extend({
color #333 !important
background #fff !important
outline none
border solid 1px rgba(0, 0, 0, 0.1)
border solid 1px rgba(#000, 0.1)
border-radius 4px
box-shadow 0 0 0 114514px #fff inset
transition all .3s ease
&:hover
border-color rgba(0, 0, 0, 0.2)
border-color rgba(#000, 0.2)
transition all .1s ease
&:focus

View File

@ -73,7 +73,7 @@ export default Vue.extend({
padding 6px 12px
font-size 0.9em
color #fff
background rgba(0, 0, 0, 0.8)
background rgba(#000, 0.8)
border-radius 4px
> p

View 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>

View File

@ -1,9 +1,7 @@
<template>
<div class="mk-welcome-timeline">
<div v-for="note in notes">
<router-link class="avatar-anchor" :to="note.user | userPage" v-user-preview="note.user.id">
<img class="avatar" :src="`${note.user.avatarUrl}?thumbnail&size=96`" alt="avatar"/>
</router-link>
<mk-avatar class="avatar" :user="note.user" target="_blank"/>
<div class="body">
<header>
<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
font-size .9em
color #4C4C4C
border-bottom 1px solid rgba(0, 0, 0, 0.05)
border-bottom 1px solid rgba(#000, 0.05)
&:after
content ""
display block
clear both
> .avatar-anchor
> .avatar
display block
float left
position -webkit-sticky
position sticky
top 16px
> img
display block
width 42px
height 42px
border-radius 6px
width 42px
height 42px
border-radius 6px
> .body
float right

View File

@ -61,6 +61,7 @@ export default define({
} else {
this.props.design++;
}
this.save();
}
}
});
@ -78,7 +79,7 @@ export default define({
color #555
&:nth-child(odd)
background rgba(0, 0, 0, 0.025)
background rgba(#000, 0.025)
> b
margin-right 4px

View File

@ -68,6 +68,7 @@ export default define({
} else {
this.props.design++;
}
this.save();
}
}
});

View File

@ -73,6 +73,7 @@ export default define({
} else {
this.props.design++;
}
this.save();
},
tick() {
const now = new Date();
@ -113,7 +114,7 @@ root(isDark)
padding 16px 0
color isDark ? #c5ced6 :#777
background isDark ? #282C37 : #fff
border solid 1px rgba(0, 0, 0, 0.075)
border solid 1px rgba(#000, 0.075)
border-radius 6px
&[data-special='on-new-years-day']
@ -126,7 +127,7 @@ root(isDark)
&[data-mobile]
border none
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
content ""

View File

@ -46,7 +46,7 @@ root(isDark)
border none
background #ead8bb
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
> h1

View File

@ -59,6 +59,8 @@ export default define({
} else {
this.props.design++;
}
this.save();
}
}
});

View File

@ -40,6 +40,7 @@ export default define({
methods: {
func() {
this.props.compact = !this.props.compact;
this.save();
},
fetch() {
fetch(`https://api.rss2json.com/v1/api.json?rss_url=${this.url}`, {
@ -92,7 +93,7 @@ root(isDark)
padding 8px 16px
&:nth-child(even)
background rgba(0, 0, 0, 0.05)
background rgba(#000, 0.05)
.mkw-rss[data-darkmode]
root(true)

View File

@ -56,7 +56,7 @@ root(isDark)
> text
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]
root(true)

View File

@ -68,6 +68,7 @@ export default define({
} else {
this.props.view++;
}
this.save();
},
func() {
if (this.props.design == 2) {
@ -75,6 +76,7 @@ export default define({
} else {
this.props.design++;
}
this.save();
}
}
});

View File

@ -64,6 +64,7 @@ export default define({
} else {
this.props.size++;
}
this.save();
this.applySize();
},
@ -111,6 +112,7 @@ export default define({
choose() {
(this as any).apis.chooseDriveFolder().then(folder => {
this.props.folder = folder ? folder.id : null;
this.save();
this.fetch();
});
}
@ -122,13 +124,13 @@ export default define({
.mkw-slideshow
overflow hidden
background #fff
border solid 1px rgba(0, 0, 0, 0.075)
border solid 1px rgba(#000, 0.075)
border-radius 6px
&[data-mobile]
border none
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
width 100%

View File

@ -1,4 +1,4 @@
import OS from '../../common/mios';
import OS from '../../mios';
import { apiUrl } from '../../config';
import CropWindow from '../views/components/crop-window.vue';
import ProgressDialog from '../views/components/progress-dialog.vue';

View File

@ -1,4 +1,4 @@
import OS from '../../common/mios';
import OS from '../../mios';
import { apiUrl } from '../../config';
import CropWindow from '../views/components/crop-window.vue';
import ProgressDialog from '../views/components/progress-dialog.vue';

View File

@ -61,6 +61,6 @@ svg
&.day
&:hover
fill rgba(0, 0, 0, 0.05)
fill rgba(#000, 0.05)
</style>

View File

@ -136,7 +136,7 @@ export default Vue.extend({
root(isDark)
color isDark ? #c5ced6 : #777
background isDark ? #282C37 : #fff
border solid 1px rgba(0, 0, 0, 0.075)
border solid 1px rgba(#000, 0.075)
border-radius 6px
&[data-melt]
@ -152,7 +152,7 @@ root(isDark)
font-size 0.9em
font-weight bold
color #888
box-shadow 0 1px rgba(0, 0, 0, 0.07)
box-shadow 0 1px rgba(#000, 0.07)
> [data-fa]
margin-right 4px
@ -214,10 +214,10 @@ root(isDark)
border-radius 6px
&:hover > div
background rgba(0, 0, 0, 0.025)
background rgba(#000, 0.025)
&:active > div
background rgba(0, 0, 0, 0.05)
background rgba(#000, 0.05)
&[data-is-donichi]
color #ef95a0
@ -233,10 +233,10 @@ root(isDark)
font-weight bold
> div
background rgba(0, 0, 0, 0.025)
background rgba(#000, 0.025)
&:active > div
background rgba(0, 0, 0, 0.05)
background rgba(#000, 0.05)
&[data-today]
> div

View File

@ -106,7 +106,7 @@ root(isDark)
width $width
background isDark ? #282c37 :#fff
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
.menu[data-darkmode]

View File

@ -68,7 +68,7 @@ root(isDark)
font-size 0.8em
background isDark ? #282c37 : #fff
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
.context-menu[data-darkmode]

View File

@ -102,7 +102,7 @@ export default Vue.extend({
left 0
width 100%
height 100%
background rgba(0, 0, 0, 0.7)
background rgba(#000, 0.7)
opacity 0
pointer-events none

View File

@ -195,7 +195,7 @@ root(isDark)
cursor pointer
&:hover
background rgba(0, 0, 0, 0.05)
background rgba(#000, 0.05)
> .label
&:before
@ -203,7 +203,7 @@ root(isDark)
background #0b65a5
&:active
background rgba(0, 0, 0, 0.1)
background rgba(#000, 0.1)
> .label
&:before

View File

@ -587,7 +587,7 @@ root(isDark)
font-size 0.9em
color isDark ? #d2d9dc : #555
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
@ -733,7 +733,7 @@ root(isDark)
display inline-block
position absolute
top 0
background-color rgba(0, 0, 0, 0.3)
background-color rgba(#000, 0.3)
border-radius 100%
animation sk-bounce 2.0s infinite ease-in-out

View File

@ -14,7 +14,7 @@
display inline-block
width 18px
height 18px
background-color rgba(0, 0, 0, 0.3)
background-color rgba(#000, 0.3)
border-radius 100%
animation bounce 1.4s infinite ease-in-out both

View File

@ -3,9 +3,7 @@
<p class="title">気になるユーザーをフォロー:</p>
<div class="users" v-if="!fetching && users.length > 0">
<div class="user" v-for="user in users" :key="user.id">
<router-link class="avatar-anchor" :to="user | userPage">
<img class="avatar" :src="`${user.avatarUrl}?thumbnail&size=42`" alt="" v-user-preview="user.id"/>
</router-link>
<mk-avatar class="avatar" :user="user" target="_blank"/>
<div class="body">
<router-link class="name" :to="user | userPage" v-user-preview="user.id">{{ user | userName }}</router-link>
<p class="username">@{{ user | acct }}</p>
@ -86,18 +84,13 @@ export default Vue.extend({
display block
clear both
> .avatar-anchor
> .avatar
display block
float left
margin 0 12px 0 0
> .avatar
display block
width 42px
height 42px
margin 0
border-radius 8px
vertical-align bottom
width 42px
height 42px
border-radius 8px
> .body
float left

View File

@ -53,7 +53,7 @@
<div class="main">
<a @click="hint">カスタマイズのヒント</a>
<div>
<mk-post-form v-if="os.i.clientSettings.showPostFormOnTopOfTl"/>
<mk-post-form v-if="clientSettings.showPostFormOnTopOfTl"/>
<mk-timeline ref="tl" @loaded="onTlLoaded"/>
</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"/>
</div>
<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-mentions @loaded="onTlLoaded" v-if="mode == 'mentions'"/>
</div>
@ -81,6 +81,7 @@ export default Vue.extend({
components: {
XDraggable
},
props: {
customize: {
type: Boolean,
@ -91,61 +92,43 @@ export default Vue.extend({
default: 'timeline'
}
},
data() {
return {
connection: null,
connectionId: null,
widgetAdderSelected: null,
trash: [],
widgets: {
left: [],
right: []
}
trash: []
};
},
computed: {
home: {
get(): any[] {
//#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;
}
home(): any[] {
return this.$store.state.settings.data.home;
},
left(): any[] {
return this.home.filter(w => w.place == 'left');
},
right(): any[] {
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() {
this.connection = (this as any).os.stream.getConnection();
this.connectionId = (this as any).os.stream.use();
this.connection.on('home_updated', this.onHomeUpdated);
},
beforeDestroy() {
this.connection.off('home_updated', this.onHomeUpdated);
(this as any).os.stream.dispose(this.connectionId);
},
methods: {
hint() {
(this as any).apis.dialog({
@ -159,56 +142,44 @@ export default Vue.extend({
}]
});
},
onTlLoaded() {
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) {
const w = (this.$refs[widgetId] as any)[0];
if (w.func) w.func();
},
onWidgetSort() {
this.saveHome();
},
onTrash(evt) {
this.saveHome();
},
addWidget() {
const widget = {
this.$store.dispatch('settings/addHomeWidget', {
name: this.widgetAdderSelected,
id: uuid(),
place: 'left',
data: {}
};
this.widgets.left.unshift(widget);
this.saveHome();
});
},
saveHome() {
const left = this.widgets.left;
const right = this.widgets.right;
this.home = left.concat(right);
this.$store.commit('settings/setHome', left.concat(right));
left.forEach(w => w.place = 'left');
right.forEach(w => w.place = 'right');
(this as any).api('i/update_home', {
home: this.home
});
},
warp(date) {
(this.$refs.tl as any).warp(date);
}
@ -251,7 +222,7 @@ root(isDark)
height 48px
color isDark ? #fff : #000
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
display block
@ -279,7 +250,7 @@ root(isDark)
> div
display flex
margin 0 auto
max-width 1200px - 32px
max-width 1220px - 32px
> div
width 50%
@ -310,7 +281,7 @@ root(isDark)
display flex
justify-content center
margin 0 auto
max-width 1200px
max-width 1220px
> *
.customize-container

View File

@ -52,7 +52,7 @@ export default Vue.extend({
left 0
width 100%
height 100%
background rgba(0, 0, 0, 0.7)
background rgba(#000, 0.7)
> img
position fixed

View File

@ -54,7 +54,7 @@ export default Vue.extend({
left 0
width 100%
height 100%
background rgba(0, 0, 0, 0.7)
background rgba(#000, 0.7)
> video
position fixed

View File

@ -85,7 +85,7 @@ export default Vue.extend({
.mk-mentions
background #fff
border solid 1px rgba(0, 0, 0, 0.075)
border solid 1px rgba(#000, 0.075)
border-radius 6px
> header

View File

@ -1,8 +1,6 @@
<template>
<div class="sub" :title="title">
<router-link class="avatar-anchor" :to="note.user | userPage">
<img class="avatar" :src="`${note.user.avatarUrl}?thumbnail&size=64`" alt="avatar" v-user-preview="note.userId"/>
</router-link>
<mk-avatar class="avatar" :user="note.user"/>
<div class="main">
<header>
<div class="left">
@ -16,7 +14,10 @@
</div>
</header>
<div class="body">
<mk-note-html v-if="note.text" :text="note.text" :i="os.i" :class="$style.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"/>
</div>
<div class="media" v-if="note.mediaIds.length > 0">
<mk-media-list :media-list="note.media"/>
</div>
@ -40,10 +41,10 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
.sub
root(isDark)
margin 0
padding 20px 32px
background #fdfdfd
background isDark ? #21242d : #fdfdfd
&:after
content ""
@ -54,18 +55,13 @@ export default Vue.extend({
> .main > footer > button
color #888
> .avatar-anchor
> .avatar
display block
float left
margin 0 16px 0 0
> .avatar
display block
width 44px
height 44px
margin 0
border-radius 4px
vertical-align bottom
width 44px
height 44px
border-radius 4px
> .main
float left
@ -87,7 +83,7 @@ export default Vue.extend({
display inline
margin 0
padding 0
color #777
color isDark ? #fff : #777
font-size 1em
font-weight 700
text-align left
@ -99,24 +95,29 @@ export default Vue.extend({
> .username
text-align left
margin 0 0 0 8px
color #ccc
color isDark ? #606984 : #ccc
> .right
float right
> .time
font-size 0.9em
color #c0c0c0
color isDark ? #606984 : #c0c0c0
> .body
> .text
cursor default
display block
margin 0
padding 0
overflow-wrap break-word
font-size 1em
color isDark ? #959ba7 : #717171
.sub[data-darkmode]
root(true)
.sub:not([data-darkmode])
root(false)
</style>
<style lang="stylus" module>
.text
cursor default
display block
margin 0
padding 0
overflow-wrap break-word
font-size 1em
color #717171
</style>

View File

@ -18,18 +18,14 @@
</div>
<div class="renote" v-if="isRenote">
<p>
<router-link class="avatar-anchor" :to="note.user | userPage" v-user-preview="note.userId">
<img class="avatar" :src="`${note.user.avatarUrl}?thumbnail&size=32`" alt="avatar"/>
</router-link>
<mk-avatar class="avatar" :user="note.user"/>
%fa:retweet%
<router-link class="name" :href="note.user | userPage">{{ note.user | userName }}</router-link>
がRenote
</p>
</div>
<article>
<router-link class="avatar-anchor" :to="p.user | userPage">
<img class="avatar" :src="`${p.user.avatarUrl}?thumbnail&size=64`" alt="avatar" v-user-preview="p.user.id"/>
</router-link>
<mk-avatar class="avatar" :user="p.user"/>
<header>
<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>
@ -38,7 +34,10 @@
</router-link>
</header>
<div class="body">
<mk-note-html :class="$style.text" v-if="p.text" :text="p.text" :i="os.i"/>
<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"/>
</div>
<div class="media" v-if="p.media.length > 0">
<mk-media-list :media-list="p.media"/>
</div>
@ -156,7 +155,7 @@ export default Vue.extend({
// Draw map
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) {
(this as any).os.getGoogleMaps().then(maps => {
const uluru = new maps.LatLng(this.p.geo.coordinates[1], this.p.geo.coordinates[0]);
@ -214,13 +213,13 @@ export default Vue.extend({
<style lang="stylus" scoped>
@import '~const.styl'
.mk-note-detail
margin 0
root(isDark)
margin 0 auto
padding 0
overflow hidden
text-align left
background #fff
border solid 1px rgba(0, 0, 0, 0.1)
background isDark ? #282C37 : #fff
border solid 1px rgba(#000, 0.1)
border-radius 8px
> .read-more
@ -232,44 +231,39 @@ export default Vue.extend({
text-align center
color #999
cursor pointer
background #fafafa
background isDark ? #21242d : #fafafa
outline none
border none
border-bottom solid 1px #eef0f2
border-bottom solid 1px isDark ? #1c2023 : #eef0f2
border-radius 6px 6px 0 0
&:hover
background #f6f6f6
background isDark ? #2e3440 : #f6f6f6
&:active
background #f0f0f0
background isDark ? #21242b : #f0f0f0
&:disabled
color #ccc
color isDark ? #21242b : #ccc
> .context
> *
border-bottom 1px solid #eef0f2
border-bottom 1px solid isDark ? #1c2023 : #eef0f2
> .renote
color #9dbb00
background 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%)
> p
margin 0
padding 16px 32px
.avatar-anchor
.avatar
display inline-block
.avatar
vertical-align bottom
min-width 28px
min-height 28px
max-width 28px
max-height 28px
margin 0 8px 0 0
border-radius 6px
width 28px
height 28px
margin 0 8px 0 0
border-radius 6px
[data-fa]
margin-right 4px
@ -281,7 +275,7 @@ export default Vue.extend({
padding-top 8px
> .reply-to
border-bottom 1px solid #eef0f2
border-bottom 1px solid isDark ? #1c2023 : #eef0f2
> article
padding 28px 32px 18px 32px
@ -292,21 +286,13 @@ export default Vue.extend({
clear both
&:hover
> .main > footer > button
color #888
> footer > button
color isDark ? #707b97 : #888
> .avatar-anchor
display block
> .avatar
width 60px
height 60px
> .avatar
display block
width 60px
height 60px
margin 0
border-radius 8px
vertical-align bottom
border-radius 8px
> header
position absolute
@ -318,7 +304,7 @@ export default Vue.extend({
display inline-block
margin 0
line-height 24px
color #777
color isDark ? #fff : #627079
font-size 18px
font-weight 700
text-align left
@ -331,18 +317,27 @@ export default Vue.extend({
display block
text-align left
margin 0
color #ccc
color isDark ? #606984 : #ccc
> .time
position absolute
top 0
right 32px
font-size 1em
color #c0c0c0
color isDark ? #606984 : #c0c0c0
> .body
padding 8px 0
> .text
cursor default
display block
margin 0
padding 0
overflow-wrap break-word
font-size 1.5em
color isDark ? #fff : #717171
> .renote
margin 8px 0
@ -404,11 +399,11 @@ export default Vue.extend({
background transparent
border none
font-size 1em
color #ddd
color isDark ? #606984 : #ccc
cursor pointer
&:hover
color #666
color isDark ? #9198af : #666
> .count
display inline
@ -420,17 +415,12 @@ export default Vue.extend({
> .replies
> *
border-top 1px solid #eef0f2
border-top 1px solid isDark ? #1c2023 : #eef0f2
.mk-note-detail[data-darkmode]
root(true)
.mk-note-detail:not([data-darkmode])
root(false)
</style>
<style lang="stylus" module>
.text
cursor default
display block
margin 0
padding 0
overflow-wrap break-word
font-size 1.5em
color #717171
</style>

View File

@ -1,8 +1,6 @@
<template>
<div class="mk-note-preview" :title="title">
<router-link class="avatar-anchor" :to="note.user | userPage">
<img class="avatar" :src="`${note.user.avatarUrl}?thumbnail&size=64`" alt="avatar" v-user-preview="note.userId"/>
</router-link>
<mk-avatar class="avatar" :user="note.user"/>
<div class="main">
<header>
<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
clear both
> .avatar-anchor
> .avatar
display block
float left
margin 0 16px 0 0
> .avatar
display block
width 52px
height 52px
margin 0
border-radius 8px
vertical-align bottom
width 52px
height 52px
border-radius 8px
> .main
float left

View File

@ -1,15 +1,22 @@
<template>
<div class="sub" :title="title">
<router-link class="avatar-anchor" :to="note.user | userPage">
<img class="avatar" :src="`${note.user.avatarUrl}?thumbnail&size=64`" alt="avatar" v-user-preview="note.userId"/>
</router-link>
<mk-avatar class="avatar" :user="note.user"/>
<div class="main">
<header>
<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>
<router-link class="created-at" :to="note | notePage">
<mk-time :time="note.createdAt"/>
</router-link>
<div class="info">
<span class="mobile" v-if="note.viaMobile">%fa:mobile-alt%</span>
<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>
<div class="body">
<mk-sub-note-content class="text" :note="note"/>
@ -35,26 +42,22 @@ export default Vue.extend({
<style lang="stylus" scoped>
root(isDark)
margin 0
padding 16px
padding 16px 32px
font-size 0.9em
background isDark ? #21242d : #fcfcfc
&:after
content ""
display block
clear both
> .avatar-anchor
> .avatar
display block
float left
margin 0 14px 0 0
> .avatar
display block
width 52px
height 52px
margin 0
border-radius 8px
vertical-align bottom
width 52px
height 52px
border-radius 8px
> .main
float left
@ -84,9 +87,18 @@ root(isDark)
margin 0 .5em 0 0
color isDark ? #606984 : #d1d8da
> .created-at
> .info
margin-left auto
color isDark ? #606984 : #b2b8bb
font-size 0.9em
> *
color isDark ? #606984 : #b2b8bb
> .mobile
margin-right 6px
> .visibility
margin-left 6px
> .body
max-height 128px

View File

@ -1,12 +1,10 @@
<template>
<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"/>
</div>
<div class="renote" v-if="isRenote">
<router-link class="avatar-anchor" :to="note.user | userPage" v-user-preview="note.userId">
<img class="avatar" :src="`${note.user.avatarUrl}?thumbnail&size=32`" alt="avatar"/>
</router-link>
<mk-avatar class="avatar" :user="note.user"/>
%fa:retweet%
<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>
@ -14,9 +12,7 @@
<mk-time :time="note.createdAt"/>
</div>
<article>
<router-link class="avatar-anchor" :to="p.user | userPage">
<img class="avatar" :src="`${p.user.avatarUrl}?thumbnail&size=64`" alt="avatar" v-user-preview="p.user.id"/>
</router-link>
<mk-avatar class="avatar" :user="p.user"/>
<div class="main">
<header>
<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">
<mk-time :time="p.createdAt"/>
</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>
</header>
<div class="body">
@ -40,6 +42,7 @@
</p>
<div class="content" v-show="p.cw == null || showContent">
<div class="text">
<span v-if="p.isHidden" style="opacity: 0.5">(この投稿は非公開です)</span>
<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"/>
<a class="rp" v-if="p.renote">RP:</a>
@ -175,7 +178,7 @@ export default Vue.extend({
// Draw map
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) {
(this as any).os.getGoogleMaps().then(maps => {
const uluru = new maps.LatLng(this.p.geo.coordinates[1], this.p.geo.coordinates[0]);
@ -336,15 +339,12 @@ root(isDark)
color #9dbb00
background isDark ? linear-gradient(to bottom, #314027 0%, #282c37 100%) : linear-gradient(to bottom, #edfde2 0%, #fff 100%)
.avatar-anchor
.avatar
display inline-block
.avatar
vertical-align bottom
width 28px
height 28px
margin 0 8px 0 0
border-radius 6px
width 28px
height 28px
margin 0 8px 0 0
border-radius 6px
[data-fa]
margin-right 4px
@ -371,13 +371,6 @@ root(isDark)
& + article
padding-top 8px
> .reply-to
padding 0 16px
background rgba(0, 0, 0, 0.0125)
> .mk-note-preview
background transparent
> article
padding 28px 32px 18px 32px
@ -390,22 +383,17 @@ root(isDark)
> .main > footer > button
color isDark ? #707b97 : #888
> .avatar-anchor
> .avatar
display block
float left
margin 0 16px 10px 0
width 58px
height 58px
border-radius 8px
//position -webkit-sticky
//position sticky
//top 74px
> .avatar
display block
width 58px
height 58px
margin 0
border-radius 8px
vertical-align bottom
> .main
float left
width calc(100% - 74px)
@ -434,7 +422,7 @@ root(isDark)
margin 0 .5em 0 0
padding 1px 6px
font-size 12px
color isDark ? #758188 :#aaa
color isDark ? #758188 : #aaa
border solid 1px isDark ? #57616f : #ddd
border-radius 3px
@ -448,18 +436,19 @@ root(isDark)
margin-left auto
font-size 0.9em
> *
color isDark ? #606984 : #c0c0c0
> .mobile
margin-right 8px
color isDark ? #606984 : #ccc
> .app
margin-right 8px
padding-right 8px
color #ccc
border-right solid 1px #eaeaea
> .created-at
color isDark ? #606984 : #c0c0c0
> .visibility
margin-left 8px
> .body
@ -613,7 +602,7 @@ root(isDark)
> .detail
padding-top 4px
background rgba(0, 0, 0, 0.0125)
background rgba(#000, 0.0125)
.note[data-darkmode]
root(true)

View File

@ -121,13 +121,13 @@ export default Vue.extend({
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;
if ((this as any).os.i.clientSettings.showMyRenotes === false) {
if ((this as any).clientSettings.showMyRenotes === false) {
if (isMyNote && isPureRenote) {
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)) {
return;
}
@ -156,7 +156,7 @@ export default Vue.extend({
this.notes = this.notes.slice(0, displayLimit);
}
} else {
this.queue.unshift(note);
this.queue.push(note);
}
},
@ -199,7 +199,7 @@ export default Vue.extend({
this.clearNotification();
}
if ((this as any).os.i.clientSettings.fetchOnScroll !== false) {
if ((this as any).clientSettings.fetchOnScroll !== false) {
const current = window.scrollY + window.innerHeight;
if (current > document.body.offsetHeight - 8) this.loadMore();
}

View File

@ -6,9 +6,7 @@
<div class="notification" :class="notification.type" :key="notification.id">
<mk-time :time="notification.createdAt"/>
<template v-if="notification.type == 'reaction'">
<router-link class="avatar-anchor" :to="notification.user | userPage" v-user-preview="notification.user.id">
<img class="avatar" :src="`${notification.user.avatarUrl}?thumbnail&size=48`" alt="avatar"/>
</router-link>
<mk-avatar class="avatar" :user="notification.user"/>
<div class="text">
<p>
<mk-reaction-icon :reaction="notification.reaction"/>
@ -20,9 +18,7 @@
</div>
</template>
<template v-if="notification.type == 'renote'">
<router-link class="avatar-anchor" :to="notification.note.user | userPage" v-user-preview="notification.note.userId">
<img class="avatar" :src="`${notification.note.user.avatarUrl}?thumbnail&size=48`" alt="avatar"/>
</router-link>
<mk-avatar class="avatar" :user="notification.note.user"/>
<div class="text">
<p>%fa:retweet%
<router-link :to="notification.note.user | userPage" v-user-preview="notification.note.userId">{{ notification.note.user | userName }}</router-link>
@ -33,9 +29,7 @@
</div>
</template>
<template v-if="notification.type == 'quote'">
<router-link class="avatar-anchor" :to="notification.note.user | userPage" v-user-preview="notification.note.userId">
<img class="avatar" :src="`${notification.note.user.avatarUrl}?thumbnail&size=48`" alt="avatar"/>
</router-link>
<mk-avatar class="avatar" :user="notification.note.user"/>
<div class="text">
<p>%fa:quote-left%
<router-link :to="notification.note.user | userPage" v-user-preview="notification.note.userId">{{ notification.note.user | userName }}</router-link>
@ -44,9 +38,7 @@
</div>
</template>
<template v-if="notification.type == 'follow'">
<router-link class="avatar-anchor" :to="notification.user | userPage" v-user-preview="notification.user.id">
<img class="avatar" :src="`${notification.user.avatarUrl}?thumbnail&size=48`" alt="avatar"/>
</router-link>
<mk-avatar class="avatar" :user="notification.user"/>
<div class="text">
<p>%fa:user-plus%
<router-link :to="notification.user | userPage" v-user-preview="notification.user.id">{{ notification.user | userName }}</router-link>
@ -54,9 +46,7 @@
</div>
</template>
<template v-if="notification.type == 'reply'">
<router-link class="avatar-anchor" :to="notification.note.user | userPage" v-user-preview="notification.note.userId">
<img class="avatar" :src="`${notification.note.user.avatarUrl}?thumbnail&size=48`" alt="avatar"/>
</router-link>
<mk-avatar class="avatar" :user="notification.note.user"/>
<div class="text">
<p>%fa:reply%
<router-link :to="notification.note.user | userPage" v-user-preview="notification.note.userId">{{ notification.note.user | userName }}</router-link>
@ -65,9 +55,7 @@
</div>
</template>
<template v-if="notification.type == 'mention'">
<router-link class="avatar-anchor" :to="notification.note.user | userPage" v-user-preview="notification.note.userId">
<img class="avatar" :src="`${notification.note.user.avatarUrl}?thumbnail&size=48`" alt="avatar"/>
</router-link>
<mk-avatar class="avatar" :user="notification.note.user"/>
<div class="text">
<p>%fa:at%
<router-link :to="notification.note.user | userPage" v-user-preview="notification.note.userId">{{ notification.note.user | userName }}</router-link>
@ -76,9 +64,7 @@
</div>
</template>
<template v-if="notification.type == 'poll_vote'">
<router-link class="avatar-anchor" :to="notification.user | userPage" v-user-preview="notification.user.id">
<img class="avatar" :src="`${notification.user.avatarUrl}?thumbnail&size=48`" alt="avatar"/>
</router-link>
<mk-avatar class="avatar" :user="notification.user"/>
<div class="text">
<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">
@ -204,7 +190,7 @@ root(isDark)
padding 16px
overflow-wrap break-word
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
border-bottom none
@ -215,7 +201,7 @@ root(isDark)
top 16px
right 12px
vertical-align top
color isDark ? #606984 : rgba(0, 0, 0, 0.6)
color isDark ? #606984 : rgba(#000, 0.6)
font-size small
&:after
@ -223,20 +209,15 @@ root(isDark)
display block
clear both
> .avatar-anchor
> .avatar
display block
float left
position -webkit-sticky
position sticky
top 16px
> img
display block
min-width 36px
min-height 36px
max-width 36px
max-height 36px
border-radius 6px
width 36px
height 36px
border-radius 6px
> .text
float right
@ -250,10 +231,10 @@ root(isDark)
margin-right 4px
.note-preview
color isDark ? #c2cad4 : rgba(0, 0, 0, 0.7)
color isDark ? #c2cad4 : rgba(#000, 0.7)
.note-ref
color isDark ? #c2cad4 : rgba(0, 0, 0, 0.7)
color isDark ? #c2cad4 : rgba(#000, 0.7)
[data-fa]
font-size 1em
@ -282,7 +263,7 @@ root(isDark)
font-size 0.8em
color isDark ? #666b79 : #aaa
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
margin 0 16px
@ -295,13 +276,13 @@ root(isDark)
width 100%
padding 16px
color #555
border-top solid 1px rgba(0, 0, 0, 0.05)
border-top solid 1px rgba(#000, 0.05)
&:hover
background rgba(0, 0, 0, 0.025)
background rgba(#000, 0.025)
&:active
background rgba(0, 0, 0, 0.05)
background rgba(#000, 0.05)
&.fetching
cursor wait

View File

@ -6,6 +6,10 @@
@drop.stop="onDrop"
>
<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="内容への注釈 (オプション)">
<textarea :class="{ with: (files.length != 0 || poll) }"
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="内容を隠す" @click="useCw = !useCw">%fa:eye-slash%</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">
{{ posting ? '%i18n:!@posting%' : submitText }}<mk-ellipsis v-if="posting"/>
</button>
@ -43,10 +48,12 @@
import Vue from 'vue';
import * as XDraggable from 'vuedraggable';
import getKao from '../../../common/scripts/get-kao';
import MkVisibilityChooser from '../../../common/views/components/visibility-chooser.vue';
export default Vue.extend({
components: {
XDraggable
XDraggable,
MkVisibilityChooser
},
props: ['reply', 'renote'],
@ -61,6 +68,8 @@ export default Vue.extend({
useCw: false,
cw: null,
geo: null,
visibility: 'public',
visibleUsers: [],
autocomplete: null,
draghover: false
};
@ -246,6 +255,32 @@ export default Vue.extend({
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() {
this.posting = true;
@ -256,6 +291,8 @@ export default Vue.extend({
renoteId: this.renote ? this.renote.id : undefined,
poll: this.poll ? (this.$refs.poll as any).get() : undefined,
cw: this.useCw ? this.cw || '' : undefined,
visibility: this.visibility,
visibleUserIds: this.visibility == 'specified' ? this.visibleUsers.map(u => u.id) : undefined,
geo: this.geo ? {
coordinates: [this.geo.longitude, this.geo.latitude],
altitude: this.geo.altitude,
@ -328,7 +365,6 @@ root(isDark)
clear both
> .content
> input
> textarea
display block
@ -381,6 +417,14 @@ root(isDark)
border-bottom solid 1px rgba($theme-color, 0.1) !important
border-radius 4px 4px 0 0
> .visibleUsers
margin-bottom 8px
font-size 14px
> span
margin-right 16px
color isDark ? #fff : #666
> .medias
margin 0
padding 0
@ -450,19 +494,6 @@ root(isDark)
input[type='file']
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
display block
position absolute
@ -527,11 +558,25 @@ root(isDark)
from {background-position: 0 0;}
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
> .drive
> .kao
> .poll
> .geo
> .visibility
display inline-block
cursor pointer
padding 0
@ -553,7 +598,7 @@ root(isDark)
color rgba($theme-color, 0.6)
background isDark ? transparent : linear-gradient(to bottom, lighten($theme-color, 80%) 0%, lighten($theme-color, 90%) 100%)
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
&:after

View File

@ -20,7 +20,7 @@
<section class="web" v-show="page == 'web'">
<h1>動作</h1>
<mk-switch v-model="os.i.clientSettings.fetchOnScroll" @change="onChangeFetchOnScroll" text="スクロールで自動読み込み">
<mk-switch v-model="clientSettings.fetchOnScroll" @change="onChangeFetchOnScroll" text="スクロールで自動読み込み">
<span>ページを下までスクロールしたときに自動で追加のコンテンツを読み込みます</span>
</mk-switch>
<mk-switch v-model="autoPopout" text="ウィンドウの自動ポップアウト">
@ -41,13 +41,14 @@
</div>
<div class="div">
<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>
<mk-switch v-model="os.i.clientSettings.showPostFormOnTopOfTl" @change="onChangeShowPostFormOnTopOfTl" text="タイムライン上部に投稿フォームを表示する"/>
<mk-switch v-model="os.i.clientSettings.showReplyTarget" @change="onChangeShowReplyTarget" text="リプライ先を表示する"/>
<mk-switch v-model="os.i.clientSettings.showMyRenotes" @change="onChangeShowMyRenotes" text="自分の行ったRenoteをタイムラインに表示する"/>
<mk-switch v-model="os.i.clientSettings.showRenotedMyNotes" @change="onChangeShowRenotedMyNotes" text="Renoteされた自分の投稿をタイムラインに表示する"/>
<mk-switch v-model="os.i.clientSettings.showMaps" @change="onChangeShowMaps" text="マップの自動展開">
<mk-switch v-model="clientSettings.showPostFormOnTopOfTl" @change="onChangeShowPostFormOnTopOfTl" text="タイムライン上部に投稿フォームを表示する"/>
<mk-switch v-model="clientSettings.showReplyTarget" @change="onChangeShowReplyTarget" text="リプライ先を表示する"/>
<mk-switch v-model="clientSettings.showMyRenotes" @change="onChangeShowMyRenotes" text="自分の行ったRenoteをタイムラインに表示する"/>
<mk-switch v-model="clientSettings.showRenotedMyNotes" @change="onChangeShowRenotedMyNotes" text="Renoteされた自分の投稿をタイムラインに表示する"/>
<mk-switch v-model="clientSettings.showMaps" @change="onChangeShowMaps" text="マップの自動展開">
<span>位置情報が添付された投稿のマップを自動的に展開します</span>
</mk-switch>
</section>
@ -69,7 +70,7 @@
<section class="web" v-show="page == 'web'">
<h1>モバイル</h1>
<mk-switch v-model="os.i.clientSettings.disableViaMobile" @change="onChangeDisableViaMobile" text="モバイルからの投稿フラグを付けない"/>
<mk-switch v-model="clientSettings.disableViaMobile" @change="onChangeDisableViaMobile" text="モバイルからの投稿フラグを付けない"/>
</section>
<section class="web" v-show="page == 'web'">
@ -297,8 +298,8 @@ export default Vue.extend({
this.$emit('done');
},
onChangeFetchOnScroll(v) {
(this as any).api('i/update_client_setting', {
name: 'fetchOnScroll',
this.$store.dispatch('settings/set', {
key: 'fetchOnScroll',
value: v
});
},
@ -308,50 +309,56 @@ export default Vue.extend({
});
},
onChangeDark(v) {
(this as any).api('i/update_client_setting', {
name: 'dark',
this.$store.dispatch('settings/set', {
key: 'dark',
value: v
});
},
onChangeShowPostFormOnTopOfTl(v) {
(this as any).api('i/update_client_setting', {
name: 'showPostFormOnTopOfTl',
this.$store.dispatch('settings/set', {
key: 'showPostFormOnTopOfTl',
value: v
});
},
onChangeShowReplyTarget(v) {
(this as any).api('i/update_client_setting', {
name: 'showReplyTarget',
this.$store.dispatch('settings/set', {
key: 'showReplyTarget',
value: v
});
},
onChangeShowMyRenotes(v) {
(this as any).api('i/update_client_setting', {
name: 'showMyRenotes',
this.$store.dispatch('settings/set', {
key: 'showMyRenotes',
value: v
});
},
onChangeShowRenotedMyNotes(v) {
(this as any).api('i/update_client_setting', {
name: 'showRenotedMyNotes',
this.$store.dispatch('settings/set', {
key: 'showRenotedMyNotes',
value: v
});
},
onChangeShowMaps(v) {
(this as any).api('i/update_client_setting', {
name: 'showMaps',
this.$store.dispatch('settings/set', {
key: 'showMaps',
value: v
});
},
onChangeCircleIcons(v) {
this.$store.dispatch('settings/set', {
key: 'circleIcons',
value: v
});
},
onChangeGradientWindowHeader(v) {
(this as any).api('i/update_client_setting', {
name: 'gradientWindowHeader',
this.$store.dispatch('settings/set', {
key: 'gradientWindowHeader',
value: v
});
},
onChangeDisableViaMobile(v) {
(this as any).api('i/update_client_setting', {
name: 'disableViaMobile',
this.$store.dispatch('settings/set', {
key: 'disableViaMobile',
value: v
});
},

View File

@ -1,6 +1,7 @@
<template>
<div class="mk-sub-note-content">
<div class="body">
<span v-if="note.isHidden" style="opacity: 0.5">(この投稿は非公開です)</span>
<a class="reply" v-if="note.replyId">%fa:reply%</a>
<mk-note-html :text="note.text" :i="os.i"/>
<a class="rp" v-if="note.renoteId" :href="`/note:${note.renoteId}`">RP: ...</a>

View File

@ -101,8 +101,8 @@ export default Vue.extend({
(this as any).api(this.endpoint, {
limit: fetchLimit + 1,
untilDate: this.date ? this.date.getTime() : undefined,
includeMyRenotes: (this as any).os.i.clientSettings.showMyRenotes,
includeRenotedMyNotes: (this as any).os.i.clientSettings.showRenotedMyNotes
includeMyRenotes: (this as any).clientSettings.showMyRenotes,
includeRenotedMyNotes: (this as any).clientSettings.showRenotedMyNotes
}).then(notes => {
if (notes.length == fetchLimit + 1) {
notes.pop();
@ -123,8 +123,8 @@ export default Vue.extend({
(this as any).api(this.endpoint, {
limit: fetchLimit + 1,
untilId: (this.$refs.timeline as any).tail().id,
includeMyRenotes: (this as any).os.i.clientSettings.showMyRenotes,
includeRenotedMyNotes: (this as any).os.i.clientSettings.showRenotedMyNotes
includeMyRenotes: (this as any).clientSettings.showMyRenotes,
includeRenotedMyNotes: (this as any).clientSettings.showRenotedMyNotes
}).then(notes => {
if (notes.length == fetchLimit + 1) {
notes.pop();

View File

@ -10,7 +10,7 @@
<x-core v-if="src == 'home'" ref="tl" key="home" src="home"/>
<x-core v-if="src == 'local'" ref="tl" key="local" src="local"/>
<x-core v-if="src == 'global'" ref="tl" key="global" src="global"/>
<mk-user-list-timeline v-if="src == 'list'" ref="tl" key="list" :list="list"/>
<mk-user-list-timeline v-if="src == 'list'" ref="tl" :key="list.id" :list="list"/>
</div>
</template>
@ -59,7 +59,7 @@ export default Vue.extend({
root(isDark)
background isDark ? #282C37 : #fff
border solid 1px rgba(0, 0, 0, 0.075)
border solid 1px rgba(#000, 0.075)
border-radius 6px
> header
@ -67,7 +67,7 @@ root(isDark)
z-index 10
background isDark ? #313543 : #fff
border-radius 6px 6px 0 0
box-shadow 0 1px rgba(0, 0, 0, 0.08)
box-shadow 0 1px isDark ? rgba(#000, 0.15) : rgba(#000, 0.08)
> button
position absolute

View File

@ -2,7 +2,7 @@
<div class="account">
<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>
<img class="avatar" :src="`${ os.i.avatarUrl }?thumbnail&size=64`" alt="avatar"/>
<mk-avatar class="avatar" :user="os.i"/>
</button>
<transition name="zoom-in-top">
<div class="menu" v-if="isOpen">
@ -22,7 +22,7 @@
</ul>
<ul>
<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 @click="settings">
<p>%fa:cog%<span>%i18n:@settings%</span>%fa:angle-right%</p>
@ -165,7 +165,7 @@ root(isDark)
font-size 0.8em
background $bgcolor
border-radius 4px
box-shadow 0 1px 4px rgba(0, 0, 0, 0.25)
box-shadow 0 1px 4px rgba(#000, 0.25)
&:before
content ""
@ -176,7 +176,7 @@ root(isDark)
right 12px
border-top 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
&:after

View File

@ -125,7 +125,7 @@ root(isDark)
width 300px
background $bgcolor
border-radius 4px
box-shadow 0 1px 4px rgba(0, 0, 0, 0.25)
box-shadow 0 1px 4px rgba(#000, 0.25)
&:before
content ""
@ -136,7 +136,7 @@ root(isDark)
right 74px
border-top 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
&:after

View File

@ -50,7 +50,7 @@ export default Vue.extend({
width 14em
height 32px
font-size 1em
background rgba(0, 0, 0, 0.05)
background rgba(#000, 0.05)
outline none
//border solid 1px #ddd
border none
@ -62,7 +62,7 @@ export default Vue.extend({
color #9eaba8
&:hover
background rgba(0, 0, 0, 0.08)
background rgba(#000, 0.08)
&:focus
box-shadow 0 0 0 2px rgba($theme-color, 0.5) !important

View File

@ -46,9 +46,10 @@ export default Vue.extend({
this.$store.commit('setUiHeaderHeight', 48);
if ((this as any).os.isSignedIn) {
const ago = (new Date().getTime() - new Date((this as any).os.i.lastUsedAt).getTime()) / 1000
const ago = (new Date().getTime() - new Date((this as any).os.i.lastUsedAt).getTime()) / 1000;
const isHisasiburi = ago >= 3600;
(this as any).os.i.lastUsedAt = new Date();
(this as any).os.bakeMe();
if (isHisasiburi) {
(this.$refs.welcomeback as any).style.display = 'block';
(this.$refs.main as any).style.overflow = 'hidden';
@ -103,7 +104,7 @@ root(isDark)
top 0
z-index 1000
width 100%
box-shadow 0 1px 1px rgba(0, 0, 0, 0.075)
box-shadow 0 1px 1px rgba(#000, 0.075)
> .main
height 48px
@ -132,7 +133,7 @@ root(isDark)
line-height 48px
margin 0
text-align center
color #888
color isDark ? #fff : #888
opacity 0
> .container

View File

@ -46,8 +46,8 @@ export default Vue.extend({
(this as any).api('notes/user-list-timeline', {
listId: this.list.id,
limit: fetchLimit + 1,
includeMyRenotes: (this as any).os.i.clientSettings.showMyRenotes,
includeRenotedMyNotes: (this as any).os.i.clientSettings.showRenotedMyNotes
includeMyRenotes: (this as any).clientSettings.showMyRenotes,
includeRenotedMyNotes: (this as any).clientSettings.showRenotedMyNotes
}).then(notes => {
if (notes.length == fetchLimit + 1) {
notes.pop();
@ -66,8 +66,8 @@ export default Vue.extend({
listId: this.list.id,
limit: fetchLimit + 1,
untilId: (this.$refs.timeline as any).tail().id,
includeMyRenotes: (this as any).os.i.clientSettings.showMyRenotes,
includeRenotedMyNotes: (this as any).os.i.clientSettings.showRenotedMyNotes
includeMyRenotes: (this as any).clientSettings.showMyRenotes,
includeRenotedMyNotes: (this as any).clientSettings.showRenotedMyNotes
}).then(notes => {
if (notes.length == fetchLimit + 1) {
notes.pop();

View File

@ -2,9 +2,7 @@
<div class="mk-user-preview">
<template v-if="u != null">
<div class="banner" :style="u.bannerUrl ? `background-image: url(${u.bannerUrl}?thumbnail&size=512)` : ''"></div>
<router-link class="avatar" :to="u | userPage">
<img :src="`${u.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
</router-link>
<mk-avatar class="avatar" :user="u" :disable-preview="true"/>
<div class="title">
<router-link class="name" :to="u | userPage">{{ u | userName }}</router-link>
<p class="username">@{{ u | acct }}</p>
@ -94,7 +92,7 @@ root(isDark)
width 250px
background isDark ? #282c37 : #fff
background-clip content-box
border solid 1px rgba(0, 0, 0, 0.1)
border solid 1px rgba(#000, 0.1)
border-radius 4px
overflow hidden
opacity 0
@ -111,14 +109,10 @@ root(isDark)
top 62px
left 13px
z-index 2
> img
display block
width 58px
height 58px
margin 0
border solid 3px isDark ? #282c37 : #fff
border-radius 8px
width 58px
height 58px
border solid 3px isDark ? #282c37 : #fff
border-radius 8px
> .title
display block

View File

@ -1,8 +1,6 @@
<template>
<div class="root item">
<router-link class="avatar-anchor" :to="user | userPage" v-user-preview="user.id">
<img class="avatar" :src="`${user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
</router-link>
<mk-avatar class="avatar" :user="user"/>
<div class="main">
<header>
<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
clear both
> .avatar-anchor
> .avatar
display block
float left
margin 0 16px 0 0
> .avatar
display block
width 58px
height 58px
margin 0
border-radius 8px
vertical-align bottom
width 58px
height 58px
border-radius 8px
> .main
float left

View File

@ -119,7 +119,7 @@ export default Vue.extend({
overflow auto
> *
border-bottom solid 1px rgba(0, 0, 0, 0.05)
border-bottom solid 1px rgba(#000, 0.05)
> *
max-width 600px

View File

@ -24,8 +24,8 @@ export default Vue.extend({
computed: {
withGradient(): boolean {
return (this as any).os.isSignedIn
? (this as any).os.i.clientSettings.gradientWindowHeader != null
? (this as any).os.i.clientSettings.gradientWindowHeader
? (this as any).clientSettings.gradientWindowHeader != null
? (this as any).clientSettings.gradientWindowHeader
: false
: false;
}
@ -36,7 +36,7 @@ export default Vue.extend({
<style lang="stylus" scoped>
root(isDark)
background isDark ? #282C37 : #fff
border solid 1px rgba(0, 0, 0, 0.075)
border solid 1px rgba(#000, 0.075)
border-radius 6px
overflow hidden
@ -55,7 +55,7 @@ root(isDark)
font-size 0.9em
font-weight bold
color isDark ? #e3e5e8 : #888
box-shadow 0 1px rgba(0, 0, 0, 0.07)
box-shadow 0 1px rgba(#000, 0.07)
> [data-fa]
margin-right 6px

View File

@ -4,7 +4,7 @@
<div class="main" ref="main" tabindex="-1" :data-is-modal="isModal" @mousedown="onBodyMousedown" @keydown="onKeydown" :style="{ width, height }">
<div class="body">
<header ref="header"
:class="{ withGradient }"
:class="{ withGradient: clientSettings.gradientWindowHeader }"
@contextmenu.prevent="() => {}" @mousedown.prevent="onHeaderMousedown"
>
<h1><slot name="header"></slot></h1>
@ -17,14 +17,16 @@
<slot></slot>
</div>
</div>
<div class="handle top" v-if="canResize" @mousedown.prevent="onTopHandleMousedown"></div>
<div class="handle right" v-if="canResize" @mousedown.prevent="onRightHandleMousedown"></div>
<div class="handle bottom" v-if="canResize" @mousedown.prevent="onBottomHandleMousedown"></div>
<div class="handle left" v-if="canResize" @mousedown.prevent="onLeftHandleMousedown"></div>
<div class="handle top-left" v-if="canResize" @mousedown.prevent="onTopLeftHandleMousedown"></div>
<div class="handle top-right" v-if="canResize" @mousedown.prevent="onTopRightHandleMousedown"></div>
<div class="handle bottom-right" v-if="canResize" @mousedown.prevent="onBottomRightHandleMousedown"></div>
<div class="handle bottom-left" v-if="canResize" @mousedown.prevent="onBottomLeftHandleMousedown"></div>
<template v-if="canResize">
<div class="handle top" @mousedown.prevent="onTopHandleMousedown"></div>
<div class="handle right" @mousedown.prevent="onRightHandleMousedown"></div>
<div class="handle bottom" @mousedown.prevent="onBottomHandleMousedown"></div>
<div class="handle left" @mousedown.prevent="onLeftHandleMousedown"></div>
<div class="handle top-left" @mousedown.prevent="onTopLeftHandleMousedown"></div>
<div class="handle top-right" @mousedown.prevent="onTopRightHandleMousedown"></div>
<div class="handle bottom-right" @mousedown.prevent="onBottomRightHandleMousedown"></div>
<div class="handle bottom-left" @mousedown.prevent="onBottomLeftHandleMousedown"></div>
</template>
</div>
</div>
</template>
@ -85,17 +87,10 @@ export default Vue.extend({
computed: {
isFlexible(): boolean {
return this.height == null;
return this.height == 'auto';
},
canResize(): boolean {
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
width 100%
height 100%
background rgba(0, 0, 0, 0.7)
background rgba(#000, 0.7)
opacity 0
pointer-events none
@ -493,7 +488,7 @@ root(isDark)
&:focus
&:not([data-is-modal])
> .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
$size = 8px
@ -561,7 +556,7 @@ root(isDark)
overflow hidden
background isDark ? #282C37 : #fff
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-height = 40px

View File

@ -114,7 +114,7 @@ export default Vue.extend({
.notes
max-width 600px
margin 0 auto
border solid 1px rgba(0, 0, 0, 0.075)
border solid 1px rgba(#000, 0.075)
border-radius 6px
overflow hidden

View File

@ -8,9 +8,7 @@
<p class="fetching" v-if="fetching">%fa:spinner .pulse .fw% %i18n:common.loading%<mk-ellipsis/></p>
<template v-else-if="users.length != 0">
<div class="user" v-for="_user in users">
<router-link class="avatar-anchor" :to="_user | userPage">
<img class="avatar" :src="`${_user.avatarUrl}?thumbnail&size=42`" alt="" v-user-preview="_user.id"/>
</router-link>
<mk-avatar class="avatar" :user="_user"/>
<div class="body">
<router-link class="name" :to="_user | userPage" v-user-preview="_user.id">{{ _user | userName }}</router-link>
<p class="username">@{{ _user | acct }}</p>
@ -80,18 +78,13 @@ root(isDark)
display block
clear both
> .avatar-anchor
> .avatar
display block
float left
margin 0 12px 0 0
> .avatar
display block
width 42px
height 42px
margin 0
border-radius 8px
vertical-align bottom
width 42px
height 42px
border-radius 8px
> .body
float left

View File

@ -38,7 +38,7 @@ export default Vue.extend({
<style lang="stylus" scoped>
.followers-you-know
background #fff
border solid 1px rgba(0, 0, 0, 0.075)
border solid 1px rgba(#000, 0.075)
border-radius 6px
> .title
@ -49,7 +49,7 @@ export default Vue.extend({
font-size 0.9em
font-weight bold
color #888
box-shadow 0 1px rgba(0, 0, 0, 0.07)
box-shadow 0 1px rgba(#000, 0.07)
> i
margin-right 4px

View File

@ -4,9 +4,7 @@
<p class="initializing" v-if="fetching">%fa:spinner .pulse .fw%%i18n:@loading%<mk-ellipsis/></p>
<template v-if="!fetching && users.length != 0">
<div class="user" v-for="friend in users">
<router-link class="avatar-anchor" :to="friend | userPage">
<img class="avatar" :src="`${friend.avatarUrl}?thumbnail&size=42`" alt="" v-user-preview="friend.id"/>
</router-link>
<mk-avatar class="avatar" :user="friend"/>
<div class="body">
<router-link class="name" :to="friend | userPage" v-user-preview="friend.id">{{ friend.name }}</router-link>
<p class="username">@{{ friend | acct }}</p>
@ -44,7 +42,7 @@ export default Vue.extend({
<style lang="stylus" scoped>
.friends
background #fff
border solid 1px rgba(0, 0, 0, 0.075)
border solid 1px rgba(#000, 0.075)
border-radius 6px
> .title
@ -55,7 +53,7 @@ export default Vue.extend({
font-size 0.9em
font-weight bold
color #888
box-shadow 0 1px rgba(0, 0, 0, 0.07)
box-shadow 0 1px rgba(#000, 0.07)
> i
margin-right 4px
@ -82,18 +80,13 @@ export default Vue.extend({
display block
clear both
> .avatar-anchor
> .avatar
display block
float left
margin 0 12px 0 0
> .avatar
display block
width 42px
height 42px
margin 0
border-radius 8px
vertical-align bottom
width 42px
height 42px
border-radius 8px
> .body
float left

View File

@ -2,12 +2,12 @@
<div class="header" :data-is-dark-background="user.bannerUrl != null">
<div class="is-suspended" v-if="user.isSuspended"><p>%fa:exclamation-triangle% %i18n:@is-suspended%</p></div>
<div class="is-remote" v-if="user.host != null"><p>%fa:exclamation-triangle% %i18n:@is-remote%<a :href="user.url || user.uri" target="_blank">%i18n:@view-remote%</a></p></div>
<div class="banner-container" :style="user.bannerUrl ? `background-image: url(${user.bannerUrl}?thumbnail&size=2048)` : ''">
<div class="banner" ref="banner" :style="user.bannerUrl ? `background-image: url(${user.bannerUrl}?thumbnail&size=2048)` : ''" @click="onBannerClick"></div>
<div class="banner-container" :style="user.bannerUrl ? `background-image: url(${user.bannerUrl})` : ''">
<div class="banner" ref="banner" :style="user.bannerUrl ? `background-image: url(${user.bannerUrl})` : ''" @click="onBannerClick"></div>
<div class="fade"></div>
</div>
<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">
<p class="name">{{ user | userName }}</p>
<p class="username">@{{ user | acct }}</p>
@ -72,7 +72,7 @@ export default Vue.extend({
overflow hidden
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-remote
@ -99,7 +99,7 @@ export default Vue.extend({
background-color #383838
> .fade
background linear-gradient(transparent, rgba(0, 0, 0, 0.7))
background linear-gradient(transparent, rgba(#000, 0.7))
> .container
> .title
@ -139,10 +139,9 @@ export default Vue.extend({
z-index 2
width 160px
height 160px
margin 0
border solid 3px #fff
border-radius 8px
box-shadow 1px 1px 3px rgba(0, 0, 0, 0.2)
box-shadow 1px 1px 3px rgba(#000, 0.2)
> .title
position absolute

View File

@ -65,7 +65,7 @@ export default Vue.extend({
width calc(100% - 275px * 2)
> .timeline
border solid 1px rgba(0, 0, 0, 0.075)
border solid 1px rgba(#000, 0.075)
border-radius 6px
> div
@ -91,7 +91,7 @@ export default Vue.extend({
font-size 12px
color #aaa
background #fff
border solid 1px rgba(0, 0, 0, 0.075)
border solid 1px rgba(#000, 0.075)
border-radius 6px
a

View File

@ -41,7 +41,7 @@ export default Vue.extend({
<style lang="stylus" scoped>
.photos
background #fff
border solid 1px rgba(0, 0, 0, 0.075)
border solid 1px rgba(#000, 0.075)
border-radius 6px
> .title
@ -52,7 +52,7 @@ export default Vue.extend({
font-size 0.9em
font-weight bold
color #888
box-shadow 0 1px rgba(0, 0, 0, 0.07)
box-shadow 0 1px rgba(#000, 0.07)
> i
margin-right 4px

View File

@ -118,7 +118,7 @@ export default Vue.extend({
<style lang="stylus" scoped>
.profile
background #fff
border solid 1px rgba(0, 0, 0, 0.075)
border solid 1px rgba(#000, 0.075)
border-radius 6px
> *:first-child

View File

@ -8,9 +8,7 @@
<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>
<div class="users">
<router-link v-for="user in users" :key="user.id" class="avatar-anchor" :to="user | userPage" v-user-preview="user.id">
<img class="avatar" :src="`${user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
</router-link>
<mk-avatar class="avatar" v-for="user in users" :key="user.id" :user="user"/>
</div>
</div>
<div>
@ -125,7 +123,8 @@ export default Vue.extend({
flex 1
$width = 1000px
background-image url('/assets/welcome-bg.svg')
background linear-gradient(to bottom, #1e1d65, #bd6659)
//background-image url('/assets/welcome-bg.svg')
background-size cover
background-position top center
@ -216,13 +215,9 @@ export default Vue.extend({
> *
display inline-block
margin 4px
> *
display inline-block
width 38px
height 38px
vertical-align top
border-radius 6px
width 38px
height 38px
border-radius 6px
> div:last-child
@ -230,14 +225,14 @@ export default Vue.extend({
width 410px
background #fff
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
> header
z-index 1
padding 12px 16px
color #888d94
box-shadow 0 1px 0px rgba(0, 0, 0, 0.1)
box-shadow 0 1px 0px rgba(#000, 0.1)
> div
position absolute
@ -309,9 +304,3 @@ export default Vue.extend({
a
color #666
</style>
<style lang="stylus">
html
body
background linear-gradient(to bottom, #1e1d65, #bd6659)
</style>

View File

@ -22,9 +22,11 @@ export default define({
} else {
this.props.design++;
}
this.save();
},
viewChanged(view) {
this.props.view = view;
this.save();
}
}
});

View File

@ -37,6 +37,7 @@ export default define({
methods: {
func() {
this.props.compact = !this.props.compact;
this.save();
},
settings() {
const id = window.prompt('チャンネルID');
@ -61,7 +62,7 @@ export default define({
<style lang="stylus" scoped>
.mkw-channel
background #fff
border solid 1px rgba(0, 0, 0, 0.075)
border solid 1px rgba(#000, 0.075)
border-radius 6px
overflow hidden
@ -73,7 +74,7 @@ export default define({
font-size 0.9em
font-weight bold
color #888
box-shadow 0 1px rgba(0, 0, 0, 0.07)
box-shadow 0 1px rgba(#000, 0.07)
> [data-fa]
margin-right 4px

View File

@ -35,6 +35,7 @@ export default define({
} else {
this.props.design++;
}
this.save();
}
}
});

View File

@ -23,6 +23,7 @@ export default define({
},
func() {
this.props.compact = !this.props.compact;
this.save();
}
}
});

View File

@ -39,6 +39,7 @@ export default define({
methods: {
func() {
this.props.compact = !this.props.compact;
this.save();
},
fetch() {
this.fetching = true;

View File

@ -29,6 +29,7 @@ export default define({
} else {
this.props.design++;
}
this.save();
},
onKeydown(e) {
if ((e.which == 10 || e.which == 13) && (e.ctrlKey || e.metaKey)) this.post();
@ -59,7 +60,7 @@ export default define({
.mkw-post-form
background #fff
overflow hidden
border solid 1px rgba(0, 0, 0, 0.075)
border solid 1px rgba(#000, 0.075)
border-radius 6px
> .title
@ -70,7 +71,7 @@ export default define({
font-size 0.9em
font-weight bold
color #888
box-shadow 0 1px rgba(0, 0, 0, 0.07)
box-shadow 0 1px rgba(#000, 0.07)
> [data-fa]
margin-right 4px

View File

@ -8,12 +8,9 @@
title="クリックでバナー編集"
@click="os.apis.updateBanner"
></div>
<img class="avatar"
:src="`${os.i.avatarUrl}?thumbnail&size=96`"
<mk-avatar class="avatar" :user="os.i"
@click="os.apis.updateAvatar"
alt="avatar"
title="クリックでアバター編集"
v-user-preview="os.i.id"
/>
<router-link class="name" :to="os.i | userPage">{{ os.i | userName }}</router-link>
<p class="username">@{{ os.i | acct }}</p>
@ -36,6 +33,7 @@ export default define({
} else {
this.props.design++;
}
this.save();
}
}
});
@ -45,7 +43,7 @@ export default define({
root(isDark)
overflow hidden
background isDark ? #282c37 : #fff
border solid 1px rgba(0, 0, 0, 0.075)
border solid 1px rgba(#000, 0.075)
border-radius 6px
&[data-compact]
@ -54,14 +52,14 @@ root(isDark)
display block
width 100%
height 100%
background rgba(0, 0, 0, 0.5)
background rgba(#000, 0.5)
> .avatar
top ((100px - 58px) / 2)
left ((100px - 58px) / 2)
border none
border-radius 100%
box-shadow 0 0 16px rgba(0, 0, 0, 0.5)
box-shadow 0 0 16px rgba(#000, 0.5)
> .name
position absolute
@ -70,7 +68,7 @@ root(isDark)
margin 0
line-height 100px
color #fff
text-shadow 0 0 8px rgba(0, 0, 0, 0.5)
text-shadow 0 0 8px rgba(#000, 0.5)
> .username
display none
@ -103,10 +101,8 @@ root(isDark)
left 16px
width 58px
height 58px
margin 0
border solid 3px isDark ? #282c37 : #fff
border-radius 8px
vertical-align bottom
cursor pointer
> .name

View File

@ -22,6 +22,7 @@ export default define({
} else {
this.props.design++;
}
this.save();
}
}
});

View File

@ -38,6 +38,7 @@ export default define({
methods: {
func() {
this.props.compact = !this.props.compact;
this.save();
},
fetch() {
this.fetching = true;

View File

@ -8,9 +8,7 @@
<p class="fetching" v-if="fetching">%fa:spinner .pulse .fw%%i18n:common.loading%<mk-ellipsis/></p>
<template v-else-if="users.length != 0">
<div class="user" v-for="_user in users">
<router-link class="avatar-anchor" :to="_user | userPage">
<img class="avatar" :src="`${_user.avatarUrl}?thumbnail&size=42`" alt="" v-user-preview="_user.id"/>
</router-link>
<mk-avatar class="avatar" :user="_user"/>
<div class="body">
<router-link class="name" :to="_user | userPage" v-user-preview="_user.id">{{ _user | userName }}</router-link>
<p class="username">@{{ _user | acct }}</p>
@ -48,6 +46,7 @@ export default define({
methods: {
func() {
this.props.compact = !this.props.compact;
this.save();
},
fetch() {
this.fetching = true;
@ -88,18 +87,13 @@ root(isDark)
display block
clear both
> .avatar-anchor
> .avatar
display block
float left
margin 0 12px 0 0
> .avatar
display block
width 42px
height 42px
margin 0
border-radius 8px
vertical-align bottom
width 42px
height 42px
border-radius 8px
> .body
float left

View File

@ -14,7 +14,7 @@ import ElementLocaleJa from 'element-ui/lib/locale/lang/ja';
import App from './app.vue';
import checkForUpdate from './common/scripts/check-for-update';
import MiOS, { API } from './common/mios';
import MiOS, { API } from './mios';
import { version, codename, lang } from './config';
let elementLocale;
@ -41,17 +41,6 @@ require('./common/views/widgets');
// Register global filters
require('./common/views/filters');
const store = new Vuex.Store({
state: {
uiHeaderHeight: 0
},
mutations: {
setUiHeaderHeight(state, height) {
state.uiHeaderHeight = height;
}
}
});
Vue.mixin({
destroyed(this: any) {
if (this.$el.parentNode) {
@ -157,22 +146,15 @@ export default (callback: (launch: (router: VueRouter, api?: (os: MiOS) => API)
return {
os,
api: os.api,
apis: os.apis
apis: os.apis,
clientSettings: os.store.state.settings.data
};
}
});
const app = new Vue({
store,
store: os.store,
router,
created() {
this.$watch('os.i', i => {
// キャッシュ更新
localStorage.setItem('me', JSON.stringify(i));
}, {
deep: true
});
},
render: createEl => createEl(App)
});

View File

@ -3,28 +3,19 @@ import { EventEmitter } from 'eventemitter3';
import * as merge from 'object-assign-deep';
import * as uuid from 'uuid';
import { hostname, apiUrl, swPublickey, version, lang, googleMapsApiKey } from '../config';
import Progress from './scripts/loading';
import Connection from './scripts/streaming/stream';
import { HomeStreamManager } from './scripts/streaming/home';
import { DriveStreamManager } from './scripts/streaming/drive';
import { ServerStreamManager } from './scripts/streaming/server';
import { MessagingIndexStreamManager } from './scripts/streaming/messaging-index';
import { OthelloStreamManager } from './scripts/streaming/othello';
import initStore from './store';
import { hostname, apiUrl, swPublickey, version, lang, googleMapsApiKey } from './config';
import Progress from './common/scripts/loading';
import Connection from './common/scripts/streaming/stream';
import { HomeStreamManager } from './common/scripts/streaming/home';
import { DriveStreamManager } from './common/scripts/streaming/drive';
import { ServerStreamManager } from './common/scripts/streaming/server';
import { MessagingIndexStreamManager } from './common/scripts/streaming/messaging-index';
import { OthelloStreamManager } from './common/scripts/streaming/othello';
import Err from '../common/views/components/connect-failed.vue';
import { LocalTimelineStreamManager } from './scripts/streaming/local-timeline';
import { GlobalTimelineStreamManager } from './scripts/streaming/global-timeline';
const defaultSettings = {
fetchOnScroll: true,
showMaps: true,
showPostFormOnTopOfTl: false,
gradientWindowHeader: false,
showReplyTarget: true,
showMyRenotes: true,
showRenotedMyNotes: true
};
import Err from './common/views/components/connect-failed.vue';
import { LocalTimelineStreamManager } from './common/scripts/streaming/local-timeline';
import { GlobalTimelineStreamManager } from './common/scripts/streaming/global-timeline';
//#region api requests
let spinner = null;
@ -117,6 +108,8 @@ export default class MiOS extends EventEmitter {
return localStorage.getItem('enableSounds') == 'true';
}
public store: ReturnType<typeof initStore>;
public apis: API;
/**
@ -232,8 +225,14 @@ export default class MiOS extends EventEmitter {
console.error.apply(null, args);
}
public bakeMe() {
// ローカルストレージにキャッシュ
localStorage.setItem('me', JSON.stringify(this.i));
}
public signout() {
localStorage.removeItem('me');
localStorage.removeItem('settings');
document.cookie = `i=; domain=${hostname}; expires=Thu, 01 Jan 1970 00:00:01 GMT;`;
location.href = '/';
}
@ -243,6 +242,8 @@ export default class MiOS extends EventEmitter {
* @param callback A function that call when initialized
*/
public async init(callback) {
this.store = initStore(this);
//#region Init stream managers
this.streams.serverStream = new ServerStreamManager(this);
@ -307,16 +308,11 @@ export default class MiOS extends EventEmitter {
// フェッチが完了したとき
const fetched = me => {
if (me) {
// デフォルトの設定をマージ
me.clientSettings = Object.assign(defaultSettings, me.clientSettings);
// ローカルストレージにキャッシュ
localStorage.setItem('me', JSON.stringify(me));
}
this.i = me;
// ローカルストレージにキャッシュ
this.bakeMe();
this.emit('signedin');
// Finish init
@ -333,6 +329,14 @@ export default class MiOS extends EventEmitter {
// Get cached account data
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.token == null) {
@ -346,12 +350,23 @@ export default class MiOS extends EventEmitter {
// 後から新鮮なデータをフェッチ
fetchme(cachedMe.token, freshData => {
merge(cachedMe, freshData);
this.store.dispatch('settings/merge', freshData.clientSettings);
});
} else {
// Get token from cookie
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 viaStream = this.stream.hasConnection &&
const viaStream = this.stream && this.stream.hasConnection &&
(localStorage.getItem('apiViaStream') ? localStorage.getItem('apiViaStream') == 'true' : true);
if (viaStream) {

View File

@ -55,15 +55,15 @@ init((launch) => {
{ path: '/signup', name: 'signup', component: MkSignup },
{ path: '/i/settings', component: MkSettings },
{ path: '/i/settings/profile', component: MkProfileSetting },
{ path: '/i/notifications', component: MkNotifications },
{ path: '/i/messaging', component: MkMessaging },
{ path: '/i/notifications', name: 'notifications', component: MkNotifications },
{ path: '/i/messaging', name: 'messaging', component: MkMessaging },
{ path: '/i/messaging/:user', component: MkMessagingRoom },
{ path: '/i/drive', component: MkDrive },
{ path: '/i/drive', name: 'drive', component: MkDrive },
{ path: '/i/drive/folder/:folder', component: MkDrive },
{ path: '/i/drive/file/:file', component: MkDrive },
{ path: '/selectdrive', component: MkSelectDrive },
{ path: '/search', component: MkSearch },
{ path: '/othello', component: MkOthello },
{ path: '/othello', name: 'othello', component: MkOthello },
{ path: '/othello/:game', component: MkOthello },
{ path: '/@:user', component: MkUser },
{ path: '/@:user/followers', component: MkFollowers },

Some files were not shown because too many files have changed in this diff Show More