New convienience functions on toggle menus, allow paths in sys module search
This commit is contained in:
parent
c456c18b85
commit
a829905c63
|
@ -135,6 +135,7 @@ module.exports = class Actor extends ActivityPubObject {
|
||||||
bbsInfo: {
|
bbsInfo: {
|
||||||
boardName: Config().general.boardName,
|
boardName: Config().general.boardName,
|
||||||
memberSince: user.getProperty(UserProps.AccountCreated),
|
memberSince: user.getProperty(UserProps.AccountCreated),
|
||||||
|
affiliations: user.getProperty(UserProps.Affiliations) || '',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ const ALL_ASSETS = [
|
||||||
];
|
];
|
||||||
|
|
||||||
const ASSET_RE = new RegExp(
|
const ASSET_RE = new RegExp(
|
||||||
'^@(' + ALL_ASSETS.join('|') + ')' + /:(?:([^:]+):)?([A-Za-z0-9_\-.]+)$/.source
|
'^@(' + ALL_ASSETS.join('|') + ')' + /:(?:([^:]+):)?([A-Za-z0-9_\-./]+)$/.source
|
||||||
);
|
);
|
||||||
|
|
||||||
function parseAsset(s) {
|
function parseAsset(s) {
|
||||||
|
|
|
@ -77,6 +77,28 @@ ToggleMenuView.prototype.setFocusItemIndex = function (index) {
|
||||||
this.updateSelection();
|
this.updateSelection();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ToggleMenuView.prototype.setTrue = function () {
|
||||||
|
this.setFocusItemIndex(0);
|
||||||
|
this.updateSelection();
|
||||||
|
};
|
||||||
|
|
||||||
|
ToggleMenuView.prototype.setFalse = function () {
|
||||||
|
this.setFocusItemIndex(1);
|
||||||
|
this.updateSelection();
|
||||||
|
};
|
||||||
|
|
||||||
|
ToggleMenuView.prototype.setFromBoolean = function (bool) {
|
||||||
|
return bool ? this.setTrue() : this.setFalse();
|
||||||
|
};
|
||||||
|
|
||||||
|
ToggleMenuView.prototype.setYes = function () {
|
||||||
|
return this.setTrue();
|
||||||
|
};
|
||||||
|
|
||||||
|
ToggleMenuView.prototype.setNo = function () {
|
||||||
|
return this.setFalse();
|
||||||
|
};
|
||||||
|
|
||||||
ToggleMenuView.prototype.setFocus = function (focused) {
|
ToggleMenuView.prototype.setFocus = function (focused) {
|
||||||
ToggleMenuView.super_.prototype.setFocus.call(this, focused);
|
ToggleMenuView.super_.prototype.setFocus.call(this, focused);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue