Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

closes #116 Open account profile in notifications #158

Merged
merged 5 commits into from
Mar 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
<icon name="star" scale="0.7"></icon>
</div>
<div class="action-detail">
<span class="bold">{{ username(message.account) }}</span> favourited your status
<span class="bold" @click="openUser(message.account)">{{ username(message.account) }}</span> favourited your status
</div>
<div class="action-icon">
<img :src="message.account.avatar" />
</div>
</div>
<div class="clearfix"></div>
<div class="target">
<div class="icon">
<div class="icon" @click="openUser(message.status.account)">
<img :src="message.status.account.avatar" />
</div>
<div class="detail">
<div class="toot-header">
<div class="user">
<div class="user" @click="openUser(message.status.account)">
{{ username(message.status.account) }}
</div>
<div class="timestamp">
Expand Down Expand Up @@ -56,6 +56,11 @@ export default {
if (link !== null) {
shell.openExternal(link)
}
},
openUser (account) {
this.$store.dispatch('TimelineSpace/Contents/SideBar/openAccountComponent')
this.$store.dispatch('TimelineSpace/Contents/SideBar/AccountProfile/changeAccount', account)
this.$store.commit('TimelineSpace/Contents/SideBar/changeOpenSideBar', true)
}
}
}
Expand Down Expand Up @@ -103,6 +108,11 @@ function findLink (target) {
margin-left: 10px;
font-size: 14px;
float: left;
max-width: 80%;

.bold {
cursor: pointer;
}
}

.action-icon {
Expand All @@ -121,6 +131,7 @@ function findLink (target) {
.icon {
float: left;
width: 42px;
cursor: pointer;

img {
width: 32px;
Expand All @@ -137,6 +148,7 @@ function findLink (target) {
.user {
float: left;
font-size: 14px;
cursor: pointer;
}

.timestamp {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<icon name="user-plus" scale="0.7"></icon>
</div>
<div class="action-detail">
<span class="bold">{{ username(message.account) }}</span> is now following you
<span class="bold" @click="openUser(message.account)">{{ username(message.account) }}</span> is now following you
</div>
<div class="action-icon">
<img :src="message.account.avatar" />
Expand All @@ -27,6 +27,11 @@ export default {
} else {
return account.username
}
},
openUser (account) {
this.$store.dispatch('TimelineSpace/Contents/SideBar/openAccountComponent')
this.$store.dispatch('TimelineSpace/Contents/SideBar/AccountProfile/changeAccount', account)
this.$store.commit('TimelineSpace/Contents/SideBar/changeOpenSideBar', true)
}
}
}
Expand Down Expand Up @@ -61,6 +66,14 @@ export default {
margin-left: 10px;
font-size: 14px;
float: left;
max-width: 80%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;

.bold {
cursor: pointer;
}
}

.action-icon {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<icon name="retweet" scala="0.7"></icon>
</div>
<div class="action-detail">
<span class="bold">{{ username(message.account) }}</span> boosted your status
<span class="bold" @clikc="openUser(message.account)">{{ username(message.account) }}</span> boosted your status
</div>
<div class="action-icon">
<img :src="message.account.avatar" />
Expand Down Expand Up @@ -56,6 +56,11 @@ export default {
if (link !== null) {
shell.openExternal(link)
}
},
openUser (account) {
this.$store.dispatch('TimelineSpace/Contents/SideBar/openAccountComponent')
this.$store.dispatch('TimelineSpace/Contents/SideBar/AccountProfile/changeAccount', account)
this.$store.commit('TimelineSpace/Contents/SideBar/changeOpenSideBar', true)
}
}
}
Expand Down Expand Up @@ -103,6 +108,11 @@ function findLink (target) {
margin-left: 10px;
font-size: 14px;
float: left;
max-width: 80%;

.bold {
cursor: pointer;
}
}

.action-icon {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<img :src="media.preview_url" @click="openImage(media.url)"/>
</div>
</div>
<div class="reblogger" v-if="message.reblog !== null">
<div class="reblogger" v-if="message.reblog !== null" @click="openUser(message.account)">
<icon name="retweet"></icon>
<span class="reblogger-icon">
<img :src="message.account.avatar" />
Expand Down Expand Up @@ -215,6 +215,7 @@ function findLink (target) {

.reblogger {
color: #909399;
cursor: pointer;

.reblogger-icon {
img {
Expand Down