mirror of
https://github.com/status-im/consul.git
synced 2025-01-21 02:59:48 +00:00
9d21736e9f
* Add copyright headers to UI files * Ensure copywrite file ignores external libs
40 lines
629 B
JavaScript
40 lines
629 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
*/
|
|
|
|
export default {
|
|
id: 'auth-dialog',
|
|
initial: 'idle',
|
|
on: {
|
|
CHANGE: [
|
|
{
|
|
target: 'authorized',
|
|
cond: 'hasToken',
|
|
actions: ['login'],
|
|
},
|
|
{
|
|
target: 'unauthorized',
|
|
actions: ['logout'],
|
|
},
|
|
],
|
|
},
|
|
states: {
|
|
idle: {
|
|
on: {
|
|
CHANGE: [
|
|
{
|
|
target: 'authorized',
|
|
cond: 'hasToken',
|
|
},
|
|
{
|
|
target: 'unauthorized',
|
|
},
|
|
],
|
|
},
|
|
},
|
|
unauthorized: {},
|
|
authorized: {},
|
|
},
|
|
};
|