Add a settings category about the cursor
This commit is contained in:
@@ -427,11 +427,11 @@ define([
|
||||
getColor().toString(16);
|
||||
};
|
||||
var getUserColor = function () {
|
||||
var color = Util.find(store.proxy, ['settings', 'general', 'color']);
|
||||
var color = Util.find(store.proxy, ['settings', 'general', 'cursor', 'color']);
|
||||
if (!color) {
|
||||
color = getRandomColor();
|
||||
Store.setAttribute(null, {
|
||||
attr: ['general', 'color'],
|
||||
attr: ['general', 'cursor', 'color'],
|
||||
value: color
|
||||
}, function () {});
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ define([
|
||||
var updateCursor = function (ctx, data, client, cb) {
|
||||
var c = ctx.clients[client];
|
||||
if (!c) { return void cb({error: 'NO_CLIENT'}); }
|
||||
data.color = Util.find(ctx.store.proxy, ['settings', 'general', 'color']);
|
||||
data.color = Util.find(ctx.store.proxy, ['settings', 'general', 'cursor', 'color']);
|
||||
data.name = ctx.store.proxy[Constants.displayNameKey] || Messages.anonymous;
|
||||
data.avatar = Util.find(ctx.store.proxy, ['profile', 'avatar']);
|
||||
console.log(data.color);
|
||||
|
||||
Reference in New Issue
Block a user