アニメーションを無効にするオプションを実装
This commit is contained in:
		@@ -10,7 +10,7 @@
 | 
			
		||||
	</div>
 | 
			
		||||
 | 
			
		||||
	<!-- トランジションを有効にするとなぜかメモリリークする -->
 | 
			
		||||
	<transition-group name="mk-notes" class="notes transition" tag="div">
 | 
			
		||||
	<component :is="$store.state.device.animations ? 'transition-group' : 'div'" name="mk-notes" class="notes transition" tag="div">
 | 
			
		||||
		<template v-for="(note, i) in _notes">
 | 
			
		||||
			<x-note :note="note" :key="note.id" @update:note="onNoteUpdated(i, $event)"/>
 | 
			
		||||
			<p class="date" :key="note.id + '_date'" v-if="i != notes.length - 1 && note._date != _notes[i + 1]._date">
 | 
			
		||||
@@ -18,7 +18,7 @@
 | 
			
		||||
				<span>%fa:angle-down%{{ _notes[i + 1]._datetext }}</span>
 | 
			
		||||
			</p>
 | 
			
		||||
		</template>
 | 
			
		||||
	</transition-group>
 | 
			
		||||
	</component>
 | 
			
		||||
 | 
			
		||||
	<footer v-if="more">
 | 
			
		||||
		<button @click="loadMore" :disabled="moreFetching" :style="{ cursor: moreFetching ? 'wait' : 'pointer' }">
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
<div class="mk-notifications">
 | 
			
		||||
	<div class="notifications" v-if="notifications.length != 0">
 | 
			
		||||
		<!-- トランジションを有効にするとなぜかメモリリークする -->
 | 
			
		||||
		<transition-group name="mk-notifications" class="transition" tag="div">
 | 
			
		||||
		<component :is="$store.state.device.animations ? 'transition-group' : 'div'" name="mk-notifications" class="transition" tag="div">
 | 
			
		||||
			<template v-for="(notification, i) in _notifications">
 | 
			
		||||
				<div class="notification" :class="notification.type" :key="notification.id">
 | 
			
		||||
					<mk-time :time="notification.createdAt"/>
 | 
			
		||||
@@ -96,7 +96,7 @@
 | 
			
		||||
					<span>%fa:angle-down%{{ _notifications[i + 1]._datetext }}</span>
 | 
			
		||||
				</p>
 | 
			
		||||
			</template>
 | 
			
		||||
		</transition-group>
 | 
			
		||||
		</component>
 | 
			
		||||
	</div>
 | 
			
		||||
	<button class="more" :class="{ fetching: fetchingMoreNotifications }" v-if="moreNotifications" @click="fetchMoreNotifications" :disabled="fetchingMoreNotifications">
 | 
			
		||||
		<template v-if="fetchingMoreNotifications">%fa:spinner .pulse .fw%</template>{{ fetchingMoreNotifications ? '%i18n:common.loading%' : '%i18n:@more%' }}
 | 
			
		||||
 
 | 
			
		||||
@@ -60,6 +60,7 @@
 | 
			
		||||
				<button class="ui" @click="deleteWallpaper">%i18n:@delete-wallpaper%</button>
 | 
			
		||||
				<mk-switch v-model="darkmode" text="%i18n:@dark-mode%"/>
 | 
			
		||||
				<mk-switch v-model="circleIcons" text="%i18n:@circle-icons%"/>
 | 
			
		||||
				<mk-switch v-model="animations" text="%i18n:common.enable-animations%"/>
 | 
			
		||||
				<mk-switch v-model="contrastedAcct" text="%i18n:@contrasted-acct%"/>
 | 
			
		||||
				<mk-switch v-model="showFullAcct" text="%i18n:common.show-full-acct%"/>
 | 
			
		||||
				<mk-switch v-model="gradientWindowHeader" text="%i18n:@gradient-window-header%"/>
 | 
			
		||||
@@ -246,6 +247,11 @@ export default Vue.extend({
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
	computed: {
 | 
			
		||||
		animations: {
 | 
			
		||||
			get() { return this.$store.state.device.animations; },
 | 
			
		||||
			set(value) { this.$store.commit('device/set', { key: 'animations', value }); }
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		apiViaStream: {
 | 
			
		||||
			get() { return this.$store.state.device.apiViaStream; },
 | 
			
		||||
			set(value) { this.$store.commit('device/set', { key: 'apiViaStream', value }); }
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,7 @@
 | 
			
		||||
<template>
 | 
			
		||||
<div class="oxynyeqmfvracxnglgulyqfgqxnxmehl">
 | 
			
		||||
	<!-- トランジションを有効にするとなぜかメモリリークする -->
 | 
			
		||||
	<!--<transition-group name="mk-notifications" class="transition notifications">-->
 | 
			
		||||
	<div class="notifications">
 | 
			
		||||
	<component :is="$store.state.device.animations ? 'transition-group' : 'div'" name="mk-notifications" class="transition notifications">
 | 
			
		||||
		<template v-for="(notification, i) in _notifications">
 | 
			
		||||
			<x-notification class="notification" :notification="notification" :key="notification.id"/>
 | 
			
		||||
			<p class="date" v-if="i != notifications.length - 1 && notification._date != _notifications[i + 1]._date" :key="notification.id + '-time'">
 | 
			
		||||
@@ -10,8 +9,7 @@
 | 
			
		||||
				<span>%fa:angle-down%{{ _notifications[i + 1]._datetext }}</span>
 | 
			
		||||
			</p>
 | 
			
		||||
		</template>
 | 
			
		||||
	</div>
 | 
			
		||||
	<!--</transition-group>-->
 | 
			
		||||
	</component>
 | 
			
		||||
	<button class="more" :class="{ fetching: fetchingMoreNotifications }" v-if="moreNotifications" @click="fetchMoreNotifications" :disabled="fetchingMoreNotifications">
 | 
			
		||||
		<template v-if="fetchingMoreNotifications">%fa:spinner .pulse .fw%</template>{{ fetchingMoreNotifications ? '%i18n:common.loading%' : '%i18n:@more%' }}
 | 
			
		||||
	</button>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user