Skip to content

Commit

Permalink
Merge pull request #474 from WebTools-NG/#473-PMS-Root-page
Browse files Browse the repository at this point in the history
#473 fixed, as well as some cleanup
  • Loading branch information
ukdtom committed Apr 29, 2022
2 parents 9e7a8df + 5a5e9ab commit 253620e
Show file tree
Hide file tree
Showing 13 changed files with 110 additions and 89 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -13,6 +13,8 @@

* [#440 Dvr Backup and Restore](https://github.com/WebTools-NG/WebTools-NG/issues/440)
* [#469 Default ExportTools Levels do NOT produce any output](https://github.com/WebTools-NG/WebTools-NG/issues/469)
* [#468 Add "Last Viewed at" as an available field for TV Show Episode exporting](https://github.com/WebTools-NG/WebTools-NG/issues/468)
* [#473 PMS Root page](https://github.com/WebTools-NG/WebTools-NG/issues/473)

## V0.3.15 (20220413)

Expand Down
7 changes: 4 additions & 3 deletions public/locales/en.json
Expand Up @@ -325,13 +325,14 @@
},
"PMS": {
"Name": "Plex Media Server",
"Description": "@:Modules.PMS.Name module allows you to manage your server",
"Description": "@:Modules.PMS.Name modules allows you to manage your server",
"Select": "To use a module select it in the side menu",
"ErrorNoServerSelectedTitle": "No server selected",
"ErrorNoServerSelectedMsg": "You need to select a server on the top of the screen",
"ExportDoneBody": "Check {0}",
"ExportDoneTitle": "Export finished",
"Butler": {
"Title": "Butler Scheduled Tasks",
"Name": "Butler Scheduled Tasks",
"Description": "Here you can kickstart a scheduled task",
"SelectTask": "Select the scheduled task to run now",
"TTSelectTask": "Here you select among the scheduled tasks that kan be started now",
Expand All @@ -354,7 +355,7 @@
"TaskDetails": "To follow progress, see Plex WebClient Dashboard"
},
"Settings": {
"Settings": "Settings",
"Name": "Settings",
"Description": "Here you can define the settings for the selected server",
"SelectSettingsSelection": "Select Settings Group",
"TTSelectSettingsSelection": "Here you select the group the setting you want to alter is in",
Expand Down
4 changes: 2 additions & 2 deletions src/App.vue
Expand Up @@ -31,7 +31,7 @@ export default {
},
created() {
// Prefetch languages
this.$store.dispatch('fetchPOELang');
this.$store.dispatch('fetchPOELang');
},
components:{
Menu,
Expand All @@ -41,7 +41,7 @@ export default {
this.isCollapsed = value
},
}, props: {
width: {
type: String,
Expand Down
70 changes: 36 additions & 34 deletions src/components/layout/Menu.vue
Expand Up @@ -37,6 +37,34 @@
title: this.$t("Common.Menu.Sidebar.NavSections.Tools"),
hiddenOnCollapse: true
},
// Export Tools
{
href: { path: '/export' },
title: this.$t("Modules.ET.Name"),
hidden: wtutils.hideMenu('et'),
// icon: 'fas fa-file-export',
icon: {
//adjust element
element: 'img',
attributes: { src: etIcon },
},
child: [
{
href: '/export/custom',
title: this.$t("Common.Menu.Sidebar.ET.Custom"),
hidden: wtutils.hideMenu('etCustom'),
icon: 'fa fa-cog'
},
{
href: '/export/settings',
title: this.$t("Common.Menu.Sidebar.ET.Settings"),
hidden: wtutils.hideMenu('etSettings'),
icon: 'fa fa-cog'
}
]
},
// Plex.TV
{
href: { path: '/plextv' },
title: this.$t("Modules.PlexTV.Name"),
Expand All @@ -48,6 +76,7 @@
attributes: { src: plextvIcon },
}
},
// PMS
{
href: { path: '/pms' },
title: this.$t("Modules.PMS.Name"),
Expand All @@ -59,12 +88,6 @@
attributes: { src: pmsIcon },
},
child: [
{
href: '/pms/settings',
hidden: wtutils.hideMenu('pmsSettings'),
title: this.$t("Common.Menu.Sidebar.PMS.Settings"),
icon: 'fa fa-cog'
},
{
href: '/pms/butler',
title: this.$t("Common.Menu.Sidebar.PMS.Butler"),
Expand All @@ -76,41 +99,20 @@
title: this.$t("Modules.PMS.DVR.Name"),
hidden: wtutils.hideMenu('pmsDVR'),
icon: 'fas fa-tv',
}
,
{
href: { path: '/pms/viewstate' },
title: this.$t("Modules.PMS.ViewState.Name"),
hidden: wtutils.hideMenu('pmsViewState'),
icon: 'fas fa-tv',
}
]
},
{
href: { path: '/export' },
title: this.$t("Modules.ET.Name"),
hidden: wtutils.hideMenu('et'),
// icon: 'fas fa-file-export',
icon: {
//adjust element
element: 'img',
attributes: { src: etIcon },
},
child: [
{
href: '/export/settings',
title: this.$t("Common.Menu.Sidebar.ET.Settings"),
hidden: wtutils.hideMenu('etSettings'),
href: '/pms/settings',
hidden: wtutils.hideMenu('pmsSettings'),
title: this.$t("Common.Menu.Sidebar.PMS.Settings"),
icon: 'fa fa-cog'
},
{
href: '/export/custom',
title: this.$t("Common.Menu.Sidebar.ET.Custom"),
hidden: wtutils.hideMenu('etCustom'),
icon: 'fa fa-cog'
href: { path: '/pms/viewstate' },
title: this.$t("Modules.PMS.ViewState.Name"),
hidden: wtutils.hideMenu('pmsViewState'),
icon: 'fas fa-tv',
}
]
},
{
header: true,
Expand Down
2 changes: 1 addition & 1 deletion src/components/modules/ExportTools/Settings/settings.vue
@@ -1,7 +1,7 @@
<template>
<b-container fluid>
<div class="col-lg-10 col-md-12 col-xs-12">
<h1>{{ $t("Modules.ET.Settings.Settings") }}</h1>
<h1>{{ $t("Modules.ET.Settings.Name") }}</h1>
<p>{{ $t("Modules.ET.Settings.Description") }}</p>
<b-input-group id="ArraySepGrp" :prepend="$t('Modules.ET.Settings.ArraySep')" class="mt-3">
<b-form-input id="ArraySep" name="ArraySep" type="text" class="form-control" v-model="ArraySep" :disabled=false :maxlength=1 @change="setArraySep()"></b-form-input>
Expand Down
1 change: 1 addition & 0 deletions src/components/modules/ExportTools/defs/def-Episode.json
Expand Up @@ -74,6 +74,7 @@
"IMDB Link",
"Intro Start",
"Intro Stop",
"Last Viewed at",
"Locked Fields",
"Media Aspect Ratio",
"Media Audio Channels",
Expand Down
2 changes: 1 addition & 1 deletion src/components/modules/ExportTools/defs/def-Fields.json
Expand Up @@ -607,7 +607,7 @@
"Last Viewed at":
{
"key": "$..lastViewedAt",
"call": 1,
"call": 2,
"type": "datetime"
},
"Labels":
Expand Down
1 change: 1 addition & 0 deletions src/components/modules/ExportTools/defs/def-Show.json
Expand Up @@ -39,6 +39,7 @@
"Item Counts",
"Key",
"Labels",
"Last Viewed at",
"Location",
"Locked Fields",
"Original Title",
Expand Down
2 changes: 1 addition & 1 deletion src/components/modules/ExportTools/scripts/ethelper.js
Expand Up @@ -839,7 +839,7 @@ const etHelper = new class ETHELPER {
this.Settings.currentItem +=1;
this.updateStatusMsg(this.RawMsgType.Items, i18n.t('Modules.ET.Status.ProcessItem', {count: this.Settings.count, total: this.Settings.endItem}));
log.debug(`Start addRowToTmp item ${this.Settings.currentItem} (Switch to Silly log to see contents)`)
log.debug(`Data is: ${JSON.stringify(data)}`)
log.silly(`Data is: ${JSON.stringify(data)}`)
let name, key, type, subType, subKey, doPostProc;
let date, year, month, day, hours, minutes, seconds;
let val, array, i, valArray, valArrayVal
Expand Down
42 changes: 21 additions & 21 deletions src/components/modules/Main/Language.vue
Expand Up @@ -5,11 +5,11 @@
<h2>
{{ $t("Common.Language.Name") }}<br>
<small>{{ $t("Common.Language.Description") }}</small>
</h2>
</h2>
<br>

<div class="control has-icons-left">
<div class="locale-changer select is-dark is-medium" >
<div class="locale-changer select is-dark is-medium" >
<b-input-group>
<b-input-group-prepend is-text>
<b-icon icon="globe2"></b-icon>
Expand Down Expand Up @@ -55,8 +55,8 @@
</li>
</ul>
</div>
<div>
<b-button variant="success" v-on:click="joinPOE">{{ $t("Common.Language.Join") }}</b-button>
<div>
<b-button variant="success" v-on:click="joinPOE">{{ $t("Common.Language.Join") }}</b-button>
</div>
</div>
</b-container>
Expand All @@ -73,46 +73,46 @@ console.log = log.log;
export default {
name: 'locale-changer',
data () {
return {
olLangs: []
return {
olLangs: []
}
},
},
mounted() {
log.info("Language Created");
this.getOnlineLangs();
log.info("Language Created");
this.getOnlineLangs();
},
methods: {
async forcedownload() {
this.olLangs = [];
await this.$store.dispatch("updateAndSetLang", { "langCode": i18n.locale, "forceDownload": true});
this.olLangs = [];
await this.$store.dispatch("updateAndSetLang", { "langCode": i18n.locale, "forceDownload": true});
this.getOnlineLangs();
// Get timeStamp
let timeStamp = ''
var onlineLangs = await this.$store.getters.getLanguages
var onlineLangs = await this.$store.getters.getLanguages
for (var i=0; i<onlineLangs.length; i++) {
if (onlineLangs[i]['code'] == i18n.locale)
{
timeStamp = onlineLangs[i]['updated']
}
}
}
// Update settings with timestamp
wtconfig.set(`Languages.${i18n.locale}`, timeStamp)
},
joinPOE() {
shell.openExternal("https://github.com/WebTools-NG/WebTools-NG/wiki/Translator")
},
async getOnlineLangs() {
var onlineLangs = await this.$store.getters.getLanguages
for (var i=0; i<onlineLangs.length; i++) {
async getOnlineLangs() {
var onlineLangs = await this.$store.getters.getLanguages
for (var i=0; i<onlineLangs.length; i++) {
var langName = onlineLangs[i]['name'] + ' (' + onlineLangs[i]['percentage'] + '%)';
const entry = {}
entry['text'] = langName
entry['text'] = langName
entry['value'] = onlineLangs[i]['code']
this.olLangs.push(entry)
}
},
onChange(event) {
this.$store.dispatch('updateAndSetLang', { "langCode": event.target.value, "forceDownload": false});
}
},
onChange(event) {
this.$store.dispatch('updateAndSetLang', { "langCode": event.target.value, "forceDownload": false});
}
}
}
Expand Down
30 changes: 15 additions & 15 deletions src/components/modules/PMS/Butler/butler.vue
@@ -1,9 +1,9 @@
<template>
<b-container fluid>
<div class="col-lg-10 col-md-12 col-xs-12">
<h1>{{ $t("Modules.PMS.Butler.Title") }}</h1>
<h1>{{ $t("Modules.PMS.Butler.Name") }}</h1>
<p>{{ $t("Modules.PMS.Butler.Description") }}</p>
</div>
</div>

<div class="d-flex align-items-center">
<b-form-group id="ButlerGroup" v-bind:label="$t('Modules.PMS.Butler.SelectTask')" label-size="lg" label-class="font-weight-bold pt-0">
Expand All @@ -12,32 +12,32 @@
</b-tooltip>
<b-form-select
v-model="selTask"
id="selTask"
id="selTask"
:options="selTaskOptions"
name="selTask">
</b-form-select>
</b-form-group>
</div>
<br>
</div>
<br>
<br>
<div class="buttons">
<!-- Buttons -->
<div id="buttons" class="text-center">
<b-button-group >
<b-button variant="success" class="mr-1" :disabled="this.selTask == ''" @click="executeButlerTask"> {{ $t('Modules.PMS.Butler.RunTask') }} </b-button>
<b-button variant="success" class="mr-1" :disabled="this.selTask == ''" @click="executeButlerTask"> {{ $t('Modules.PMS.Butler.RunTask') }} </b-button>
</b-button-group>
</div>
</div>
</div>
</b-container>
</template>

<script>
const log = require("electron-log");
import i18n from '../../../../i18n';
import i18n from '../../../../i18n';
import store from '../../../../store';
export default {
data() {
return {
return {
selTaskOptions: [
{
"text": i18n.t('Modules.PMS.Butler.BackupDatabase'),
Expand Down Expand Up @@ -95,13 +95,13 @@
"text": i18n.t('Modules.PMS.Butler.UpgradeMediaAnalysis'),
"value": "UpgradeMediaAnalysis"
}
],
selTask : "",
],
selTask : "",
};
},
created() {
log.info("PMS Butler Created");
this.serverSelected();
this.serverSelected();
},
computed: {
selectedServerAddress: function(){
Expand All @@ -110,7 +110,7 @@
},
methods: {
async executeButlerTask() {
log.debug(`Starting Butler Task: ${this.selTask}`);
log.debug(`Starting Butler Task: ${this.selTask}`);
await store.dispatch('startButlerTask', {
Token: this.$store.getters.getAuthToken,
Address: this.$store.getters.getSelectedServerAddress,
Expand All @@ -122,7 +122,7 @@
variant: 'primary',
toaster: 'b-toaster-bottom-right'
});
},
},
async serverSelected() {
let serverCheck = this.$store.getters.getSelectedServer;
if (serverCheck == "none") {
Expand All @@ -136,7 +136,7 @@
}
);
}
}
}
}
};
Expand Down

0 comments on commit 253620e

Please sign in to comment.