mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
feat(electron): recording popups (#11016)
Added a recording popup UI for the audio recording feature in the desktop app, improving the user experience when capturing audio from applications. ### What changed? - Created a new popup window system for displaying recording controls - Added a dedicated recording UI with start/stop controls and status indicators - Moved audio encoding logic from the main app to a dedicated module - Implemented smooth animations for popup appearance/disappearance - Updated the recording workflow to show visual feedback during recording process - Added internationalization support for recording-related text - Modified the recording status flow to include new states: new, recording, stopped, ready fix AF-2340
This commit is contained in:
@@ -112,6 +112,19 @@ export function createBackgroundWorkerHTMLPlugin(
|
||||
});
|
||||
}
|
||||
|
||||
export function createPopupHTMLPlugin(
|
||||
flags: BuildFlags,
|
||||
BUILD_CONFIG: BUILD_CONFIG_TYPE
|
||||
) {
|
||||
const htmlPluginOptions = getHTMLPluginOptions(flags, BUILD_CONFIG);
|
||||
|
||||
return new HTMLPlugin({
|
||||
...htmlPluginOptions,
|
||||
chunks: ['popup'],
|
||||
filename: `popup.html`,
|
||||
});
|
||||
}
|
||||
|
||||
export function createHTMLPlugins(
|
||||
flags: BuildFlags,
|
||||
BUILD_CONFIG: BUILD_CONFIG_TYPE
|
||||
|
||||
@@ -17,6 +17,7 @@ import { productionCacheGroups } from './cache-group.js';
|
||||
import {
|
||||
createBackgroundWorkerHTMLPlugin,
|
||||
createHTMLPlugins,
|
||||
createPopupHTMLPlugin,
|
||||
createShellHTMLPlugin,
|
||||
} from './html-plugin.js';
|
||||
import { WebpackS3Plugin } from './s3-plugin.js';
|
||||
@@ -425,6 +426,7 @@ export function createWebpackConfig(
|
||||
if (buildConfig.isElectron) {
|
||||
config.plugins.push(createShellHTMLPlugin(flags, buildConfig));
|
||||
config.plugins.push(createBackgroundWorkerHTMLPlugin(flags, buildConfig));
|
||||
config.plugins.push(createPopupHTMLPlugin(flags, buildConfig));
|
||||
|
||||
// sourcemap url like # sourceMappingURL=76-6370cd185962bc89.js.map wont load in electron
|
||||
// this is because the default file:// protocol will be ignored by Chromium
|
||||
|
||||
Reference in New Issue
Block a user