Merge pull request #1177 from Smithster/master

Custom Background to Command Line
This commit is contained in:
Jack 2021-04-04 20:42:13 +01:00 committed by GitHub
commit ec7ed79029
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 0 deletions

View file

@ -1596,6 +1596,14 @@ export let defaultCommands = {
Commandline.show();
},
},
{
id: "changeCustomBackground",
display: "Change custom background...",
input: true,
exec: (input) => {
UpdateConfig.setCustomBackground(input);
},
},
{
id: "changeTheme",
display: "Change theme...",

View file

@ -1349,6 +1349,7 @@ export function setCustomBackground(value, nosave) {
if (value == null || value == undefined) {
value = "";
}
value = value.trim();
if( /(https|http):\/\/(www\.|).+\..+\/.+(\.png|\.gif|\.jpeg|\.jpg)/gi.test(value) || value == ""){
config.customBackground = value;
ThemeController.applyCustomBackground();

View file

@ -2934,6 +2934,7 @@
placeholder="image url"
class="input"
tabindex="0"
onClick="this.select();"
/>
<div
class="button save"