diff options
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/conversation/conversation.vue | 2 | ||||
| -rw-r--r-- | src/components/mentions/mentions.js | 13 | ||||
| -rw-r--r-- | src/components/nav_panel/nav_panel.vue | 3 | ||||
| -rw-r--r-- | src/components/notifications/notifications.scss | 6 | ||||
| -rw-r--r-- | src/components/notifications/notifications.vue | 2 | ||||
| -rw-r--r-- | src/components/settings/settings.js | 4 | ||||
| -rw-r--r-- | src/components/settings/settings.vue | 21 | ||||
| -rw-r--r-- | src/components/status/status.js | 13 | ||||
| -rw-r--r-- | src/components/status/status.vue | 32 | ||||
| -rw-r--r-- | src/components/status_or_conversation/status_or_conversation.vue | 2 | ||||
| -rw-r--r-- | src/components/timeline/timeline.js | 3 | ||||
| -rw-r--r-- | src/components/timeline/timeline.vue | 10 |
12 files changed, 75 insertions, 36 deletions
diff --git a/src/components/conversation/conversation.vue b/src/components/conversation/conversation.vue index 33a43e15..331cce99 100644 --- a/src/components/conversation/conversation.vue +++ b/src/components/conversation/conversation.vue @@ -8,7 +8,7 @@ </div> <div class="panel-body"> <div class="timeline"> - <status v-for="status in conversation" :key="status.id" v-bind:statusoid="status":expandable='false':focused="focused(status.id)"></status> + <status v-for="status in conversation" :key="status.id" :statusoid="status" :expandable='false' :focused="focused(status.id)" :inConversation='true'></status> </div> </div> </div> diff --git a/src/components/mentions/mentions.js b/src/components/mentions/mentions.js index 46a1c63e..841d5aa4 100644 --- a/src/components/mentions/mentions.js +++ b/src/components/mentions/mentions.js @@ -2,25 +2,12 @@ import Timeline from '../timeline/timeline.vue' const Mentions = { computed: { - username () { - return this.$route.params.username - }, timeline () { return this.$store.state.statuses.timelines.mentions } }, components: { Timeline - }, - created () { - this.$store.state.api.backendInteractor.fetchMentions({username: this.username}) - .then((mentions) => { - this.$store.dispatch('addNewStatuses', { - statuses: mentions, - timeline: 'mentions', - showImmediately: true - }) - }) } } diff --git a/src/components/nav_panel/nav_panel.vue b/src/components/nav_panel/nav_panel.vue index 1d96f4d6..b62b4148 100644 --- a/src/components/nav_panel/nav_panel.vue +++ b/src/components/nav_panel/nav_panel.vue @@ -1,7 +1,7 @@ <template> <div class="nav-panel"> <div class="panel panel-default base02-background"> - <ul> + <ul class="base03-border"> <li v-if='currentUser'> <router-link class="base01-background" to='/main/friends'> Timeline @@ -38,6 +38,7 @@ .nav-panel li { border-bottom: 1px solid; + border-color: inherit; padding: 0; &:first-child a { border-top-right-radius: 10px; diff --git a/src/components/notifications/notifications.scss b/src/components/notifications/notifications.scss index 6ad7ec1e..5cce7a73 100644 --- a/src/components/notifications/notifications.scss +++ b/src/components/notifications/notifications.scss @@ -33,7 +33,8 @@ // which does not happen with 10px vs 4px + 6px. padding: 0.4em 0 0 10px; display: flex; - border-bottom: 1px solid silver; + border-bottom: 1px solid; + border-bottom-color: inherit; .text { @@ -72,7 +73,8 @@ } &:last-child { - border: none + border-bottom: none; + border-radius: 0 0 10px 10px; } } diff --git a/src/components/notifications/notifications.vue b/src/components/notifications/notifications.vue index 91f6cfdc..661d842c 100644 --- a/src/components/notifications/notifications.vue +++ b/src/components/notifications/notifications.vue @@ -6,7 +6,7 @@ Notifications <button @click.prevent="markAsSeen" class="base06 base02-background read-button">Read!</button> </div> - <div class="panel-body"> + <div class="panel-body base03-border"> <div v-for="notification in visibleNotifications" class="notification" :class='{"unseen": !notification.seen}'> <a :href="notification.action.user.statusnet_profile_url"> <img class='avatar' :src="notification.action.user.profile_image_url_original"> diff --git a/src/components/settings/settings.js b/src/components/settings/settings.js index c1b88f82..3d373283 100644 --- a/src/components/settings/settings.js +++ b/src/components/settings/settings.js @@ -4,6 +4,7 @@ const settings = { data () { return { hideAttachmentsLocal: this.$store.state.config.hideAttachments, + hideAttachmentsInConvLocal: this.$store.state.config.hideAttachmentsInConv, hideNsfwLocal: this.$store.state.config.hideNsfw } }, @@ -14,6 +15,9 @@ const settings = { hideAttachmentsLocal (value) { this.$store.dispatch('setOption', { name: 'hideAttachments', value }) }, + hideAttachmentsInConvLocal (value) { + this.$store.dispatch('setOption', { name: 'hideAttachmentsInConv', value }) + }, hideNsfwLocal (value) { this.$store.dispatch('setOption', { name: 'hideNsfw', value }) } diff --git a/src/components/settings/settings.vue b/src/components/settings/settings.vue index 89b89a39..478d761a 100644 --- a/src/components/settings/settings.vue +++ b/src/components/settings/settings.vue @@ -10,10 +10,20 @@ </div> <div class="setting-item"> <h2>Attachments</h2> - <input type="checkbox" id="hideAttachments" v-model="hideAttachmentsLocal"> - <label for="hideAttachments">Hide Attachments</label> - <input type="checkbox" id="hideNsfw" v-model="hideNsfwLocal"> - <label for="hideNsfw">Enable clickthrough NSFW attachment hiding</label> + <ul class="setting-list"> + <li> + <input type="checkbox" id="hideAttachments" v-model="hideAttachmentsLocal"> + <label for="hideAttachments">Hide attachments in timeline</label> + </li> + <li> + <input type="checkbox" id="hideAttachmentsInConv" v-model="hideAttachmentsInConvLocal"> + <label for="hideAttachmentsInConv">Hide attachments in conversations</label> + </li> + <li> + <input type="checkbox" id="hideNsfw" v-model="hideNsfwLocal"> + <label for="hideNsfw">Enable clickthrough NSFW attachment hiding</label> + </li> + </ul> </div> </div> </div> @@ -26,4 +36,7 @@ .setting-item { margin: 1em 1em 1.4em; } + .setting-list { + list-style-type: none; + } </style> diff --git a/src/components/status/status.js b/src/components/status/status.js index bc9d6e6c..87fff879 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -9,6 +9,7 @@ const Status = { props: [ 'statusoid', 'expandable', + 'inConversation', 'focused' ], data: () => ({ @@ -18,7 +19,10 @@ const Status = { userExpanded: false }), computed: { - hideAttachments () { return this.$store.state.config.hideAttachments }, + hideAttachments () { + return (this.$store.state.config.hideAttachments && !this.inConversation) || + (this.$store.state.config.hideAttachmentsInConv && this.inConversation) + }, retweet () { return !!this.statusoid.retweeted_status }, retweeter () { return this.statusoid.user.name }, status () { @@ -32,7 +36,12 @@ const Status = { return !!this.$store.state.users.currentUser }, muted () { return !this.unmuted && this.status.user.muted }, - isReply () { return !!this.status.in_reply_to_status_id } + isReply () { return !!this.status.in_reply_to_status_id }, + borderColor () { + return { + borderBottomColor: this.$store.state.config.colors['base02'] + } + } }, components: { Attachment, diff --git a/src/components/status/status.vue b/src/components/status/status.vue index 6476e1e5..62a55505 100644 --- a/src/components/status/status.vue +++ b/src/components/status/status.vue @@ -1,5 +1,5 @@ <template> - <div class="status-el base00-background" v-if="!status.deleted" v-bind:class="[{ 'expanded-status': !expandable }, { 'base01-background': focused }]"> + <div class="status-el base00-background base03-border" v-if="!status.deleted" v-bind:class="[{ 'base01-background': focused }, { 'status-conversation': inConversation }]" > <template v-if="muted"> <div class="media status container muted"> <small><router-link :to="{ name: 'user-profile', params: { id: status.user.id } }">{{status.user.screen_name}}</router-link></small> @@ -73,18 +73,20 @@ <div class='status-actions'> <div> <a href="#" v-on:click.prevent="toggleReplying"> - <i class='fa icon-reply'></i> + <i class="fa icon-reply" :class="{'icon-reply-active': replying}"></i> </a> </div> <retweet-button :status=status></retweet-button> <favorite-button :status=status></favorite-button> <delete-button :status=status></delete-button> </div> - - <post-status-form v-if="replying" :reply-to="status.id" :attentions="status.attentions" :repliedUser="status.user" v-on:posted="toggleReplying"></post-status-form> </div> </div> </div> + <div class="status base00-background container" v-if="replying"> + <div class="reply-left"/> + <post-status-form class="reply-body" :reply-to="status.id" :attentions="status.attentions" :repliedUser="status.user" v-on:posted="toggleReplying"/> + </div> </template> </div> </template> @@ -98,6 +100,7 @@ overflow-wrap: break-word; word-wrap: break-word; word-break: break-word; + border-left-width: 0px; .user-content { min-height: 52px; @@ -128,8 +131,8 @@ } } - .expanded-status { - border-left: 4px solid rgba(255, 48, 16, 0.65); + .status-conversation { + border-left-style: solid; } .status-actions { @@ -140,6 +143,10 @@ color: $blue; } + .icon-reply-active { + color: $blue; + } + .status .avatar { width: 48px; } @@ -151,6 +158,9 @@ .status { padding: 0.65em 0.7em 0.8em 0.8em; border-bottom: 1px solid; + border-bottom-color: inherit; + border-left: 4px rgba(255, 48, 16, 0.65); + border-left-style: inherit; } .muted button { margin-left: auto; @@ -168,4 +178,14 @@ margin-bottom: 1em; margin-top: 0.2em; } + + .reply-left { + flex: 0; + min-width: 48px; + } + + .reply-body { + flex: 1; + } + </style> diff --git a/src/components/status_or_conversation/status_or_conversation.vue b/src/components/status_or_conversation/status_or_conversation.vue index 4aaaf2ff..9647d5eb 100644 --- a/src/components/status_or_conversation/status_or_conversation.vue +++ b/src/components/status_or_conversation/status_or_conversation.vue @@ -1,7 +1,7 @@ <template> <div> <conversation v-if="expanded" @toggleExpanded="toggleExpanded" :collapsable="true" :statusoid="statusoid"></conversation> - <status v-if="!expanded" @toggleExpanded="toggleExpanded" :expandable="true" :statusoid="statusoid" :focused="false"></status> + <status v-if="!expanded" @toggleExpanded="toggleExpanded" :expandable="true" :inConversation="false" :focused="false" :statusoid="statusoid"></status> </div> </template> diff --git a/src/components/timeline/timeline.js b/src/components/timeline/timeline.js index b4e80fe1..d5a9adcc 100644 --- a/src/components/timeline/timeline.js +++ b/src/components/timeline/timeline.js @@ -8,6 +8,9 @@ const Timeline = { 'timelineName', 'title' ], + computed: { + timelineError () { return this.$store.state.statuses.error } + }, components: { Status, StatusOrConversation diff --git a/src/components/timeline/timeline.vue b/src/components/timeline/timeline.vue index ac074f3c..84defac7 100644 --- a/src/components/timeline/timeline.vue +++ b/src/components/timeline/timeline.vue @@ -4,13 +4,13 @@ <div class="title"> {{title}} </div> - <button @click.prevent="showNewStatuses" class="base06 base02-background loadmore-button" v-if="timeline.newStatusCount > 0 && !timeline.error"> + <button @click.prevent="showNewStatuses" class="base06 base02-background loadmore-button" v-if="timeline.newStatusCount > 0 && !timelineError"> Show new ({{timeline.newStatusCount}}) </button> - <button @click.prevent class="base06 error no-press loadmore-button" v-if="timeline.error"> + <button @click.prevent class="base06 error no-press loadmore-button" v-if="timelineError"> Error fetching updates </button> - <button @click.prevent class="base04 base01-background no-press loadmore-button" v-if="!timeline.newStatusCount > 0 && !timeline.error"> + <button @click.prevent class="base04 base01-background no-press loadmore-button" v-if="!timeline.newStatusCount > 0 && !timelineError"> Up-to-date </button> </div> @@ -18,9 +18,9 @@ <div class="timeline"> <status-or-conversation v-for="status in timeline.visibleStatuses" :key="status.id" v-bind:statusoid="status"></status-or-conversation> <a href="#" v-on:click.prevent='fetchOlderStatuses()' v-if="!timeline.loading"> - <div class="base01-background base05-border new-status-notification text-center">Load older statuses.</div> + <div class="base01-background base03-border new-status-notification text-center">Load older statuses.</div> </a> - <div class="base01-background base05-border new-status-notification text-center" v-else>...</div> + <div class="base01-background base03-border new-status-notification text-center" v-else>...</div> </div> </div> </div> |
