-
-
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.
BREAKING CHANGE: This introduces a new authentication system
- Loading branch information
nickchecan
committed
Jan 15, 2025
1 parent
aba7a8a
commit 7079701
Showing
2 changed files
with
52 additions
and
1 deletion.
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
49 changes: 49 additions & 0 deletions
49
...zjoule.plugin/src/com/developer/nefarious/zjoule/plugin/login/pages/LoginOptionsPage.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,49 @@ | ||
package com.developer.nefarious.zjoule.plugin.login.pages; | ||
|
||
import org.eclipse.jface.wizard.WizardPage; | ||
import org.eclipse.swt.SWT; | ||
import org.eclipse.swt.layout.GridData; | ||
import org.eclipse.swt.layout.GridLayout; | ||
import org.eclipse.swt.widgets.Button; | ||
import org.eclipse.swt.widgets.Composite; | ||
|
||
public class LoginOptionsPage extends WizardPage { | ||
|
||
public static final String PAGE_ID = "Login Options"; | ||
|
||
public LoginOptionsPage() { | ||
super(PAGE_ID); | ||
setTitle("Login Options"); | ||
setDescription("Choose the AI provider."); | ||
setPageComplete(false); // Initially set the page as incomplete | ||
} | ||
|
||
@Override | ||
public void createControl(final Composite parent) { | ||
Composite container = new Composite(parent, SWT.NONE); | ||
container.setLayout(new GridLayout(1, false)); | ||
|
||
Button option1 = new Button(container, SWT.RADIO); | ||
option1.setText("SAP AI Core"); | ||
option1.setToolTipText("Select model from the SAP AI Core Generative AI Hub."); | ||
option1.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); | ||
option1.addListener(SWT.Selection, event -> setOption1()); | ||
|
||
Button option2 = new Button(container, SWT.RADIO); | ||
option2.setText("Ollama (Local)"); | ||
option2.setToolTipText("Select a local Ollama model."); | ||
option2.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); | ||
option2.addListener(SWT.Selection, event -> setOption2()); | ||
|
||
setControl(container); | ||
} | ||
|
||
private void setOption1() { | ||
setPageComplete(true); | ||
} | ||
|
||
private void setOption2() { | ||
setPageComplete(true); | ||
} | ||
|
||
} |