Merge branch 'develop' of https://github.com/matrix-org/matrix-react-sdk into joriks/font-scaling-slider
This commit is contained in:
@@ -72,6 +72,7 @@ export default class WidgetUtils {
|
||||
return room.currentState.maySendStateEvent('im.vector.modular.widgets', me);
|
||||
}
|
||||
|
||||
// TODO: Generify the name of this function. It's not just scalar.
|
||||
/**
|
||||
* Returns true if specified url is a scalar URL, typically https://scalar.vector.im/api
|
||||
* @param {[type]} testUrlString URL to check
|
||||
@@ -210,9 +211,9 @@ export default class WidgetUtils {
|
||||
});
|
||||
}
|
||||
|
||||
static setUserWidget(widgetId, widgetType, widgetUrl, widgetName, widgetData) {
|
||||
static setUserWidget(widgetId, widgetType: WidgetType, widgetUrl, widgetName, widgetData) {
|
||||
const content = {
|
||||
type: widgetType,
|
||||
type: widgetType.preferred,
|
||||
url: widgetUrl,
|
||||
name: widgetName,
|
||||
data: widgetData,
|
||||
@@ -369,7 +370,7 @@ export default class WidgetUtils {
|
||||
static addIntegrationManagerWidget(name: string, uiUrl: string, apiUrl: string) {
|
||||
return WidgetUtils.setUserWidget(
|
||||
"integration_manager_" + (new Date().getTime()),
|
||||
"m.integration_manager",
|
||||
WidgetType.INTEGRATION_MANAGER,
|
||||
uiUrl,
|
||||
"Integration Manager: " + name,
|
||||
{"api_url": apiUrl},
|
||||
|
||||
@@ -15,6 +15,6 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
// converts a pixel value to rem.
|
||||
export function toRem(pixelVal) {
|
||||
return pixelVal / 15 + "rem";
|
||||
export function toRem(pixelValue) {
|
||||
return pixelValue / 15 + "rem";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user