feat: Add ErrorWidget, InvitesTotal, and UsersTotal components
- Add ErrorWidget component with basic layout and text content for displaying a 404 error.
- Add InvitesTotal component for displaying the total number of invites.
- Add UsersTotal component for displaying the total number of users.
feat: Update admin views and templates
- Updated the
AdminView.vue
template to remove unnecessary styles and improve responsiveness. - Added a new
HomeView.vue
template for managing the Wizarr server. - Updated the
InvitationsView.vue
template to include a button for creating invites and improved styling. - Updated the
InviteView.vue
template to include a button for creating invites and improved styling. - Added a new
SettingsView.vue
template for managing server settings. - Updated the
UsersView.vue
template to include a button for scanning users and improved styling.
feat: Add Dashboard and ViewToggle components
- Adds a new Dashboard component to display widgets in a grid layout.
- Adds a ViewToggle component to AdminNavBar for switching between views.
feat: Refactor AdminTemplate, HeaderTemplate, and add WidgetTemplate
- Refactored the
AdminTemplate
to improve readability and simplify the template structure. - Updated the styling classes in
AdminTemplate
to ensure consistent spacing and borders. - Added
boxView
andcontentConform
props to control the visibility and alignment of the template. - Refactored the
HeaderTemplate
to improve readability and simplify the template structure. - Added a new
WidgetTemplate
component for displaying widget-like information. - Implemented the
WidgetTemplate
with props for icon, title, and value.
Closes #123
feat: Add ViewToggle component and Button component
This commit adds the ViewToggle component and Button component to the frontend. The ViewToggle component allows users to toggle between box view and list view, while the Button component provides a customizable button with various size, variant, and outline options. These components enhance the user interface and provide more interactivity to the frontend.
Add dashboard store and theme store with respective functionalities
- Add
dashboard.ts
with a store nameddashboard
that includes theupdateWidget
anddeleteWidget
actions. The store initializes with a default dashboard state containing two widgets: InvitesTotal and UsersTotal. - Add
theme.ts
with a store namedtheme
that includes acurrentTheme
getter and initializes with a default theme and aboxView
boolean flag set to false. - Add
widgets.ts
with a helper functiongetWidget
that dynamically imports the Vue component based on the provided widget type. If the import fails, it falls back toErrorWidget.vue
.
feat: Update router redirects and component imports
- Updated the router redirect from "admin-invite" to "admin-home" in the "/admin" path.
- Changed the component import for the "test" route to import "HomeView.vue" instead of "TestView.vue".
- Updated the component import for the "admin-settings" route to import "SettingsView.vue" instead of "SettingsView.vue".
fix: Use new Plugin for formkit
- Replaced the commented import of the "VanillaPlugin" with the import of the "Plugin" from "@flavorly/vanilla-components".
- Removed the "as any" type assertion for the "Plugin" import.
refactor: Remove counter store
- Deleted the "counter.ts" file, which contained the "useCounterStore" store.
feat: Add WidgetOptions interface
- Added a new interface "WidgetOptions" in "WidgetOptions.ts" file to define the options for a widget component.
feat: Add gridstack and responsive grid layout packages
This commit adds the "gridstack" package to the frontend package.json dependencies and the "vue-ts-responsive-grid-layout" package to the devDependencies. It also excludes the "@flavorly/vanilla-components" directory from the tsconfig.app.json and tsconfig.json files.
feat: Add Gridstack CSS files
This commit adds the Gridstack CSS files to the project, including gridstack.min.css
and gridstack-extra.min.css
. These files are imported in main.scss
using @import
statements.
Add vue-ts-responsive-grid-layout shim file and remove SettingsView component
-
Add
vue-ts-responsive-grid-layout
shim file to declare module and exportGridLayout
andGridItem
components. -
Remove
SettingsView
component file. -
Adds
vue-ts-responsive-grid-layout
shim file for grid layout support. -
Removes
SettingsView
component, which is no longer needed.
Refactor account button and related buttons
- Refactored the code in AccountButton.vue, LanguageSelector.vue, LogoutButton.vue, ThemeToggle.vue, and ViewToggle.vue to use a more standardized and consistent code structure for button components.
- Updated the usage of the
<button>
element and replaced it with the<div>
element. - Made adjustments to the classes and attributes of the buttons for better styling and interactivity.
- Modified the imports and dependencies to optimize the code and remove unused imports.
feat: Update Dashboard and related components
- Updated the deleteWidget method to deleteLocalWidget to improve clarity.
- Added a resetLocalDashboard method to reset the dashboard layout.
- Updated the deleteWidget method calls to deleteLocalWidget.
- Added a fade transition for the editing mode.
- Added a reset layout button and a add widget button.
- Updated the Widget component to receive the isShowing prop.
- Updated the Dashboard component to use the deleteLocalWidget and resetLocalDashboard methods.
- Removed the Button component import from Dashboard.
- Updated the InviteForm component to handle duration as null for unlimited invites.
- Updated the InviteForm component to handle duration as null for custom duration.
- Updated the invite creation process to handle null duration and expires values.
- Updated the AdminViews HomeView component to listen for isEditing prop changes.
- Updated the SettingsViews DefaultView component to use nullish coalescing operator for search filtering.
Add InvitationItem.vue and UserItem.vue with updated functionality
Update AdminNavBar and UserItem components
- In AdminNavBar component:
- Modify the "router-link" class condition to highlight the active link correctly.
- In UserItem component:
- Remove unnecessary classes from the "expired" paragraph element.
Refactor create_invitation method and fix expires and duration validation
- Refactor the create_invitation method in invitations_api.py to return the created invitation directly.
- Update the expires and duration validation in invitations.py to correctly check if the values are in the future.
The create_invitation method in invitations_api.py has been refactored to directly return the created invitation.
In invitations.py, the validation for expires and duration has been fixed to properly check if the values are in the future. If the expires or duration values are strings or integers, they are converted to datetime objects representing the UTC date and time.
Additionally, unnecessary code for converting models to dictionaries in get_users_by_expiring method has been removed.
feat: Add default dashboard layout
- Added a default dashboard layout consisting of several widgets.
- Each widget has a unique ID, type, and grid configuration.
- The
useDashboardStore
state now initializes with the default dashboard layout.
fix: Update runJob function in tasks store
- Updated the
runJob
function in thetasks
store to properly handle the response from the API. - If the job is null, the function will return early.
- The updated job is now properly stored in the store.
feat: Update toMinutes filter
- Updated the
toMinutes
filter to include a newutc
parameter. - The
utc
parameter determines whether to consider UTC time or local time. - Moment objects are created using the respective time zone option.
- The difference in minutes is calculated between the input value and the current time.
feat: Add InvitesGraph, InvitesTotal, TasksTotal, and UsersGraph widgets
- Add new InvitesGraph widget that displays a line chart of invitations created on different days of the week.
- Add new InvitesTotal widget that displays the total number of invitations.
- Add new TasksTotal widget that displays the total number of tasks.
- Add new UsersGraph widget that displays a line chart of users created on different days of the week.
Add chart.js and vue-chart-3 packages to frontend dependencies