Skip to content

Commit fa7b146

Browse files
committed
Changelog 1.0.3
- Changelog 1.0.3 - Bugfix in settings - Alerts for missing api key
1 parent f8039c6 commit fa7b146

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

Diff for: CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Release Notes for chatgpt-integration
22

3+
## 1.0.3 - 2023-04-27
4+
> {warning} Once you have installed the update, you need to head to the settings page and select which fields the prompts should be displayed for.
5+
6+
### Added
7+
- Added the option to enable or disable individual fields in the settings.
8+
- Added the option to disable the default translation prompts.
9+
- Added warning when saving settings without an api token
10+
11+
### Changed
12+
- Divided settings over three sup-pages for clarity
13+
314
## 1.0.2 - 2023-04-04
415

516
### Added

Diff for: src/Plugin.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,11 @@ function (Event $event) {
137137
$settings = Plugin::getInstance()->getSettings();
138138

139139
if (!in_array(true, $settings->enabledFields, false)){
140-
Craft::$app->getSession()->setError('ChatGPT-Integrations currently has no fields to attach to!');
140+
Craft::$app->getSession()->setError('ChatGPT-Integration currently has no fields to attach to!');
141+
}
142+
143+
if ($settings->accessToken === ''){
144+
Craft::$app->getSession()->setError('API Access Token required .');
141145
}
142146
}
143147
);

Diff for: src/templates/settings/fields.twig

+6-2
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,17 @@
3131
<tbody>
3232
<tr class="s-{{ field.id }}">
3333
<td class="label-column">{{ field.name }}</td>
34-
<td class="handle-column">{{ field.handle }}</td>
34+
<td class="handle-column">
35+
<div id="fields-handle-attribute" class="code small light copytextbtn" title="Copy to clipboard" role="button" aria-label="Copy to clipboard" tabindex="0" onclick="navigator.clipboard.writeText('{{ field.handle }}')">
36+
<input type="text" value="{{ field.handle }}" readonly="" size="{{ field.handle|length }}" tabindex="-1">
37+
<span data-icon="clipboard" aria-hidden="true"></span>
38+
</div></td>
3539
<td class="group-column">{{ craft.chatgptIntegration.getClass(field) }}</td>
3640
<td class="group-column">{{ field.group }}</td>
3741
<td class="enabled-column">
3842
{{ forms.lightswitch({
3943
name: 'enabledFields['~field.id~'].key',
40-
on: settings.enabledFields[field.id]
44+
on: settings.enabledFields|length and settings.enabledFields[field.id]
4145
}) }}
4246
</td>
4347
</tr>

0 commit comments

Comments
 (0)