mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 20:50:19 +08:00
Improve i18n.
This commit is contained in:
@ -71,23 +71,6 @@ export function renderMessageLarge(ths, msg) {
|
||||
}
|
||||
}
|
||||
|
||||
export function trim(str, ch) {
|
||||
if (str === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
let start = 0;
|
||||
let end = str.length;
|
||||
|
||||
while(start < end && str[start] === ch)
|
||||
++start;
|
||||
|
||||
while(end > start && str[end - 1] === ch)
|
||||
--end;
|
||||
|
||||
return (start > 0 || end < str.length) ? str.substring(start, end) : str;
|
||||
}
|
||||
|
||||
export function getOAuthGetParameters(params) {
|
||||
const queries = (params !== undefined) ? params : new URLSearchParams(window.location.search);
|
||||
const clientId = queries.get("client_id");
|
||||
|
Reference in New Issue
Block a user