fix #2456
This commit is contained in:
22
dist/swagger-ui.js
vendored
22
dist/swagger-ui.js
vendored
File diff suppressed because one or more lines are too long
2
dist/swagger-ui.js.map
vendored
2
dist/swagger-ui.js.map
vendored
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"swagger-ui.js","sources":["webpack:///swagger-ui.js"],"mappings":"AAAA;AAsoGA;AAy4HA;AA+7FA;AA2mCA;AAkgCA;AAshCA;AAi4BA","sourceRoot":""}
|
{"version":3,"file":"swagger-ui.js","sources":["webpack:///swagger-ui.js"],"mappings":"AAAA;;;;;;AAmwCA;AAoyHA;AA2wHA;AA07FA;AAmnCA;AAu/BA;AAmiCA;AA44BA","sourceRoot":""}
|
||||||
@@ -37,7 +37,6 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"babel-polyfill": "^6.23.0",
|
"babel-polyfill": "^6.23.0",
|
||||||
"brace": "0.7.0",
|
"brace": "0.7.0",
|
||||||
"btoa": "^1.1.2",
|
|
||||||
"deep-extend": "0.4.1",
|
"deep-extend": "0.4.1",
|
||||||
"expect": "1.20.2",
|
"expect": "1.20.2",
|
||||||
"getbase": "^2.8.2",
|
"getbase": "^2.8.2",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import win from "core/window"
|
import win from "core/window"
|
||||||
import btoa from "btoa"
|
import { btoa } from "core/utils"
|
||||||
|
|
||||||
export const SHOW_AUTH_POPUP = "show_popup"
|
export const SHOW_AUTH_POPUP = "show_popup"
|
||||||
export const AUTHORIZE = "authorize"
|
export const AUTHORIZE = "authorize"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { fromJS, Map } from "immutable"
|
import { fromJS, Map } from "immutable"
|
||||||
import btoa from "btoa"
|
import { btoa } from "core/utils"
|
||||||
|
|
||||||
import {
|
import {
|
||||||
SHOW_AUTH_POPUP,
|
SHOW_AUTH_POPUP,
|
||||||
|
|||||||
@@ -547,3 +547,15 @@ export const parseSeach = () => {
|
|||||||
|
|
||||||
return map
|
return map
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const btoa = (str) => {
|
||||||
|
let buffer;
|
||||||
|
|
||||||
|
if (str instanceof Buffer) {
|
||||||
|
buffer = str;
|
||||||
|
} else {
|
||||||
|
buffer = new Buffer(str.toString(), "utf-8");
|
||||||
|
}
|
||||||
|
|
||||||
|
return buffer.toString("base64");
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user