diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2019-05-03 18:58:54 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2019-05-03 18:58:54 +0900 |
| commit | 12cd2709d6764986f01d1dbcb394f40c43a74c71 (patch) | |
| tree | 6828868f93984839363773a0cdcf4284719e7b26 /src/client | |
| parent | Merge branch 'develop' (diff) | |
| parent | 11.10.0 (diff) | |
| download | misskey-12cd2709d6764986f01d1dbcb394f40c43a74c71.tar.gz misskey-12cd2709d6764986f01d1dbcb394f40c43a74c71.tar.bz2 misskey-12cd2709d6764986f01d1dbcb394f40c43a74c71.zip | |
Merge branch 'develop'
Diffstat (limited to 'src/client')
5 files changed, 25 insertions, 52 deletions
diff --git a/src/client/app/common/views/components/page-editor/page-editor.blocks.vue b/src/client/app/common/views/components/page-editor/page-editor.blocks.vue index 894feb34cc..266b6d6b21 100644 --- a/src/client/app/common/views/components/page-editor/page-editor.blocks.vue +++ b/src/client/app/common/views/components/page-editor/page-editor.blocks.vue @@ -1,5 +1,5 @@ <template> -<x-draggable tag="div" :list="blocks" handle=".drag-handle" :group="{ name: 'blocks' }" animation="150"> +<x-draggable tag="div" :list="blocks" handle=".drag-handle" :group="{ name: 'blocks' }" animation="150" swap-threshold="0.5"> <component v-for="block in blocks" :is="'x-' + block.type" :value="block" @input="updateItem" @remove="removeItem" :key="block.id" :ai-script="aiScript"/> </x-draggable> </template> diff --git a/src/client/app/common/views/components/page-editor/page-editor.container.vue b/src/client/app/common/views/components/page-editor/page-editor.container.vue index 4127cd39e0..a3a501afb4 100644 --- a/src/client/app/common/views/components/page-editor/page-editor.container.vue +++ b/src/client/app/common/views/components/page-editor/page-editor.container.vue @@ -1,12 +1,15 @@ <template> -<div class="cpjygsrt" :class="{ error: error != null, warn: warn != null, draggable }"> - <header class="drag-handle"> +<div class="cpjygsrt" :class="{ error: error != null, warn: warn != null }"> + <header> <div class="title"><slot name="header"></slot></div> <div class="buttons"> <slot name="func"></slot> <button v-if="removable" @click="remove()"> <fa :icon="faTrashAlt"/> </button> + <button v-if="draggable" class="drag-handle"> + <fa :icon="faBars"/> + </button> <button @click="toggleContent(!showBody)"> <template v-if="showBody"><fa icon="angle-up"/></template> <template v-else><fa icon="angle-down"/></template> @@ -23,6 +26,7 @@ <script lang="ts"> import Vue from 'vue'; +import { faBars } from '@fortawesome/free-solid-svg-icons'; import { faTrashAlt } from '@fortawesome/free-regular-svg-icons'; import i18n from '../../../../i18n'; @@ -54,7 +58,7 @@ export default Vue.extend({ data() { return { showBody: this.expanded, - faTrashAlt + faTrashAlt, faBars }; }, methods: { @@ -124,9 +128,8 @@ export default Vue.extend({ &:active color var(--faceTextButtonActive) - &.draggable - > header - cursor move + .drag-handle + cursor move > .warn color #b19e49 diff --git a/src/client/app/common/views/components/settings/profile.vue b/src/client/app/common/views/components/settings/profile.vue index c1ecfafe16..a22fd6df98 100644 --- a/src/client/app/common/views/components/settings/profile.vue +++ b/src/client/app/common/views/components/settings/profile.vue @@ -290,12 +290,17 @@ export default Vue.extend({ this.exportTarget == 'mute' ? 'i/export-mute' : this.exportTarget == 'blocking' ? 'i/export-blocking' : this.exportTarget == 'user-lists' ? 'i/export-user-lists' : - null, {}); - - this.$root.dialog({ - type: 'info', - text: this.$t('export-requested') - }); + null, {}).then(() => { + this.$root.dialog({ + type: 'info', + text: this.$t('export-requested') + }); + }).catch((e: any) => { + this.$root.dialog({ + type: 'error', + text: e.message + }); + }); }, doImport() { diff --git a/src/client/app/mios.ts b/src/client/app/mios.ts index 191b72e5bf..3ebee35804 100644 --- a/src/client/app/mios.ts +++ b/src/client/app/mios.ts @@ -173,9 +173,10 @@ export default class MiOS extends EventEmitter { // Init service worker if (this.shouldRegisterSw) { - this.getMeta().then(data => { - this.registerSw(data.swPublickey); - }); + // #4813 + //this.getMeta().then(data => { + // this.registerSw(data.swPublickey); + //}); } }; diff --git a/src/client/app/sw.js b/src/client/app/sw.js index ccf6dc818e..92f2ac8284 100644 --- a/src/client/app/sw.js +++ b/src/client/app/sw.js @@ -3,12 +3,6 @@ */ import composeNotification from './common/scripts/compose-notification'; -import { erase } from '../../prelude/array'; - -// キャッシュするリソース -const cachee = [ - '/' -]; // インストールされたとき self.addEventListener('install', ev => { @@ -16,31 +10,9 @@ self.addEventListener('install', ev => { ev.waitUntil(Promise.all([ self.skipWaiting(), // Force activate - caches.open(_VERSION_).then(cache => cache.addAll(cachee)) // Cache ])); }); -// アクティベートされたとき -self.addEventListener('activate', ev => { - // Clean up old caches - ev.waitUntil( - caches.keys().then(keys => Promise.all( - erase(_VERSION_, keys) - .map(key => caches.delete(key)) - )) - ); -}); - -// リクエストが発生したとき -self.addEventListener('fetch', ev => { - ev.respondWith( - // キャッシュがあるか確認してあればそれを返す - caches.match(ev.request).then(response => - response || fetch(ev.request) - ) - ); -}); - // プッシュ通知を受け取ったとき self.addEventListener('push', ev => { // クライアント取得 @@ -59,11 +31,3 @@ self.addEventListener('push', ev => { }); })); }); - -self.addEventListener('message', ev => { - if (ev.data == 'clear') { - caches.keys().then(keys => { - for (const key of keys) caches.delete(key); - }); - } -}); |