From 547117173bdc81eb87e8f6fcebc70dfbe214698e Mon Sep 17 00:00:00 2001 From: Leafd Date: Thu, 9 Oct 2025 13:44:52 -0400 Subject: [PATCH] feat: add login page --- src/App.vue | 312 +++++++++++++++++++++++--------------------- src/views/Login.vue | 225 ++++++++++++++++++++++++++++++++ 2 files changed, 390 insertions(+), 147 deletions(-) create mode 100644 src/views/Login.vue diff --git a/src/App.vue b/src/App.vue index 4419b28..cf12112 100644 --- a/src/App.vue +++ b/src/App.vue @@ -9,6 +9,7 @@ import Home from "./views/Home.vue"; import Projects from "./views/Projects.vue"; import Settings from "./views/Settings.vue"; import Statistics from "./views/Statistics.vue"; +import Login from "./views/Login.vue"; import UserProfileCard from "./components/UserProfileCard.vue"; import CustomTitlebar from "./components/CustomTitlebar.vue"; import WakatimeSetupModal from "./components/WakatimeSetupModal.vue"; @@ -411,8 +412,10 @@ async function copyApiKey() { } -async function handleDirectOAuthAuth() { - if (!directOAuthToken.value.trim()) { +async function handleDirectOAuthAuth(token?: string) { + const tokenToUse = token || directOAuthToken.value; + + if (!tokenToUse.trim()) { alert("Please enter an OAuth authorization code or access token"); return; } @@ -420,12 +423,12 @@ async function handleDirectOAuthAuth() { try { isLoading.value = true; - console.log("Attempting direct OAuth auth with token:", directOAuthToken.value); - console.log("Token length:", directOAuthToken.value.length); + console.log("Attempting direct OAuth auth with token:", tokenToUse); + console.log("Token length:", tokenToUse.length); console.log("API config:", apiConfig.value); await invoke("authenticate_with_direct_oauth", { - oauthToken: directOAuthToken.value, + oauthToken: tokenToUse, apiConfig: apiConfig.value }); @@ -452,6 +455,11 @@ async function handleDirectOAuthAuth() { } async function checkForUpdatesAndInstall() { + if (isDevMode.value) { + console.info('[AUTO-UPDATE] Skipping auto-update check in development mode'); + return; + } + try { console.info('[AUTO-UPDATE] Checking for updates...'); const update = await check(); @@ -495,158 +503,168 @@ async function checkForUpdatesAndInstall() {
-
+ +
+ +
+
- - -
- -
- -
- -
- - -
-
-
-
-

- leaderboard -

-
- friends - global -
+
+
+
+ Hackatime
-
+ + + +
+
-
- - -
- -
+ - -
- -
+ +
+ +
+ +
+ +
- -
- -
-
+ +
+
+
+
+

+ leaderboard +

+
+ friends + global +
+
+ +
+
+
+
+ + +
+ +
+ + +
+ +
+ + +
+ +
+
diff --git a/src/views/Login.vue b/src/views/Login.vue new file mode 100644 index 0000000..029db93 --- /dev/null +++ b/src/views/Login.vue @@ -0,0 +1,225 @@ + + + + + +