mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
Plain classes are private to their file, so accessing them from
another module results in the following warning:
That property was defined with 'let' or 'const' inside the module.
This was previously supported, but is not correct according to the
ES6 standard.
Fix by assigning the class to a public variable instead.
(Eventually switching to ES6 modules with proper imports/exports will
fix this as well)
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1512>
24 lines
532 B
JavaScript
24 lines
532 B
JavaScript
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
|
/* exported CredentialManager */
|
|
|
|
var CredentialManager = class CredentialManager {
|
|
constructor(service) {
|
|
this._token = null;
|
|
this._service = service;
|
|
this._authenticatedSignalId = null;
|
|
}
|
|
|
|
get token() {
|
|
return this._token;
|
|
}
|
|
|
|
set token(t) {
|
|
this._token = t;
|
|
if (this._token)
|
|
this.emit('user-authenticated', this._token);
|
|
}
|
|
|
|
get service() {
|
|
return this._service;
|
|
}
|
|
};
|