mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-01 10:01:07 +02:00
feat(core): add config and package_info getters on App and AppHandle (#2016)
This commit is contained in:
committed by
GitHub
parent
94dbc96c97
commit
70fc87a7ff
5
.changes/config-package-info-getters.md
Normal file
5
.changes/config-package-info-getters.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri": patch
|
||||
---
|
||||
|
||||
Adds `config` and `package_info` getters to the `App` and `AppHandle` structs.
|
||||
@@ -216,6 +216,16 @@ macro_rules! shared_app_impl {
|
||||
package_info: self.manager.package_info().clone(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Gets the app's configuration, defined on the `tauri.conf.json` file.
|
||||
pub fn config(&self) -> Arc<Config> {
|
||||
self.manager.config()
|
||||
}
|
||||
|
||||
/// Gets the app's package information.
|
||||
pub fn package_info(&self) -> &PackageInfo {
|
||||
self.manager.package_info()
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user