feat(ui): new SettingsSSLProvider using antd

This commit is contained in:
Fu Diwei
2024-12-20 20:42:46 +08:00
parent 9e1e0dee1d
commit a917d6c2c5
16 changed files with 392 additions and 488 deletions

View File

@@ -22,10 +22,12 @@ export const useNotifyChannelStore = create<NotifyChannelState>((set, get) => {
setChannel: async (channel, config) => {
settings ??= await getSettings<NotifyChannelsSettingsContent>(SETTINGS_NAMES.NOTIFY_CHANNELS);
return get().setChannels({
...settings.content,
[channel]: { ...settings.content[channel], ...config },
});
return get().setChannels(
produce(settings, (draft) => {
draft.content ??= {};
draft.content[channel] = { ...draft.content[channel], ...config };
})
);
},
setChannels: async (channels) => {