Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
34345ea8a7 | |||
fc166b7bee | |||
cf3112c7c0 | |||
e7dd74a443 |
@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "misskey",
|
"name": "misskey",
|
||||||
"author": "syuilo <i@syuilo.com>",
|
"author": "syuilo <i@syuilo.com>",
|
||||||
"version": "2.0.0",
|
"version": "2.1.1",
|
||||||
"clientVersion": "1.0.5184",
|
"clientVersion": "1.0.5188",
|
||||||
"codename": "nighthike",
|
"codename": "nighthike",
|
||||||
"main": "./built/index.js",
|
"main": "./built/index.js",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
@ -40,8 +40,8 @@
|
|||||||
<section v-if="myGames.length > 0">
|
<section v-if="myGames.length > 0">
|
||||||
<h2>自分の対局</h2>
|
<h2>自分の対局</h2>
|
||||||
<a class="game" v-for="g in myGames" tabindex="-1" @click.prevent="go(g)" :href="`/othello/${g.id}`">
|
<a class="game" v-for="g in myGames" tabindex="-1" @click.prevent="go(g)" :href="`/othello/${g.id}`">
|
||||||
<mk-avatar class="avatar" :user="g.user1.avatarUrl"/>
|
<mk-avatar class="avatar" :user="g.user1"/>
|
||||||
<mk-avatar class="avatar" :user="g.user2.avatarUrl"/>
|
<mk-avatar class="avatar" :user="g.user2"/>
|
||||||
<span><b>{{ g.user1.name }}</b> vs <b>{{ g.user2.name }}</b></span>
|
<span><b>{{ g.user1.name }}</b> vs <b>{{ g.user2.name }}</b></span>
|
||||||
<span class="state">{{ g.isEnded ? '終了' : '進行中' }}</span>
|
<span class="state">{{ g.isEnded ? '終了' : '進行中' }}</span>
|
||||||
</a>
|
</a>
|
||||||
@ -49,8 +49,8 @@
|
|||||||
<section v-if="games.length > 0">
|
<section v-if="games.length > 0">
|
||||||
<h2>みんなの対局</h2>
|
<h2>みんなの対局</h2>
|
||||||
<a class="game" v-for="g in games" tabindex="-1" @click.prevent="go(g)" :href="`/othello/${g.id}`">
|
<a class="game" v-for="g in games" tabindex="-1" @click.prevent="go(g)" :href="`/othello/${g.id}`">
|
||||||
<mk-avatar class="avatar" :user="g.user1.avatarUrl"/>
|
<mk-avatar class="avatar" :user="g.user1"/>
|
||||||
<mk-avatar class="avatar" :user="g.user2.avatarUrl"/>
|
<mk-avatar class="avatar" :user="g.user2"/>
|
||||||
<span><b>{{ g.user1.name }}</b> vs <b>{{ g.user2.name }}</b></span>
|
<span><b>{{ g.user1.name }}</b> vs <b>{{ g.user2.name }}</b></span>
|
||||||
<span class="state">{{ g.isEnded ? '終了' : '進行中' }}</span>
|
<span class="state">{{ g.isEnded ? '終了' : '進行中' }}</span>
|
||||||
</a>
|
</a>
|
||||||
@ -272,6 +272,8 @@ export default Vue.extend({
|
|||||||
background #eee
|
background #eee
|
||||||
|
|
||||||
> .avatar
|
> .avatar
|
||||||
|
width 32px
|
||||||
|
height 32px
|
||||||
border-radius 100%
|
border-radius 100%
|
||||||
|
|
||||||
> span
|
> span
|
||||||
@ -301,6 +303,8 @@ export default Vue.extend({
|
|||||||
background #eee
|
background #eee
|
||||||
|
|
||||||
> .avatar
|
> .avatar
|
||||||
|
width 32px
|
||||||
|
height 32px
|
||||||
border-radius 100%
|
border-radius 100%
|
||||||
|
|
||||||
> span
|
> span
|
||||||
|
@ -30,6 +30,7 @@ export type IMetadata = {
|
|||||||
comment: string;
|
comment: string;
|
||||||
uri: string;
|
uri: string;
|
||||||
deletedAt?: Date;
|
deletedAt?: Date;
|
||||||
|
isExpired?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type IDriveFile = {
|
export type IDriveFile = {
|
||||||
|
BIN
src/server/file/assets/cache-expired.png
Normal file
BIN
src/server/file/assets/cache-expired.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
@ -31,7 +31,11 @@ export default async function(ctx: Koa.Context) {
|
|||||||
|
|
||||||
if (file.metadata.deletedAt) {
|
if (file.metadata.deletedAt) {
|
||||||
ctx.status = 410;
|
ctx.status = 410;
|
||||||
await send(ctx, `${__dirname}/assets/tombstone.png`);
|
if (file.metadata.isExpired) {
|
||||||
|
await send(ctx, `${__dirname}/assets/cache-expired.png`);
|
||||||
|
} else {
|
||||||
|
await send(ctx, `${__dirname}/assets/tombstone.png`);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -201,7 +201,10 @@ const addFile = async (
|
|||||||
// Calculate drive usage
|
// Calculate drive usage
|
||||||
const usage = await DriveFile
|
const usage = await DriveFile
|
||||||
.aggregate([{
|
.aggregate([{
|
||||||
$match: { 'metadata.userId': user._id }
|
$match: {
|
||||||
|
'metadata.userId': user._id,
|
||||||
|
'metadata.deletedAt': { $exists: false }
|
||||||
|
}
|
||||||
}, {
|
}, {
|
||||||
$project: {
|
$project: {
|
||||||
length: true
|
length: true
|
||||||
@ -245,7 +248,8 @@ const addFile = async (
|
|||||||
|
|
||||||
DriveFile.update({ _id: oldFile._id }, {
|
DriveFile.update({ _id: oldFile._id }, {
|
||||||
$set: {
|
$set: {
|
||||||
'metadata.deletedAt': new Date()
|
'metadata.deletedAt': new Date(),
|
||||||
|
'metadata.isExpired': true
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user