Compare commits
17 Commits
Author | SHA1 | Date | |
---|---|---|---|
a5023271ef | |||
c3747db670 | |||
fe1e60a28c | |||
f91d2e8c8d | |||
dccc2c60e3 | |||
933e25804c | |||
0b503661af | |||
58082431ff | |||
2536bfb5f5 | |||
6428066552 | |||
4bf3827b73 | |||
3cad494404 | |||
ef0793311f | |||
6f3e341e89 | |||
2fea3be7c0 | |||
166c4ebda0 | |||
319eed029b |
@ -90,6 +90,7 @@ common:
|
|||||||
my-token-regenerated: "あなたのトークンが更新されたのでサインアウトします。"
|
my-token-regenerated: "あなたのトークンが更新されたのでサインアウトします。"
|
||||||
i-like-sushi: "私は(プリンよりむしろ)寿司が好き"
|
i-like-sushi: "私は(プリンよりむしろ)寿司が好き"
|
||||||
show-reversi-board-labels: "リバーシのボードの行と列のラベルを表示"
|
show-reversi-board-labels: "リバーシのボードの行と列のラベルを表示"
|
||||||
|
use-contrast-reversi-stones: "リバーシのアイコンにコントラストを付ける"
|
||||||
verified-user: "公式アカウント"
|
verified-user: "公式アカウント"
|
||||||
disable-animated-mfm: "投稿内の動きのあるテキストを無効にする"
|
disable-animated-mfm: "投稿内の動きのあるテキストを無効にする"
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "misskey",
|
"name": "misskey",
|
||||||
"author": "syuilo <i@syuilo.com>",
|
"author": "syuilo <i@syuilo.com>",
|
||||||
"version": "7.2.0",
|
"version": "7.3.0",
|
||||||
"clientVersion": "1.0.8724",
|
"clientVersion": "1.0.8741",
|
||||||
"codename": "nighthike",
|
"codename": "nighthike",
|
||||||
"main": "./built/index.js",
|
"main": "./built/index.js",
|
||||||
"private": true,
|
"private": true,
|
||||||
@ -157,6 +157,7 @@
|
|||||||
"monk": "6.0.6",
|
"monk": "6.0.6",
|
||||||
"ms": "2.1.1",
|
"ms": "2.1.1",
|
||||||
"nan": "2.10.0",
|
"nan": "2.10.0",
|
||||||
|
"nested-property": "0.0.7",
|
||||||
"node-sass": "4.9.3",
|
"node-sass": "4.9.3",
|
||||||
"node-sass-json-importer": "3.3.1",
|
"node-sass-json-importer": "3.3.1",
|
||||||
"nprogress": "0.2.0",
|
"nprogress": "0.2.0",
|
||||||
|
@ -18,11 +18,11 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="board">
|
<div class="board">
|
||||||
<div class="labels-x" v-if="this.$store.state.settings.reversiBoardLabels">
|
<div class="labels-x" v-if="this.$store.state.settings.games.reversi.showBoardLabels">
|
||||||
<span v-for="i in game.settings.map[0].length">{{ String.fromCharCode(64 + i) }}</span>
|
<span v-for="i in game.settings.map[0].length">{{ String.fromCharCode(64 + i) }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<div class="labels-y" v-if="this.$store.state.settings.reversiBoardLabels">
|
<div class="labels-y" v-if="this.$store.state.settings.games.reversi.showBoardLabels">
|
||||||
<div v-for="i in game.settings.map.length">{{ i }}</div>
|
<div v-for="i in game.settings.map.length">{{ i }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="cells" :style="cellsStyle">
|
<div class="cells" :style="cellsStyle">
|
||||||
@ -30,15 +30,15 @@
|
|||||||
:class="{ empty: stone == null, none: o.map[i] == 'null', isEnded: game.isEnded, myTurn: !game.isEnded && isMyTurn, can: turnUser ? o.canPut(turnUser.id == blackUser.id, i) : null, prev: o.prevPos == i }"
|
:class="{ empty: stone == null, none: o.map[i] == 'null', isEnded: game.isEnded, myTurn: !game.isEnded && isMyTurn, can: turnUser ? o.canPut(turnUser.id == blackUser.id, i) : null, prev: o.prevPos == i }"
|
||||||
@click="set(i)"
|
@click="set(i)"
|
||||||
:title="`${String.fromCharCode(65 + o.transformPosToXy(i)[0])}${o.transformPosToXy(i)[1] + 1}`">
|
:title="`${String.fromCharCode(65 + o.transformPosToXy(i)[0])}${o.transformPosToXy(i)[1] + 1}`">
|
||||||
<img v-if="stone === true" :src="blackUser.avatarUrl" alt="">
|
<img v-if="stone === true" :src="blackUser.avatarUrl" alt="black" :class="{ contrast: $store.state.settings.games.reversi.useContrastStones }">
|
||||||
<img v-if="stone === false" :src="whiteUser.avatarUrl" alt="">
|
<img v-if="stone === false" :src="whiteUser.avatarUrl" alt="white" :class="{ contrast: $store.state.settings.games.reversi.useContrastStones }">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="labels-y" v-if="this.$store.state.settings.reversiBoardLabels">
|
<div class="labels-y" v-if="this.$store.state.settings.games.reversi.showBoardLabels">
|
||||||
<div v-for="i in game.settings.map.length">{{ i }}</div>
|
<div v-for="i in game.settings.map.length">{{ i }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="labels-x" v-if="this.$store.state.settings.reversiBoardLabels">
|
<div class="labels-x" v-if="this.$store.state.settings.games.reversi.showBoardLabels">
|
||||||
<span v-for="i in game.settings.map[0].length">{{ String.fromCharCode(64 + i) }}</span>
|
<span v-for="i in game.settings.map[0].length">{{ String.fromCharCode(64 + i) }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -421,6 +421,13 @@ root(isDark)
|
|||||||
width 100%
|
width 100%
|
||||||
height 100%
|
height 100%
|
||||||
|
|
||||||
|
&.contrast
|
||||||
|
&[alt="black"]
|
||||||
|
filter brightness(.5)
|
||||||
|
|
||||||
|
&[alt="white"]
|
||||||
|
filter brightness(2)
|
||||||
|
|
||||||
> .graph
|
> .graph
|
||||||
display grid
|
display grid
|
||||||
grid-template-columns repeat(61, 1fr)
|
grid-template-columns repeat(61, 1fr)
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<i>・</i>
|
<i>・</i>
|
||||||
<a :href="feedbackUrl" target="_blank">%i18n:@feedback%</a>
|
<a :href="feedbackUrl" target="_blank">%i18n:@feedback%</a>
|
||||||
<i>・</i>
|
<i>・</i>
|
||||||
<a :href="devUrl">%i18n:@develop%</a>
|
<a href="/dev">%i18n:@develop%</a>
|
||||||
<i>・</i>
|
<i>・</i>
|
||||||
<a href="https://twitter.com/misskey_xyz" target="_blank">Follow us on %fa:B twitter%</a>
|
<a href="https://twitter.com/misskey_xyz" target="_blank">Follow us on %fa:B twitter%</a>
|
||||||
</span>
|
</span>
|
||||||
@ -14,18 +14,21 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import { docsUrl, statsUrl, statusUrl, devUrl, repositoryUrl, feedbackUrl, lang } from '../../../config';
|
import { lang } from '../../../config';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
aboutUrl: `${docsUrl}/${lang}/about`,
|
aboutUrl: `/docs/${lang}/about`,
|
||||||
statsUrl,
|
repositoryUrl: 'https://github.com/syuilo/misskey',
|
||||||
statusUrl,
|
feedbackUrl: 'https://github.com/syuilo/misskey/issues/new'
|
||||||
devUrl,
|
|
||||||
repositoryUrl: repositoryUrl || `https://github.com/syuilo/misskey`,
|
|
||||||
feedbackUrl: feedbackUrl || `https://github.com/syuilo/misskey/issues/new`
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
(this as any).os.getMeta().then(meta => {
|
||||||
|
if (meta.repositoryUrl) this.repositoryUrl = meta.repositoryUrl;
|
||||||
|
if (meta.feedbackUrl) this.feedbackUrl = meta.feedbackUrl;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@ -56,8 +56,9 @@
|
|||||||
<mk-switch v-model="$store.state.settings.showMaps" @change="onChangeShowMaps" text="%i18n:@show-maps%">
|
<mk-switch v-model="$store.state.settings.showMaps" @change="onChangeShowMaps" text="%i18n:@show-maps%">
|
||||||
<span>%i18n:@show-maps-desc%</span>
|
<span>%i18n:@show-maps-desc%</span>
|
||||||
</mk-switch>
|
</mk-switch>
|
||||||
<mk-switch v-model="$store.state.settings.reversiBoardLabels" @change="onChangeReversiBoardLabels" text="%i18n:common.show-reversi-board-labels%"/>
|
|
||||||
<mk-switch v-model="$store.state.settings.disableAnimatedMfm" @change="onChangeDisableAnimatedMfm" text="%i18n:common.disable-animated-mfm%"/>
|
<mk-switch v-model="$store.state.settings.disableAnimatedMfm" @change="onChangeDisableAnimatedMfm" text="%i18n:common.disable-animated-mfm%"/>
|
||||||
|
<mk-switch v-model="$store.state.settings.games.reversi.showBoardLabels" @change="onChangeReversiBoardLabels" text="%i18n:common.show-reversi-board-labels%"/>
|
||||||
|
<mk-switch v-model="$store.state.settings.games.reversi.useContrastStones" @change="onChangeUseContrastReversiStones" text="%i18n:common.use-contrast-reversi-stones%"/>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="web" v-show="page == 'web'">
|
<section class="web" v-show="page == 'web'">
|
||||||
@ -376,7 +377,13 @@ export default Vue.extend({
|
|||||||
},
|
},
|
||||||
onChangeReversiBoardLabels(v) {
|
onChangeReversiBoardLabels(v) {
|
||||||
this.$store.dispatch('settings/set', {
|
this.$store.dispatch('settings/set', {
|
||||||
key: 'reversiBoardLabels',
|
key: 'games.reversi.showBoardLabels',
|
||||||
|
value: v
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onChangeUseContrastReversiStones(v) {
|
||||||
|
this.$store.dispatch('settings/set', {
|
||||||
|
key: 'games.reversi.useContrastStones',
|
||||||
value: v
|
value: v
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import { docsUrl, lang } from '../../../config';
|
import { lang } from '../../../config';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
props: ['isOpen'],
|
props: ['isOpen'],
|
||||||
@ -50,7 +50,7 @@ export default Vue.extend({
|
|||||||
hasGameInvitation: false,
|
hasGameInvitation: false,
|
||||||
connection: null,
|
connection: null,
|
||||||
connectionId: null,
|
connectionId: null,
|
||||||
aboutUrl: `${docsUrl}/${lang}/about`
|
aboutUrl: `/docs/${lang}/about`
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -13,8 +13,9 @@
|
|||||||
<ui-switch v-model="darkmode">%i18n:@dark-mode%</ui-switch>
|
<ui-switch v-model="darkmode">%i18n:@dark-mode%</ui-switch>
|
||||||
<ui-switch v-model="$store.state.settings.circleIcons" @change="onChangeCircleIcons">%i18n:@circle-icons%</ui-switch>
|
<ui-switch v-model="$store.state.settings.circleIcons" @change="onChangeCircleIcons">%i18n:@circle-icons%</ui-switch>
|
||||||
<ui-switch v-model="$store.state.settings.iLikeSushi" @change="onChangeILikeSushi">%i18n:common.i-like-sushi%</ui-switch>
|
<ui-switch v-model="$store.state.settings.iLikeSushi" @change="onChangeILikeSushi">%i18n:common.i-like-sushi%</ui-switch>
|
||||||
<ui-switch v-model="$store.state.settings.reversiBoardLabels" @change="onChangeReversiBoardLabels">%i18n:common.show-reversi-board-labels%</ui-switch>
|
|
||||||
<ui-switch v-model="$store.state.settings.disableAnimatedMfm" @change="onChangeDisableAnimatedMfm">%i18n:common.disable-animated-mfm%</ui-switch>
|
<ui-switch v-model="$store.state.settings.disableAnimatedMfm" @change="onChangeDisableAnimatedMfm">%i18n:common.disable-animated-mfm%</ui-switch>
|
||||||
|
<ui-switch v-model="$store.state.settings.games.reversi.showBoardLabels" @change="onChangeReversiBoardLabels">%i18n:common.show-reversi-board-labels%</ui-switch>
|
||||||
|
<ui-switch v-model="$store.state.settings.games.reversi.useContrastStones" @change="onChangeUseContrastReversiStones">%i18n:common.use-contrast-reversi-stones%</ui-switch>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<div>%i18n:@timeline%</div>
|
<div>%i18n:@timeline%</div>
|
||||||
@ -189,7 +190,14 @@ export default Vue.extend({
|
|||||||
|
|
||||||
onChangeReversiBoardLabels(v) {
|
onChangeReversiBoardLabels(v) {
|
||||||
this.$store.dispatch('settings/set', {
|
this.$store.dispatch('settings/set', {
|
||||||
key: 'reversiBoardLabels',
|
key: 'games.reversi.showBoardLabels',
|
||||||
|
value: v
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
onChangeUseContrastReversiStones(v) {
|
||||||
|
this.$store.dispatch('settings/set', {
|
||||||
|
key: 'games.reversi.useContrastStones',
|
||||||
value: v
|
value: v
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import Vuex from 'vuex';
|
import Vuex from 'vuex';
|
||||||
import createPersistedState from 'vuex-persistedstate';
|
import createPersistedState from 'vuex-persistedstate';
|
||||||
|
import * as nestedProperty from 'nested-property';
|
||||||
|
|
||||||
import MiOS from './mios';
|
import MiOS from './mios';
|
||||||
import { hostname } from './config';
|
import { hostname } from './config';
|
||||||
@ -22,7 +23,12 @@ const defaultSettings = {
|
|||||||
disableViaMobile: false,
|
disableViaMobile: false,
|
||||||
memo: null,
|
memo: null,
|
||||||
iLikeSushi: false,
|
iLikeSushi: false,
|
||||||
reversiBoardLabels: false
|
games: {
|
||||||
|
reversi: {
|
||||||
|
showBoardLabels: false,
|
||||||
|
useContrastStones: false
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const defaultDeviceSettings = {
|
const defaultDeviceSettings = {
|
||||||
@ -125,7 +131,7 @@ export default (os: MiOS) => new Vuex.Store({
|
|||||||
|
|
||||||
mutations: {
|
mutations: {
|
||||||
set(state, x: { key: string; value: any }) {
|
set(state, x: { key: string; value: any }) {
|
||||||
state[x.key] = x.value;
|
nestedProperty.set(state, x.key, x.value);
|
||||||
},
|
},
|
||||||
|
|
||||||
setHome(state, data) {
|
setHome(state, data) {
|
||||||
|
@ -82,7 +82,7 @@ props:
|
|||||||
ja: "フォルダ"
|
ja: "フォルダ"
|
||||||
en: "The folder of this file"
|
en: "The folder of this file"
|
||||||
|
|
||||||
sensitive:
|
isSensitive:
|
||||||
type: "boolean"
|
type: "boolean"
|
||||||
optional: true
|
optional: true
|
||||||
desc:
|
desc:
|
||||||
|
@ -14,6 +14,7 @@ import * as portscanner from 'portscanner';
|
|||||||
import isRoot = require('is-root');
|
import isRoot = require('is-root');
|
||||||
import Xev from 'xev';
|
import Xev from 'xev';
|
||||||
import * as program from 'commander';
|
import * as program from 'commander';
|
||||||
|
import mongo from './db/mongodb';
|
||||||
|
|
||||||
import Logger from './misc/logger';
|
import Logger from './misc/logger';
|
||||||
import ProgressBar from './misc/cli/progressbar';
|
import ProgressBar from './misc/cli/progressbar';
|
||||||
@ -158,8 +159,13 @@ function checkMongoDb(config: Config) {
|
|||||||
const p = config.mongodb.pass ? encodeURIComponent(config.mongodb.pass) : null;
|
const p = config.mongodb.pass ? encodeURIComponent(config.mongodb.pass) : null;
|
||||||
const uri = `mongodb://${u && p ? `${u}:****@` : ''}${config.mongodb.host}:${config.mongodb.port}/${config.mongodb.db}`;
|
const uri = `mongodb://${u && p ? `${u}:****@` : ''}${config.mongodb.host}:${config.mongodb.port}/${config.mongodb.db}`;
|
||||||
mongoDBLogger.info(`Connecting to ${uri}`);
|
mongoDBLogger.info(`Connecting to ${uri}`);
|
||||||
require('./db/mongodb');
|
|
||||||
|
mongo.then(() => {
|
||||||
mongoDBLogger.succ('Connectivity confirmed');
|
mongoDBLogger.succ('Connectivity confirmed');
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
mongoDBLogger.error(err.message);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function spawnWorkers(limit: number) {
|
function spawnWorkers(limit: number) {
|
||||||
|
@ -131,7 +131,8 @@ export async function createPerson(value: any, resolver?: Resolver): Promise<IUs
|
|||||||
endpoints: person.endpoints,
|
endpoints: person.endpoints,
|
||||||
uri: person.id,
|
uri: person.id,
|
||||||
url: person.url,
|
url: person.url,
|
||||||
isBot
|
isBot: isBot,
|
||||||
|
isCat: (person as any).isCat === true ? true : false
|
||||||
}) as IRemoteUser;
|
}) as IRemoteUser;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// duplicate key error
|
// duplicate key error
|
||||||
@ -262,7 +263,8 @@ export async function updatePerson(value: string | IObject, resolver?: Resolver)
|
|||||||
notesCount,
|
notesCount,
|
||||||
name: person.name,
|
name: person.name,
|
||||||
url: person.url,
|
url: person.url,
|
||||||
endpoints: person.endpoints
|
endpoints: person.endpoints,
|
||||||
|
isCat: (person as any).isCat === true ? true : false
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,7 @@ export default async (user: ILocalUser) => {
|
|||||||
icon: user.avatarId && renderImage(avatar),
|
icon: user.avatarId && renderImage(avatar),
|
||||||
image: user.bannerId && renderImage(banner),
|
image: user.bannerId && renderImage(banner),
|
||||||
manuallyApprovesFollowers: user.isLocked,
|
manuallyApprovesFollowers: user.isLocked,
|
||||||
publicKey: renderKey(user)
|
publicKey: renderKey(user),
|
||||||
|
isCat: user.isCat
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -34,9 +34,12 @@ export default (params: any, user: ILocalUser) => new Promise(async (res, rej) =
|
|||||||
const sort = {
|
const sort = {
|
||||||
_id: -1
|
_id: -1
|
||||||
};
|
};
|
||||||
|
|
||||||
const query = {
|
const query = {
|
||||||
'metadata.userId': user._id
|
'metadata.userId': user._id,
|
||||||
|
'metadata.deletedAt': { $exists: false }
|
||||||
} as any;
|
} as any;
|
||||||
|
|
||||||
if (sinceId) {
|
if (sinceId) {
|
||||||
sort._id = 1;
|
sort._id = 1;
|
||||||
query._id = {
|
query._id = {
|
||||||
@ -47,6 +50,7 @@ export default (params: any, user: ILocalUser) => new Promise(async (res, rej) =
|
|||||||
$lt: untilId
|
$lt: untilId
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type) {
|
if (type) {
|
||||||
query.contentType = new RegExp(`^${type.replace(/\*/g, '.+?')}$`);
|
query.contentType = new RegExp(`^${type.replace(/\*/g, '.+?')}$`);
|
||||||
}
|
}
|
||||||
@ -59,6 +63,5 @@ export default (params: any, user: ILocalUser) => new Promise(async (res, rej) =
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Serialize
|
// Serialize
|
||||||
res(await Promise.all(files.map(async file =>
|
res(await Promise.all(files.map(file => pack(file))));
|
||||||
await pack(file))));
|
|
||||||
});
|
});
|
||||||
|
@ -12,8 +12,9 @@ export default async (ctx: Koa.Context) => {
|
|||||||
ctx.set('Access-Control-Allow-Credentials', 'true');
|
ctx.set('Access-Control-Allow-Credentials', 'true');
|
||||||
|
|
||||||
const body = ctx.request.body as any;
|
const body = ctx.request.body as any;
|
||||||
const username = body['username'];
|
// See: https://github.com/syuilo/misskey/issues/2384
|
||||||
const password = body['password'];
|
const username = body['username'] || body['x'];
|
||||||
|
const password = body['password'] || body['y'];
|
||||||
const token = body['token'];
|
const token = body['token'];
|
||||||
|
|
||||||
if (typeof username != 'string') {
|
if (typeof username != 'string') {
|
||||||
|
Reference in New Issue
Block a user