Skip to content

Commit

Permalink
Update "Config - General"
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkykh committed May 29, 2018
1 parent 35dcf9d commit 9a41aa8
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 12 deletions.
3 changes: 2 additions & 1 deletion themes-default/slim/static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3384,7 +3384,8 @@ pre {
input sizing (for config pages)
========================================================================== */

#config select {
/* Don't style root-dirs select */
#config select:not([size]) {
width: auto;
display: inline;
}
Expand Down
14 changes: 11 additions & 3 deletions themes-default/slim/views/config_general.mako
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<%inherit file="/layouts/main.mako"/>
<%!
import datetime
import json
import locale
from medusa import app, config, metadata
from medusa.common import SKIPPED, WANTED, UNAIRED, ARCHIVED, IGNORED, SNATCHED, SNATCHED_PROPER, SNATCHED_BEST, FAILED
Expand All @@ -17,8 +18,15 @@ window.app = new Vue({
metaInfo: {
title: 'Config - General'
},
data: {
header: 'General Configuration'
created() {
// @FIXME: This is a workaround to make sure `rootDirs` is available for the component.
MEDUSA.config.rootDirs = ${json.dumps(app.ROOT_DIRS)};
},
data() {
return {
header: 'General Configuration',
rootDirs: []
};
}
});
</script>
Expand Down Expand Up @@ -115,7 +123,7 @@ window.app = new Vue({
<span class="component-title">Show root directories</span>
<span class="component-desc">
<p>where the files of shows are located</p>
<%include file="/inc_rootDirs.mako"/>
<root-dirs @update:root-dirs="rootDirs = $event"></root-dirs>
</span>
</label>
</div>
Expand Down
3 changes: 2 additions & 1 deletion themes/dark/assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3384,7 +3384,8 @@ pre {
input sizing (for config pages)
========================================================================== */

#config select {
/* Don't style root-dirs select */
#config select:not([size]) {
width: auto;
display: inline;
}
Expand Down
14 changes: 11 additions & 3 deletions themes/dark/templates/config_general.mako
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<%inherit file="/layouts/main.mako"/>
<%!
import datetime
import json
import locale
from medusa import app, config, metadata
from medusa.common import SKIPPED, WANTED, UNAIRED, ARCHIVED, IGNORED, SNATCHED, SNATCHED_PROPER, SNATCHED_BEST, FAILED
Expand All @@ -17,8 +18,15 @@ window.app = new Vue({
metaInfo: {
title: 'Config - General'
},
data: {
header: 'General Configuration'
created() {
// @FIXME: This is a workaround to make sure `rootDirs` is available for the component.
MEDUSA.config.rootDirs = ${json.dumps(app.ROOT_DIRS)};
},
data() {
return {
header: 'General Configuration',
rootDirs: []
};
}
});
</script>
Expand Down Expand Up @@ -115,7 +123,7 @@ window.app = new Vue({
<span class="component-title">Show root directories</span>
<span class="component-desc">
<p>where the files of shows are located</p>
<%include file="/inc_rootDirs.mako"/>
<root-dirs @update:root-dirs="rootDirs = $event"></root-dirs>
</span>
</label>
</div>
Expand Down
3 changes: 2 additions & 1 deletion themes/light/assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3384,7 +3384,8 @@ pre {
input sizing (for config pages)
========================================================================== */

#config select {
/* Don't style root-dirs select */
#config select:not([size]) {
width: auto;
display: inline;
}
Expand Down
14 changes: 11 additions & 3 deletions themes/light/templates/config_general.mako
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<%inherit file="/layouts/main.mako"/>
<%!
import datetime
import json
import locale
from medusa import app, config, metadata
from medusa.common import SKIPPED, WANTED, UNAIRED, ARCHIVED, IGNORED, SNATCHED, SNATCHED_PROPER, SNATCHED_BEST, FAILED
Expand All @@ -17,8 +18,15 @@ window.app = new Vue({
metaInfo: {
title: 'Config - General'
},
data: {
header: 'General Configuration'
created() {
// @FIXME: This is a workaround to make sure `rootDirs` is available for the component.
MEDUSA.config.rootDirs = ${json.dumps(app.ROOT_DIRS)};
},
data() {
return {
header: 'General Configuration',
rootDirs: []
};
}
});
</script>
Expand Down Expand Up @@ -115,7 +123,7 @@ window.app = new Vue({
<span class="component-title">Show root directories</span>
<span class="component-desc">
<p>where the files of shows are located</p>
<%include file="/inc_rootDirs.mako"/>
<root-dirs @update:root-dirs="rootDirs = $event"></root-dirs>
</span>
</label>
</div>
Expand Down

0 comments on commit 9a41aa8

Please sign in to comment.