Skip to content

Commit 3d0031c

Browse files
committed
Fix device configuration panel.
1 parent 40b719e commit 3d0031c

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

coder-apps/common/coder/static/js/index.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,6 @@ var saveSettings = function() {
248248
$.post('/app/coderlib/api/device/name',
249249
{ 'name': $('#coder_name').val() },
250250
function(d) {
251-
//console.log( d );
252251
if ( d.status === 'success' ) {
253252
device_name = d.name;
254253
$("#coder_logo").text( device_name );
@@ -264,9 +263,8 @@ var saveSettings = function() {
264263
return;
265264
}
266265
$.post('/app/coderlib/api/device/owner',
267-
{ 'coder_owner': $('#coder_ownername').val() },
266+
{ 'owner': $('#coder_ownername').val() },
268267
function(d) {
269-
//console.log( d );
270268
if ( d.status === 'success' ) {
271269
coder_owner = d.owner;
272270
}
@@ -289,9 +287,8 @@ var saveSettings = function() {
289287

290288

291289
$.post('/app/coderlib/api/device/color',
292-
{ 'coder_color': hexcolor },
290+
{ 'color': hexcolor },
293291
function(d) {
294-
//console.log( d );
295292
if ( d.status === 'success' ) {
296293
coder_color = d.color;
297294
$("#coder_nav").css('background-color', coder_color);

coder-apps/common/coderlib/app/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ exports.api_set_device_color = function(app, req, res) {
315315
if (err)
316316
res.json({ status: 'error', error: err });
317317
else
318-
res.json({ status: 'success', color: exports.device.coder_color });
318+
res.json({ status: 'success', color: exports.device.color });
319319
});
320320
}
321321
else

coder-base/server.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ var apphandler = function( req, res, appdir ) {
6060
}
6161
userapp = app.require();
6262

63-
res.locals["app_name"] = name;
64-
res.locals["app_url"] = "/app/" + name;
65-
res.locals["static_url"] = "/static/apps/" + name;
63+
res.locals["app_name"] = appname;
64+
res.locals["app_url"] = "/app/" + appname;
65+
res.locals["static_url"] = "/static/apps/" + appname;
6666
res.locals["device_name"] = coderlib.device.name;
6767
res.locals["coder_owner"] = coderlib.device.owner;
6868
res.locals["coder_color"] = coderlib.device.color;

0 commit comments

Comments
 (0)