Commit Graph
634 Commits
Author SHA1 Message Date
Mcat12 e304eae619 Move API type definitions to new api.d.ts file
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-01-24 21:08:59 -08:00
Mcat12 3134c8101d Convert dashboard components to TypeScript
Also fixed the format check to use TypeScript files.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-01-24 20:57:51 -08:00
Mcat12 0af3e21ab2 Convert settings components to TypeScript
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-01-23 22:06:38 -08:00
Mcat12 dbfd6b6c28 Convert ForgotPassword to Typescript
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-01-23 21:01:34 -08:00
Mcat12 35e0c3af7e Convert the query log to TypeScript
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-01-23 20:59:13 -08:00
Mcat12 f9270074a4 Convert the list components to TypeScript
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-01-23 20:33:06 -08:00
Mcat12 5e7539bf83 Convert the rest of the common components to TypeScript
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-01-23 19:53:13 -08:00
Mcat12 383b6cddbe Convert some common components to TypeScript
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-01-21 18:19:29 -08:00
Mcat12 64a0dd4f60 Convert the Full.js container component
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-01-21 17:50:47 -08:00
Mcat12 f2841ff1ab Convert the util files to TypeScript
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-01-21 17:30:32 -08:00
Mcat12 148a24d8a7 Convert the rest of the views to TypeScript
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-01-21 11:51:34 -08:00
Mcat12 3512b49960 Convert route.js and some views
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-01-20 19:50:04 -08:00
Mcat12 637d5aecab Convert more top-level js files to typescript
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-01-20 17:24:02 -08:00
Mcat12 7010fde8a7 Add TypeScript
index.js has been converted to index.tsx.
The build works without errors.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-01-20 16:36:18 -08:00
Mark Drobnak b5dba58fc6 Merge pull request #137 from pi-hole/feature/language-preference
Add language setting to preferences
2019-01-20 18:47:45 -05:00
Mcat12 6cc979c93b Add language setting to preferences
Translations have been updated to support preferences. A new
"preferences" namespace is added.

A new `languages.json` file is generated under `src/` by
`update-translations.js` so the web interface knows what languages are
available.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-01-20 15:45:25 -08:00
Mark Drobnak ce6f4f6e0c Merge pull request #136 from pi-hole/fix/unnecessary-refresh-calls
WithAPIData: Don't make a request on refresh if we know the answer
2019-01-20 17:56:38 -05:00
Mcat12 91971713eb WithAPIData: Don't make a request on refresh if we know the answer
If a user changes a setting, we send it to the API, and it says the
change was successful, then we should not have to ask the API for the
settings we just saved.

This is the case for status and preferences. When we save those
settings, we can update our local data with the new setting instead of
making a request for it. This changes a "PUT then GET" flow into a
"PUT then update local" flow, which is one less server call.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-01-20 14:55:15 -08:00
Mark Drobnak 9ebaaba190 Merge pull request #135 from pi-hole/feature/web-layout-preferences
Add preferences page with web interface layout preference
2019-01-20 17:27:23 -05:00
Mcat12 2af97f830f Add preferences page with web interface layout preference
The boxed layout button in the top right has been removed. The layout
is now controlled by the same option used in the PHP web interface. It
is retrieved when the web interface starts, and can be changed in the
Preferences page.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-01-20 14:21:36 -08:00
Mark Drobnak fbe513865c Merge pull request #134 from pi-hole/tweak/tests-directory
Move tests into __tests__ folders
2019-01-18 21:40:21 -08:00
Mcat12 02765e7655 Move tests into __tests__ folders
`i18n.js` and `validate.js` (plus its tests) were moved into the util
folder.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-01-18 21:37:47 -08:00
Mark Drobnak a848686a65 Merge pull request #133 from pi-hole/feature/enable-disable
Implement enable/disable buttons in the sidebar
2019-01-18 21:31:19 -08:00
Mark Drobnak 7d90c8a0d4 Merge branch 'development' into feature/enable-disable 2019-01-18 21:30:01 -08:00
Mcat12 6199764914 Add support for custom disable times
Translations were updated to move "Apply" from settings to common, and
to add a few more necessary strings.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-01-18 21:22:41 -08:00
Mark Drobnak 984e4b1f45 Merge pull request #132 from pi-hole/fix/network-page
Fix crash on network page due to incorrect use of input tags
2019-01-18 20:14:11 -08:00
Mcat12 b674d69333 Fix crash on network page due to incorrect use of input tags
Input tags should not have children, and should be marked as read-only.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-01-18 20:12:56 -08:00
Mcat12 37c0226c21 Implement basic enable/disable functionality
All buttons except for "Custom time" are implemented.
When a status change is requested, no other status changes can happen
until the first is finished. When it is finished, it will refresh the
status to get the latest value.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-01-18 20:08:33 -08:00
Mcat12 9ae1a854ff Expose the refresh function to StatusContext consumers
This will be used to quickly refresh the status when it has been changed
by the EnableDisable component.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-01-18 18:45:08 -08:00
Mcat12 f2fe9d5aa7 Prevent WithAPIData promises from getting orphaned when refreshing
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-01-18 18:36:32 -08:00
Mcat12 4764723c36 Move context.js to components/common
It exports a component, and is only used by components.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-01-18 18:35:15 -08:00
Mcat12 00fd625956 Update translations with enable/disable text
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-01-17 22:02:16 -08:00
Mcat12 848dc15a4a Add enable/disable buttons to the sidebar
The currently are read-only, they do not do anything when clicked.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-01-17 21:14:04 -08:00
Mcat12 b15326f7d4 Update packages to the latest versions
It seems an update to the formatter caused the license headers to get
reformatted, so that is the bulk of the changes. The other large change
is that the translate HOC function was renamed to withNamespaces.

With the license headers all getting updated, I updated the year to
2019.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-01-17 20:58:41 -08:00
Mcat12 97bd418ced Add support for custom components in the sidebar
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-01-16 22:16:48 -08:00
Mcat12 e7242fa61f Make nav items into components
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-01-16 22:16:11 -08:00
Mark Drobnak 3f00ac7ef6 Merge pull request #130 from pi-hole/update/font-awesome
Update to Font Awesome 5.6.3
2019-01-16 22:10:33 -08:00
Mcat12 aad70387f3 Update to Font Awesome 5.6.3
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-01-16 22:06:14 -08:00
Mark Drobnak 574bcc4104 Merge pull request #129 from pi-hole/tweak/default-boxed
Set the default layout to boxed
2019-01-13 17:03:28 -08:00
Mcat12 f718bfb6e0 Set the default layout to boxed
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-01-13 16:52:33 -08:00
Mark Drobnak 700c43c112 Merge pull request #128 from pi-hole/fix/base-path
Fix base path of router set to / instead of /admin
2019-01-12 16:09:16 -08:00
Mcat12 e885648362 Fix base path of router set to / instead of /admin
The base path of the build was set correctly to /admin, but the client
side router (react-router) was using / as the base path. Now it will use
the same base path as the build.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-01-12 15:41:17 -08:00
Mark Drobnak b8f16e4ae6 Merge pull request #126 from pi-hole/feature/query-log-filters
Add Query Log Filters
2019-01-08 19:48:34 -08:00
Mcat12 42efd5bc9a Fix use before definition
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-01-06 18:03:11 -08:00
Mcat12 5a6f829869 Update translations
This mainly adds the "Allowed" string to query-log.json and adds
Turkish.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-01-06 17:59:18 -08:00
Mcat12 a743085a0d Add date range filtering to the Query Log
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-01-06 17:48:38 -08:00
Mcat12 13fcbef1c7 Fix action button to use new status row
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-12-31 23:39:43 -05:00
Mcat12 c5e4086b1d Add reply filter
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-12-31 23:38:35 -05:00
Mcat12 f8b5071b5a Fix incorrect query type filter parsing
The value is stored as a string and must be converted to use addition.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-12-31 20:49:00 -05:00
Mcat12 093872acf8 Add support for blocked and allowed status filters
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-12-31 20:45:40 -05:00