diff options
Diffstat (limited to 'src/client/components')
| -rw-r--r-- | src/client/components/analog-clock.vue | 18 | ||||
| -rw-r--r-- | src/client/components/link.vue | 4 | ||||
| -rw-r--r-- | src/client/components/note.vue | 6 | ||||
| -rw-r--r-- | src/client/components/url-preview-popup.vue | 6 | ||||
| -rw-r--r-- | src/client/components/url.vue | 4 |
5 files changed, 14 insertions, 24 deletions
diff --git a/src/client/components/analog-clock.vue b/src/client/components/analog-clock.vue index b689266780..81c6598c7a 100644 --- a/src/client/components/analog-clock.vue +++ b/src/client/components/analog-clock.vue @@ -38,13 +38,6 @@ import Vue from 'vue'; import * as tinycolor from 'tinycolor2'; export default Vue.extend({ - props: { - smooth: { - type: Boolean, - default: false - } - }, - data() { return { now: new Date(), @@ -83,9 +76,6 @@ export default Vue.extend({ return tinycolor(this.computedStyle.getPropertyValue('--accent')).toHexString(); }, - ms(): number { - return this.now.getMilliseconds() * (this.smooth ? 1 : 0); - }, s(): number { return this.now.getSeconds(); }, @@ -97,13 +87,13 @@ export default Vue.extend({ }, hAngle(): number { - return Math.PI * (this.h % 12 + (this.m + (this.s + this.ms / 1000) / 60) / 60) / 6; + return Math.PI * (this.h % 12 + (this.m + this.s / 60) / 60) / 6; }, mAngle(): number { - return Math.PI * (this.m + (this.s + this.ms / 1000) / 60) / 30; + return Math.PI * (this.m + this.s / 60) / 30; }, sAngle(): number { - return Math.PI * (this.s + this.ms / 1000) / 30; + return Math.PI * this.s / 30; }, graduations(): any { @@ -121,7 +111,7 @@ export default Vue.extend({ const update = () => { if (this.enabled) { this.tick(); - requestAnimationFrame(update); + setTimeout(update, 1000); } }; update(); diff --git a/src/client/components/link.vue b/src/client/components/link.vue index f4e07c1627..11de688520 100644 --- a/src/client/components/link.vue +++ b/src/client/components/link.vue @@ -13,7 +13,7 @@ import Vue from 'vue'; import { faExternalLinkSquareAlt } from '@fortawesome/free-solid-svg-icons'; import { url as local } from '../config'; -import XUrlPreview from './url-preview-popup.vue'; +import MkUrlPreview from './url-preview-popup.vue'; export default Vue.extend({ props: { @@ -44,7 +44,7 @@ export default Vue.extend({ if (!document.body.contains(this.$el)) return; if (this.preview) return; - this.preview = new XUrlPreview({ + this.preview = new MkUrlPreview({ parent: this, propsData: { url: this.url, diff --git a/src/client/components/note.vue b/src/client/components/note.vue index b3126e0673..48e37c33d3 100644 --- a/src/client/components/note.vue +++ b/src/client/components/note.vue @@ -49,7 +49,7 @@ <x-media-list :media-list="appearNote.files"/> </div> <x-poll v-if="appearNote.poll" :note="appearNote" ref="pollViewer"/> - <x-url-preview v-for="url in urls" :url="url" :key="url" :compact="true" class="url-preview"/> + <mk-url-preview v-for="url in urls" :url="url" :key="url" :compact="true" class="url-preview"/> <div class="renote" v-if="appearNote.renote"><x-note-preview :note="appearNote.renote"/></div> </div> </div> @@ -97,7 +97,7 @@ import XReactionsViewer from './reactions-viewer.vue'; import XMediaList from './media-list.vue'; import XCwButton from './cw-button.vue'; import XPoll from './poll.vue'; -import XUrlPreview from './url-preview.vue'; +import MkUrlPreview from './url-preview.vue'; import MkReactionPicker from './reaction-picker.vue'; import pleaseLogin from '../scripts/please-login'; import { focusPrev, focusNext } from '../scripts/focus'; @@ -115,7 +115,7 @@ export default Vue.extend({ XMediaList, XCwButton, XPoll, - XUrlPreview, + MkUrlPreview, }, props: { diff --git a/src/client/components/url-preview-popup.vue b/src/client/components/url-preview-popup.vue index 26fdbf44a9..938566e9e2 100644 --- a/src/client/components/url-preview-popup.vue +++ b/src/client/components/url-preview-popup.vue @@ -1,19 +1,19 @@ <template> <div class="fgmtyycl _panel" :style="{ top: top + 'px', left: left + 'px' }"> - <x-url-preview :url="url"/> + <mk-url-preview :url="url"/> </div> </template> <script lang="ts"> import Vue from 'vue'; import i18n from '../i18n'; -import XUrlPreview from './url-preview.vue'; +import MkUrlPreview from './url-preview.vue'; export default Vue.extend({ i18n, components: { - XUrlPreview + MkUrlPreview }, props: { diff --git a/src/client/components/url.vue b/src/client/components/url.vue index df16bc9c24..409bb128f6 100644 --- a/src/client/components/url.vue +++ b/src/client/components/url.vue @@ -23,7 +23,7 @@ import Vue from 'vue'; import { faExternalLinkSquareAlt } from '@fortawesome/free-solid-svg-icons'; import { toUnicode as decodePunycode } from 'punycode'; import { url as local } from '../config'; -import XUrlPreview from './url-preview-popup.vue'; +import MkUrlPreview from './url-preview-popup.vue'; export default Vue.extend({ props: { @@ -70,7 +70,7 @@ export default Vue.extend({ if (!document.body.contains(this.$el)) return; if (this.preview) return; - this.preview = new XUrlPreview({ + this.preview = new MkUrlPreview({ parent: this, propsData: { url: this.url, |