Skip to content

Commit

Permalink
fix: close button for header editor
Browse files Browse the repository at this point in the history
  • Loading branch information
Soare-Robert-Daniel committed Jul 9, 2024
1 parent f06eef9 commit 1b72364
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
3 changes: 2 additions & 1 deletion includes/class-rop-i18n.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ public static function get_labels( $key = '' ) {
'preloader_message_default' => __( 'Loading...', 'tweet-old-post' ),
'only_in_pro' => __( 'Available in Pro', 'tweet-old-post' ),
'limit_reached' => __( 'Limit reached', 'tweet-old-post' ),
'edit_headers' => __( 'Edit Headers', 'tweet-old-post' ),
'hide' => __( 'Hide', 'tweet-old-post' ),
),
'settings' => array(
'yes_text' => __( 'Yes', 'tweet-old-post' ),
Expand Down Expand Up @@ -432,7 +434,6 @@ public static function get_labels( $key = '' ) {
'license_not_active' => __( 'An active Pro license is needed to share to %1$s', 'tweet-old-post' ),
'could_not_send_webhook' => __( 'Could not send webhook.', 'tweet-old-post' ),
'webhook_error' => __( 'An error occurred for Webhook post sharing.', 'tweet-old-post' ),

),
'generic' => array(
'only_pro_suffix' => ' (' . __( 'Available in Pro', 'tweet-old-post' ) . ')',
Expand Down
23 changes: 22 additions & 1 deletion vue/src/vue-elements/sign-in-btn.vue
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,27 @@ q2 -17 -1.5 -33t-13.5 -30q-16 -22 -41 -32q-17 -7 -35.5 -6.5t-35.5 7.5q-28 12 -43
</div>
</div>
<WebhookHeaders
v-if="isWebhook"
v-if="isWebhook && showHeaders"
:headers.sync="webhooksHeaders"
/>
<div
v-if="isWebhook"
>
<button
v-if="!showHeaders"
class="btn btn-primary"
@click="showHeaders = true"
>
{{ labels.edit_headers }}
</button>
<button
v-if="showHeaders"
class="btn btn-secondary"
@click="showHeaders = false"
>
{{ labels.hide }}
</button>
</div>
</div>
</div>

Expand Down Expand Up @@ -347,6 +365,7 @@ export default {
currentWebhookHeader: '',
webhooksHeaders: [],
showBtn: false,
showHeaders: false,
}
},
computed: {
Expand Down Expand Up @@ -524,6 +543,8 @@ export default {
this.modal.serviceName = this.$store.state.availableServices[this.selected_network].name
this.modal.description = this.$store.state.availableServices[this.selected_network].description
this.modal.data = this.$store.state.availableServices[this.selected_network].credentials
this.showHeaders = false;
this.openModal()
} else {
this.activePopup = this.selected_network
Expand Down

0 comments on commit 1b72364

Please sign in to comment.