summaryrefslogtreecommitdiff
path: root/src/web/app/common
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/common
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/common')
-rw-r--r--src/web/app/common/scripts/get-post-summary.js35
-rw-r--r--src/web/app/common/tags/error.tag14
2 files changed, 12 insertions, 37 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>