1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-08 18:30:53 +00:00

change notification popover (#5629)

* change notification popover

delete useless test

* Update iconfont and user notification ui

* change notification dialog detail

* format css

* update url of all notifications when send notice email

---------

Co-authored-by: lian <imwhatiam123@gmail.com>
This commit is contained in:
Michael An
2023-09-08 13:54:05 +08:00
committed by GitHub
parent cd3ede438f
commit b46a60268f
24 changed files with 710 additions and 768 deletions

View File

@@ -1571,4 +1571,34 @@ export const Utils = {
return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
},
getUrlSearches() {
const search = location.search;
let searchParams = {};
if (search.length === 0) {
return searchParams;
}
let allSearches = search.split('?')[1];
let allSearchesArr = allSearches.split('&');
allSearchesArr.forEach(item => {
let itemArr = item.split('=');
searchParams[itemArr[0]] = decodeURI(itemArr[1]);
});
return searchParams;
},
// If value is null, delete the search parameter; else, add or update the search parameter.
updateSearchParameter(key, value) {
const { origin, pathname } = location;
const searchParams = this.getUrlSearches();
searchParams[key] = value;
let newSearch = '?';
for (let key in searchParams) {
let value = searchParams[key];
if (value) {
newSearch = newSearch === '?' ? `?${key}=${value}` : `${newSearch}&${key}=${value}`;
}
}
history.replaceState(null, '', origin + pathname + newSearch);
},
};