summaryrefslogtreecommitdiff
path: root/src/web/app
diff options
context:
space:
mode:
authorha-dai <contact@haradai.net>2017-10-25 16:24:16 +0900
committerha-dai <contact@haradai.net>2017-10-25 16:24:16 +0900
commitfabcad6db9dff573ef1b3a634db813e8eff7d82e (patch)
treee2c312df68bdd508b7422fbe15a35351c6a589b0 /src/web/app
parentMerge pull request #788 from syuilo/greenkeeper/@types/morgan-1.7.33 (diff)
parentMerge branch 'master' of https://github.com/syuilo/misskey (diff)
downloadmisskey-fabcad6db9dff573ef1b3a634db813e8eff7d82e.tar.gz
misskey-fabcad6db9dff573ef1b3a634db813e8eff7d82e.tar.bz2
misskey-fabcad6db9dff573ef1b3a634db813e8eff7d82e.zip
Merge branch 'master' of https://github.com/syuilo/misskey
Diffstat (limited to 'src/web/app')
-rw-r--r--src/web/app/common/scripts/get-post-summary.js35
-rw-r--r--src/web/app/common/tags/error.tag14
-rw-r--r--src/web/app/desktop/script.js2
-rw-r--r--src/web/app/desktop/tags/home-widgets/version.tag2
-rw-r--r--src/web/app/desktop/tags/notifications.tag2
-rw-r--r--src/web/app/desktop/tags/pages/home.tag2
-rw-r--r--src/web/app/mobile/tags/notification-preview.tag2
-rw-r--r--src/web/app/mobile/tags/notification.tag2
-rw-r--r--src/web/app/mobile/tags/notifications.tag2
-rw-r--r--src/web/app/mobile/tags/page/home.tag2
-rw-r--r--src/web/app/mobile/tags/page/settings.tag3
-rw-r--r--src/web/app/mobile/tags/post-detail.tag2
-rw-r--r--src/web/app/mobile/tags/timeline.tag2
-rw-r--r--src/web/app/mobile/tags/user.tag2
14 files changed, 26 insertions, 48 deletions
diff --git a/src/web/app/common/scripts/get-post-summary.js b/src/web/app/common/scripts/get-post-summary.js
deleted file mode 100644
index 83eda8f6b4..0000000000
--- a/src/web/app/common/scripts/get-post-summary.js
+++ /dev/null
@@ -1,35 +0,0 @@
-const summarize = post => {
- let summary = post.text ? post.text : '';
-
- // メディアが添付されているとき
- if (post.media) {
- summary += ` (${post.media.length}つのメディア)`;
- }
-
- // 投票が添付されているとき
- if (post.poll) {
- summary += ' (投票)';
- }
-
- // 返信のとき
- if (post.reply_to_id) {
- if (post.reply_to) {
- summary += ` RE: ${summarize(post.reply_to)}`;
- } else {
- summary += ' RE: ...';
- }
- }
-
- // Repostのとき
- if (post.repost_id) {
- if (post.repost) {
- summary += ` RP: ${summarize(post.repost)}`;
- } else {
- summary += ' RP: ...';
- }
- }
-
- return summary.trim();
-};
-
-export default summarize;
diff --git a/src/web/app/common/tags/error.tag b/src/web/app/common/tags/error.tag
index e4e0272a49..7a2976541d 100644
--- a/src/web/app/common/tags/error.tag
+++ b/src/web/app/common/tags/error.tag
@@ -1,7 +1,13 @@
<mk-error>
- <img src="/assets/error.jpg" alt=""/>
+ <img src="data:image/jpeg;base64,%base64:/assets/error.jpg%" alt=""/>
<h1>%i18n:common.tags.mk-error.title%</h1>
- <p class="text">%i18n:common.tags.mk-error.description%</p>
+ <p class="text">{
+ '%i18n:common.tags.mk-error.description%'.substr(0, '%i18n:common.tags.mk-error.description%'.indexOf('{'))
+ }<a onclick={ reload }>{
+ '%i18n:common.tags.mk-error.description%'.match(/\{(.+?)\}/)[1]
+ }</a>{
+ '%i18n:common.tags.mk-error.description%'.substr('%i18n:common.tags.mk-error.description%'.indexOf('}') + 1)
+ }</p>
<p class="thanks">%i18n:common.tags.mk-error.thanks%</p>
<style>
:scope
@@ -53,5 +59,9 @@
document.title = 'Oops!';
document.documentElement.style.background = '#f8f8f8';
});
+
+ this.reload = () => {
+ location.reload();
+ };
</script>
</mk-error>
diff --git a/src/web/app/desktop/script.js b/src/web/app/desktop/script.js
index 2e81147943..46a7fce700 100644
--- a/src/web/app/desktop/script.js
+++ b/src/web/app/desktop/script.js
@@ -11,7 +11,7 @@ import * as riot from 'riot';
import init from '../init';
import route from './router';
import fuckAdBlock from './scripts/fuck-ad-block';
-import getPostSummary from '../common/scripts/get-post-summary';
+import getPostSummary from '../../../common/get-post-summary.ts';
/**
* init
diff --git a/src/web/app/desktop/tags/home-widgets/version.tag b/src/web/app/desktop/tags/home-widgets/version.tag
index 079e4e86b8..fa92afc49f 100644
--- a/src/web/app/desktop/tags/home-widgets/version.tag
+++ b/src/web/app/desktop/tags/home-widgets/version.tag
@@ -1,5 +1,5 @@
<mk-version-home-widget>
- <p>ver{ version }</p>
+ <p>ver { version }</p>
<style>
:scope
display block
diff --git a/src/web/app/desktop/tags/notifications.tag b/src/web/app/desktop/tags/notifications.tag
index 21e4fe7fa5..1046358ce9 100644
--- a/src/web/app/desktop/tags/notifications.tag
+++ b/src/web/app/desktop/tags/notifications.tag
@@ -207,7 +207,7 @@
</style>
<script>
- import getPostSummary from '../../common/scripts/get-post-summary';
+ import getPostSummary from '../../../../common/get-post-summary.ts';
this.getPostSummary = getPostSummary;
this.mixin('i');
diff --git a/src/web/app/desktop/tags/pages/home.tag b/src/web/app/desktop/tags/pages/home.tag
index 124a2eefa3..e8ba4023de 100644
--- a/src/web/app/desktop/tags/pages/home.tag
+++ b/src/web/app/desktop/tags/pages/home.tag
@@ -8,7 +8,7 @@
</style>
<script>
import Progress from '../../../common/scripts/loading';
- import getPostSummary from '../../../common/scripts/get-post-summary';
+ import getPostSummary from '../../../../../common/get-post-summary.ts';
this.mixin('i');
this.mixin('api');
diff --git a/src/web/app/mobile/tags/notification-preview.tag b/src/web/app/mobile/tags/notification-preview.tag
index 077ae78463..1fdcc57641 100644
--- a/src/web/app/mobile/tags/notification-preview.tag
+++ b/src/web/app/mobile/tags/notification-preview.tag
@@ -110,7 +110,7 @@
</style>
<script>
- import getPostSummary from '../../common/scripts/get-post-summary';
+ import getPostSummary from '../../../../common/get-post-summary.ts';
this.getPostSummary = getPostSummary;
this.notification = this.opts.notification;
</script>
diff --git a/src/web/app/mobile/tags/notification.tag b/src/web/app/mobile/tags/notification.tag
index 3663709525..53222b9dbe 100644
--- a/src/web/app/mobile/tags/notification.tag
+++ b/src/web/app/mobile/tags/notification.tag
@@ -163,7 +163,7 @@
</style>
<script>
- import getPostSummary from '../../common/scripts/get-post-summary';
+ import getPostSummary from '../../../../common/get-post-summary.ts';
this.getPostSummary = getPostSummary;
this.notification = this.opts.notification;
</script>
diff --git a/src/web/app/mobile/tags/notifications.tag b/src/web/app/mobile/tags/notifications.tag
index 2f314769db..7370aa84d3 100644
--- a/src/web/app/mobile/tags/notifications.tag
+++ b/src/web/app/mobile/tags/notifications.tag
@@ -78,7 +78,7 @@
</style>
<script>
- import getPostSummary from '../../common/scripts/get-post-summary';
+ import getPostSummary from '../../../../common/get-post-summary.ts';
this.getPostSummary = getPostSummary;
this.mixin('api');
diff --git a/src/web/app/mobile/tags/page/home.tag b/src/web/app/mobile/tags/page/home.tag
index efb5068a57..3b0255b293 100644
--- a/src/web/app/mobile/tags/page/home.tag
+++ b/src/web/app/mobile/tags/page/home.tag
@@ -9,7 +9,7 @@
<script>
import ui from '../../scripts/ui-event';
import Progress from '../../../common/scripts/loading';
- import getPostSummary from '../../../common/scripts/get-post-summary';
+ import getPostSummary from '../../../../../common/get-post-summary.ts';
import openPostForm from '../../scripts/open-post-form';
this.mixin('i');
diff --git a/src/web/app/mobile/tags/page/settings.tag b/src/web/app/mobile/tags/page/settings.tag
index b129b97bd1..b366d3a16a 100644
--- a/src/web/app/mobile/tags/page/settings.tag
+++ b/src/web/app/mobile/tags/page/settings.tag
@@ -29,6 +29,7 @@
<ul>
<li><a onclick={ signout }><i class="fa fa-power-off"></i>%i18n:mobile.tags.mk-settings-page.signout%</a></li>
</ul>
+ <p><small>ver { version }</small></p>
<style>
:scope
display block
@@ -96,5 +97,7 @@
this.signout = signout;
this.mixin('i');
+
+ this.version = VERSION;
</script>
</mk-settings>
diff --git a/src/web/app/mobile/tags/post-detail.tag b/src/web/app/mobile/tags/post-detail.tag
index dc032fe964..ed275749ec 100644
--- a/src/web/app/mobile/tags/post-detail.tag
+++ b/src/web/app/mobile/tags/post-detail.tag
@@ -264,7 +264,7 @@
</style>
<script>
import compile from '../../common/scripts/text-compiler';
- import getPostSummary from '../../common/scripts/get-post-summary';
+ import getPostSummary from '../../../../common/get-post-summary.ts';
import openPostForm from '../scripts/open-post-form';
this.mixin('api');
diff --git a/src/web/app/mobile/tags/timeline.tag b/src/web/app/mobile/tags/timeline.tag
index 2b0948ac34..5ecc2df9d1 100644
--- a/src/web/app/mobile/tags/timeline.tag
+++ b/src/web/app/mobile/tags/timeline.tag
@@ -464,7 +464,7 @@
</style>
<script>
import compile from '../../common/scripts/text-compiler';
- import getPostSummary from '../../common/scripts/get-post-summary';
+ import getPostSummary from '../../../../common/get-post-summary.ts';
import openPostForm from '../scripts/open-post-form';
this.mixin('api');
diff --git a/src/web/app/mobile/tags/user.tag b/src/web/app/mobile/tags/user.tag
index f29f0a0c86..a332e930e2 100644
--- a/src/web/app/mobile/tags/user.tag
+++ b/src/web/app/mobile/tags/user.tag
@@ -428,7 +428,7 @@
</style>
<script>
- import summary from '../../common/scripts/get-post-summary';
+ import summary from '../../../../common/get-post-summary.ts';
this.post = this.opts.post;
this.text = summary(this.post);