Skip to content

Commit

Permalink
0.16.4: Loader on settings page and updated title
Browse files Browse the repository at this point in the history
  • Loading branch information
flavienbwk committed Sep 12, 2024
1 parent 3c86c0f commit 7da4372
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
22 changes: 21 additions & 1 deletion app/app/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ import useAuth from './hooks/useAuth';

import './globals.css';

function Loader() {
return (
<div className="absolute inset-0 flex flex-col items-center justify-center min-h-screen bg-white bg-opacity-75">
<div className="loader flex flex-col items-center">
<div className="animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-blue-500"></div>
<p className="mt-4 text-blue-500">Loading settings...</p>
</div>
</div>
);
}

export default function Home() {
const [settings, setSettings] = useState({});
const { token, isTokenValid, showPasswordModal, handleValidate, setShowPasswordModal } = useAuth();
Expand All @@ -28,8 +39,17 @@ export default function Home() {
fetchSettings();
}, []);

useEffect(() => {
if (isLoading) {
document.title = "RepoChat";
} else {
document.title = settings.repo_name ? `RepoChat - ${settings.repo_name}` : "RepoChat";
}
}, [isLoading, settings.repo_name]);

return (
<div className="bg-gradient-to-br from-indigo-500 via-purple-500 to-pink-500 flex flex-col justify-between min-h-screen">
<div className="relative bg-gradient-to-br from-indigo-500 via-purple-500 to-pink-500 flex flex-col justify-between min-h-screen">
{isLoading && <Loader />}
<main className="w-full px-4 flex-grow flex items-center">
<div className="w-full max-w-4xl mx-auto">
<div className="relative">
Expand Down
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79194,7 +79194,7 @@ module.exports = JSON.parse('{"application/1d-interleaved-parityfec":{"source":"
/***/ ((module) => {

"use strict";
module.exports = {"i8":"0.16.3"};
module.exports = {"i8":"0.16.4"};

/***/ })

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gh-action-repochat",
"version": "0.16.3",
"version": "0.16.4",
"type": "commonjs",
"description": "GitHub Action to run RepoChat",
"main": "index.js",
Expand Down

0 comments on commit 7da4372

Please sign in to comment.