From 2d2e16d9f60bd31c90eb9fb62cf490b08dd754ce Mon Sep 17 00:00:00 2001
From: xps2 <9610872+xps2@users.noreply.github.com>
Date: Sun, 26 Aug 2018 10:11:47 +0900
Subject: [PATCH 1/6] =?UTF-8?q?donation=E3=80=81config=E3=81=AEmaintainer?=
=?UTF-8?q?=E3=82=92=E5=8F=82=E7=85=A7=E3=81=99=E3=82=8B=E3=82=88=E3=81=86?=
=?UTF-8?q?=E5=A4=89=E6=9B=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/client/app/common/views/widgets/donation.vue | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/client/app/common/views/widgets/donation.vue b/src/client/app/common/views/widgets/donation.vue
index 470576d5e..4bc71b2b7 100644
--- a/src/client/app/common/views/widgets/donation.vue
+++ b/src/client/app/common/views/widgets/donation.vue
@@ -4,7 +4,7 @@
%fa:heart%%i18n:@title%
{{ '%i18n:@text%'.substr(0, '%i18n:@text%'.indexOf('{')) }}
- @syuilo
+ @{{ meta.maintainer.name }}
{{ '%i18n:@text%'.substr('%i18n:@text%'.indexOf('}') + 1) }}
@@ -15,6 +15,17 @@
import define from '../../../common/define-widget';
export default define({
name: 'donation'
+}).extend({
+ data() {
+ return {
+ meta: null;
+ };
+ },
+ created() {
+ (this as any).os.getMeta().then(meta => {
+ this.meta = meta;
+ });
+ }
});
From 3f30a69b8b11b584acc0eb934a339763b068806c Mon Sep 17 00:00:00 2001
From: xps2 <9610872+xps2@users.noreply.github.com>
Date: Sun, 26 Aug 2018 10:29:24 +0900
Subject: [PATCH 2/6] fix
---
src/client/app/common/views/widgets/donation.vue | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/client/app/common/views/widgets/donation.vue b/src/client/app/common/views/widgets/donation.vue
index 4bc71b2b7..b1352e803 100644
--- a/src/client/app/common/views/widgets/donation.vue
+++ b/src/client/app/common/views/widgets/donation.vue
@@ -4,7 +4,7 @@
%fa:heart%%i18n:@title%
{{ '%i18n:@text%'.substr(0, '%i18n:@text%'.indexOf('{')) }}
- @{{ meta.maintainer.name }}
+ {{ meta.maintainer.name }}
{{ '%i18n:@text%'.substr('%i18n:@text%'.indexOf('}') + 1) }}
@@ -18,7 +18,7 @@ export default define({
}).extend({
data() {
return {
- meta: null;
+ meta: null
};
},
created() {
From bfed1475bbdd1941bb9b12e5ad772ab0f5840bb4 Mon Sep 17 00:00:00 2001
From: Aya Morisawa
Date: Sun, 26 Aug 2018 13:55:39 +0900
Subject: [PATCH 3/6] Use endsWith for readability
---
src/config/load.ts | 2 +-
src/server/api/service/twitter.ts | 2 +-
webpack/loaders/replace.js | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/config/load.ts b/src/config/load.ts
index 1c59f82b3..8929cf8d3 100644
--- a/src/config/load.ts
+++ b/src/config/load.ts
@@ -53,5 +53,5 @@ export default function load() {
}
function normalizeUrl(url: string) {
- return url[url.length - 1] === '/' ? url.substr(0, url.length - 1) : url;
+ return url.endsWith('/') ? url.substr(0, url.length - 1) : url;
}
diff --git a/src/server/api/service/twitter.ts b/src/server/api/service/twitter.ts
index 8c668e832..aad2846bb 100644
--- a/src/server/api/service/twitter.ts
+++ b/src/server/api/service/twitter.ts
@@ -14,7 +14,7 @@ function getUserToken(ctx: Koa.Context) {
function compareOrigin(ctx: Koa.Context) {
function normalizeUrl(url: string) {
- return url[url.length - 1] === '/' ? url.substr(0, url.length - 1) : url;
+ return url.endsWith('/') ? url.substr(0, url.length - 1) : url;
}
const referer = ctx.headers['referer'];
diff --git a/webpack/loaders/replace.js b/webpack/loaders/replace.js
index fd6bb3617..9f4825e18 100644
--- a/webpack/loaders/replace.js
+++ b/webpack/loaders/replace.js
@@ -7,7 +7,7 @@ function trim(text, g) {
export default function(src) {
const fn = options => {
const search = options.search;
- const g = search[search.length - 1] == 'g';
+ const g = search.endsWith('g');
const file = this.resourcePath.replace(/\\/g, '/');
const replace = options.i18n ? global[options.replace].bind(null, {
src: file,
From 800de0318784ba367db238c2778511e27aa39c8b Mon Sep 17 00:00:00 2001
From: Aya Morisawa
Date: Sun, 26 Aug 2018 14:29:12 +0900
Subject: [PATCH 4/6] Remove delete-invalid-users.js
---
cli/delete-invalid-users.js | 40 -------------------------------------
1 file changed, 40 deletions(-)
delete mode 100644 cli/delete-invalid-users.js
diff --git a/cli/delete-invalid-users.js b/cli/delete-invalid-users.js
deleted file mode 100644
index 41bbc2bab..000000000
--- a/cli/delete-invalid-users.js
+++ /dev/null
@@ -1,40 +0,0 @@
-const { default: User, deleteUser } = require('../built/models/user');
-const { default: zip } = require('@prezzemolo/zip')
-
-const migrate = async (user) => {
- try {
- await deleteUser(user._id);
- return true;
- } catch (e) {
- return false;
- }
-}
-
-async function main() {
- const count = await User.count({
- uri: /#/
- });
-
- const dop = 1
- const idop = ((count - (count % dop)) / dop) + 1
-
- return zip(
- 1,
- async (time) => {
- console.log(`${time} / ${idop}`)
- const doc = await User.find({
- uri: /#/
- }, {
- limit: dop, skip: time * dop
- })
- return Promise.all(doc.map(migrate))
- },
- idop
- ).then(a => {
- const rv = []
- a.forEach(e => rv.push(...e))
- return rv
- })
-}
-
-main().then(console.dir).catch(console.error)
From 33dfc21e4b88f22c4a8d836fcf4b72f9960c8039 Mon Sep 17 00:00:00 2001
From: syuilo
Date: Mon, 27 Aug 2018 04:50:52 +0900
Subject: [PATCH 5/6] Fix bug
---
src/models/stats.ts | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/models/stats.ts b/src/models/stats.ts
index 3041d3852..326bfacc8 100644
--- a/src/models/stats.ts
+++ b/src/models/stats.ts
@@ -2,7 +2,8 @@ import * as mongo from 'mongodb';
import db from '../db/mongodb';
const Stats = db.get('stats');
-Stats.createIndex({ date: -1 }, { unique: true });
+Stats.dropIndex({ date: -1 }); // 後方互換性のため
+Stats.createIndex({ span: -1, date: -1 }, { unique: true });
export default Stats;
export interface IStats {
From 8e5ce7f8e3757d848440fc1368735935b7e81539 Mon Sep 17 00:00:00 2001
From: syuilo
Date: Mon, 27 Aug 2018 04:56:38 +0900
Subject: [PATCH 6/6] 8.15.0
---
package.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/package.json b/package.json
index 8bde6935b..c84f01fc5 100644
--- a/package.json
+++ b/package.json
@@ -1,8 +1,8 @@
{
"name": "misskey",
"author": "syuilo ",
- "version": "8.14.0",
- "clientVersion": "1.0.9022",
+ "version": "8.15.0",
+ "clientVersion": "1.0.9031",
"codename": "nighthike",
"main": "./built/index.js",
"private": true,