"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "client/src/actions/access.js" between
AdGuardHome-0.104.1.tar.gz and AdGuardHome-0.104.3.tar.gz

About: AdGuard Home is a network-wide ads & trackers blocking DNS server. It operates as a DNS server that re-routes tracking domains to a "black hole," thus preventing your devices from connecting to those servers.

access.js  (AdGuardHome-0.104.1):access.js  (AdGuardHome-0.104.3)
skipping to change at line 54 skipping to change at line 54
} }
}; };
export const toggleClientBlockRequest = createAction('TOGGLE_CLIENT_BLOCK_REQUES T'); export const toggleClientBlockRequest = createAction('TOGGLE_CLIENT_BLOCK_REQUES T');
export const toggleClientBlockFailure = createAction('TOGGLE_CLIENT_BLOCK_FAILUR E'); export const toggleClientBlockFailure = createAction('TOGGLE_CLIENT_BLOCK_FAILUR E');
export const toggleClientBlockSuccess = createAction('TOGGLE_CLIENT_BLOCK_SUCCES S'); export const toggleClientBlockSuccess = createAction('TOGGLE_CLIENT_BLOCK_SUCCES S');
export const toggleClientBlock = (ip, disallowed, disallowed_rule) => async (dis patch) => { export const toggleClientBlock = (ip, disallowed, disallowed_rule) => async (dis patch) => {
dispatch(toggleClientBlockRequest()); dispatch(toggleClientBlockRequest());
try { try {
const { const accessList = await apiClient.getAccessList();
allowed_clients, blocked_hosts, disallowed_clients = [], const allowed_clients = accessList.allowed_clients ?? [];
} = await apiClient.getAccessList(); const blocked_hosts = accessList.blocked_hosts ?? [];
const disallowed_clients = accessList.disallowed_clients ?? [];
const updatedDisallowedClients = disallowed const updatedDisallowedClients = disallowed
? disallowed_clients.filter((client) => client !== disallowed_rule) ? disallowed_clients.filter((client) => client !== disallowed_rule)
: disallowed_clients.concat(ip); : disallowed_clients.concat(ip);
const values = { const values = {
allowed_clients, allowed_clients,
blocked_hosts, blocked_hosts,
disallowed_clients: updatedDisallowedClients, disallowed_clients: updatedDisallowedClients,
}; };
 End of changes. 1 change blocks. 
3 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)