Skip to content

Commit

Permalink
add statics to override new session title & icon
Browse files Browse the repository at this point in the history
  • Loading branch information
WeeJeWel committed Jan 21, 2025
1 parent 727b795 commit ecf6736
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/OAuth2Driver.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ const sOAuth2ConfigId = Symbol('oAuth2ConfigId');
class OAuth2Driver extends Homey.Driver {

static OAUTH2_CONFIG_ID = 'default';
static OAUTH2_NEW_SESSION_TITLE = 'New User';
static OAUTH2_NEW_SESSION_ICON = null;

/**
* @returns {Promise<void>}
Expand Down Expand Up @@ -206,7 +208,8 @@ class OAuth2Driver extends Homey.Driver {
});

result.push({
name: 'New User',
name: this.constructor.OAUTH2_NEW_SESSION_TITLE,
icon: this.constructor.OAUTH2_NEW_SESSION_ICON,
data: {
id: '$new',
},
Expand Down

0 comments on commit ecf6736

Please sign in to comment.