1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-12 06:35:31 +02:00

Compare commits

..

3 Commits

Author SHA1 Message Date
syuilo
281971f4a4 2.22.1 2018-05-29 02:37:31 +09:00
syuilo
12b13e974c 🎨 2018-05-29 02:36:57 +09:00
syuilo
9d27fa7eaa Fix bug 2018-05-29 02:31:32 +09:00
3 changed files with 24 additions and 60 deletions

View File

@@ -1,8 +1,8 @@
{
"name": "misskey",
"author": "syuilo <i@syuilo.com>",
"version": "2.22.0",
"clientVersion": "1.0.5939",
"version": "2.22.1",
"clientVersion": "1.0.5942",
"codename": "nighthike",
"main": "./built/index.js",
"private": true,

View File

@@ -6,44 +6,27 @@
*::input-placeholder
color #D8CBC5
*
&:focus
outline none
&::scrollbar
width 5px
background transparent
&:horizontal
height 5px
&::scrollbar-button
width 0
height 0
background rgba(0, 0, 0, 0.2)
&::scrollbar-piece
background transparent
&:start
background transparent
&::scrollbar-thumb
background rgba(0, 0, 0, 0.2)
&:hover
background rgba(0, 0, 0, 0.4)
&:active
background $theme-color
&::scrollbar-corner
background rgba(0, 0, 0, 0.2)
*:focus
outline none
html
height 100%
background #f7f7f7
&, *
&::-webkit-scrollbar
width 6px
height 6px
&::-webkit-scrollbar-thumb
background rgba(0, 0, 0, 0.2)
&:hover
background rgba(0, 0, 0, 0.4)
&:active
background $theme-color
&[data-darkmode]
background #191B22
@@ -51,10 +34,6 @@ html
&::-webkit-scrollbar-track
background-color #282C37
&::-webkit-scrollbar
width 6px
height 6px
&::-webkit-scrollbar-thumb
background-color #454954

View File

@@ -12,7 +12,7 @@
<a @click="messaging">
%fa:comments%
<p>%i18n:@messaging%</p>
<template v-if="hasUnreadMessagingMessages">%fa:circle%</template>
<template v-if="hasUnreadMessagingMessage">%fa:circle%</template>
</a>
</li>
<li class="game">
@@ -35,48 +35,33 @@ import MkGameWindow from './game-window.vue';
export default Vue.extend({
data() {
return {
hasUnreadMessagingMessages: false,
hasGameInvitations: false,
connection: null,
connectionId: null
};
},
computed: {
hasUnreadMessagingMessage(): boolean {
return this.$store.getters.isSignedIn && this.$store.state.i.hasUnreadMessagingMessage;
}
},
mounted() {
if (this.$store.getters.isSignedIn) {
this.connection = (this as any).os.stream.getConnection();
this.connectionId = (this as any).os.stream.use();
this.connection.on('read_all_messaging_messages', this.onReadAllMessagingMessages);
this.connection.on('unread_messaging_message', this.onUnreadMessagingMessage);
this.connection.on('othello_invited', this.onOthelloInvited);
this.connection.on('othello_no_invites', this.onOthelloNoInvites);
// Fetch count of unread messaging messages
(this as any).api('messaging/unread').then(res => {
if (res.count > 0) {
this.hasUnreadMessagingMessages = true;
}
});
}
},
beforeDestroy() {
if (this.$store.getters.isSignedIn) {
this.connection.off('read_all_messaging_messages', this.onReadAllMessagingMessages);
this.connection.off('unread_messaging_message', this.onUnreadMessagingMessage);
this.connection.off('othello_invited', this.onOthelloInvited);
this.connection.off('othello_no_invites', this.onOthelloNoInvites);
(this as any).os.stream.dispose(this.connectionId);
}
},
methods: {
onUnreadMessagingMessage() {
this.hasUnreadMessagingMessages = true;
},
onReadAllMessagingMessages() {
this.hasUnreadMessagingMessages = false;
},
onOthelloInvited() {
this.hasGameInvitations = true;
},