first commit

This commit is contained in:
brusnitsyn
2026-01-04 23:15:06 +09:00
commit 0ec04cfb4b
104 changed files with 19072 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
import {createDiscreteApi, darkTheme, lightTheme} from "naive-ui";
export function setupNaiveDiscreteApi(app) {
const {
message,
notification,
dialog,
loadingBar
} = createDiscreteApi(
['message', 'dialog', 'notification', 'loadingBar'],
{
configProviderProps: {
theme: window.matchMedia('(prefers-color-scheme: dark)').matches ? darkTheme : lightTheme
}
}
)
window.$notification = notification
window.$message = message
window.$dialog = dialog
window.$loadingBar = loadingBar
app.config.globalProperties.$notification = notification
app.config.globalProperties.$message = message
app.config.globalProperties.$dialog = dialog
app.config.globalProperties.$loadingBar = loadingBar
}