This commit is contained in:
UKDTOM 2021-02-23 23:15:52 +01:00
parent 622211bbe0
commit 3ed901c983
4 changed files with 22 additions and 155 deletions

View file

@ -5,6 +5,7 @@
**Note**: This version is an Alpha version, that is not made public **Note**: This version is an Alpha version, that is not made public
* [#257 Plex.TV Export notify when done](https://github.com/WebTools-NG/WebTools-NG/issues/257) * [#257 Plex.TV Export notify when done](https://github.com/WebTools-NG/WebTools-NG/issues/257)
* [#256 PMS Export notify when done](https://github.com/WebTools-NG/WebTools-NG/issues/256)
## V0.1.15 ## V0.1.15

View file

@ -113,6 +113,7 @@ const pmssettings = new class PMSSettings {
var newFile = tmpFile.replace('.tmp', '.csv'); var newFile = tmpFile.replace('.tmp', '.csv');
fs.renameSync(tmpFile, newFile); fs.renameSync(tmpFile, newFile);
log.info('renamed complete'); log.info('renamed complete');
return newFile;
} }
async getFileName({ Type, Module, Grp }){ async getFileName({ Type, Module, Grp }){

View file

@ -161,19 +161,31 @@
methods: { methods: {
exportSettings: async function(){ exportSettings: async function(){
log.info(`Export Group Settings: ${this.selSection}`); log.info(`Export Group Settings: ${this.selSection}`);
const path = require('path'); const path = require('path');
const dirPath = path.join(i18n.t("Modules.PMS.Name"), i18n.t("Modules.PMS.Settings.Settings")); const dirPath = path.join(i18n.t("Modules.PMS.Name"), i18n.t("Modules.PMS.Settings.Settings"));
const outFile = await pmssettings.exportSettings({Module: dirPath, Grp: this.selSection, Data: this.$store.getters.getPMSSettings});
await pmssettings.exportSettings({Module: dirPath, Grp: this.selSection, Data: this.$store.getters.getPMSSettings}); const bodyStr = i18n.t("Modules.PMS.ExportDoneBody", [outFile]);
this.$bvToast.toast(bodyStr, {
title: this.$t("Modules.PMS.ExportDoneTitle"),
autoHideDelay: 400000,
solid: true,
variant: 'primary',
toaster: 'b-toaster-bottom-right'
});
}, },
exportAllSettings: async function(){ exportAllSettings: async function(){
log.info(`Export All Settings: ${this.selSection}`); log.info(`Export All Settings: ${this.selSection}`);
const path = require('path'); const path = require('path');
const dirPath = path.join(i18n.t("Modules.PMS.Name"), i18n.t("Modules.PMS.Settings.Settings")); const dirPath = path.join(i18n.t("Modules.PMS.Name"), i18n.t("Modules.PMS.Settings.Settings"));
const outFile = await pmssettings.exportSettings({Module: dirPath, Grp:'All', Data: this.$store.getters.getPMSSettings});
await pmssettings.exportSettings({Module: dirPath, Grp:'All', Data: this.$store.getters.getPMSSettings}); const bodyStr = i18n.t("Modules.PMS.ExportDoneBody", [outFile]);
this.$bvToast.toast(bodyStr, {
title: this.$t("Modules.PMS.ExportDoneTitle"),
autoHideDelay: 400000,
solid: true,
variant: 'primary',
toaster: 'b-toaster-bottom-right'
});
}, },
async saveNewSetting() { async saveNewSetting() {
log.debug(`Saving setting ${this.newSettingValue} for setting ${this.edtSettingKey}`); log.debug(`Saving setting ${this.newSettingValue} for setting ${this.edtSettingKey}`);

File diff suppressed because one or more lines are too long