Skip to content

Commit

Permalink
Merge pull request #64 from HiEventsDev/develop
Browse files Browse the repository at this point in the history
main <- devlop
  • Loading branch information
daveearley authored Jun 20, 2024
2 parents 0a994a4 + 68e1113 commit 5b30491
Show file tree
Hide file tree
Showing 12 changed files with 4,518 additions and 7,486 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ a quick start, follow these steps:

[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/8CGKmu?referralCode=KvSr11)

[![Deploy on Zeabur](https://zeabur.com/button.svg)](https://zeabur.com/templates/8DIRY6)

### 🐳 Quick Start with Docker

> [!IMPORTANT]
Expand Down Expand Up @@ -128,4 +130,4 @@ reach out to us at [[email protected]](mailto:[email protected]).

Hi.Events is licensed under the terms of the [AGPL-3.0](https://github.com/HiEventsDev/hi.events/blob/main/LICENCE) license.

For more licensing information, including commercial licencing options, please visit our licensing page [here](https://hi.events/licensing).
For more licensing information, including commercial licencing options, please visit our licensing page [here](https://hi.events/licensing).
1 change: 0 additions & 1 deletion backend/app/Http/Request/Account/UpdateAccountRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ public function rules(): array
return [
'name' => 'required|string',
'timezone' => 'required|timezone:all',
'email' => 'required|email',
'currency_code' => [Rule::in(array_values($currencies))],
];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ public function __construct(
public readonly string $account_id,
public readonly string $updated_by_user_id,
public readonly string $name,
public readonly string $email,
public readonly string $currency_code,
public readonly string $timezone,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ public function handle(UpdateAccountDTO $data): AccountDomainObject
$this->accountRepository->updateWhere(
attributes: [
'name' => $data->name,
'email' => $data->email,
'currency_code' => $data->currency_code,
'timezone' => $data->timezone,
],
Expand Down
9 changes: 5 additions & 4 deletions frontend/src/components/common/WidgetEditor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ export const WidgetEditor = () => {
},
});

const [htmlEmbedCode, setHtmlHtmlEmbedCode] = useState<string>("");
const [htmlEmbedCode, setHtmlEmbedCode] = useState<string>("");
const [reactComponentCode, setReactComponentCode] = useState<string>("");
const [reactUsageCode, setReactUsageCode] = useState<string>("");
const currentLocation = typeof window !== "undefined" ? window?.location : undefined;
const embedUrl = `${currentLocation?.protocol}//${currentLocation?.host}/widget.js`;
const embedScript = `<script async src="${embedUrl}"></script>`;

useEffect(() => {
setHtmlHtmlEmbedCode(
setHtmlEmbedCode(
'<div ' +
'data-hievents-id="' + eventId + '" ' +
'data-hievents-primary-color="' + form.values.primary_color + '" ' +
Expand Down Expand Up @@ -165,7 +165,8 @@ export default App;
<Group justify={'space-between'}>
{t`Colors`}

<Popover title={t`The styling settings you choose apply only to copied HTML and won't be stored.`}>
<Popover
title={t`The styling settings you choose apply only to copied HTML and won't be stored.`}>
<IconInfoCircle size={23}/>
</Popover>
</Group>
Expand Down Expand Up @@ -357,4 +358,4 @@ export default App;
</div>
</div>
);
};
};
6 changes: 3 additions & 3 deletions frontend/src/embed/widget.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/* eslint-disable lingui/no-unlocalized-strings */
(function () {
(function(scriptElement) {
const isScriptLoaded = () => !!window.hiEventWidgetLoaded;

const loadWidget = () => {
window.hiEventWidgetLoaded = true;

let scriptOrigin;
try {
const scriptURL = document.currentScript.src;
const scriptURL = scriptElement.src;
scriptOrigin = new URL(scriptURL).origin;
} catch (e) {
console.error('HiEvent widget error: Invalid script URL');
Expand Down Expand Up @@ -86,4 +86,4 @@
loadWidget();
}
}
})();
})(document.currentScript);
Loading

0 comments on commit 5b30491

Please sign in to comment.