-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: migrate current swing componenet
- Loading branch information
Showing
27 changed files
with
3,592 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
src/main/java/com/lcaohoanq/formhandling/constants/APIConstants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.lcaohoanq.formhandling.constants; | ||
|
||
public class APIConstants { | ||
public static final String API_PREFIX = "/api/v1"; | ||
public static final String BASE_URL = "http://localhost:8081" + API_PREFIX; | ||
} |
37 changes: 37 additions & 0 deletions
37
src/main/java/com/lcaohoanq/formhandling/controllers/ForgotPasswordController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package com.lcaohoanq.formhandling.controllers; | ||
|
||
import java.awt.Desktop; | ||
import java.awt.event.ActionListener; | ||
import java.net.URI; | ||
import lombok.extern.slf4j.Slf4j; | ||
import com.lcaohoanq.formhandling.views.SwingLoginView; | ||
import com.lcaohoanq.formhandling.views.OTPVerificationView; | ||
|
||
@Slf4j | ||
public class ForgotPasswordController implements ActionListener { | ||
|
||
private final SwingLoginView loginView; | ||
|
||
@Deprecated | ||
private OTPVerificationView otpVerificationView; | ||
|
||
public ForgotPasswordController(SwingLoginView loginView, OTPVerificationView otpVerificationView) { | ||
this.loginView = loginView; | ||
this.otpVerificationView = otpVerificationView; | ||
} | ||
|
||
@Override | ||
public void actionPerformed(java.awt.event.ActionEvent e) { | ||
String api = "http://localhost:3000/forgot-password"; | ||
try { | ||
// Specify the URL of the website | ||
URI uri = new URI("http://localhost:3000/forgot-password"); | ||
// Open the website in the default browser | ||
if (Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) { | ||
Desktop.getDesktop().browse(uri); | ||
} | ||
} catch (Exception ex) { | ||
ex.printStackTrace(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.