Skip to content

Commit

Permalink
feat: update WP SweepBright
Browse files Browse the repository at this point in the history
  • Loading branch information
FalkoJoseph committed Feb 21, 2024
1 parent bc4c87f commit de1b6de
Show file tree
Hide file tree
Showing 84 changed files with 27,270 additions and 40,343 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,7 @@ error_log
.cache
**/.cache
**/.cache/*

/db/
/db/*
!/db/.keep
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.15.1
14.17.0
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- PHP 7.3+
- Dedicated, managed or fast WordPress hosting (ability to resize & crop large image files 10MB+)
- [Advanced Custom Fields PRO](https://www.advancedcustomfields.com/pro/)
- Yearly license (€99,00 annually, per website).
- Yearly license ([contact sales](mailto:[email protected]))

### 1.2. Features

Expand Down Expand Up @@ -42,7 +42,7 @@

SweepBright uses a [webhook](https://website.sweepbright.com/docs/#header-1.-publish-a-property-to-the-custom-website) for publishing properties to your website. The webhook on your website should be responsible for retrieving and storing all of the property's information whenever a publication occurs in SweepBright.

However, if you have a lot of publications scheduled at the same time it could take up a lot of processing resources.
However, if you have a lot of publications scheduled at the same time it could take up a lot of processing resources.
Potentially leading to unpredictable or unreliable behavior.

We've solved this by creating our own webhook server which acts as a "man in the middle" between SweepBright and your website.
Expand All @@ -57,7 +57,7 @@ Whenever a publication is scheduled in SweepBright it will first connect to our

### 2.3. What's the price / additional costs?

> €99,00 annually, per website.
> The plugin comes with a yearly subscription, dependent on the usage of our webhook server.
Additional costs may occur depending on your usage of our webhook server.
For regular use or less than 15 publications per day on average, there are no additional costs.
Expand Down
Binary file removed admin/.DS_Store
Binary file not shown.
11 changes: 11 additions & 0 deletions admin/partials/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,17 @@
</select>
</td>
</tr>
<tr>
<th scope="row">
<label for="country">Country</label>
</th>
<td>
<select name="country" id="country" class="postform" value="<?= WP_SweepBright_Helpers::setting('country'); ?>">
<option class="level-0" value="be" <?= WP_SweepBright_Helpers::setting('country') === 'be' ? 'selected' : ''; ?>>Belgium</option>
<option class="level-0" value="fr" <?= WP_SweepBright_Helpers::setting('country') === 'fr' ? 'selected' : ''; ?>>France</option>
</select>
</td>
</tr>
</tbody>
</table>

Expand Down
Binary file removed admin/vue-components/.DS_Store
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<template>
<textarea
:value="inputData(field, col)"
@change="updateData($event, col, field)"
>
</textarea>
</template>

<script>
export default {
props: ["field", "col", "lang"],
components: {},
computed: {},
data() {
return {};
},
methods: {
inputData(field, activeCol) {
let data = this.col.data[field.sync ? "default" : this.lang][field.id];
if (!data && !field.allow_empty) {
data = field.default;
if (field.sync) {
activeCol.data["default"][field.id] = data;
} else {
activeCol.data["en"][field.id] = data;
activeCol.data["nl"][field.id] = data;
activeCol.data["fr"][field.id] = data;
}
}
return data;
},
updateData(e, col, field) {
const data = e.target.value;
if (!field.sync) {
col.data[this.lang][field.id] = data;
} else {
col.data["default"][field.id] = data;
}
this.$forceUpdate();
},
},
mounted() {},
};
</script>
12 changes: 11 additions & 1 deletion admin/vue-components/Pages/Components/Editor/Fields/Renderer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<template v-if="conditionalField(field)">
<template v-if="field.type !== 'locale'">
<p
class="mb-3 text-xs font-medium tracking-wide text-gray-600 uppercase "
class="mb-3 text-xs font-medium tracking-wide text-gray-600 uppercase"
>
{{ field.name }}
<template
Expand Down Expand Up @@ -119,6 +119,14 @@
</FieldGroup>
</template>

<template v-else-if="field.type === 'textarea'">
<FieldTextArea
:field="field"
:col="col"
:lang="lang"
></FieldTextArea>
</template>

<template v-else>
<FieldText :field="field" :col="col" :lang="lang"></FieldText>
</template>
Expand All @@ -131,6 +139,7 @@
<script>
import FieldGroup from "./FieldGroup";
import FieldText from "./FieldText";
import FieldTextArea from "./FieldTextArea";
import FieldWysiwyg from "./FieldWysiwyg";
import FieldNumber from "./FieldNumber";
import FieldRange from "./FieldRange";
Expand All @@ -155,6 +164,7 @@ export default {
components: {
FieldGroup,
FieldText,
FieldTextArea,
FieldWysiwyg,
FieldNumber,
FieldRange,
Expand Down
Loading

0 comments on commit de1b6de

Please sign in to comment.