From 0b01643a6915168e2354dcd1252b2648fd24a563 Mon Sep 17 00:00:00 2001
From: AkiraFukushima
Date: Thu, 24 May 2018 23:38:24 +0900
Subject: [PATCH 1/2] refs #330 Set sensitive in new toot modal
---
.../TimelineSpace/Modals/NewToot.vue | 18 +++++++++++++++++-
.../store/TimelineSpace/Modals/NewToot.js | 7 ++++++-
2 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/src/renderer/components/TimelineSpace/Modals/NewToot.vue b/src/renderer/components/TimelineSpace/Modals/NewToot.vue
index 6659709e..b9c5eeeb 100644
--- a/src/renderer/components/TimelineSpace/Modals/NewToot.vue
+++ b/src/renderer/components/TimelineSpace/Modals/NewToot.vue
@@ -31,6 +31,12 @@
+
+
+
+
+
+
{{ 500 - status.length }}
Cancel
Toot
@@ -61,6 +67,7 @@ export default {
attachedMedias: state => state.TimelineSpace.Modals.NewToot.attachedMedias,
blockSubmit: state => state.TimelineSpace.Modals.NewToot.blockSubmit,
visibility: state => state.TimelineSpace.Modals.NewToot.visibility,
+ sensitive: state => state.TimelineSpace.Modals.NewToot.sensitive,
visibilityIcon: (state) => {
switch (state.TimelineSpace.Modals.NewToot.visibility) {
case 'public':
@@ -119,7 +126,8 @@ export default {
}
let form = {
status: this.status,
- visibility: this.visibility
+ visibility: this.visibility,
+ sensitive: this.sensitive
}
if (this.replyToId !== null) {
form = Object.assign(form, {
@@ -193,6 +201,9 @@ export default {
},
changeVisibility (level) {
this.$store.commit('TimelineSpace/Modals/NewToot/changeVisibility', level)
+ },
+ changeSensitive () {
+ this.$store.commit('TimelineSpace/Modals/NewToot/changeSensitive', !this.sensitive)
}
}
}
@@ -274,6 +285,11 @@ export default {
margin-left: 8px;
}
+ .sensitive {
+ float: left;
+ margin-left: 8px;
+ }
+
.text-count {
padding-right: 24px;
color: #909399;
diff --git a/src/renderer/store/TimelineSpace/Modals/NewToot.js b/src/renderer/store/TimelineSpace/Modals/NewToot.js
index 81762aa7..0e016474 100644
--- a/src/renderer/store/TimelineSpace/Modals/NewToot.js
+++ b/src/renderer/store/TimelineSpace/Modals/NewToot.js
@@ -10,7 +10,8 @@ const NewToot = {
replyToMessage: null,
blockSubmit: false,
attachedMedias: [],
- visibility: 'public'
+ visibility: 'public',
+ sensitive: false
},
mutations: {
changeModal (state, value) {
@@ -36,6 +37,9 @@ const NewToot = {
},
changeVisibility (state, value) {
state.visibility = value
+ },
+ changeSensitive (state, value) {
+ state.sensitive = value
}
},
actions: {
@@ -70,6 +74,7 @@ const NewToot = {
commit('setReplyTo', null)
commit('changeBlockSubmit', false)
commit('clearAttachedMedias')
+ commit('changeSensitive', false)
}
},
uploadImage ({ state, commit, rootState }, image) {
From c2c658f838faf560bb46e36cbfd1506766f918f0 Mon Sep 17 00:00:00 2001
From: AkiraFukushima
Date: Fri, 25 May 2018 00:21:20 +0900
Subject: [PATCH 2/2] refs #330 Show sensitive button when attached medias are
exist
---
src/renderer/components/TimelineSpace/Modals/NewToot.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/renderer/components/TimelineSpace/Modals/NewToot.vue b/src/renderer/components/TimelineSpace/Modals/NewToot.vue
index b9c5eeeb..1cf47ba5 100644
--- a/src/renderer/components/TimelineSpace/Modals/NewToot.vue
+++ b/src/renderer/components/TimelineSpace/Modals/NewToot.vue
@@ -31,7 +31,7 @@
-