Disable unavailable subreddits after Reddit 404
This commit is contained in:
1 parent
664aa5c098
commit
dcf57273e2
13 files changed
+153
-12
No files matched your search
@@ -122,7 +122,7 @@ export function BehaviourSection({ config, draft, errors, onChange }: SectionPro
|
||||
...draft,
|
||||
subreddits: [
|
||||
...draft.subreddits,
|
||||
{ name: '', type: 'image', weight: '1', tone: 'default', scripted: '' },
|
||||
{ name: '', enabled: true, type: 'image', weight: '1', tone: 'default', scripted: '' },
|
||||
],
|
||||
})}
|
||||
type="button"
|
||||
@@ -157,6 +157,15 @@ export function BehaviourSection({ config, draft, errors, onChange }: SectionPro
|
||||
<option value="image">Image</option><option value="chat">Chat</option>
|
||||
</select>
|
||||
</label>
|
||||
<label className="toggle-field">
|
||||
<input
|
||||
aria-label={`Subreddit ${index + 1} enabled`}
|
||||
checked={subreddit.enabled}
|
||||
onChange={(event) => onChange(updateSubreddit(draft, index, { ...subreddit, enabled: event.target.checked }))}
|
||||
type="checkbox"
|
||||
/>
|
||||
<span><strong>Enabled</strong><small>Disabled subreddits are not polled.</small></span>
|
||||
</label>
|
||||
<label className="settings-field">
|
||||
<span>Weight</span>
|
||||
<input
|
||||
|
||||
Reference in new issue
Block a user