You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailchat/client/web/plugins/com.msgbyte.notify/src/index.tsx

19 lines
500 B
TypeScript

import { regPluginSettings, showToasts } from '@capital/common';
import { initNotify } from './notify';
import { Translate } from './translate';
import { PLUGIN_SYSTEM_SETTINGS_DISABLED_SOUND } from './const';
if ('Notification' in window) {
initNotify();
} else {
showToasts(Translate.nosupport, 'warning');
console.warn(Translate.nosupport);
}
regPluginSettings({
name: PLUGIN_SYSTEM_SETTINGS_DISABLED_SOUND,
label: Translate.disabledSound,
position: 'system',
type: 'boolean',
});