diff --git a/.travis.yml b/.travis.yml index d2552bb46..c86b737d2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ notifications: language: node_js node_js: - - 9.8.0 + - 10.1.0 env: - CXX=g++-4.8 NODE_ENV=production @@ -22,19 +22,14 @@ addons: cache: directories: - # パッケージをキャッシュすると本来は動かないはずなのに動いてしまう - # 場合があり危険なのでキャッシュはしない: - #- node_modules + - node_modules services: - mongodb - redis-server before_script: - # Travisはproduction環境なので(10行目により)、 - # npm install しただけでは devDependencies はインストールされないので、 - # --only=dev オプションを付けてそれらもインストールされるようにする: - - npm install --only=dev + - npm install # 設定ファイルを配置 - cp ./.travis/default.yml ./.config diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 000000000..280d6a99a --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,41 @@ +# appveyor file +# http://www.appveyor.com/docs/appveyor-yml + +environment: + matrix: + - nodejs_version: 10.1.0 + +cache: + - node_modules + +build: off + +install: + # Update Node.js + # 標準で入っている Node.js を更新します (2014/11/13 時点では、v0.10.32 が標準) + - ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) + - node --version + + # Update NPM + - npm install -g npm + - npm --version + + # Update node-gyp + # 必須! node-gyp のバージョンを上げないと、ネイティブモジュールのコンパイルに失敗します + - npm install -g node-gyp + + - npm install + +init: + # git clone の際の改行を変換しないようにします + - git config --global core.autocrlf false + +before_test: + # 設定ファイルを配置 + - cp ./.travis/default.yml ./.config + - cp ./.travis/test.yml ./.config + + - npm run build + +test_script: + - npm test diff --git a/gulpfile.ts b/gulpfile.ts index a9ccbbdb5..fa1155878 100644 --- a/gulpfile.ts +++ b/gulpfile.ts @@ -20,6 +20,7 @@ import * as replace from 'gulp-replace'; import * as htmlmin from 'gulp-htmlmin'; const uglifyes = require('uglify-es'); +import locales from './locales'; import { fa } from './src/build/fa'; const client = require('./built/client/meta.json'); import config from './src/config'; @@ -122,6 +123,7 @@ gulp.task('build:client:script', () => .pipe(replace('VERSION', JSON.stringify(client.version))) .pipe(replace('API', JSON.stringify(config.api_url))) .pipe(replace('ENV', JSON.stringify(env))) + .pipe(replace('LANGS', JSON.stringify(Object.keys(locales)))) .pipe(isProduction ? uglify({ toplevel: true } as any) : gutil.noop()) diff --git a/locales/en.yml b/locales/en.yml index da290d842..9f2a0be3a 100644 --- a/locales/en.yml +++ b/locales/en.yml @@ -1,7 +1,7 @@ --- meta: - lang: "日本語" - divider: "" + lang: "English" + divider: " " common: misskey: "Share everything with others using Misskey." time: diff --git a/locales/index.ts b/locales/index.ts index 89d18190f..319d178e0 100644 --- a/locales/index.ts +++ b/locales/index.ts @@ -11,6 +11,7 @@ const loadLang = lang => yaml.safeLoad( const native = loadLang('ja'); const langs = { + 'de': loadLang('de'), 'en': loadLang('en'), 'fr': loadLang('fr'), 'ja': native, diff --git a/locales/ja.yml b/locales/ja.yml index d8e15fb3c..d71251d20 100644 --- a/locales/ja.yml +++ b/locales/ja.yml @@ -1,3 +1,7 @@ +meta: + lang: "日本語" + divider: "" + common: misskey: "Misskeyで皆と共有しよう。" @@ -253,6 +257,32 @@ desktop/views/components/drive.vue: upload: "ファイルをアップロード" url-upload: "URLからアップロード" +desktop/views/components/home.vue: + done: "完了" + add-widget: "ウィジェットを追加:" + profile: "プロフィール" + calendar: "カレンダー" + timemachine: "カレンダー(タイムマシン)" + activity: "アクティビティ" + rss: "RSSリーダー" + trends: "トレンド" + photostream: "フォトストリーム" + slideshow: "スライドショー" + version: "バージョン" + broadcast: "ブロードキャスト" + notifications: "通知" + users: "おすすめユーザー" + polls: "投票" + post-form: "投稿フォーム" + messaging: "メッセージ" + channel: "チャンネル" + access-log: "アクセスログ" + server: "サーバー情報" + donation: "寄付のお願い" + nav: "ナビゲーション" + tips: "ヒント" + add: "追加" + desktop/views/components/messaging-window.vue: title: "メッセージ" @@ -312,6 +342,7 @@ desktop/views/components/settings.vue: mute: "ミュート" drive: "ドライブ" security: "セキュリティ" + signin: "サインイン履歴" password: "パスワード" 2fa: "二段階認証" other: "その他" @@ -341,6 +372,7 @@ desktop/views/components/settings.api.vue: caution: "アカウントを不正利用される可能性があるため、このトークンは第三者に教えないでください(アプリなどにも入力しないでください)。" regeneration-of-token: "万が一このトークンが漏れたりその可能性がある場合はトークンを再生成できます。" regenerate-token: "トークンを再生成" + token: "Token:" enter-password: "パスワードを入力してください" desktop/views/components/settings.app.vue: @@ -396,6 +428,20 @@ desktop/views/components/ui.header.post.vue: desktop/views/components/ui.header.search.vue: placeholder: "検索" +desktop/views/components/user-lists-window.vue: + create-list: "リストを作成" + +desktop/views/components/user-preview.vue: + notes: "投稿" + following: "フォロー" + followers: "フォロワー" + +desktop/views/components/users-list.vue: + all: "すべて" + iknow: "知り合い" + load-more: "もっと" + fetching: "読み込んでいます" + desktop/views/pages/note.vue: prev: "前の投稿" next: "次の投稿" @@ -510,6 +556,9 @@ mobile/views/components/notifications.vue: mobile/views/components/post-form.vue: submit: "投稿" + reply: "返信" + renote: "Renote" + renote-placeholder: "この投稿を引用... (オプション)" reply-placeholder: "この投稿への返信..." note-placeholder: "いまどうしてる?" diff --git a/package.json b/package.json index 544dda603..6b7f63d6c 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "misskey", "author": "syuilo ", - "version": "2.6.2", - "clientVersion": "1.0.5260", + "version": "2.10.0", + "clientVersion": "1.0.5406", "codename": "nighthike", "main": "./built/index.js", "private": true, @@ -31,13 +31,11 @@ "@prezzemolo/rap": "0.1.2", "@prezzemolo/zip": "0.0.3", "@types/bcryptjs": "2.4.1", - "@types/chai": "4.1.3", - "@types/chai-http": "3.0.4", "@types/debug": "0.0.30", "@types/deep-equal": "1.0.1", - "@types/elasticsearch": "5.0.22", + "@types/elasticsearch": "5.0.23", "@types/eventemitter3": "2.0.2", - "@types/gm": "1.17.33", + "@types/gm": "1.18.0", "@types/gulp": "3.8.36", "@types/gulp-htmlmin": "1.3.32", "@types/gulp-mocha": "0.0.32", @@ -58,18 +56,18 @@ "@types/koa-multer": "1.0.0", "@types/koa-router": "7.0.28", "@types/koa-send": "4.1.1", - "@types/koa-views": "^2.0.3", + "@types/koa-views": "2.0.3", "@types/koa__cors": "2.2.2", "@types/kue": "0.11.8", "@types/license-checker": "15.0.0", "@types/mkdirp": "0.5.2", "@types/mocha": "5.2.0", - "@types/mongodb": "3.0.15", + "@types/mongodb": "3.0.18", "@types/monk": "6.0.0", "@types/ms": "0.7.30", - "@types/node": "9.6.6", + "@types/node": "10.1.0", "@types/nopt": "3.0.29", - "@types/parse5": "^3.0.0", + "@types/parse5": "3.0.0", "@types/pug": "2.0.4", "@types/qrcode": "0.8.1", "@types/ratelimiter": "2.1.28", @@ -78,22 +76,20 @@ "@types/request-promise-native": "1.0.14", "@types/rimraf": "2.0.2", "@types/seedrandom": "2.4.27", - "@types/single-line-log": "^1.1.0", + "@types/single-line-log": "1.1.0", "@types/speakeasy": "2.0.2", "@types/tmp": "0.0.33", "@types/uuid": "3.4.3", - "@types/webpack": "4.1.4", + "@types/webpack": "4.1.7", "@types/webpack-stream": "3.2.10", - "@types/websocket": "0.0.38", - "@types/ws": "4.0.2", + "@types/websocket": "0.0.39", + "@types/ws": "5.1.1", "animejs": "2.2.0", - "autosize": "4.0.1", + "autosize": "4.0.2", "autwh": "0.1.0", "bcryptjs": "2.4.3", "bootstrap-vue": "2.0.0-rc.6", "cafy": "8.0.0", - "chai": "4.1.2", - "chai-http": "4.0.0", "chalk": "2.4.1", "crc-32": "1.2.0", "css-loader": "0.28.11", @@ -101,9 +97,9 @@ "deep-equal": "1.0.1", "deepcopy": "0.6.3", "diskusage": "0.2.4", - "dompurify": "1.0.3", + "dompurify": "1.0.4", "elasticsearch": "14.2.2", - "element-ui": "2.3.6", + "element-ui": "2.3.8", "emojilib": "2.2.12", "escape-regexp": "0.0.1", "eslint": "4.19.1", @@ -111,7 +107,7 @@ "eventemitter3": "3.1.0", "exif-js": "2.3.0", "file-loader": "1.1.11", - "file-type": "7.6.0", + "file-type": "8.0.0", "fuckadblock": "3.2.1", "gm": "1.23.1", "gulp": "3.9.1", @@ -120,15 +116,15 @@ "gulp-imagemin": "4.1.0", "gulp-mocha": "5.0.0", "gulp-pug": "4.0.1", - "gulp-rename": "1.2.2", - "gulp-replace": "0.6.1", + "gulp-rename": "1.2.3", + "gulp-replace": "1.0.0", "gulp-sourcemaps": "2.6.4", "gulp-stylus": "2.7.0", "gulp-tslint": "8.1.3", "gulp-typescript": "4.0.2", "gulp-uglify": "3.0.0", "gulp-util": "3.0.8", - "hard-source-webpack-plugin": "0.6.4", + "hard-source-webpack-plugin": "0.6.7", "highlight.js": "9.12.0", "html-minifier": "3.5.15", "http-signature": "1.2.0", @@ -136,7 +132,7 @@ "is-root": "2.0.0", "is-url": "1.2.4", "js-yaml": "3.11.0", - "jsdom": "11.9.0", + "jsdom": "11.10.0", "koa": "2.5.1", "koa-bodyparser": "4.2.0", "koa-compress": "3.0.0", @@ -148,16 +144,16 @@ "koa-router": "7.4.0", "koa-send": "4.1.3", "koa-slow": "2.1.0", - "koa-views": "^6.1.4", + "koa-views": "6.1.4", "kue": "0.11.6", - "license-checker": "18.0.0", + "license-checker": "19.0.0", "loader-utils": "1.1.0", "mecab-async": "0.1.2", "mkdirp": "0.5.1", "mocha": "5.1.1", "moji": "0.5.1", - "mongodb": "3.0.7", - "monk": "6.0.5", + "mongodb": "3.0.8", + "monk": "6.0.6", "ms": "2.1.1", "nan": "2.10.0", "node-sass": "4.9.0", @@ -167,10 +163,10 @@ "object-assign-deep": "0.4.0", "on-build-webpack": "0.1.0", "os-utils": "0.0.14", - "parse5": "^4.0.0", + "parse5": "4.0.0", "progress-bar-webpack-plugin": "1.11.0", "prominence": "0.2.0", - "promise-sequential": "^1.1.1", + "promise-sequential": "1.1.1", "pug": "2.0.3", "punycode": "2.1.0", "qrcode": "1.2.0", @@ -178,14 +174,14 @@ "recaptcha-promise": "0.1.3", "reconnecting-websocket": "3.2.2", "redis": "2.8.0", - "request": "2.85.0", + "request": "2.86.0", "request-promise-native": "1.0.5", "rimraf": "2.6.2", "rndstr": "1.0.0", "s-age": "1.1.2", "sass-loader": "7.0.1", "seedrandom": "2.4.3", - "single-line-log": "^1.1.2", + "single-line-log": "1.1.2", "speakeasy": "2.0.0", "style-loader": "0.21.0", "stylus": "0.54.5", @@ -196,9 +192,9 @@ "tcp-port-used": "0.1.2", "textarea-caret": "3.1.0", "tmp": "0.0.33", - "ts-loader": "4.2.0", - "ts-node": "6.0.1", - "tslint": "5.9.1", + "ts-loader": "4.3.0", + "ts-node": "6.0.3", + "tslint": "5.10.0", "typescript": "2.8.3", "typescript-eslint-parser": "15.0.0", "uglify-es": "3.3.9", @@ -209,16 +205,15 @@ "vue-cropperjs": "2.2.0", "vue-js-modal": "1.3.13", "vue-json-tree-view": "2.1.4", - "vue-loader": "15.0.3", + "vue-loader": "15.0.11", "vue-router": "3.0.1", "vue-template-compiler": "2.5.16", "vuedraggable": "2.16.0", "vuex": "3.0.1", - "web-push": "3.3.0", + "web-push": "3.3.1", "webfinger.js": "2.6.6", - "webpack": "4.6.0", - "webpack-cli": "2.0.15", - "webpack-replace-loader": "1.3.0", + "webpack": "4.8.3", + "webpack-cli": "2.1.3", "websocket": "1.0.26", "ws": "5.1.1", "xev": "2.0.0" diff --git a/src/build/fa.ts b/src/build/fa.ts index f6f2427d0..111c19ae6 100644 --- a/src/build/fa.ts +++ b/src/build/fa.ts @@ -7,10 +7,7 @@ import * as regular from '@fortawesome/fontawesome-free-regular'; import * as solid from '@fortawesome/fontawesome-free-solid'; import * as brands from '@fortawesome/fontawesome-free-brands'; -// Add icons -fontawesome.library.add(regular); -fontawesome.library.add(solid); -fontawesome.library.add(brands); +fontawesome.library.add(regular, solid, brands); export const pattern = /%fa:(.+?)%/g; diff --git a/src/client/app/boot.js b/src/client/app/boot.js index 35d02cf9c..9338bc501 100644 --- a/src/client/app/boot.js +++ b/src/client/app/boot.js @@ -32,7 +32,7 @@ // Detect the user language // Note: The default language is Japanese let lang = navigator.language.split('-')[0]; - if (!/^(en|ja)$/.test(lang)) lang = 'ja'; + if (!LANGS.includes(lang)) lang = 'en'; if (localStorage.getItem('lang')) lang = localStorage.getItem('lang'); // Detect the user agent diff --git a/src/client/app/common/scripts/can-hide-text.ts b/src/client/app/common/scripts/can-hide-text.ts new file mode 100644 index 000000000..4a4be8d9d --- /dev/null +++ b/src/client/app/common/scripts/can-hide-text.ts @@ -0,0 +1,16 @@ +export default function(note) { + if (note.text == null) return true; + + let txt = note.text; + + if (note.media) { + note.media.forEach(file => { + txt = txt.replace(file.url, ''); + if (file.src) txt = txt.replace(file.src, ''); + }); + + if (txt == '') return true; + } + + return false; +} diff --git a/src/client/app/common/scripts/streaming/home.ts b/src/client/app/common/scripts/streaming/home.ts index 32685f3c2..09d830bec 100644 --- a/src/client/app/common/scripts/streaming/home.ts +++ b/src/client/app/common/scripts/streaming/home.ts @@ -48,6 +48,17 @@ export class HomeStream extends Stream { } }); + this.on('mobile_home_updated', x => { + if (x.home) { + os.store.commit('settings/setMobileHome', x.home); + } else { + os.store.commit('settings/setMobileHomeWidget', { + id: x.id, + data: x.data + }); + } + }); + // トークンが再生成されたとき // このままではMisskeyが利用できないので強制的にサインアウトさせる this.on('my_token_regenerated', () => { diff --git a/src/client/app/common/views/components/acct.vue b/src/client/app/common/views/components/acct.vue new file mode 100644 index 000000000..1ad222afd --- /dev/null +++ b/src/client/app/common/views/components/acct.vue @@ -0,0 +1,19 @@ + + + + + diff --git a/src/client/app/common/views/components/avatar.vue b/src/client/app/common/views/components/avatar.vue index a4648c272..8ec359e83 100644 --- a/src/client/app/common/views/components/avatar.vue +++ b/src/client/app/common/views/components/avatar.vue @@ -23,7 +23,7 @@ export default Vue.extend({ computed: { style(): any { return { - backgroundColor: this.user.avatarColor ? `rgb(${ this.user.avatarColor.join(',') })` : null, + backgroundColor: this.user.avatarColor && this.user.avatarColor.length == 3 ? `rgb(${ this.user.avatarColor.join(',') })` : null, backgroundImage: `url(${ this.user.avatarUrl }?thumbnail)`, borderRadius: (this as any).clientSettings.circleIcons ? '100%' : null }; diff --git a/src/client/app/common/views/components/index.ts b/src/client/app/common/views/components/index.ts index 69fed00c7..c1a7bc61d 100644 --- a/src/client/app/common/views/components/index.ts +++ b/src/client/app/common/views/components/index.ts @@ -3,6 +3,7 @@ import Vue from 'vue'; import signin from './signin.vue'; import signup from './signup.vue'; import forkit from './forkit.vue'; +import acct from './acct.vue'; import avatar from './avatar.vue'; import nav from './nav.vue'; import noteHtml from './note-html'; @@ -29,6 +30,7 @@ import welcomeTimeline from './welcome-timeline.vue'; Vue.component('mk-signin', signin); Vue.component('mk-signup', signup); Vue.component('mk-forkit', forkit); +Vue.component('mk-acct', acct); Vue.component('mk-avatar', avatar); Vue.component('mk-nav', nav); Vue.component('mk-note-html', noteHtml); diff --git a/src/client/app/common/views/components/url-preview.vue b/src/client/app/common/views/components/url-preview.vue index 3bae6e507..028b911e2 100644 --- a/src/client/app/common/views/components/url-preview.vue +++ b/src/client/app/common/views/components/url-preview.vue @@ -126,16 +126,21 @@ root(isDark) line-height 16px vertical-align top - @media (max-width 500px) - font-size 8px - border none - + @media (max-width 700px) > .thumbnail - width 70px + position relative + width 100% + height 100px & + article - left 70px - width calc(100% - 70px) + left 0 + width 100% + + @media (max-width 500px) + font-size 8px + + > .thumbnail + height 70px > article padding 8px diff --git a/src/client/app/common/views/widgets/calendar.vue b/src/client/app/common/views/widgets/calendar.vue index 41e925378..0e9714960 100644 --- a/src/client/app/common/views/widgets/calendar.vue +++ b/src/client/app/common/views/widgets/calendar.vue @@ -1,37 +1,37 @@ @@ -111,93 +111,82 @@ export default define({ @import '~const.styl' root(isDark) - padding 16px 0 - color isDark ? #c5ced6 :#777 - background isDark ? #282C37 : #fff - border solid 1px rgba(#000, 0.075) - border-radius 6px - &[data-special='on-new-years-day'] border-color #ef95a0 - &[data-melt] - background transparent - border none + .mkw-calendar--body + padding 16px 0 + color isDark ? #c5ced6 : #777 - &[data-mobile] - border none - border-radius 8px - box-shadow 0 0 0 1px rgba(#000, 0.2) + &:after + content "" + display block + clear both - &:after - content "" - display block - clear both + > .calendar + float left + width 60% + text-align center - > .calendar - float left - width 60% - text-align center - - &[data-is-holiday] - > .day - color #ef95a0 - - > p - margin 0 - line-height 18px - font-size 14px - - > span - margin 0 4px - - > .day - margin 10px 0 - line-height 32px - font-size 28px - - > .info - display block - float left - width 40% - padding 0 16px 0 0 - - > div - margin-bottom 8px - - &:last-child - margin-bottom 4px + &[data-is-holiday] + > .day + color #ef95a0 > p - margin 0 0 2px 0 - font-size 12px + margin 0 line-height 18px - color isDark ? #7a8692 : #888 + font-size 14px - > b - margin-left 2px + > span + margin 0 4px - > .meter - width 100% - overflow hidden - background isDark ? #1c1f25 : #eee - border-radius 8px + > .day + margin 10px 0 + line-height 32px + font-size 28px - > .val - height 4px - background $theme-color + > .info + display block + float left + width 40% + padding 0 16px 0 0 - &:nth-child(1) - > .meter > .val - background #f7796c + > div + margin-bottom 8px - &:nth-child(2) - > .meter > .val - background #a1de41 + &:last-child + margin-bottom 4px - &:nth-child(3) - > .meter > .val - background #41ddde + > p + margin 0 0 2px 0 + font-size 12px + line-height 18px + color isDark ? #7a8692 : #888 + + > b + margin-left 2px + + > .meter + width 100% + overflow hidden + background isDark ? #1c1f25 : #eee + border-radius 8px + + > .val + height 4px + background $theme-color + + &:nth-child(1) + > .meter > .val + background #f7796c + + &:nth-child(2) + > .meter > .val + background #a1de41 + + &:nth-child(3) + > .meter > .val + background #41ddde .mkw-calendar[data-darkmode] root(true) diff --git a/src/client/app/common/views/widgets/rss.vue b/src/client/app/common/views/widgets/rss.vue index b5339add0..9e2c6b649 100644 --- a/src/client/app/common/views/widgets/rss.vue +++ b/src/client/app/common/views/widgets/rss.vue @@ -1,10 +1,10 @@