Skip to content

Commit

Permalink
Merge pull request #992 from Codeinwp/fix/ui
Browse files Browse the repository at this point in the history
Improve UI colors
  • Loading branch information
Soare-Robert-Daniel authored Jul 11, 2024
2 parents f3925a7 + fae8ad4 commit 4a73699
Show file tree
Hide file tree
Showing 4 changed files with 146 additions and 44 deletions.
58 changes: 28 additions & 30 deletions assets/css/rop_core.css
Original file line number Diff line number Diff line change
Expand Up @@ -2669,7 +2669,7 @@ a.active {
margin: 0.1rem;
padding: 0.1rem 0.5rem;
border-radius: 5rem;
color: #727e96;
color: #4C4E67;
background: #f0f1f4;
vertical-align: middle;
text-decoration: none;
Expand Down Expand Up @@ -3530,7 +3530,7 @@ a.active {
}

#rop_core .text-gray {
color: #acb3c2;
color: #6A7590;
}

#rop_core a.text-gray:focus,
Expand Down Expand Up @@ -4258,7 +4258,7 @@ a.active {
}

.rop-control-container-false .rop-control {
opacity: 0.6;
opacity: 0.7;
}

#rop_core .panel-body {
Expand Down Expand Up @@ -4410,7 +4410,7 @@ a.active {
#rop_core .btn-danger {
border-color: #b71c1c;
color: #fff;
background-color: #c62828;
background-color: #B7151F;
}

#rop_core .btn-danger:hover,
Expand All @@ -4429,7 +4429,7 @@ a.active {
#rop_core .btn-success {
border-color: #33691e;
color: #fff;
background-color: #8bc34a;
background-color: #2E8726;
}

#rop_core .btn-success:hover,
Expand All @@ -4445,6 +4445,17 @@ a.active {
background-color: #33691e;
}

#rop_core :is( .btn-success, .btn-warning, .btn-danger, .sharing-status-sharing, .rop-next-share-time, .sharing-status-notsharing ) {
display: flex;
align-items: center;
gap: 10px;
}

#rop_core :is( .btn-success, .btn-warning, .btn-danger, .sharing-status-sharing, .rop-next-share-time, .rop-sidebar-action-btns, .sharing-status-notsharing ) {
padding: 12px 16px 12px 16px;
height: fit-content;
}

.rop-queue-post i.service {
background: none;
}
Expand All @@ -4459,6 +4470,11 @@ a.active {
margin-bottom: 10px;
}

#rop_core .rop-container-start {
border: unset;
box-shadow: unset;
}

#rop_core .rop-container-start .tooltip::after {
white-space: initial;
text-overflow: initial;
Expand Down Expand Up @@ -4567,32 +4583,11 @@ a.active {
pointer-events: auto;
}

#rop_core .toast.rop-next-share-time{
background: #8bc34a;
#rop_core .toast.rop-next-share-time {
background: #E8EDFE;
color: #384C94;
border: none;
margin-bottom: 0;
}

.sharing-box{
padding: 15px 10px;
font-size: 0.75rem;
margin: 10px 0 0;
text-align: center;
}

.sharing-status-sharing {
color: #fff;
background-color: #46bd55;
}

.sharing-status-notsharing {
color: #fff;
background-color: #e65100;
}

.sharing-status-error {
color: #fff;
background-color: #c62828;
margin: 0 0 10px 0;
}

#rop_vid_tuts span{
Expand Down Expand Up @@ -4674,6 +4669,9 @@ a.active {
}

#rop_core .upsell {
color: #674E13;
background: #FFF7E2;
padding: 8px;
margin-bottom: 0;
border-radius: 0.1rem;
}
Expand Down
21 changes: 10 additions & 11 deletions vue/src/vue-elements/main-page-panel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
<h1 class="plugin-title d-inline-block">
Revive Social
</h1>

</div>
</div>
<toast />
Expand Down Expand Up @@ -96,6 +95,13 @@
:class="'rop-license-plan-'+license"
>
<div class="card rop-container-start">
<StatusBox
:status-color-class="status_color_class"
:label="status_label_display"
/>

<countdown :current_time="current_time" />

<button
id="rop_start_stop_btn"
class="btn"
Expand All @@ -119,14 +125,6 @@
{{ labels.click }} {{ labels.to }} {{ ( start_status ? labels.stop : labels.start ) }} {{ labels.sharing }}
</button>

<div
class="sharing-box"
:class="status_color_class"
>
{{ status_label_display }}
</div>

<countdown :current_time="current_time" />

<div
v-if="staging"
Expand Down Expand Up @@ -173,8 +171,8 @@
import LogsTab from './logs-tab-panel.vue'
import Toast from './reusables/toast.vue'
import CountDown from './reusables/countdown.vue'
import moment from 'moment'
import upsellSidebar from './upsell-sidebar.vue'
import StatusBox from './reusables/status-box.vue'
export default {
name: 'MainPagePanel',
Expand All @@ -186,7 +184,8 @@
'logs': LogsTab,
'upsell-sidebar': upsellSidebar,
'toast': Toast,
'countdown': CountDown
'countdown': CountDown,
StatusBox
},
data: function () {
return {
Expand Down
11 changes: 8 additions & 3 deletions vue/src/vue-elements/reusables/countdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@
v-if="isOn && accounts_no > 0"
class="toast rop-next-share-time"
>
<span v-if="diff_seconds>0"> <b><i
class="fa fa-fast-forward"
/> {{ labels.next_share }}</b> {{ labels.in }}</span>
<span v-if="diff_seconds>0">
<b>
<i
class="fa fa-fast-forward"
/>
{{ labels.next_share }} {{ labels.in }}
</b>
</span>
<small v-if="timediff !== ''">{{ timediff }}</small>
</div>
</template>
Expand Down
100 changes: 100 additions & 0 deletions vue/src/vue-elements/reusables/status-box.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<template>
<div
class="sharing-box"
:class="statusColorClass"
>
<svg
v-if="'sharing-status-sharing' === statusColorClass"
width="20"
height="20"
viewBox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M8.00002 18.777C7.12963 18.5796 6.2937 18.253 5.52002 17.808M12 1.22302C13.9882 1.67709 15.7632 2.79271 17.0347 4.38723C18.3061 5.98174 18.9984 7.96067 18.9984 10C18.9984 12.0394 18.3061 14.0183 17.0347 15.6128C15.7632 17.2073 13.9882 18.323 12 18.777M2.57899 15.093C2.03349 14.3005 1.61919 13.4253 1.35199 12.501M1.12402 8.50002C1.28402 7.55002 1.59202 6.65002 2.02402 5.82502L2.19302 5.52002M4.90698 2.57902C5.84264 1.93492 6.8923 1.47474 7.99998 1.22302M7 10L9 12L13 8.00003"
stroke="#218818"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>
<svg
v-if="'sharing-status-sharing' !== statusColorClass"
width="20"
height="20"
viewBox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M8.00002 18.777C7.12963 18.5796 6.2937 18.253 5.52002 17.808M12 1.22302C13.9882 1.67709 15.7632 2.79271 17.0347 4.38723C18.3061 5.98174 18.9984 7.96067 18.9984 10C18.9984 12.0394 18.3061 14.0183 17.0347 15.6128C15.7632 17.2073 13.9882 18.323 12 18.777M2.57899 15.093C2.03349 14.3005 1.61919 13.4253 1.35199 12.501M1.12402 8.50002C1.28402 7.55002 1.59202 6.65002 2.02402 5.82502L2.19302 5.52002M4.90698 2.57902C5.84264 1.93492 6.8923 1.47474 7.99998 1.22302M10 6.00003V10M10 14V14.01"
:stroke="'sharing-status-nosharing' === statusColorClass ? '#B33E00' : '#3A3A3A'"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>

<span>
<b>{{ title }}:</b>
{{ description }}
</span>
</div>
</template>

<script>
export default {
name: 'StatusBox',
props: {
statusColorClass: {
type: String,
required: true
},
label: {
type: String,
required: true
}
},
data() {
const [ title, description ] = this.label.split( ':' )
return {
title,
description
}
}
}
</script>

<style scoped>
span {
font-weight: 400;
}
.sharing-box{
padding: 15px 10px;
font-size: 0.75rem;
margin: 0 0 10px 0;
text-align: center;
}
.sharing-status-sharing {
color: #144E0F;
background-color: #E7F7E6;
}
.sharing-status-notsharing {
color: #3A3A3A;
background-color: #F1F1F1;
}
.sharing-status-error {
color: #3A3A3A;
background-color: #FFEBE0;
}
</style>

<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M8.00002 18.777C7.12963 18.5796 6.2937 18.253 5.52002 17.808M12 1.22302C13.9882 1.67709 15.7632 2.79271 17.0347 4.38723C18.3061 5.98174 18.9984 7.96067 18.9984 10C18.9984 12.0394 18.3061 14.0183 17.0347 15.6128C15.7632 17.2073 13.9882 18.323 12 18.777M2.57899 15.093C2.03349 14.3005 1.61919 13.4253 1.35199 12.501M1.12402 8.50002C1.28402 7.55002 1.59202 6.65002 2.02402 5.82502L2.19302 5.52002M4.90698 2.57902C5.84264 1.93492 6.8923 1.47474 7.99998 1.22302M10 6.00003V10M10 14V14.01" stroke="#3A3A3A" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

0 comments on commit 4a73699

Please sign in to comment.