From 90f8fe7e538bb7e52d2558152a0390e693f39b11 Mon Sep 17 00:00:00 2001 From: Akihiko Odaki Date: Thu, 29 Mar 2018 01:20:40 +0900 Subject: Introduce processor --- src/web/app/animation.styl | 12 - src/web/app/app.styl | 128 ---- src/web/app/app.vue | 3 - src/web/app/auth/assets/logo.svg | 7 - src/web/app/auth/script.ts | 25 - src/web/app/auth/style.styl | 15 - src/web/app/auth/views/form.vue | 141 ---- src/web/app/auth/views/index.vue | 149 ---- src/web/app/base.pug | 38 - src/web/app/boot.js | 120 ---- src/web/app/ch/script.ts | 15 - src/web/app/ch/style.styl | 10 - src/web/app/ch/tags/channel.tag | 403 ----------- src/web/app/ch/tags/header.tag | 20 - src/web/app/ch/tags/index.tag | 37 - src/web/app/ch/tags/index.ts | 3 - src/web/app/common/define-widget.ts | 79 --- src/web/app/common/mios.ts | 578 --------------- src/web/app/common/scripts/check-for-update.ts | 33 - src/web/app/common/scripts/compose-notification.ts | 67 -- src/web/app/common/scripts/contains.ts | 8 - src/web/app/common/scripts/copy-to-clipboard.ts | 13 - src/web/app/common/scripts/date-stringify.ts | 13 - src/web/app/common/scripts/fuck-ad-block.ts | 21 - src/web/app/common/scripts/gcd.ts | 2 - src/web/app/common/scripts/get-kao.ts | 5 - src/web/app/common/scripts/get-median.ts | 11 - src/web/app/common/scripts/loading.ts | 21 - src/web/app/common/scripts/parse-search-query.ts | 53 -- src/web/app/common/scripts/streaming/channel.ts | 13 - src/web/app/common/scripts/streaming/drive.ts | 34 - src/web/app/common/scripts/streaming/home.ts | 57 -- .../common/scripts/streaming/messaging-index.ts | 34 - src/web/app/common/scripts/streaming/messaging.ts | 20 - .../app/common/scripts/streaming/othello-game.ts | 11 - src/web/app/common/scripts/streaming/othello.ts | 31 - src/web/app/common/scripts/streaming/requests.ts | 30 - src/web/app/common/scripts/streaming/server.ts | 30 - .../app/common/scripts/streaming/stream-manager.ts | 108 --- src/web/app/common/scripts/streaming/stream.ts | 137 ---- .../app/common/views/components/autocomplete.vue | 306 -------- .../components/connect-failed.troubleshooter.vue | 137 ---- .../app/common/views/components/connect-failed.vue | 106 --- src/web/app/common/views/components/ellipsis.vue | 26 - .../app/common/views/components/file-type-icon.vue | 17 - src/web/app/common/views/components/forkit.vue | 42 -- src/web/app/common/views/components/index.ts | 51 -- src/web/app/common/views/components/media-list.vue | 57 -- .../views/components/messaging-room.form.vue | 305 -------- .../views/components/messaging-room.message.vue | 263 ------- .../app/common/views/components/messaging-room.vue | 377 ---------- src/web/app/common/views/components/messaging.vue | 463 ------------ src/web/app/common/views/components/nav.vue | 41 -- .../app/common/views/components/othello.game.vue | 324 --------- .../common/views/components/othello.gameroom.vue | 42 -- .../app/common/views/components/othello.room.vue | 297 -------- src/web/app/common/views/components/othello.vue | 311 --------- .../app/common/views/components/poll-editor.vue | 142 ---- src/web/app/common/views/components/poll.vue | 124 ---- src/web/app/common/views/components/post-html.ts | 137 ---- src/web/app/common/views/components/post-menu.vue | 141 ---- .../app/common/views/components/reaction-icon.vue | 28 - .../common/views/components/reaction-picker.vue | 191 ----- .../common/views/components/reactions-viewer.vue | 49 -- src/web/app/common/views/components/signin.vue | 142 ---- src/web/app/common/views/components/signup.vue | 287 -------- .../common/views/components/special-message.vue | 42 -- .../common/views/components/stream-indicator.vue | 86 --- src/web/app/common/views/components/switch.vue | 190 ----- src/web/app/common/views/components/time.vue | 76 -- src/web/app/common/views/components/timer.vue | 49 -- .../common/views/components/twitter-setting.vue | 66 -- src/web/app/common/views/components/uploader.vue | 212 ------ .../app/common/views/components/url-preview.vue | 142 ---- src/web/app/common/views/components/url.vue | 66 -- .../common/views/components/welcome-timeline.vue | 118 ---- .../app/common/views/directives/autocomplete.ts | 194 ------ src/web/app/common/views/directives/index.ts | 5 - src/web/app/common/views/filters/bytes.ts | 8 - src/web/app/common/views/filters/index.ts | 2 - src/web/app/common/views/filters/number.ts | 5 - src/web/app/common/views/widgets/access-log.vue | 90 --- src/web/app/common/views/widgets/broadcast.vue | 161 ----- src/web/app/common/views/widgets/calendar.vue | 201 ------ src/web/app/common/views/widgets/donation.vue | 58 -- src/web/app/common/views/widgets/index.ts | 25 - src/web/app/common/views/widgets/nav.vue | 31 - src/web/app/common/views/widgets/photo-stream.vue | 104 --- src/web/app/common/views/widgets/rss.vue | 93 --- .../app/common/views/widgets/server.cpu-memory.vue | 127 ---- src/web/app/common/views/widgets/server.cpu.vue | 68 -- src/web/app/common/views/widgets/server.disk.vue | 76 -- src/web/app/common/views/widgets/server.info.vue | 25 - src/web/app/common/views/widgets/server.memory.vue | 76 -- src/web/app/common/views/widgets/server.pie.vue | 61 -- .../app/common/views/widgets/server.uptimes.vue | 46 -- src/web/app/common/views/widgets/server.vue | 93 --- src/web/app/common/views/widgets/slideshow.vue | 159 ----- src/web/app/common/views/widgets/tips.vue | 108 --- src/web/app/common/views/widgets/version.vue | 28 - src/web/app/config.ts | 37 - src/web/app/desktop/api/choose-drive-file.ts | 30 - src/web/app/desktop/api/choose-drive-folder.ts | 17 - src/web/app/desktop/api/contextmenu.ts | 16 - src/web/app/desktop/api/dialog.ts | 19 - src/web/app/desktop/api/input.ts | 20 - src/web/app/desktop/api/notify.ts | 10 - src/web/app/desktop/api/post.ts | 21 - src/web/app/desktop/api/update-avatar.ts | 98 --- src/web/app/desktop/api/update-banner.ts | 98 --- src/web/app/desktop/assets/grid.svg | 150 ---- src/web/app/desktop/assets/header-logo-white.svg | 25 - src/web/app/desktop/assets/header-logo.svg | 25 - src/web/app/desktop/assets/index.jpg | Bin 410409 -> 0 bytes src/web/app/desktop/assets/remove.png | Bin 3115 -> 0 bytes src/web/app/desktop/script.ts | 167 ----- src/web/app/desktop/style.styl | 50 -- src/web/app/desktop/ui.styl | 125 ---- .../desktop/views/components/activity.calendar.vue | 66 -- .../desktop/views/components/activity.chart.vue | 103 --- src/web/app/desktop/views/components/activity.vue | 116 ---- .../app/desktop/views/components/analog-clock.vue | 108 --- src/web/app/desktop/views/components/calendar.vue | 252 ------- .../components/choose-file-from-drive-window.vue | 180 ----- .../components/choose-folder-from-drive-window.vue | 114 --- .../desktop/views/components/context-menu.menu.vue | 121 ---- .../app/desktop/views/components/context-menu.vue | 74 -- .../app/desktop/views/components/crop-window.vue | 178 ----- src/web/app/desktop/views/components/dialog.vue | 170 ----- .../app/desktop/views/components/drive-window.vue | 56 -- .../app/desktop/views/components/drive.file.vue | 317 --------- .../app/desktop/views/components/drive.folder.vue | 267 ------- .../desktop/views/components/drive.nav-folder.vue | 113 --- src/web/app/desktop/views/components/drive.vue | 773 --------------------- .../app/desktop/views/components/ellipsis-icon.vue | 37 - .../app/desktop/views/components/follow-button.vue | 164 ----- .../desktop/views/components/followers-window.vue | 26 - src/web/app/desktop/views/components/followers.vue | 26 - .../desktop/views/components/following-window.vue | 26 - src/web/app/desktop/views/components/following.vue | 26 - .../app/desktop/views/components/friends-maker.vue | 171 ----- .../app/desktop/views/components/game-window.vue | 37 - src/web/app/desktop/views/components/home.vue | 357 ---------- src/web/app/desktop/views/components/index.ts | 61 -- .../app/desktop/views/components/input-dialog.vue | 180 ----- .../views/components/media-image-dialog.vue | 69 -- .../app/desktop/views/components/media-image.vue | 63 -- .../views/components/media-video-dialog.vue | 70 -- .../app/desktop/views/components/media-video.vue | 67 -- src/web/app/desktop/views/components/mentions.vue | 125 ---- .../views/components/messaging-room-window.vue | 32 - .../desktop/views/components/messaging-window.vue | 32 - .../app/desktop/views/components/notifications.vue | 317 --------- .../desktop/views/components/post-detail.sub.vue | 126 ---- .../app/desktop/views/components/post-detail.vue | 433 ------------ .../desktop/views/components/post-form-window.vue | 76 -- src/web/app/desktop/views/components/post-form.vue | 537 -------------- .../app/desktop/views/components/post-preview.vue | 103 --- .../desktop/views/components/posts.post.sub.vue | 112 --- .../app/desktop/views/components/posts.post.vue | 582 ---------------- src/web/app/desktop/views/components/posts.vue | 89 --- .../desktop/views/components/progress-dialog.vue | 95 --- .../views/components/repost-form-window.vue | 42 -- .../app/desktop/views/components/repost-form.vue | 131 ---- .../desktop/views/components/settings-window.vue | 24 - .../app/desktop/views/components/settings.2fa.vue | 80 --- .../app/desktop/views/components/settings.api.vue | 40 -- .../app/desktop/views/components/settings.apps.vue | 39 -- .../desktop/views/components/settings.drive.vue | 35 - .../app/desktop/views/components/settings.mute.vue | 35 - .../desktop/views/components/settings.password.vue | 47 -- .../desktop/views/components/settings.profile.vue | 87 --- .../desktop/views/components/settings.signins.vue | 98 --- src/web/app/desktop/views/components/settings.vue | 419 ----------- .../desktop/views/components/sub-post-content.vue | 56 -- .../app/desktop/views/components/taskmanager.vue | 219 ------ src/web/app/desktop/views/components/timeline.vue | 156 ----- .../desktop/views/components/ui-notification.vue | 61 -- .../desktop/views/components/ui.header.account.vue | 225 ------ .../desktop/views/components/ui.header.clock.vue | 109 --- .../app/desktop/views/components/ui.header.nav.vue | 175 ----- .../views/components/ui.header.notifications.vue | 158 ----- .../desktop/views/components/ui.header.post.vue | 54 -- .../desktop/views/components/ui.header.search.vue | 70 -- src/web/app/desktop/views/components/ui.header.vue | 172 ----- src/web/app/desktop/views/components/ui.vue | 37 - .../app/desktop/views/components/user-preview.vue | 173 ----- .../desktop/views/components/users-list.item.vue | 107 --- .../app/desktop/views/components/users-list.vue | 143 ---- .../desktop/views/components/widget-container.vue | 85 --- src/web/app/desktop/views/components/window.vue | 635 ----------------- src/web/app/desktop/views/directives/index.ts | 6 - .../app/desktop/views/directives/user-preview.ts | 72 -- src/web/app/desktop/views/pages/drive.vue | 52 -- src/web/app/desktop/views/pages/home-customize.vue | 12 - src/web/app/desktop/views/pages/home.vue | 62 -- src/web/app/desktop/views/pages/index.vue | 16 - src/web/app/desktop/views/pages/messaging-room.vue | 54 -- src/web/app/desktop/views/pages/othello.vue | 50 -- src/web/app/desktop/views/pages/post.vue | 67 -- src/web/app/desktop/views/pages/search.vue | 138 ---- src/web/app/desktop/views/pages/selectdrive.vue | 177 ----- .../views/pages/user/user.followers-you-know.vue | 84 --- .../app/desktop/views/pages/user/user.friends.vue | 124 ---- .../app/desktop/views/pages/user/user.header.vue | 196 ------ src/web/app/desktop/views/pages/user/user.home.vue | 103 --- .../app/desktop/views/pages/user/user.photos.vue | 88 --- .../app/desktop/views/pages/user/user.profile.vue | 138 ---- .../app/desktop/views/pages/user/user.timeline.vue | 139 ---- src/web/app/desktop/views/pages/user/user.vue | 53 -- src/web/app/desktop/views/pages/welcome.vue | 319 --------- src/web/app/desktop/views/widgets/activity.vue | 31 - .../desktop/views/widgets/channel.channel.form.vue | 67 -- .../desktop/views/widgets/channel.channel.post.vue | 71 -- .../app/desktop/views/widgets/channel.channel.vue | 106 --- src/web/app/desktop/views/widgets/channel.vue | 107 --- src/web/app/desktop/views/widgets/index.ts | 23 - src/web/app/desktop/views/widgets/messaging.vue | 59 -- .../app/desktop/views/widgets/notifications.vue | 70 -- src/web/app/desktop/views/widgets/polls.vue | 129 ---- src/web/app/desktop/views/widgets/post-form.vue | 111 --- src/web/app/desktop/views/widgets/profile.vue | 125 ---- src/web/app/desktop/views/widgets/timemachine.vue | 28 - src/web/app/desktop/views/widgets/trends.vue | 135 ---- src/web/app/desktop/views/widgets/users.vue | 172 ----- src/web/app/dev/script.ts | 44 -- src/web/app/dev/style.styl | 10 - src/web/app/dev/views/app.vue | 39 -- src/web/app/dev/views/apps.vue | 37 - src/web/app/dev/views/index.vue | 10 - src/web/app/dev/views/new-app.vue | 105 --- src/web/app/dev/views/ui.vue | 20 - src/web/app/init.css | 66 -- src/web/app/init.ts | 172 ----- src/web/app/mobile/api/choose-drive-file.ts | 18 - src/web/app/mobile/api/choose-drive-folder.ts | 17 - src/web/app/mobile/api/dialog.ts | 5 - src/web/app/mobile/api/input.ts | 8 - src/web/app/mobile/api/notify.ts | 3 - src/web/app/mobile/api/post.ts | 43 -- src/web/app/mobile/script.ts | 84 --- src/web/app/mobile/style.styl | 15 - src/web/app/mobile/views/components/activity.vue | 62 -- .../mobile/views/components/drive-file-chooser.vue | 98 --- .../views/components/drive-folder-chooser.vue | 78 --- .../mobile/views/components/drive.file-detail.vue | 295 -------- src/web/app/mobile/views/components/drive.file.vue | 171 ----- .../app/mobile/views/components/drive.folder.vue | 58 -- src/web/app/mobile/views/components/drive.vue | 581 ---------------- .../app/mobile/views/components/follow-button.vue | 123 ---- .../app/mobile/views/components/friends-maker.vue | 127 ---- src/web/app/mobile/views/components/index.ts | 47 -- .../app/mobile/views/components/media-image.vue | 31 - .../app/mobile/views/components/media-video.vue | 36 - .../views/components/notification-preview.vue | 128 ---- .../app/mobile/views/components/notification.vue | 164 ----- .../app/mobile/views/components/notifications.vue | 168 ----- src/web/app/mobile/views/components/notify.vue | 49 -- src/web/app/mobile/views/components/post-card.vue | 89 --- .../mobile/views/components/post-detail.sub.vue | 109 --- .../app/mobile/views/components/post-detail.vue | 447 ------------ src/web/app/mobile/views/components/post-form.vue | 276 -------- .../app/mobile/views/components/post-preview.vue | 106 --- src/web/app/mobile/views/components/post.sub.vue | 115 --- src/web/app/mobile/views/components/post.vue | 523 -------------- src/web/app/mobile/views/components/posts.vue | 111 --- .../mobile/views/components/sub-post-content.vue | 43 -- src/web/app/mobile/views/components/timeline.vue | 109 --- src/web/app/mobile/views/components/ui.header.vue | 242 ------- src/web/app/mobile/views/components/ui.nav.vue | 244 ------- src/web/app/mobile/views/components/ui.vue | 75 -- src/web/app/mobile/views/components/user-card.vue | 69 -- .../app/mobile/views/components/user-preview.vue | 110 --- .../app/mobile/views/components/user-timeline.vue | 76 -- src/web/app/mobile/views/components/users-list.vue | 133 ---- .../mobile/views/components/widget-container.vue | 68 -- src/web/app/mobile/views/directives/index.ts | 6 - .../app/mobile/views/directives/user-preview.ts | 2 - src/web/app/mobile/views/pages/drive.vue | 107 --- src/web/app/mobile/views/pages/followers.vue | 65 -- src/web/app/mobile/views/pages/following.vue | 65 -- src/web/app/mobile/views/pages/home.vue | 259 ------- src/web/app/mobile/views/pages/index.vue | 16 - src/web/app/mobile/views/pages/messaging-room.vue | 42 -- src/web/app/mobile/views/pages/messaging.vue | 23 - src/web/app/mobile/views/pages/notifications.vue | 32 - src/web/app/mobile/views/pages/othello.vue | 50 -- src/web/app/mobile/views/pages/post.vue | 85 --- src/web/app/mobile/views/pages/profile-setting.vue | 226 ------ src/web/app/mobile/views/pages/search.vue | 93 --- src/web/app/mobile/views/pages/selectdrive.vue | 96 --- src/web/app/mobile/views/pages/settings.vue | 102 --- src/web/app/mobile/views/pages/signup.vue | 57 -- src/web/app/mobile/views/pages/user.vue | 247 ------- .../views/pages/user/home.followers-you-know.vue | 67 -- .../app/mobile/views/pages/user/home.friends.vue | 54 -- .../app/mobile/views/pages/user/home.photos.vue | 83 --- src/web/app/mobile/views/pages/user/home.posts.vue | 57 -- src/web/app/mobile/views/pages/user/home.vue | 94 --- src/web/app/mobile/views/pages/welcome.vue | 206 ------ src/web/app/mobile/views/widgets/activity.vue | 32 - src/web/app/mobile/views/widgets/index.ts | 7 - src/web/app/mobile/views/widgets/profile.vue | 62 -- src/web/app/reset.styl | 32 - src/web/app/safe.js | 31 - src/web/app/stats/style.styl | 10 - src/web/app/stats/tags/index.tag | 209 ------ src/web/app/stats/tags/index.ts | 1 - src/web/app/status/style.styl | 10 - src/web/app/status/tags/index.tag | 201 ------ src/web/app/status/tags/index.ts | 1 - src/web/app/sw.js | 71 -- src/web/app/tsconfig.json | 23 - src/web/app/v.d.ts | 4 - src/web/assets/404.js | 21 - src/web/assets/code-highlight.css | 93 --- src/web/assets/error.jpg | Bin 56865 -> 0 bytes src/web/assets/favicon.ico | Bin 360414 -> 0 bytes src/web/assets/label.svg | 6 - src/web/assets/manifest.json | 7 - src/web/assets/message.mp3 | Bin 4584 -> 0 bytes src/web/assets/othello-put-me.mp3 | Bin 15672 -> 0 bytes src/web/assets/othello-put-you.mp3 | Bin 26121 -> 0 bytes src/web/assets/post.mp3 | Bin 2506 -> 0 bytes src/web/assets/reactions/angry.png | Bin 5875 -> 0 bytes src/web/assets/reactions/confused.png | Bin 7255 -> 0 bytes src/web/assets/reactions/congrats.png | Bin 10643 -> 0 bytes src/web/assets/reactions/hmm.png | Bin 6628 -> 0 bytes src/web/assets/reactions/laugh.png | Bin 7921 -> 0 bytes src/web/assets/reactions/like.png | Bin 4835 -> 0 bytes src/web/assets/reactions/love.png | Bin 3342 -> 0 bytes src/web/assets/reactions/pudding.png | Bin 7652 -> 0 bytes src/web/assets/reactions/surprise.png | Bin 4698 -> 0 bytes src/web/assets/recover.html | 36 - src/web/assets/title.svg | 25 - src/web/assets/unread.svg | 7 - src/web/assets/welcome-bg.svg | 579 --------------- src/web/assets/welcome-fg.svg | 380 ---------- src/web/const.styl | 4 - src/web/docs/about.en.pug | 3 - src/web/docs/about.ja.pug | 3 - src/web/docs/api.ja.pug | 103 --- src/web/docs/api/endpoints/posts/create.yaml | 53 -- src/web/docs/api/endpoints/posts/timeline.yaml | 32 - src/web/docs/api/endpoints/style.styl | 21 - src/web/docs/api/endpoints/view.pug | 32 - src/web/docs/api/entities/drive-file.yaml | 73 -- src/web/docs/api/entities/post.yaml | 173 ----- src/web/docs/api/entities/style.styl | 1 - src/web/docs/api/entities/user.yaml | 173 ----- src/web/docs/api/entities/view.pug | 20 - src/web/docs/api/gulpfile.ts | 188 ----- src/web/docs/api/mixins.pug | 37 - src/web/docs/api/style.styl | 11 - src/web/docs/gulpfile.ts | 77 -- src/web/docs/index.en.pug | 3 - src/web/docs/index.ja.pug | 3 - src/web/docs/layout.pug | 41 -- src/web/docs/license.en.pug | 17 - src/web/docs/license.ja.pug | 17 - src/web/docs/mute.ja.pug | 13 - src/web/docs/search.ja.pug | 120 ---- src/web/docs/server.ts | 21 - src/web/docs/style.styl | 120 ---- src/web/docs/tou.ja.pug | 3 - src/web/docs/ui.styl | 19 - src/web/docs/vars.ts | 64 -- src/web/element.scss | 12 - src/web/server.ts | 77 -- src/web/service/url-preview.ts | 15 - src/web/style.styl | 37 - 371 files changed, 36108 deletions(-) delete mode 100644 src/web/app/animation.styl delete mode 100644 src/web/app/app.styl delete mode 100644 src/web/app/app.vue delete mode 100644 src/web/app/auth/assets/logo.svg delete mode 100644 src/web/app/auth/script.ts delete mode 100644 src/web/app/auth/style.styl delete mode 100644 src/web/app/auth/views/form.vue delete mode 100644 src/web/app/auth/views/index.vue delete mode 100644 src/web/app/base.pug delete mode 100644 src/web/app/boot.js delete mode 100644 src/web/app/ch/script.ts delete mode 100644 src/web/app/ch/style.styl delete mode 100644 src/web/app/ch/tags/channel.tag delete mode 100644 src/web/app/ch/tags/header.tag delete mode 100644 src/web/app/ch/tags/index.tag delete mode 100644 src/web/app/ch/tags/index.ts delete mode 100644 src/web/app/common/define-widget.ts delete mode 100644 src/web/app/common/mios.ts delete mode 100644 src/web/app/common/scripts/check-for-update.ts delete mode 100644 src/web/app/common/scripts/compose-notification.ts delete mode 100644 src/web/app/common/scripts/contains.ts delete mode 100644 src/web/app/common/scripts/copy-to-clipboard.ts delete mode 100644 src/web/app/common/scripts/date-stringify.ts delete mode 100644 src/web/app/common/scripts/fuck-ad-block.ts delete mode 100644 src/web/app/common/scripts/gcd.ts delete mode 100644 src/web/app/common/scripts/get-kao.ts delete mode 100644 src/web/app/common/scripts/get-median.ts delete mode 100644 src/web/app/common/scripts/loading.ts delete mode 100644 src/web/app/common/scripts/parse-search-query.ts delete mode 100644 src/web/app/common/scripts/streaming/channel.ts delete mode 100644 src/web/app/common/scripts/streaming/drive.ts delete mode 100644 src/web/app/common/scripts/streaming/home.ts delete mode 100644 src/web/app/common/scripts/streaming/messaging-index.ts delete mode 100644 src/web/app/common/scripts/streaming/messaging.ts delete mode 100644 src/web/app/common/scripts/streaming/othello-game.ts delete mode 100644 src/web/app/common/scripts/streaming/othello.ts delete mode 100644 src/web/app/common/scripts/streaming/requests.ts delete mode 100644 src/web/app/common/scripts/streaming/server.ts delete mode 100644 src/web/app/common/scripts/streaming/stream-manager.ts delete mode 100644 src/web/app/common/scripts/streaming/stream.ts delete mode 100644 src/web/app/common/views/components/autocomplete.vue delete mode 100644 src/web/app/common/views/components/connect-failed.troubleshooter.vue delete mode 100644 src/web/app/common/views/components/connect-failed.vue delete mode 100644 src/web/app/common/views/components/ellipsis.vue delete mode 100644 src/web/app/common/views/components/file-type-icon.vue delete mode 100644 src/web/app/common/views/components/forkit.vue delete mode 100644 src/web/app/common/views/components/index.ts delete mode 100644 src/web/app/common/views/components/media-list.vue delete mode 100644 src/web/app/common/views/components/messaging-room.form.vue delete mode 100644 src/web/app/common/views/components/messaging-room.message.vue delete mode 100644 src/web/app/common/views/components/messaging-room.vue delete mode 100644 src/web/app/common/views/components/messaging.vue delete mode 100644 src/web/app/common/views/components/nav.vue delete mode 100644 src/web/app/common/views/components/othello.game.vue delete mode 100644 src/web/app/common/views/components/othello.gameroom.vue delete mode 100644 src/web/app/common/views/components/othello.room.vue delete mode 100644 src/web/app/common/views/components/othello.vue delete mode 100644 src/web/app/common/views/components/poll-editor.vue delete mode 100644 src/web/app/common/views/components/poll.vue delete mode 100644 src/web/app/common/views/components/post-html.ts delete mode 100644 src/web/app/common/views/components/post-menu.vue delete mode 100644 src/web/app/common/views/components/reaction-icon.vue delete mode 100644 src/web/app/common/views/components/reaction-picker.vue delete mode 100644 src/web/app/common/views/components/reactions-viewer.vue delete mode 100644 src/web/app/common/views/components/signin.vue delete mode 100644 src/web/app/common/views/components/signup.vue delete mode 100644 src/web/app/common/views/components/special-message.vue delete mode 100644 src/web/app/common/views/components/stream-indicator.vue delete mode 100644 src/web/app/common/views/components/switch.vue delete mode 100644 src/web/app/common/views/components/time.vue delete mode 100644 src/web/app/common/views/components/timer.vue delete mode 100644 src/web/app/common/views/components/twitter-setting.vue delete mode 100644 src/web/app/common/views/components/uploader.vue delete mode 100644 src/web/app/common/views/components/url-preview.vue delete mode 100644 src/web/app/common/views/components/url.vue delete mode 100644 src/web/app/common/views/components/welcome-timeline.vue delete mode 100644 src/web/app/common/views/directives/autocomplete.ts delete mode 100644 src/web/app/common/views/directives/index.ts delete mode 100644 src/web/app/common/views/filters/bytes.ts delete mode 100644 src/web/app/common/views/filters/index.ts delete mode 100644 src/web/app/common/views/filters/number.ts delete mode 100644 src/web/app/common/views/widgets/access-log.vue delete mode 100644 src/web/app/common/views/widgets/broadcast.vue delete mode 100644 src/web/app/common/views/widgets/calendar.vue delete mode 100644 src/web/app/common/views/widgets/donation.vue delete mode 100644 src/web/app/common/views/widgets/index.ts delete mode 100644 src/web/app/common/views/widgets/nav.vue delete mode 100644 src/web/app/common/views/widgets/photo-stream.vue delete mode 100644 src/web/app/common/views/widgets/rss.vue delete mode 100644 src/web/app/common/views/widgets/server.cpu-memory.vue delete mode 100644 src/web/app/common/views/widgets/server.cpu.vue delete mode 100644 src/web/app/common/views/widgets/server.disk.vue delete mode 100644 src/web/app/common/views/widgets/server.info.vue delete mode 100644 src/web/app/common/views/widgets/server.memory.vue delete mode 100644 src/web/app/common/views/widgets/server.pie.vue delete mode 100644 src/web/app/common/views/widgets/server.uptimes.vue delete mode 100644 src/web/app/common/views/widgets/server.vue delete mode 100644 src/web/app/common/views/widgets/slideshow.vue delete mode 100644 src/web/app/common/views/widgets/tips.vue delete mode 100644 src/web/app/common/views/widgets/version.vue delete mode 100644 src/web/app/config.ts delete mode 100644 src/web/app/desktop/api/choose-drive-file.ts delete mode 100644 src/web/app/desktop/api/choose-drive-folder.ts delete mode 100644 src/web/app/desktop/api/contextmenu.ts delete mode 100644 src/web/app/desktop/api/dialog.ts delete mode 100644 src/web/app/desktop/api/input.ts delete mode 100644 src/web/app/desktop/api/notify.ts delete mode 100644 src/web/app/desktop/api/post.ts delete mode 100644 src/web/app/desktop/api/update-avatar.ts delete mode 100644 src/web/app/desktop/api/update-banner.ts delete mode 100644 src/web/app/desktop/assets/grid.svg delete mode 100644 src/web/app/desktop/assets/header-logo-white.svg delete mode 100644 src/web/app/desktop/assets/header-logo.svg delete mode 100644 src/web/app/desktop/assets/index.jpg delete mode 100644 src/web/app/desktop/assets/remove.png delete mode 100644 src/web/app/desktop/script.ts delete mode 100644 src/web/app/desktop/style.styl delete mode 100644 src/web/app/desktop/ui.styl delete mode 100644 src/web/app/desktop/views/components/activity.calendar.vue delete mode 100644 src/web/app/desktop/views/components/activity.chart.vue delete mode 100644 src/web/app/desktop/views/components/activity.vue delete mode 100644 src/web/app/desktop/views/components/analog-clock.vue delete mode 100644 src/web/app/desktop/views/components/calendar.vue delete mode 100644 src/web/app/desktop/views/components/choose-file-from-drive-window.vue delete mode 100644 src/web/app/desktop/views/components/choose-folder-from-drive-window.vue delete mode 100644 src/web/app/desktop/views/components/context-menu.menu.vue delete mode 100644 src/web/app/desktop/views/components/context-menu.vue delete mode 100644 src/web/app/desktop/views/components/crop-window.vue delete mode 100644 src/web/app/desktop/views/components/dialog.vue delete mode 100644 src/web/app/desktop/views/components/drive-window.vue delete mode 100644 src/web/app/desktop/views/components/drive.file.vue delete mode 100644 src/web/app/desktop/views/components/drive.folder.vue delete mode 100644 src/web/app/desktop/views/components/drive.nav-folder.vue delete mode 100644 src/web/app/desktop/views/components/drive.vue delete mode 100644 src/web/app/desktop/views/components/ellipsis-icon.vue delete mode 100644 src/web/app/desktop/views/components/follow-button.vue delete mode 100644 src/web/app/desktop/views/components/followers-window.vue delete mode 100644 src/web/app/desktop/views/components/followers.vue delete mode 100644 src/web/app/desktop/views/components/following-window.vue delete mode 100644 src/web/app/desktop/views/components/following.vue delete mode 100644 src/web/app/desktop/views/components/friends-maker.vue delete mode 100644 src/web/app/desktop/views/components/game-window.vue delete mode 100644 src/web/app/desktop/views/components/home.vue delete mode 100644 src/web/app/desktop/views/components/index.ts delete mode 100644 src/web/app/desktop/views/components/input-dialog.vue delete mode 100644 src/web/app/desktop/views/components/media-image-dialog.vue delete mode 100644 src/web/app/desktop/views/components/media-image.vue delete mode 100644 src/web/app/desktop/views/components/media-video-dialog.vue delete mode 100644 src/web/app/desktop/views/components/media-video.vue delete mode 100644 src/web/app/desktop/views/components/mentions.vue delete mode 100644 src/web/app/desktop/views/components/messaging-room-window.vue delete mode 100644 src/web/app/desktop/views/components/messaging-window.vue delete mode 100644 src/web/app/desktop/views/components/notifications.vue delete mode 100644 src/web/app/desktop/views/components/post-detail.sub.vue delete mode 100644 src/web/app/desktop/views/components/post-detail.vue delete mode 100644 src/web/app/desktop/views/components/post-form-window.vue delete mode 100644 src/web/app/desktop/views/components/post-form.vue delete mode 100644 src/web/app/desktop/views/components/post-preview.vue delete mode 100644 src/web/app/desktop/views/components/posts.post.sub.vue delete mode 100644 src/web/app/desktop/views/components/posts.post.vue delete mode 100644 src/web/app/desktop/views/components/posts.vue delete mode 100644 src/web/app/desktop/views/components/progress-dialog.vue delete mode 100644 src/web/app/desktop/views/components/repost-form-window.vue delete mode 100644 src/web/app/desktop/views/components/repost-form.vue delete mode 100644 src/web/app/desktop/views/components/settings-window.vue delete mode 100644 src/web/app/desktop/views/components/settings.2fa.vue delete mode 100644 src/web/app/desktop/views/components/settings.api.vue delete mode 100644 src/web/app/desktop/views/components/settings.apps.vue delete mode 100644 src/web/app/desktop/views/components/settings.drive.vue delete mode 100644 src/web/app/desktop/views/components/settings.mute.vue delete mode 100644 src/web/app/desktop/views/components/settings.password.vue delete mode 100644 src/web/app/desktop/views/components/settings.profile.vue delete mode 100644 src/web/app/desktop/views/components/settings.signins.vue delete mode 100644 src/web/app/desktop/views/components/settings.vue delete mode 100644 src/web/app/desktop/views/components/sub-post-content.vue delete mode 100644 src/web/app/desktop/views/components/taskmanager.vue delete mode 100644 src/web/app/desktop/views/components/timeline.vue delete mode 100644 src/web/app/desktop/views/components/ui-notification.vue delete mode 100644 src/web/app/desktop/views/components/ui.header.account.vue delete mode 100644 src/web/app/desktop/views/components/ui.header.clock.vue delete mode 100644 src/web/app/desktop/views/components/ui.header.nav.vue delete mode 100644 src/web/app/desktop/views/components/ui.header.notifications.vue delete mode 100644 src/web/app/desktop/views/components/ui.header.post.vue delete mode 100644 src/web/app/desktop/views/components/ui.header.search.vue delete mode 100644 src/web/app/desktop/views/components/ui.header.vue delete mode 100644 src/web/app/desktop/views/components/ui.vue delete mode 100644 src/web/app/desktop/views/components/user-preview.vue delete mode 100644 src/web/app/desktop/views/components/users-list.item.vue delete mode 100644 src/web/app/desktop/views/components/users-list.vue delete mode 100644 src/web/app/desktop/views/components/widget-container.vue delete mode 100644 src/web/app/desktop/views/components/window.vue delete mode 100644 src/web/app/desktop/views/directives/index.ts delete mode 100644 src/web/app/desktop/views/directives/user-preview.ts delete mode 100644 src/web/app/desktop/views/pages/drive.vue delete mode 100644 src/web/app/desktop/views/pages/home-customize.vue delete mode 100644 src/web/app/desktop/views/pages/home.vue delete mode 100644 src/web/app/desktop/views/pages/index.vue delete mode 100644 src/web/app/desktop/views/pages/messaging-room.vue delete mode 100644 src/web/app/desktop/views/pages/othello.vue delete mode 100644 src/web/app/desktop/views/pages/post.vue delete mode 100644 src/web/app/desktop/views/pages/search.vue delete mode 100644 src/web/app/desktop/views/pages/selectdrive.vue delete mode 100644 src/web/app/desktop/views/pages/user/user.followers-you-know.vue delete mode 100644 src/web/app/desktop/views/pages/user/user.friends.vue delete mode 100644 src/web/app/desktop/views/pages/user/user.header.vue delete mode 100644 src/web/app/desktop/views/pages/user/user.home.vue delete mode 100644 src/web/app/desktop/views/pages/user/user.photos.vue delete mode 100644 src/web/app/desktop/views/pages/user/user.profile.vue delete mode 100644 src/web/app/desktop/views/pages/user/user.timeline.vue delete mode 100644 src/web/app/desktop/views/pages/user/user.vue delete mode 100644 src/web/app/desktop/views/pages/welcome.vue delete mode 100644 src/web/app/desktop/views/widgets/activity.vue delete mode 100644 src/web/app/desktop/views/widgets/channel.channel.form.vue delete mode 100644 src/web/app/desktop/views/widgets/channel.channel.post.vue delete mode 100644 src/web/app/desktop/views/widgets/channel.channel.vue delete mode 100644 src/web/app/desktop/views/widgets/channel.vue delete mode 100644 src/web/app/desktop/views/widgets/index.ts delete mode 100644 src/web/app/desktop/views/widgets/messaging.vue delete mode 100644 src/web/app/desktop/views/widgets/notifications.vue delete mode 100644 src/web/app/desktop/views/widgets/polls.vue delete mode 100644 src/web/app/desktop/views/widgets/post-form.vue delete mode 100644 src/web/app/desktop/views/widgets/profile.vue delete mode 100644 src/web/app/desktop/views/widgets/timemachine.vue delete mode 100644 src/web/app/desktop/views/widgets/trends.vue delete mode 100644 src/web/app/desktop/views/widgets/users.vue delete mode 100644 src/web/app/dev/script.ts delete mode 100644 src/web/app/dev/style.styl delete mode 100644 src/web/app/dev/views/app.vue delete mode 100644 src/web/app/dev/views/apps.vue delete mode 100644 src/web/app/dev/views/index.vue delete mode 100644 src/web/app/dev/views/new-app.vue delete mode 100644 src/web/app/dev/views/ui.vue delete mode 100644 src/web/app/init.css delete mode 100644 src/web/app/init.ts delete mode 100644 src/web/app/mobile/api/choose-drive-file.ts delete mode 100644 src/web/app/mobile/api/choose-drive-folder.ts delete mode 100644 src/web/app/mobile/api/dialog.ts delete mode 100644 src/web/app/mobile/api/input.ts delete mode 100644 src/web/app/mobile/api/notify.ts delete mode 100644 src/web/app/mobile/api/post.ts delete mode 100644 src/web/app/mobile/script.ts delete mode 100644 src/web/app/mobile/style.styl delete mode 100644 src/web/app/mobile/views/components/activity.vue delete mode 100644 src/web/app/mobile/views/components/drive-file-chooser.vue delete mode 100644 src/web/app/mobile/views/components/drive-folder-chooser.vue delete mode 100644 src/web/app/mobile/views/components/drive.file-detail.vue delete mode 100644 src/web/app/mobile/views/components/drive.file.vue delete mode 100644 src/web/app/mobile/views/components/drive.folder.vue delete mode 100644 src/web/app/mobile/views/components/drive.vue delete mode 100644 src/web/app/mobile/views/components/follow-button.vue delete mode 100644 src/web/app/mobile/views/components/friends-maker.vue delete mode 100644 src/web/app/mobile/views/components/index.ts delete mode 100644 src/web/app/mobile/views/components/media-image.vue delete mode 100644 src/web/app/mobile/views/components/media-video.vue delete mode 100644 src/web/app/mobile/views/components/notification-preview.vue delete mode 100644 src/web/app/mobile/views/components/notification.vue delete mode 100644 src/web/app/mobile/views/components/notifications.vue delete mode 100644 src/web/app/mobile/views/components/notify.vue delete mode 100644 src/web/app/mobile/views/components/post-card.vue delete mode 100644 src/web/app/mobile/views/components/post-detail.sub.vue delete mode 100644 src/web/app/mobile/views/components/post-detail.vue delete mode 100644 src/web/app/mobile/views/components/post-form.vue delete mode 100644 src/web/app/mobile/views/components/post-preview.vue delete mode 100644 src/web/app/mobile/views/components/post.sub.vue delete mode 100644 src/web/app/mobile/views/components/post.vue delete mode 100644 src/web/app/mobile/views/components/posts.vue delete mode 100644 src/web/app/mobile/views/components/sub-post-content.vue delete mode 100644 src/web/app/mobile/views/components/timeline.vue delete mode 100644 src/web/app/mobile/views/components/ui.header.vue delete mode 100644 src/web/app/mobile/views/components/ui.nav.vue delete mode 100644 src/web/app/mobile/views/components/ui.vue delete mode 100644 src/web/app/mobile/views/components/user-card.vue delete mode 100644 src/web/app/mobile/views/components/user-preview.vue delete mode 100644 src/web/app/mobile/views/components/user-timeline.vue delete mode 100644 src/web/app/mobile/views/components/users-list.vue delete mode 100644 src/web/app/mobile/views/components/widget-container.vue delete mode 100644 src/web/app/mobile/views/directives/index.ts delete mode 100644 src/web/app/mobile/views/directives/user-preview.ts delete mode 100644 src/web/app/mobile/views/pages/drive.vue delete mode 100644 src/web/app/mobile/views/pages/followers.vue delete mode 100644 src/web/app/mobile/views/pages/following.vue delete mode 100644 src/web/app/mobile/views/pages/home.vue delete mode 100644 src/web/app/mobile/views/pages/index.vue delete mode 100644 src/web/app/mobile/views/pages/messaging-room.vue delete mode 100644 src/web/app/mobile/views/pages/messaging.vue delete mode 100644 src/web/app/mobile/views/pages/notifications.vue delete mode 100644 src/web/app/mobile/views/pages/othello.vue delete mode 100644 src/web/app/mobile/views/pages/post.vue delete mode 100644 src/web/app/mobile/views/pages/profile-setting.vue delete mode 100644 src/web/app/mobile/views/pages/search.vue delete mode 100644 src/web/app/mobile/views/pages/selectdrive.vue delete mode 100644 src/web/app/mobile/views/pages/settings.vue delete mode 100644 src/web/app/mobile/views/pages/signup.vue delete mode 100644 src/web/app/mobile/views/pages/user.vue delete mode 100644 src/web/app/mobile/views/pages/user/home.followers-you-know.vue delete mode 100644 src/web/app/mobile/views/pages/user/home.friends.vue delete mode 100644 src/web/app/mobile/views/pages/user/home.photos.vue delete mode 100644 src/web/app/mobile/views/pages/user/home.posts.vue delete mode 100644 src/web/app/mobile/views/pages/user/home.vue delete mode 100644 src/web/app/mobile/views/pages/welcome.vue delete mode 100644 src/web/app/mobile/views/widgets/activity.vue delete mode 100644 src/web/app/mobile/views/widgets/index.ts delete mode 100644 src/web/app/mobile/views/widgets/profile.vue delete mode 100644 src/web/app/reset.styl delete mode 100644 src/web/app/safe.js delete mode 100644 src/web/app/stats/style.styl delete mode 100644 src/web/app/stats/tags/index.tag delete mode 100644 src/web/app/stats/tags/index.ts delete mode 100644 src/web/app/status/style.styl delete mode 100644 src/web/app/status/tags/index.tag delete mode 100644 src/web/app/status/tags/index.ts delete mode 100644 src/web/app/sw.js delete mode 100644 src/web/app/tsconfig.json delete mode 100644 src/web/app/v.d.ts delete mode 100644 src/web/assets/404.js delete mode 100644 src/web/assets/code-highlight.css delete mode 100644 src/web/assets/error.jpg delete mode 100644 src/web/assets/favicon.ico delete mode 100644 src/web/assets/label.svg delete mode 100644 src/web/assets/manifest.json delete mode 100644 src/web/assets/message.mp3 delete mode 100644 src/web/assets/othello-put-me.mp3 delete mode 100644 src/web/assets/othello-put-you.mp3 delete mode 100644 src/web/assets/post.mp3 delete mode 100644 src/web/assets/reactions/angry.png delete mode 100644 src/web/assets/reactions/confused.png delete mode 100644 src/web/assets/reactions/congrats.png delete mode 100644 src/web/assets/reactions/hmm.png delete mode 100644 src/web/assets/reactions/laugh.png delete mode 100644 src/web/assets/reactions/like.png delete mode 100644 src/web/assets/reactions/love.png delete mode 100644 src/web/assets/reactions/pudding.png delete mode 100644 src/web/assets/reactions/surprise.png delete mode 100644 src/web/assets/recover.html delete mode 100644 src/web/assets/title.svg delete mode 100644 src/web/assets/unread.svg delete mode 100644 src/web/assets/welcome-bg.svg delete mode 100644 src/web/assets/welcome-fg.svg delete mode 100644 src/web/const.styl delete mode 100644 src/web/docs/about.en.pug delete mode 100644 src/web/docs/about.ja.pug delete mode 100644 src/web/docs/api.ja.pug delete mode 100644 src/web/docs/api/endpoints/posts/create.yaml delete mode 100644 src/web/docs/api/endpoints/posts/timeline.yaml delete mode 100644 src/web/docs/api/endpoints/style.styl delete mode 100644 src/web/docs/api/endpoints/view.pug delete mode 100644 src/web/docs/api/entities/drive-file.yaml delete mode 100644 src/web/docs/api/entities/post.yaml delete mode 100644 src/web/docs/api/entities/style.styl delete mode 100644 src/web/docs/api/entities/user.yaml delete mode 100644 src/web/docs/api/entities/view.pug delete mode 100644 src/web/docs/api/gulpfile.ts delete mode 100644 src/web/docs/api/mixins.pug delete mode 100644 src/web/docs/api/style.styl delete mode 100644 src/web/docs/gulpfile.ts delete mode 100644 src/web/docs/index.en.pug delete mode 100644 src/web/docs/index.ja.pug delete mode 100644 src/web/docs/layout.pug delete mode 100644 src/web/docs/license.en.pug delete mode 100644 src/web/docs/license.ja.pug delete mode 100644 src/web/docs/mute.ja.pug delete mode 100644 src/web/docs/search.ja.pug delete mode 100644 src/web/docs/server.ts delete mode 100644 src/web/docs/style.styl delete mode 100644 src/web/docs/tou.ja.pug delete mode 100644 src/web/docs/ui.styl delete mode 100644 src/web/docs/vars.ts delete mode 100644 src/web/element.scss delete mode 100644 src/web/server.ts delete mode 100644 src/web/service/url-preview.ts delete mode 100644 src/web/style.styl (limited to 'src/web') diff --git a/src/web/app/animation.styl b/src/web/app/animation.styl deleted file mode 100644 index 8f121b313b..0000000000 --- a/src/web/app/animation.styl +++ /dev/null @@ -1,12 +0,0 @@ -.zoom-in-top-enter-active, -.zoom-in-top-leave-active { - opacity: 1; - transform: scaleY(1); - transition: transform 300ms cubic-bezier(0.23, 1, 0.32, 1), opacity 300ms cubic-bezier(0.23, 1, 0.32, 1); - transform-origin: center top; -} -.zoom-in-top-enter, -.zoom-in-top-leave-active { - opacity: 0; - transform: scaleY(0); -} diff --git a/src/web/app/app.styl b/src/web/app/app.styl deleted file mode 100644 index 431b9daa65..0000000000 --- a/src/web/app/app.styl +++ /dev/null @@ -1,128 +0,0 @@ -@import "../style" -@import "../animation" - -html - &.progress - &, * - cursor progress !important - -body - overflow-wrap break-word - -#error - padding 32px - color #fff - - hr - border solid 1px #fff - -#nprogress - pointer-events none - - position absolute - z-index 65536 - - .bar - background $theme-color - - position fixed - z-index 65537 - top 0 - left 0 - - width 100% - height 2px - - /* Fancy blur effect */ - .peg - display block - position absolute - right 0px - width 100px - height 100% - box-shadow 0 0 10px $theme-color, 0 0 5px $theme-color - opacity 1 - - transform rotate(3deg) translate(0px, -4px) - -#wait - display block - position fixed - z-index 65537 - top 15px - right 15px - - &:before - content "" - display block - width 18px - height 18px - box-sizing border-box - - border solid 2px transparent - border-top-color $theme-color - border-left-color $theme-color - border-radius 50% - - animation progress-spinner 400ms linear infinite - - @keyframes progress-spinner - 0% - transform rotate(0deg) - 100% - transform rotate(360deg) - -code - font-family Consolas, 'Courier New', Courier, Monaco, monospace - - .comment - opacity 0.5 - - .string - color #e96900 - - .regexp - color #e9003f - - .keyword - color #2973b7 - - &.true - &.false - &.null - &.nil - &.undefined - color #ae81ff - - .symbol - color #42b983 - - .number - .nan - color #ae81ff - - .var:not(.keyword) - font-weight bold - font-style italic - //text-decoration underline - - .method - font-style italic - color #8964c1 - - .property - color #a71d5d - - .label - color #e9003f - -pre - display block - - > code - display block - overflow auto - tab-size 2 - -[data-fa] - display inline-block diff --git a/src/web/app/app.vue b/src/web/app/app.vue deleted file mode 100644 index 7a46e7dea0..0000000000 --- a/src/web/app/app.vue +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/src/web/app/auth/assets/logo.svg b/src/web/app/auth/assets/logo.svg deleted file mode 100644 index 19b8a2737e..0000000000 --- a/src/web/app/auth/assets/logo.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/src/web/app/auth/script.ts b/src/web/app/auth/script.ts deleted file mode 100644 index 31c758ebc2..0000000000 --- a/src/web/app/auth/script.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Authorize Form - */ - -// Style -import './style.styl'; - -import init from '../init'; - -import Index from './views/index.vue'; - -/** - * init - */ -init(async (launch) => { - document.title = 'Misskey | アプリの連携'; - - // Launch the app - const [app] = launch(); - - // Routing - app.$router.addRoutes([ - { path: '/:token', component: Index }, - ]); -}); diff --git a/src/web/app/auth/style.styl b/src/web/app/auth/style.styl deleted file mode 100644 index bd25e1b572..0000000000 --- a/src/web/app/auth/style.styl +++ /dev/null @@ -1,15 +0,0 @@ -@import "../app" -@import "../reset" - -html - background #eee - - @media (max-width 600px) - background #fff - -body - margin 0 - padding 32px 0 - - @media (max-width 600px) - padding 0 diff --git a/src/web/app/auth/views/form.vue b/src/web/app/auth/views/form.vue deleted file mode 100644 index d86ed58b38..0000000000 --- a/src/web/app/auth/views/form.vue +++ /dev/null @@ -1,141 +0,0 @@ - - - - - diff --git a/src/web/app/auth/views/index.vue b/src/web/app/auth/views/index.vue deleted file mode 100644 index 17e5cc6108..0000000000 --- a/src/web/app/auth/views/index.vue +++ /dev/null @@ -1,149 +0,0 @@ - - - - - diff --git a/src/web/app/base.pug b/src/web/app/base.pug deleted file mode 100644 index d7c7f0aed4..0000000000 --- a/src/web/app/base.pug +++ /dev/null @@ -1,38 +0,0 @@ -doctype html - -!= '\n\n' - -html - - head - meta(charset='utf-8') - meta(name='application-name' content='Misskey') - meta(name='theme-color' content=themeColor) - meta(name='referrer' content='origin') - link(rel='manifest' href='/manifest.json') - - title Misskey - - style - include ./../../../built/web/assets/init.css - script - include ./../../../built/web/assets/boot.js - - script - include ./../../../built/web/assets/safe.js - - //- FontAwesome style - style #{facss} - - //- highlight.js style - style #{hljscss} - - body - noscript: p - | JavaScriptを有効にしてください - br - | Please turn on your JavaScript - div#ini: p - span . - span . - span . diff --git a/src/web/app/boot.js b/src/web/app/boot.js deleted file mode 100644 index 0846e4bd55..0000000000 --- a/src/web/app/boot.js +++ /dev/null @@ -1,120 +0,0 @@ -/** - * MISSKEY BOOT LOADER - * (ENTRY POINT) - */ - -/** - * ドメインに基づいて適切なスクリプトを読み込みます。 - * ユーザーの言語およびモバイル端末か否かも考慮します。 - * webpackは介さないためrequireやimportは使えません。 - */ - -'use strict'; - -// Chromeで確認したことなのですが、constやletを用いたとしても -// グローバルなスコープで定数/変数を定義するとwindowのプロパティ -// としてそれがアクセスできるようになる訳ではありませんが、普通に -// コンソールから定数/変数名を入力するとアクセスできてしまいます。 -// ブロック内に入れてスコープを非グローバル化するとそれが防げます -// (Chrome以外のブラウザでは検証していません) -{ - // Get the current url information - const url = new URL(location.href); - - //#region Detect app name - let app = null; - - if (url.pathname == '/docs') app = 'docs'; - if (url.pathname == '/dev') app = 'dev'; - if (url.pathname == '/auth') app = 'auth'; - //#endregion - - // Detect the user language - // Note: The default language is English - let lang = navigator.language.split('-')[0]; - if (!/^(en|ja)$/.test(lang)) lang = 'en'; - if (localStorage.getItem('lang')) lang = localStorage.getItem('lang'); - if (ENV != 'production') lang = 'ja'; - - // Detect the user agent - const ua = navigator.userAgent.toLowerCase(); - const isMobile = /mobile|iphone|ipad|android/.test(ua); - - // Get the element - const head = document.getElementsByTagName('head')[0]; - - // If mobile, insert the viewport meta tag - if (isMobile) { - const meta = document.createElement('meta'); - meta.setAttribute('name', 'viewport'); - meta.setAttribute('content', - 'width=device-width,' + - 'initial-scale=1,' + - 'minimum-scale=1,' + - 'maximum-scale=1,' + - 'user-scalable=no'); - head.appendChild(meta); - } - - // Switch desktop or mobile version - if (app == null) { - app = isMobile ? 'mobile' : 'desktop'; - } - - // Script version - const ver = localStorage.getItem('v') || VERSION; - - // Whether in debug mode - const isDebug = localStorage.getItem('debug') == 'true'; - - // Whether use raw version script - const raw = (localStorage.getItem('useRawScript') == 'true' && isDebug) - || ENV != 'production'; - - // Load an app script - // Note: 'async' make it possible to load the script asyncly. - // 'defer' make it possible to run the script when the dom loaded. - const script = document.createElement('script'); - script.setAttribute('src', `/assets/${app}.${ver}.${lang}.${raw ? 'raw' : 'min'}.js`); - script.setAttribute('async', 'true'); - script.setAttribute('defer', 'true'); - head.appendChild(script); - - // 1秒経ってもスクリプトがロードされない場合はバージョンが古くて - // 404になっているせいかもしれないので、バージョンを確認して古ければ更新する - // - // 読み込まれたスクリプトからこのタイマーを解除できるように、 - // グローバルにタイマーIDを代入しておく - window.mkBootTimer = window.setTimeout(async () => { - // Fetch meta - const res = await fetch(API + '/meta', { - method: 'POST', - cache: 'no-cache' - }); - - // Parse - const meta = await res.json(); - - // Compare versions - if (meta.version != ver) { - alert( - 'Misskeyの新しいバージョンがあります。ページを再度読み込みします。' + - '\n\n' + - 'New version of Misskey available. The page will be reloaded.'); - - // Clear cache (serive worker) - try { - navigator.serviceWorker.controller.postMessage('clear'); - - navigator.serviceWorker.getRegistrations().then(registrations => { - registrations.forEach(registration => registration.unregister()); - }); - } catch (e) { - console.error(e); - } - - // Force reload - location.reload(true); - } - }, 1000); -} diff --git a/src/web/app/ch/script.ts b/src/web/app/ch/script.ts deleted file mode 100644 index 4c6b6dfd1b..0000000000 --- a/src/web/app/ch/script.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Channels - */ - -// Style -import './style.styl'; - -require('./tags'); -import init from '../init'; - -/** - * init - */ -init(() => { -}); diff --git a/src/web/app/ch/style.styl b/src/web/app/ch/style.styl deleted file mode 100644 index 21ca648cbe..0000000000 --- a/src/web/app/ch/style.styl +++ /dev/null @@ -1,10 +0,0 @@ -@import "../app" - -html - padding 8px - background #efefef - -#wait - top auto - bottom 15px - left 15px diff --git a/src/web/app/ch/tags/channel.tag b/src/web/app/ch/tags/channel.tag deleted file mode 100644 index dc4b8e1426..0000000000 --- a/src/web/app/ch/tags/channel.tag +++ /dev/null @@ -1,403 +0,0 @@ - - -
-
-

{ channel.title }

- -
-

このチャンネルをウォッチしています ウォッチ解除

-

このチャンネルをウォッチする

-
- - - -
-

読み込み中

-
-

まだ投稿がありません

- -
-
-
- -
-

参加するにはログインまたは新規登録してください

-
-
-
- Misskey ver { _VERSION_ } (葵 aoi) -
-
- - -
- - -
- { post.index }: - { post.user.name } - - - ID:{ acct } -
-
- >>{ post.reply.index } - { post.text } -
- -
-
- - -
- - -

>>{ reply.index } ({ reply.user.name }): [x]

- -
- - - -
- -
    -
  1. { name }
  2. -
- - - -
- - - - - - - - - - diff --git a/src/web/app/ch/tags/header.tag b/src/web/app/ch/tags/header.tag deleted file mode 100644 index 901123d63b..0000000000 --- a/src/web/app/ch/tags/header.tag +++ /dev/null @@ -1,20 +0,0 @@ - -
- Index | Misskey -
-
- ログイン(新規登録) - { I.username } -
- - -
diff --git a/src/web/app/ch/tags/index.tag b/src/web/app/ch/tags/index.tag deleted file mode 100644 index 88df2ec45d..0000000000 --- a/src/web/app/ch/tags/index.tag +++ /dev/null @@ -1,37 +0,0 @@ - - -
- -
- - - -
diff --git a/src/web/app/ch/tags/index.ts b/src/web/app/ch/tags/index.ts deleted file mode 100644 index 12ffdaeb84..0000000000 --- a/src/web/app/ch/tags/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -require('./index.tag'); -require('./channel.tag'); -require('./header.tag'); diff --git a/src/web/app/common/define-widget.ts b/src/web/app/common/define-widget.ts deleted file mode 100644 index d8d29873a4..0000000000 --- a/src/web/app/common/define-widget.ts +++ /dev/null @@ -1,79 +0,0 @@ -import Vue from 'vue'; - -export default function(data: { - name: string; - props?: () => T; -}) { - return Vue.extend({ - props: { - widget: { - type: Object - }, - isMobile: { - type: Boolean, - default: false - }, - isCustomizeMode: { - type: Boolean, - default: false - } - }, - computed: { - id(): string { - return this.widget.id; - } - }, - data() { - return { - props: data.props ? data.props() : {} as T, - bakedOldProps: null, - preventSave: false - }; - }, - created() { - if (this.props) { - Object.keys(this.props).forEach(prop => { - if (this.widget.data.hasOwnProperty(prop)) { - this.props[prop] = this.widget.data[prop]; - } - }); - } - - this.bakeProps(); - - this.$watch('props', newProps => { - if (this.preventSave) { - this.preventSave = false; - this.bakeProps(); - return; - } - if (this.bakedOldProps == JSON.stringify(newProps)) return; - - this.bakeProps(); - - if (this.isMobile) { - (this as any).api('i/update_mobile_home', { - id: this.id, - data: newProps - }).then(() => { - (this as any).os.i.account.client_settings.mobile_home.find(w => w.id == this.id).data = newProps; - }); - } else { - (this as any).api('i/update_home', { - id: this.id, - data: newProps - }).then(() => { - (this as any).os.i.account.client_settings.home.find(w => w.id == this.id).data = newProps; - }); - } - }, { - deep: true - }); - }, - methods: { - bakeProps() { - this.bakedOldProps = JSON.stringify(this.props); - } - } - }); -} diff --git a/src/web/app/common/mios.ts b/src/web/app/common/mios.ts deleted file mode 100644 index 2c6c9988e7..0000000000 --- a/src/web/app/common/mios.ts +++ /dev/null @@ -1,578 +0,0 @@ -import Vue from 'vue'; -import { EventEmitter } from 'eventemitter3'; -import * as merge from 'object-assign-deep'; -import * as uuid from 'uuid'; - -import { hostname, apiUrl, swPublickey, version, lang, googleMapsApiKey } from '../config'; -import Progress from './scripts/loading'; -import Connection from './scripts/streaming/stream'; -import { HomeStreamManager } from './scripts/streaming/home'; -import { DriveStreamManager } from './scripts/streaming/drive'; -import { ServerStreamManager } from './scripts/streaming/server'; -import { RequestsStreamManager } from './scripts/streaming/requests'; -import { MessagingIndexStreamManager } from './scripts/streaming/messaging-index'; -import { OthelloStreamManager } from './scripts/streaming/othello'; - -import Err from '../common/views/components/connect-failed.vue'; - -//#region api requests -let spinner = null; -let pending = 0; -//#endregion - -export type API = { - chooseDriveFile: (opts: { - title?: string; - currentFolder?: any; - multiple?: boolean; - }) => Promise; - - chooseDriveFolder: (opts: { - title?: string; - currentFolder?: any; - }) => Promise; - - dialog: (opts: { - title: string; - text: string; - actions?: Array<{ - text: string; - id?: string; - }>; - }) => Promise; - - input: (opts: { - title: string; - placeholder?: string; - default?: string; - }) => Promise; - - post: (opts?: { - reply?: any; - repost?: any; - }) => void; - - notify: (message: string) => void; -}; - -/** - * Misskey Operating System - */ -export default class MiOS extends EventEmitter { - /** - * Misskeyの /meta で取得できるメタ情報 - */ - private meta: { - data: { [x: string]: any }; - chachedAt: Date; - }; - - private isMetaFetching = false; - - public app: Vue; - - public new(vm, props) { - const w = new vm({ - parent: this.app, - propsData: props - }).$mount(); - document.body.appendChild(w.$el); - } - - /** - * A signing user - */ - public i: { [x: string]: any }; - - /** - * Whether signed in - */ - public get isSignedIn() { - return this.i != null; - } - - /** - * Whether is debug mode - */ - public get debug() { - return localStorage.getItem('debug') == 'true'; - } - - /** - * Whether enable sounds - */ - public get isEnableSounds() { - return localStorage.getItem('enableSounds') == 'true'; - } - - public apis: API; - - /** - * A connection manager of home stream - */ - public stream: HomeStreamManager; - - /** - * Connection managers - */ - public streams: { - driveStream: DriveStreamManager; - serverStream: ServerStreamManager; - requestsStream: RequestsStreamManager; - messagingIndexStream: MessagingIndexStreamManager; - othelloStream: OthelloStreamManager; - } = { - driveStream: null, - serverStream: null, - requestsStream: null, - messagingIndexStream: null, - othelloStream: null - }; - - /** - * A registration of service worker - */ - private swRegistration: ServiceWorkerRegistration = null; - - /** - * Whether should register ServiceWorker - */ - private shouldRegisterSw: boolean; - - /** - * ウィンドウシステム - */ - public windows = new WindowSystem(); - - /** - * MiOSインスタンスを作成します - * @param shouldRegisterSw ServiceWorkerを登録するかどうか - */ - constructor(shouldRegisterSw = false) { - super(); - - this.shouldRegisterSw = shouldRegisterSw; - - //#region BIND - this.log = this.log.bind(this); - this.logInfo = this.logInfo.bind(this); - this.logWarn = this.logWarn.bind(this); - this.logError = this.logError.bind(this); - this.init = this.init.bind(this); - this.api = this.api.bind(this); - this.getMeta = this.getMeta.bind(this); - this.registerSw = this.registerSw.bind(this); - //#endregion - - if (this.debug) { - (window as any).os = this; - } - } - - private googleMapsIniting = false; - - public getGoogleMaps() { - return new Promise((res, rej) => { - if ((window as any).google && (window as any).google.maps) { - res((window as any).google.maps); - } else { - this.once('init-google-maps', () => { - res((window as any).google.maps); - }); - - //#region load google maps api - if (!this.googleMapsIniting) { - this.googleMapsIniting = true; - (window as any).initGoogleMaps = () => { - this.emit('init-google-maps'); - }; - const head = document.getElementsByTagName('head')[0]; - const script = document.createElement('script'); - script.setAttribute('src', `https://maps.googleapis.com/maps/api/js?key=${googleMapsApiKey}&callback=initGoogleMaps`); - script.setAttribute('async', 'true'); - script.setAttribute('defer', 'true'); - head.appendChild(script); - } - //#endregion - } - }); - } - - public log(...args) { - if (!this.debug) return; - console.log.apply(null, args); - } - - public logInfo(...args) { - if (!this.debug) return; - console.info.apply(null, args); - } - - public logWarn(...args) { - if (!this.debug) return; - console.warn.apply(null, args); - } - - public logError(...args) { - if (!this.debug) return; - console.error.apply(null, args); - } - - public signout() { - localStorage.removeItem('me'); - document.cookie = `i=; domain=.${hostname}; expires=Thu, 01 Jan 1970 00:00:01 GMT;`; - location.href = '/'; - } - - /** - * Initialize MiOS (boot) - * @param callback A function that call when initialized - */ - public async init(callback) { - //#region Init stream managers - this.streams.serverStream = new ServerStreamManager(this); - this.streams.requestsStream = new RequestsStreamManager(this); - - this.once('signedin', () => { - // Init home stream manager - this.stream = new HomeStreamManager(this, this.i); - - // Init other stream manager - this.streams.driveStream = new DriveStreamManager(this, this.i); - this.streams.messagingIndexStream = new MessagingIndexStreamManager(this, this.i); - this.streams.othelloStream = new OthelloStreamManager(this, this.i); - }); - //#endregion - - // ユーザーをフェッチしてコールバックする - const fetchme = (token, cb) => { - let me = null; - - // Return when not signed in - if (token == null) { - return done(); - } - - // Fetch user - fetch(`${apiUrl}/i`, { - method: 'POST', - body: JSON.stringify({ - i: token - }) - }) - // When success - .then(res => { - // When failed to authenticate user - if (res.status !== 200) { - return this.signout(); - } - - // Parse response - res.json().then(i => { - me = i; - me.account.token = token; - done(); - }); - }) - // When failure - .catch(() => { - // Render the error screen - document.body.innerHTML = '
'; - new Vue({ - render: createEl => createEl(Err) - }).$mount('#err'); - - Progress.done(); - }); - - function done() { - if (cb) cb(me); - } - }; - - // フェッチが完了したとき - const fetched = me => { - if (me) { - // デフォルトの設定をマージ - me.account.client_settings = Object.assign({ - fetchOnScroll: true, - showMaps: true, - showPostFormOnTopOfTl: false, - gradientWindowHeader: false - }, me.account.client_settings); - - // ローカルストレージにキャッシュ - localStorage.setItem('me', JSON.stringify(me)); - } - - this.i = me; - - this.emit('signedin'); - - // Finish init - callback(); - - //#region Post - - // Init service worker - if (this.shouldRegisterSw) this.registerSw(); - - //#endregion - }; - - // Get cached account data - const cachedMe = JSON.parse(localStorage.getItem('me')); - - // キャッシュがあったとき - if (cachedMe) { - // とりあえずキャッシュされたデータでお茶を濁して(?)おいて、 - fetched(cachedMe); - - // 後から新鮮なデータをフェッチ - fetchme(cachedMe.account.token, freshData => { - merge(cachedMe, freshData); - }); - } else { - // Get token from cookie - const i = (document.cookie.match(/i=(!\w+)/) || [null, null])[1]; - - fetchme(i, fetched); - } - } - - /** - * Register service worker - */ - private registerSw() { - // Check whether service worker and push manager supported - const isSwSupported = - ('serviceWorker' in navigator) && ('PushManager' in window); - - // Reject when browser not service worker supported - if (!isSwSupported) return; - - // Reject when not signed in to Misskey - if (!this.isSignedIn) return; - - // When service worker activated - navigator.serviceWorker.ready.then(registration => { - this.log('[sw] ready: ', registration); - - this.swRegistration = registration; - - // Options of pushManager.subscribe - // SEE: https://developer.mozilla.org/en-US/docs/Web/API/PushManager/subscribe#Parameters - const opts = { - // A boolean indicating that the returned push subscription - // will only be used for messages whose effect is made visible to the user. - userVisibleOnly: true, - - // A public key your push server will use to send - // messages to client apps via a push server. - applicationServerKey: urlBase64ToUint8Array(swPublickey) - }; - - // Subscribe push notification - this.swRegistration.pushManager.subscribe(opts).then(subscription => { - this.log('[sw] Subscribe OK:', subscription); - - function encode(buffer: ArrayBuffer) { - return btoa(String.fromCharCode.apply(null, new Uint8Array(buffer))); - } - - // Register - this.api('sw/register', { - endpoint: subscription.endpoint, - auth: encode(subscription.getKey('auth')), - publickey: encode(subscription.getKey('p256dh')) - }); - }) - // When subscribe failed - .catch(async (err: Error) => { - this.logError('[sw] Subscribe Error:', err); - - // 通知が許可されていなかったとき - if (err.name == 'NotAllowedError') { - this.logError('[sw] Subscribe failed due to notification not allowed'); - return; - } - - // 違うapplicationServerKey (または gcm_sender_id)のサブスクリプションが - // 既に存在していることが原因でエラーになった可能性があるので、 - // そのサブスクリプションを解除しておく - const subscription = await this.swRegistration.pushManager.getSubscription(); - if (subscription) subscription.unsubscribe(); - }); - }); - - // Whether use raw version script - const raw = (localStorage.getItem('useRawScript') == 'true' && this.debug) - || process.env.NODE_ENV != 'production'; - - // The path of service worker script - const sw = `/sw.${version}.${lang}.${raw ? 'raw' : 'min'}.js`; - - // Register service worker - navigator.serviceWorker.register(sw).then(registration => { - // 登録成功 - this.logInfo('[sw] Registration successful with scope: ', registration.scope); - }).catch(err => { - // 登録失敗 :( - this.logError('[sw] Registration failed: ', err); - }); - } - - public requests = []; - - /** - * Misskey APIにリクエストします - * @param endpoint エンドポイント名 - * @param data パラメータ - */ - public api(endpoint: string, data: { [x: string]: any } = {}): Promise<{ [x: string]: any }> { - if (++pending === 1) { - spinner = document.createElement('div'); - spinner.setAttribute('id', 'wait'); - document.body.appendChild(spinner); - } - - // Append a credential - if (this.isSignedIn) (data as any).i = this.i.account.token; - - // TODO - //const viaStream = localStorage.getItem('enableExperimental') == 'true'; - - return new Promise((resolve, reject) => { - /*if (viaStream) { - const stream = this.stream.borrow(); - const id = Math.random().toString(); - stream.once(`api-res:${id}`, res => { - resolve(res); - }); - stream.send({ - type: 'api', - id, - endpoint, - data - }); - } else {*/ - const req = { - id: uuid(), - date: new Date(), - name: endpoint, - data, - res: null, - status: null - }; - - if (this.debug) { - this.requests.push(req); - } - - // Send request - fetch(endpoint.indexOf('://') > -1 ? endpoint : `${apiUrl}/${endpoint}`, { - method: 'POST', - body: JSON.stringify(data), - credentials: endpoint === 'signin' ? 'include' : 'omit', - cache: 'no-cache' - }).then(async (res) => { - if (--pending === 0) spinner.parentNode.removeChild(spinner); - - const body = res.status === 204 ? null : await res.json(); - - if (this.debug) { - req.status = res.status; - req.res = body; - } - - if (res.status === 200) { - resolve(body); - } else if (res.status === 204) { - resolve(); - } else { - reject(body.error); - } - }).catch(reject); - /*}*/ - }); - } - - /** - * Misskeyのメタ情報を取得します - * @param force キャッシュを無視するか否か - */ - public getMeta(force = false) { - return new Promise<{ [x: string]: any }>(async (res, rej) => { - if (this.isMetaFetching) { - this.once('_meta_fetched_', () => { - res(this.meta.data); - }); - return; - } - - const expire = 1000 * 60; // 1min - - // forceが有効, meta情報を保持していない or 期限切れ - if (force || this.meta == null || Date.now() - this.meta.chachedAt.getTime() > expire) { - this.isMetaFetching = true; - const meta = await this.api('meta'); - this.meta = { - data: meta, - chachedAt: new Date() - }; - this.isMetaFetching = false; - this.emit('_meta_fetched_'); - res(meta); - } else { - res(this.meta.data); - } - }); - } - - public connections: Connection[] = []; - - public registerStreamConnection(connection: Connection) { - this.connections.push(connection); - } - - public unregisterStreamConnection(connection: Connection) { - this.connections = this.connections.filter(c => c != connection); - } -} - -class WindowSystem extends EventEmitter { - public windows = new Set(); - - public add(window) { - this.windows.add(window); - this.emit('added', window); - } - - public remove(window) { - this.windows.delete(window); - this.emit('removed', window); - } - - public getAll() { - return this.windows; - } -} - -/** - * Convert the URL safe base64 string to a Uint8Array - * @param base64String base64 string - */ -function urlBase64ToUint8Array(base64String: string): Uint8Array { - const padding = '='.repeat((4 - base64String.length % 4) % 4); - const base64 = (base64String + padding) - .replace(/\-/g, '+') - .replace(/_/g, '/'); - - const rawData = window.atob(base64); - const outputArray = new Uint8Array(rawData.length); - - for (let i = 0; i < rawData.length; ++i) { - outputArray[i] = rawData.charCodeAt(i); - } - return outputArray; -} diff --git a/src/web/app/common/scripts/check-for-update.ts b/src/web/app/common/scripts/check-for-update.ts deleted file mode 100644 index 81c1eb9812..0000000000 --- a/src/web/app/common/scripts/check-for-update.ts +++ /dev/null @@ -1,33 +0,0 @@ -import MiOS from '../mios'; -import { version as current } from '../../config'; - -export default async function(mios: MiOS, force = false, silent = false) { - const meta = await mios.getMeta(force); - const newer = meta.version; - - if (newer != current) { - localStorage.setItem('should-refresh', 'true'); - localStorage.setItem('v', newer); - - // Clear cache (serive worker) - try { - if (navigator.serviceWorker.controller) { - navigator.serviceWorker.controller.postMessage('clear'); - } - - navigator.serviceWorker.getRegistrations().then(registrations => { - registrations.forEach(registration => registration.unregister()); - }); - } catch (e) { - console.error(e); - } - - if (!silent) { - alert('%i18n:common.update-available%'.replace('{newer}', newer).replace('{current}', current)); - } - - return newer; - } else { - return null; - } -} diff --git a/src/web/app/common/scripts/compose-notification.ts b/src/web/app/common/scripts/compose-notification.ts deleted file mode 100644 index e1dbd3bc13..0000000000 --- a/src/web/app/common/scripts/compose-notification.ts +++ /dev/null @@ -1,67 +0,0 @@ -import getPostSummary from '../../../../common/get-post-summary'; -import getReactionEmoji from '../../../../common/get-reaction-emoji'; - -type Notification = { - title: string; - body: string; - icon: string; - onclick?: any; -}; - -// TODO: i18n - -export default function(type, data): Notification { - switch (type) { - case 'drive_file_created': - return { - title: 'ファイルがアップロードされました', - body: data.name, - icon: data.url + '?thumbnail&size=64' - }; - - case 'mention': - return { - title: `${data.user.name}さんから:`, - body: getPostSummary(data), - icon: data.user.avatar_url + '?thumbnail&size=64' - }; - - case 'reply': - return { - title: `${data.user.name}さんから返信:`, - body: getPostSummary(data), - icon: data.user.avatar_url + '?thumbnail&size=64' - }; - - case 'quote': - return { - title: `${data.user.name}さんが引用:`, - body: getPostSummary(data), - icon: data.user.avatar_url + '?thumbnail&size=64' - }; - - case 'reaction': - return { - title: `${data.user.name}: ${getReactionEmoji(data.reaction)}:`, - body: getPostSummary(data.post), - icon: data.user.avatar_url + '?thumbnail&size=64' - }; - - case 'unread_messaging_message': - return { - title: `${data.user.name}さんからメッセージ:`, - body: data.text, // TODO: getMessagingMessageSummary(data), - icon: data.user.avatar_url + '?thumbnail&size=64' - }; - - case 'othello_invited': - return { - title: '対局への招待があります', - body: `${data.parent.name}さんから`, - icon: data.parent.avatar_url + '?thumbnail&size=64' - }; - - default: - return null; - } -} diff --git a/src/web/app/common/scripts/contains.ts b/src/web/app/common/scripts/contains.ts deleted file mode 100644 index a5071b3f25..0000000000 --- a/src/web/app/common/scripts/contains.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default (parent, child) => { - let node = child.parentNode; - while (node) { - if (node == parent) return true; - node = node.parentNode; - } - return false; -}; diff --git a/src/web/app/common/scripts/copy-to-clipboard.ts b/src/web/app/common/scripts/copy-to-clipboard.ts deleted file mode 100644 index 3d2741f8d7..0000000000 --- a/src/web/app/common/scripts/copy-to-clipboard.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Clipboardに値をコピー(TODO: 文字列以外も対応) - */ -export default val => { - const form = document.createElement('textarea'); - form.textContent = val; - document.body.appendChild(form); - form.select(); - const result = document.execCommand('copy'); - document.body.removeChild(form); - - return result; -}; diff --git a/src/web/app/common/scripts/date-stringify.ts b/src/web/app/common/scripts/date-stringify.ts deleted file mode 100644 index e51de8833d..0000000000 --- a/src/web/app/common/scripts/date-stringify.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default date => { - if (typeof date == 'string') date = new Date(date); - return ( - date.getFullYear() + '年' + - (date.getMonth() + 1) + '月' + - date.getDate() + '日' + - ' ' + - date.getHours() + '時' + - date.getMinutes() + '分' + - ' ' + - `(${['日', '月', '火', '水', '木', '金', '土'][date.getDay()]})` - ); -}; diff --git a/src/web/app/common/scripts/fuck-ad-block.ts b/src/web/app/common/scripts/fuck-ad-block.ts deleted file mode 100644 index 9bcf7deeff..0000000000 --- a/src/web/app/common/scripts/fuck-ad-block.ts +++ /dev/null @@ -1,21 +0,0 @@ -require('fuckadblock'); - -declare const fuckAdBlock: any; - -export default (os) => { - function adBlockDetected() { - os.apis.dialog({ - title: '%fa:exclamation-triangle%広告ブロッカーを無効にしてください', - text: 'Misskeyは広告を掲載していませんが、広告をブロックする機能が有効だと一部の機能が利用できなかったり、不具合が発生する場合があります。', - actins: [{ - text: 'OK' - }] - }); - } - - if (fuckAdBlock === undefined) { - adBlockDetected(); - } else { - fuckAdBlock.onDetected(adBlockDetected); - } -}; diff --git a/src/web/app/common/scripts/gcd.ts b/src/web/app/common/scripts/gcd.ts deleted file mode 100644 index 9a19f9da66..0000000000 --- a/src/web/app/common/scripts/gcd.ts +++ /dev/null @@ -1,2 +0,0 @@ -const gcd = (a, b) => !b ? a : gcd(b, a % b); -export default gcd; diff --git a/src/web/app/common/scripts/get-kao.ts b/src/web/app/common/scripts/get-kao.ts deleted file mode 100644 index 2168c5be88..0000000000 --- a/src/web/app/common/scripts/get-kao.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default () => [ - '(=^・・^=)', - 'v(‘ω’)v', - '🐡( \'-\' 🐡 )フグパンチ!!!!' -][Math.floor(Math.random() * 3)]; diff --git a/src/web/app/common/scripts/get-median.ts b/src/web/app/common/scripts/get-median.ts deleted file mode 100644 index 91a415d5b2..0000000000 --- a/src/web/app/common/scripts/get-median.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * 中央値を求めます - * @param samples サンプル - */ -export default function(samples) { - if (!samples.length) return 0; - const numbers = samples.slice(0).sort((a, b) => a - b); - const middle = Math.floor(numbers.length / 2); - const isEven = numbers.length % 2 === 0; - return isEven ? (numbers[middle] + numbers[middle - 1]) / 2 : numbers[middle]; -} diff --git a/src/web/app/common/scripts/loading.ts b/src/web/app/common/scripts/loading.ts deleted file mode 100644 index c48e626648..0000000000 --- a/src/web/app/common/scripts/loading.ts +++ /dev/null @@ -1,21 +0,0 @@ -const NProgress = require('nprogress'); -NProgress.configure({ - trickleSpeed: 500, - showSpinner: false -}); - -const root = document.getElementsByTagName('html')[0]; - -export default { - start: () => { - root.classList.add('progress'); - NProgress.start(); - }, - done: () => { - root.classList.remove('progress'); - NProgress.done(); - }, - set: val => { - NProgress.set(val); - } -}; diff --git a/src/web/app/common/scripts/parse-search-query.ts b/src/web/app/common/scripts/parse-search-query.ts deleted file mode 100644 index 512791ecb0..0000000000 --- a/src/web/app/common/scripts/parse-search-query.ts +++ /dev/null @@ -1,53 +0,0 @@ -export default function(qs: string) { - const q = { - text: '' - }; - - qs.split(' ').forEach(x => { - if (/^([a-z_]+?):(.+?)$/.test(x)) { - const [key, value] = x.split(':'); - switch (key) { - case 'user': - q['include_user_usernames'] = value.split(','); - break; - case 'exclude_user': - q['exclude_user_usernames'] = value.split(','); - break; - case 'follow': - q['following'] = value == 'null' ? null : value == 'true'; - break; - case 'reply': - q['reply'] = value == 'null' ? null : value == 'true'; - break; - case 'repost': - q['repost'] = value == 'null' ? null : value == 'true'; - break; - case 'media': - q['media'] = value == 'null' ? null : value == 'true'; - break; - case 'poll': - q['poll'] = value == 'null' ? null : value == 'true'; - break; - case 'until': - case 'since': - // YYYY-MM-DD - if (/^[0-9]+\-[0-9]+\-[0-9]+$/) { - const [yyyy, mm, dd] = value.split('-'); - q[`${key}_date`] = (new Date(parseInt(yyyy, 10), parseInt(mm, 10) - 1, parseInt(dd, 10))).getTime(); - } - break; - default: - q[key] = value; - break; - } - } else { - q.text += x + ' '; - } - }); - - if (q.text) { - q.text = q.text.trim(); - } - - return q; -} diff --git a/src/web/app/common/scripts/streaming/channel.ts b/src/web/app/common/scripts/streaming/channel.ts deleted file mode 100644 index cab5f4edb4..0000000000 --- a/src/web/app/common/scripts/streaming/channel.ts +++ /dev/null @@ -1,13 +0,0 @@ -import Stream from './stream'; -import MiOS from '../../mios'; - -/** - * Channel stream connection - */ -export default class Connection extends Stream { - constructor(os: MiOS, channelId) { - super(os, 'channel', { - channel: channelId - }); - } -} diff --git a/src/web/app/common/scripts/streaming/drive.ts b/src/web/app/common/scripts/streaming/drive.ts deleted file mode 100644 index f11573685e..0000000000 --- a/src/web/app/common/scripts/streaming/drive.ts +++ /dev/null @@ -1,34 +0,0 @@ -import Stream from './stream'; -import StreamManager from './stream-manager'; -import MiOS from '../../mios'; - -/** - * Drive stream connection - */ -export class DriveStream extends Stream { - constructor(os: MiOS, me) { - super(os, 'drive', { - i: me.account.token - }); - } -} - -export class DriveStreamManager extends StreamManager { - private me; - private os: MiOS; - - constructor(os: MiOS, me) { - super(); - - this.me = me; - this.os = os; - } - - public getConnection() { - if (this.connection == null) { - this.connection = new DriveStream(this.os, this.me); - } - - return this.connection; - } -} diff --git a/src/web/app/common/scripts/streaming/home.ts b/src/web/app/common/scripts/streaming/home.ts deleted file mode 100644 index ffcf6e5360..0000000000 --- a/src/web/app/common/scripts/streaming/home.ts +++ /dev/null @@ -1,57 +0,0 @@ -import * as merge from 'object-assign-deep'; - -import Stream from './stream'; -import StreamManager from './stream-manager'; -import MiOS from '../../mios'; - -/** - * Home stream connection - */ -export class HomeStream extends Stream { - constructor(os: MiOS, me) { - super(os, '', { - i: me.account.token - }); - - // 最終利用日時を更新するため定期的にaliveメッセージを送信 - setInterval(() => { - this.send({ type: 'alive' }); - me.account.last_used_at = new Date(); - }, 1000 * 60); - - // 自分の情報が更新されたとき - this.on('i_updated', i => { - if (os.debug) { - console.log('I updated:', i); - } - merge(me, i); - }); - - // トークンが再生成されたとき - // このままではAPIが利用できないので強制的にサインアウトさせる - this.on('my_token_regenerated', () => { - alert('%i18n:common.my-token-regenerated%'); - os.signout(); - }); - } -} - -export class HomeStreamManager extends StreamManager { - private me; - private os: MiOS; - - constructor(os: MiOS, me) { - super(); - - this.me = me; - this.os = os; - } - - public getConnection() { - if (this.connection == null) { - this.connection = new HomeStream(this.os, this.me); - } - - return this.connection; - } -} diff --git a/src/web/app/common/scripts/streaming/messaging-index.ts b/src/web/app/common/scripts/streaming/messaging-index.ts deleted file mode 100644 index 24f0ce0c9f..0000000000 --- a/src/web/app/common/scripts/streaming/messaging-index.ts +++ /dev/null @@ -1,34 +0,0 @@ -import Stream from './stream'; -import StreamManager from './stream-manager'; -import MiOS from '../../mios'; - -/** - * Messaging index stream connection - */ -export class MessagingIndexStream extends Stream { - constructor(os: MiOS, me) { - super(os, 'messaging-index', { - i: me.account.token - }); - } -} - -export class MessagingIndexStreamManager extends StreamManager { - private me; - private os: MiOS; - - constructor(os: MiOS, me) { - super(); - - this.me = me; - this.os = os; - } - - public getConnection() { - if (this.connection == null) { - this.connection = new MessagingIndexStream(this.os, this.me); - } - - return this.connection; - } -} diff --git a/src/web/app/common/scripts/streaming/messaging.ts b/src/web/app/common/scripts/streaming/messaging.ts deleted file mode 100644 index 4c593deb31..0000000000 --- a/src/web/app/common/scripts/streaming/messaging.ts +++ /dev/null @@ -1,20 +0,0 @@ -import Stream from './stream'; -import MiOS from '../../mios'; - -/** - * Messaging stream connection - */ -export class MessagingStream extends Stream { - constructor(os: MiOS, me, otherparty) { - super(os, 'messaging', { - i: me.account.token, - otherparty - }); - - (this as any).on('_connected_', () => { - this.send({ - i: me.account.token - }); - }); - } -} diff --git a/src/web/app/common/scripts/streaming/othello-game.ts b/src/web/app/common/scripts/streaming/othello-game.ts deleted file mode 100644 index f34ef35147..0000000000 --- a/src/web/app/common/scripts/streaming/othello-game.ts +++ /dev/null @@ -1,11 +0,0 @@ -import Stream from './stream'; -import MiOS from '../../mios'; - -export class OthelloGameStream extends Stream { - constructor(os: MiOS, me, game) { - super(os, 'othello-game', { - i: me ? me.account.token : null, - game: game.id - }); - } -} diff --git a/src/web/app/common/scripts/streaming/othello.ts b/src/web/app/common/scripts/streaming/othello.ts deleted file mode 100644 index 8c6f4b9c3c..0000000000 --- a/src/web/app/common/scripts/streaming/othello.ts +++ /dev/null @@ -1,31 +0,0 @@ -import StreamManager from './stream-manager'; -import Stream from './stream'; -import MiOS from '../../mios'; - -export class OthelloStream extends Stream { - constructor(os: MiOS, me) { - super(os, 'othello', { - i: me.account.token - }); - } -} - -export class OthelloStreamManager extends StreamManager { - private me; - private os: MiOS; - - constructor(os: MiOS, me) { - super(); - - this.me = me; - this.os = os; - } - - public getConnection() { - if (this.connection == null) { - this.connection = new OthelloStream(this.os, this.me); - } - - return this.connection; - } -} diff --git a/src/web/app/common/scripts/streaming/requests.ts b/src/web/app/common/scripts/streaming/requests.ts deleted file mode 100644 index 5bec30143f..0000000000 --- a/src/web/app/common/scripts/streaming/requests.ts +++ /dev/null @@ -1,30 +0,0 @@ -import Stream from './stream'; -import StreamManager from './stream-manager'; -import MiOS from '../../mios'; - -/** - * Requests stream connection - */ -export class RequestsStream extends Stream { - constructor(os: MiOS) { - super(os, 'requests'); - } -} - -export class RequestsStreamManager extends StreamManager { - private os: MiOS; - - constructor(os: MiOS) { - super(); - - this.os = os; - } - - public getConnection() { - if (this.connection == null) { - this.connection = new RequestsStream(this.os); - } - - return this.connection; - } -} diff --git a/src/web/app/common/scripts/streaming/server.ts b/src/web/app/common/scripts/streaming/server.ts deleted file mode 100644 index 3d35ef4d9d..0000000000 --- a/src/web/app/common/scripts/streaming/server.ts +++ /dev/null @@ -1,30 +0,0 @@ -import Stream from './stream'; -import StreamManager from './stream-manager'; -import MiOS from '../../mios'; - -/** - * Server stream connection - */ -export class ServerStream extends Stream { - constructor(os: MiOS) { - super(os, 'server'); - } -} - -export class ServerStreamManager extends StreamManager { - private os: MiOS; - - constructor(os: MiOS) { - super(); - - this.os = os; - } - - public getConnection() { - if (this.connection == null) { - this.connection = new ServerStream(this.os); - } - - return this.connection; - } -} diff --git a/src/web/app/common/scripts/streaming/stream-manager.ts b/src/web/app/common/scripts/streaming/stream-manager.ts deleted file mode 100644 index 568b8b0372..0000000000 --- a/src/web/app/common/scripts/streaming/stream-manager.ts +++ /dev/null @@ -1,108 +0,0 @@ -import { EventEmitter } from 'eventemitter3'; -import * as uuid from 'uuid'; -import Connection from './stream'; - -/** - * ストリーム接続を管理するクラス - * 複数の場所から同じストリームを利用する際、接続をまとめたりする - */ -export default abstract class StreamManager extends EventEmitter { - private _connection: T = null; - - private disposeTimerId: any; - - /** - * コネクションを必要としているユーザー - */ - private users = []; - - protected set connection(connection: T) { - this._connection = connection; - - if (this._connection == null) { - this.emit('disconnected'); - } else { - this.emit('connected', this._connection); - - this._connection.on('_connected_', () => { - this.emit('_connected_'); - }); - - this._connection.on('_disconnected_', () => { - this.emit('_disconnected_'); - }); - - this._connection.user = 'Managed'; - } - } - - protected get connection() { - return this._connection; - } - - /** - * コネクションを持っているか否か - */ - public get hasConnection() { - return this._connection != null; - } - - public get state(): string { - if (!this.hasConnection) return 'no-connection'; - return this._connection.state; - } - - /** - * コネクションを要求します - */ - public abstract getConnection(): T; - - /** - * 現在接続しているコネクションを取得します - */ - public borrow() { - return this._connection; - } - - /** - * コネクションを要求するためのユーザーIDを発行します - */ - public use() { - // タイマー解除 - if (this.disposeTimerId) { - clearTimeout(this.disposeTimerId); - this.disposeTimerId = null; - } - - // ユーザーID生成 - const userId = uuid(); - - this.users.push(userId); - - this._connection.user = `Managed (${ this.users.length })`; - - return userId; - } - - /** - * コネクションを利用し終わってもう必要ないことを通知します - * @param userId use で発行したユーザーID - */ - public dispose(userId) { - this.users = this.users.filter(id => id != userId); - - this._connection.user = `Managed (${ this.users.length })`; - - // 誰もコネクションの利用者がいなくなったら - if (this.users.length == 0) { - // また直ぐに再利用される可能性があるので、一定時間待ち、 - // 新たな利用者が現れなければコネクションを切断する - this.disposeTimerId = setTimeout(() => { - this.disposeTimerId = null; - - this.connection.close(); - this.connection = null; - }, 3000); - } - } -} diff --git a/src/web/app/common/scripts/streaming/stream.ts b/src/web/app/common/scripts/streaming/stream.ts deleted file mode 100644 index 3912186ad3..0000000000 --- a/src/web/app/common/scripts/streaming/stream.ts +++ /dev/null @@ -1,137 +0,0 @@ -import { EventEmitter } from 'eventemitter3'; -import * as uuid from 'uuid'; -import * as ReconnectingWebsocket from 'reconnecting-websocket'; -import { wsUrl } from '../../../config'; -import MiOS from '../../mios'; - -/** - * Misskey stream connection - */ -export default class Connection extends EventEmitter { - public state: string; - private buffer: any[]; - public socket: ReconnectingWebsocket; - public name: string; - public connectedAt: Date; - public user: string = null; - public in: number = 0; - public out: number = 0; - public inout: Array<{ - type: 'in' | 'out', - at: Date, - data: string - }> = []; - public id: string; - public isSuspended = false; - private os: MiOS; - - constructor(os: MiOS, endpoint, params?) { - super(); - - //#region BIND - this.onOpen = this.onOpen.bind(this); - this.onClose = this.onClose.bind(this); - this.onMessage = this.onMessage.bind(this); - this.send = this.send.bind(this); - this.close = this.close.bind(this); - //#endregion - - this.id = uuid(); - this.os = os; - this.name = endpoint; - this.state = 'initializing'; - this.buffer = []; - - const query = params - ? Object.keys(params) - .map(k => encodeURIComponent(k) + '=' + encodeURIComponent(params[k])) - .join('&') - : null; - - this.socket = new ReconnectingWebsocket(`${wsUrl}/${endpoint}${query ? '?' + query : ''}`); - this.socket.addEventListener('open', this.onOpen); - this.socket.addEventListener('close', this.onClose); - this.socket.addEventListener('message', this.onMessage); - - // Register this connection for debugging - this.os.registerStreamConnection(this); - } - - /** - * Callback of when open connection - */ - private onOpen() { - this.state = 'connected'; - this.emit('_connected_'); - - this.connectedAt = new Date(); - - // バッファーを処理 - const _buffer = [].concat(this.buffer); // Shallow copy - this.buffer = []; // Clear buffer - _buffer.forEach(data => { - this.send(data); // Resend each buffered messages - - if (this.os.debug) { - this.out++; - this.inout.push({ type: 'out', at: new Date(), data }); - } - }); - } - - /** - * Callback of when close connection - */ - private onClose() { - this.state = 'reconnecting'; - this.emit('_disconnected_'); - } - - /** - * Callback of when received a message from connection - */ - private onMessage(message) { - if (this.isSuspended) return; - - if (this.os.debug) { - this.in++; - this.inout.push({ type: 'in', at: new Date(), data: message.data }); - } - - try { - const msg = JSON.parse(message.data); - if (msg.type) this.emit(msg.type, msg.body); - } catch (e) { - // noop - } - } - - /** - * Send a message to connection - */ - public send(data) { - if (this.isSuspended) return; - - // まだ接続が確立されていなかったらバッファリングして次に接続した時に送信する - if (this.state != 'connected') { - this.buffer.push(data); - return; - } - - if (this.os.debug) { - this.out++; - this.inout.push({ type: 'out', at: new Date(), data }); - } - - this.socket.send(JSON.stringify(data)); - } - - /** - * Close this connection - */ - public close() { - this.os.unregisterStreamConnection(this); - this.socket.removeEventListener('open', this.onOpen); - this.socket.removeEventListener('message', this.onMessage); - } -} diff --git a/src/web/app/common/views/components/autocomplete.vue b/src/web/app/common/views/components/autocomplete.vue deleted file mode 100644 index 8afa291e3c..0000000000 --- a/src/web/app/common/views/components/autocomplete.vue +++ /dev/null @@ -1,306 +0,0 @@ - - - - - diff --git a/src/web/app/common/views/components/connect-failed.troubleshooter.vue b/src/web/app/common/views/components/connect-failed.troubleshooter.vue deleted file mode 100644 index cadbd36ba4..0000000000 --- a/src/web/app/common/views/components/connect-failed.troubleshooter.vue +++ /dev/null @@ -1,137 +0,0 @@ - - - - - diff --git a/src/web/app/common/views/components/connect-failed.vue b/src/web/app/common/views/components/connect-failed.vue deleted file mode 100644 index 185250dbd8..0000000000 --- a/src/web/app/common/views/components/connect-failed.vue +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - diff --git a/src/web/app/common/views/components/ellipsis.vue b/src/web/app/common/views/components/ellipsis.vue deleted file mode 100644 index 07349902de..0000000000 --- a/src/web/app/common/views/components/ellipsis.vue +++ /dev/null @@ -1,26 +0,0 @@ - - - diff --git a/src/web/app/common/views/components/file-type-icon.vue b/src/web/app/common/views/components/file-type-icon.vue deleted file mode 100644 index b7e868d1f7..0000000000 --- a/src/web/app/common/views/components/file-type-icon.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - diff --git a/src/web/app/common/views/components/forkit.vue b/src/web/app/common/views/components/forkit.vue deleted file mode 100644 index 6f334b965a..0000000000 --- a/src/web/app/common/views/components/forkit.vue +++ /dev/null @@ -1,42 +0,0 @@ - - - diff --git a/src/web/app/common/views/components/index.ts b/src/web/app/common/views/components/index.ts deleted file mode 100644 index b58ba37ecb..0000000000 --- a/src/web/app/common/views/components/index.ts +++ /dev/null @@ -1,51 +0,0 @@ -import Vue from 'vue'; - -import signin from './signin.vue'; -import signup from './signup.vue'; -import forkit from './forkit.vue'; -import nav from './nav.vue'; -import postHtml from './post-html'; -import poll from './poll.vue'; -import pollEditor from './poll-editor.vue'; -import reactionIcon from './reaction-icon.vue'; -import reactionsViewer from './reactions-viewer.vue'; -import time from './time.vue'; -import timer from './timer.vue'; -import mediaList from './media-list.vue'; -import uploader from './uploader.vue'; -import specialMessage from './special-message.vue'; -import streamIndicator from './stream-indicator.vue'; -import ellipsis from './ellipsis.vue'; -import messaging from './messaging.vue'; -import messagingRoom from './messaging-room.vue'; -import urlPreview from './url-preview.vue'; -import twitterSetting from './twitter-setting.vue'; -import fileTypeIcon from './file-type-icon.vue'; -import Switch from './switch.vue'; -import Othello from './othello.vue'; -import welcomeTimeline from './welcome-timeline.vue'; - -Vue.component('mk-signin', signin); -Vue.component('mk-signup', signup); -Vue.component('mk-forkit', forkit); -Vue.component('mk-nav', nav); -Vue.component('mk-post-html', postHtml); -Vue.component('mk-poll', poll); -Vue.component('mk-poll-editor', pollEditor); -Vue.component('mk-reaction-icon', reactionIcon); -Vue.component('mk-reactions-viewer', reactionsViewer); -Vue.component('mk-time', time); -Vue.component('mk-timer', timer); -Vue.component('mk-media-list', mediaList); -Vue.component('mk-uploader', uploader); -Vue.component('mk-special-message', specialMessage); -Vue.component('mk-stream-indicator', streamIndicator); -Vue.component('mk-ellipsis', ellipsis); -Vue.component('mk-messaging', messaging); -Vue.component('mk-messaging-room', messagingRoom); -Vue.component('mk-url-preview', urlPreview); -Vue.component('mk-twitter-setting', twitterSetting); -Vue.component('mk-file-type-icon', fileTypeIcon); -Vue.component('mk-switch', Switch); -Vue.component('mk-othello', Othello); -Vue.component('mk-welcome-timeline', welcomeTimeline); diff --git a/src/web/app/common/views/components/media-list.vue b/src/web/app/common/views/components/media-list.vue deleted file mode 100644 index 64172ad0b4..0000000000 --- a/src/web/app/common/views/components/media-list.vue +++ /dev/null @@ -1,57 +0,0 @@ - - - - - diff --git a/src/web/app/common/views/components/messaging-room.form.vue b/src/web/app/common/views/components/messaging-room.form.vue deleted file mode 100644 index 01886b19c8..0000000000 --- a/src/web/app/common/views/components/messaging-room.form.vue +++ /dev/null @@ -1,305 +0,0 @@ - - - - - diff --git a/src/web/app/common/views/components/messaging-room.message.vue b/src/web/app/common/views/components/messaging-room.message.vue deleted file mode 100644 index 5f2eb1ba86..0000000000 --- a/src/web/app/common/views/components/messaging-room.message.vue +++ /dev/null @@ -1,263 +0,0 @@ - - - - - diff --git a/src/web/app/common/views/components/messaging-room.vue b/src/web/app/common/views/components/messaging-room.vue deleted file mode 100644 index 6ff808b617..0000000000 --- a/src/web/app/common/views/components/messaging-room.vue +++ /dev/null @@ -1,377 +0,0 @@ - - - - - diff --git a/src/web/app/common/views/components/messaging.vue b/src/web/app/common/views/components/messaging.vue deleted file mode 100644 index 88574b94d1..0000000000 --- a/src/web/app/common/views/components/messaging.vue +++ /dev/null @@ -1,463 +0,0 @@ - - - - - diff --git a/src/web/app/common/views/components/nav.vue b/src/web/app/common/views/components/nav.vue deleted file mode 100644 index 8ce75d3529..0000000000 --- a/src/web/app/common/views/components/nav.vue +++ /dev/null @@ -1,41 +0,0 @@ - - - - - diff --git a/src/web/app/common/views/components/othello.game.vue b/src/web/app/common/views/components/othello.game.vue deleted file mode 100644 index 414d819a55..0000000000 --- a/src/web/app/common/views/components/othello.game.vue +++ /dev/null @@ -1,324 +0,0 @@ - - - - - diff --git a/src/web/app/common/views/components/othello.gameroom.vue b/src/web/app/common/views/components/othello.gameroom.vue deleted file mode 100644 index 38a25f6686..0000000000 --- a/src/web/app/common/views/components/othello.gameroom.vue +++ /dev/null @@ -1,42 +0,0 @@ - - - diff --git a/src/web/app/common/views/components/othello.room.vue b/src/web/app/common/views/components/othello.room.vue deleted file mode 100644 index 3965414836..0000000000 --- a/src/web/app/common/views/components/othello.room.vue +++ /dev/null @@ -1,297 +0,0 @@ - - - - - - - - - diff --git a/src/web/app/common/views/components/othello.vue b/src/web/app/common/views/components/othello.vue deleted file mode 100644 index d650322341..0000000000 --- a/src/web/app/common/views/components/othello.vue +++ /dev/null @@ -1,311 +0,0 @@ - - - - - diff --git a/src/web/app/common/views/components/poll-editor.vue b/src/web/app/common/views/components/poll-editor.vue deleted file mode 100644 index 47d901d7b1..0000000000 --- a/src/web/app/common/views/components/poll-editor.vue +++ /dev/null @@ -1,142 +0,0 @@ - - - - - diff --git a/src/web/app/common/views/components/poll.vue b/src/web/app/common/views/components/poll.vue deleted file mode 100644 index 8156c8bc58..0000000000 --- a/src/web/app/common/views/components/poll.vue +++ /dev/null @@ -1,124 +0,0 @@ - - - - - diff --git a/src/web/app/common/views/components/post-html.ts b/src/web/app/common/views/components/post-html.ts deleted file mode 100644 index 98da86617d..0000000000 --- a/src/web/app/common/views/components/post-html.ts +++ /dev/null @@ -1,137 +0,0 @@ -import Vue from 'vue'; -import * as emojilib from 'emojilib'; -import getAcct from '../../../../../common/user/get-acct'; -import { url } from '../../../config'; -import MkUrl from './url.vue'; - -const flatten = list => list.reduce( - (a, b) => a.concat(Array.isArray(b) ? flatten(b) : b), [] -); - -export default Vue.component('mk-post-html', { - props: { - ast: { - type: Array, - required: true - }, - shouldBreak: { - type: Boolean, - default: true - }, - i: { - type: Object, - default: null - } - }, - render(createElement) { - const els = flatten((this as any).ast.map(token => { - switch (token.type) { - case 'text': - const text = token.content.replace(/(\r\n|\n|\r)/g, '\n'); - - if ((this as any).shouldBreak) { - const x = text.split('\n') - .map(t => t == '' ? [createElement('br')] : [createElement('span', t), createElement('br')]); - x[x.length - 1].pop(); - return x; - } else { - return createElement('span', text.replace(/\n/g, ' ')); - } - - case 'bold': - return createElement('strong', token.bold); - - case 'url': - return createElement(MkUrl, { - props: { - url: token.content, - target: '_blank' - } - }); - - case 'link': - return createElement('a', { - attrs: { - class: 'link', - href: token.url, - target: '_blank', - title: token.url - } - }, token.title); - - case 'mention': - return (createElement as any)('a', { - attrs: { - href: `${url}/@${getAcct(token)}`, - target: '_blank', - dataIsMe: (this as any).i && getAcct((this as any).i) == getAcct(token) - }, - directives: [{ - name: 'user-preview', - value: token.content - }] - }, token.content); - - case 'hashtag': - return createElement('a', { - attrs: { - href: `${url}/search?q=${token.content}`, - target: '_blank' - } - }, token.content); - - case 'code': - return createElement('pre', [ - createElement('code', { - domProps: { - innerHTML: token.html - } - }) - ]); - - case 'inline-code': - return createElement('code', token.html); - - case 'quote': - const text2 = token.quote.replace(/(\r\n|\n|\r)/g, '\n'); - - if ((this as any).shouldBreak) { - const x = text2.split('\n') - .map(t => [createElement('span', t), createElement('br')]); - x[x.length - 1].pop(); - return createElement('div', { - attrs: { - class: 'quote' - } - }, x); - } else { - return createElement('span', { - attrs: { - class: 'quote' - } - }, text2.replace(/\n/g, ' ')); - } - - case 'emoji': - const emoji = emojilib.lib[token.emoji]; - return createElement('span', emoji ? emoji.char : token.content); - - default: - console.log('unknown ast type:', token.type); - } - })); - - const _els = []; - els.forEach((el, i) => { - if (el.tag == 'br') { - if (els[i - 1].tag != 'div') { - _els.push(el); - } - } else { - _els.push(el); - } - }); - - return createElement('span', _els); - } -}); diff --git a/src/web/app/common/views/components/post-menu.vue b/src/web/app/common/views/components/post-menu.vue deleted file mode 100644 index a53680e55a..0000000000 --- a/src/web/app/common/views/components/post-menu.vue +++ /dev/null @@ -1,141 +0,0 @@ - - - - - diff --git a/src/web/app/common/views/components/reaction-icon.vue b/src/web/app/common/views/components/reaction-icon.vue deleted file mode 100644 index 7d24f4f9e9..0000000000 --- a/src/web/app/common/views/components/reaction-icon.vue +++ /dev/null @@ -1,28 +0,0 @@ - - - - - diff --git a/src/web/app/common/views/components/reaction-picker.vue b/src/web/app/common/views/components/reaction-picker.vue deleted file mode 100644 index df8100f2fc..0000000000 --- a/src/web/app/common/views/components/reaction-picker.vue +++ /dev/null @@ -1,191 +0,0 @@ - - - - - diff --git a/src/web/app/common/views/components/reactions-viewer.vue b/src/web/app/common/views/components/reactions-viewer.vue deleted file mode 100644 index f6a27d9139..0000000000 --- a/src/web/app/common/views/components/reactions-viewer.vue +++ /dev/null @@ -1,49 +0,0 @@ - - - - - diff --git a/src/web/app/common/views/components/signin.vue b/src/web/app/common/views/components/signin.vue deleted file mode 100644 index 2434684085..0000000000 --- a/src/web/app/common/views/components/signin.vue +++ /dev/null @@ -1,142 +0,0 @@ - - - - - diff --git a/src/web/app/common/views/components/signup.vue b/src/web/app/common/views/components/signup.vue deleted file mode 100644 index c2e78aa8a3..0000000000 --- a/src/web/app/common/views/components/signup.vue +++ /dev/null @@ -1,287 +0,0 @@ - - - - - diff --git a/src/web/app/common/views/components/special-message.vue b/src/web/app/common/views/components/special-message.vue deleted file mode 100644 index 2fd4d6515e..0000000000 --- a/src/web/app/common/views/components/special-message.vue +++ /dev/null @@ -1,42 +0,0 @@ - - - - - diff --git a/src/web/app/common/views/components/stream-indicator.vue b/src/web/app/common/views/components/stream-indicator.vue deleted file mode 100644 index 1f18fa76ed..0000000000 --- a/src/web/app/common/views/components/stream-indicator.vue +++ /dev/null @@ -1,86 +0,0 @@ - - - - - diff --git a/src/web/app/common/views/components/switch.vue b/src/web/app/common/views/components/switch.vue deleted file mode 100644 index 19a4adc3de..0000000000 --- a/src/web/app/common/views/components/switch.vue +++ /dev/null @@ -1,190 +0,0 @@ - - - - - diff --git a/src/web/app/common/views/components/time.vue b/src/web/app/common/views/components/time.vue deleted file mode 100644 index 6e0d2b0dcb..0000000000 --- a/src/web/app/common/views/components/time.vue +++ /dev/null @@ -1,76 +0,0 @@ - - - diff --git a/src/web/app/common/views/components/timer.vue b/src/web/app/common/views/components/timer.vue deleted file mode 100644 index a3c4f01b77..0000000000 --- a/src/web/app/common/views/components/timer.vue +++ /dev/null @@ -1,49 +0,0 @@ - - - diff --git a/src/web/app/common/views/components/twitter-setting.vue b/src/web/app/common/views/components/twitter-setting.vue deleted file mode 100644 index 15968d20a6..0000000000 --- a/src/web/app/common/views/components/twitter-setting.vue +++ /dev/null @@ -1,66 +0,0 @@ - - - - - diff --git a/src/web/app/common/views/components/uploader.vue b/src/web/app/common/views/components/uploader.vue deleted file mode 100644 index 73006b16e9..0000000000 --- a/src/web/app/common/views/components/uploader.vue +++ /dev/null @@ -1,212 +0,0 @@ - - - - - diff --git a/src/web/app/common/views/components/url-preview.vue b/src/web/app/common/views/components/url-preview.vue deleted file mode 100644 index e91e510550..0000000000 --- a/src/web/app/common/views/components/url-preview.vue +++ /dev/null @@ -1,142 +0,0 @@ -