Skip to content
Merged

main #179

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
- 🛠️ **[Developer Guide](https://github.com/Matdata-eu/Matgui/blob/main/docs/developer-guide.md)** - API reference and integration guide
- 🚀 **[Production Environment](https://matgui.matdata.eu/)** - Live instance
- 📦 **[npm Package](https://www.npmjs.com/package/@matdata/yasgui)**
- 🐳 **[Docker Hub](https://hub.docker.com/r/mathiasvda/yasgui)**
- 🐳 **[Docker Hub](https://hub.docker.com/r/mathiasvda/matgui)**
- 📝 **[Releases & Changelog](https://github.com/Matdata-eu/Matgui/releases)**
- 💻 **[GitHub Repository](https://github.com/Matdata-eu/MatGUI)**

Expand Down Expand Up @@ -126,8 +126,8 @@ yarn add @matdata/yasgui

**Run with default endpoint:**
```bash
docker pull mathiasvda/yasgui:latest
docker run -p 8080:8080 mathiasvda/yasgui:latest
docker pull mathiasvda/matgui:latest
docker run -p 8080:8080 mathiasvda/matgui:latest
```

Access at: `http://localhost:8080`
Expand All @@ -136,7 +136,7 @@ Access at: `http://localhost:8080`
```bash
docker run -p 8080:8080 \
-e MATGUI_DEFAULT_ENDPOINT=https://your-endpoint.com/sparql \
mathiasvda/yasgui:latest
mathiasvda/matgui:latest
```

For detailed installation instructions and usage examples, see the **[Developer Guide](https://github.com/Matdata-eu/Matgui/blob/main/docs/developer-guide.md#installation)** and **[User Guide - Docker](https://github.com/Matdata-eu/Matgui/blob/main/docs/user-guide.md#running-matgui-with-docker)**.
Expand Down
8 changes: 4 additions & 4 deletions docs/user-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ You can run Matgui locally using Docker, which is especially useful when working
**Running MatGUI:**

```bash
docker run -p 8080:8080 mathiasvda/yasgui
docker run -p 8080:8080 mathiasvda/matgui
```

This command:
Expand Down Expand Up @@ -173,7 +173,7 @@ This command:
To run on a different port (e.g., 3000):

```bash
docker run -p 3000:8080 mathiasvda/yasgui
docker run -p 3000:8080 mathiasvda/matgui
```

Then access at `http://localhost:3000`
Expand Down Expand Up @@ -253,7 +253,7 @@ The process is similar in Chrome, Firefox, and Safari:
If you frequently work with local endpoints, consider running Matgui locally with Docker:

```bash
docker run -p 8080:8080 mathiasvda/yasgui
docker run -p 8080:8080 mathiasvda/matgui
```

Then open your browser and navigate to `http://localhost:8080`.
Expand Down Expand Up @@ -1903,7 +1903,7 @@ Browsers block HTTP requests to local endpoints from HTTPS pages (mixed content
1. **Run Matgui Locally with Docker** (Recommended):

```bash
docker run -p 8080:8080 mathiasvda/yasgui
docker run -p 8080:8080 mathiasvda/matgui
```

- Eliminates all permission issues
Expand Down
16 changes: 16 additions & 0 deletions packages/yasgui/src/PersistentConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,22 @@ export default class PersistentConfig {
this.toStorage();
}

/**
* Get the persisted layout orientation
*/
public getOrientation(): "vertical" | "horizontal" | undefined {
const orientation = this.persistedJson.orientation;
return orientation === "vertical" || orientation === "horizontal" ? orientation : undefined;
}

/**
* Set and persist the layout orientation
*/
public setOrientation(orientation: "vertical" | "horizontal") {
this.persistedJson.orientation = orientation;
this.toStorage();
}

/**
* Get list of disabled developer-configured endpoint buttons
*/
Expand Down
3 changes: 3 additions & 0 deletions packages/yasgui/src/Tab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,9 @@ export class Tab extends EventEmitter {
// Update global config
this.yasgui.config.orientation = newOrientation;

// Persist orientation
this.yasgui.persistentConfig.setOrientation(newOrientation);

// Apply to all tabs
for (const tabId in this.yasgui._tabs) {
const tab = this.yasgui._tabs[tabId];
Expand Down
6 changes: 6 additions & 0 deletions packages/yasgui/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,12 @@ export class Yasgui extends EventEmitter {
this.config.showSnippetsBar = persistedShowSnippetsBar;
}

// Load persisted orientation if available
const persistedOrientation = this.persistentConfig.getOrientation();
if (persistedOrientation !== undefined) {
this.config.orientation = persistedOrientation;
}

this.tabElements = new TabElements(this);
this.tabPanelsEl = document.createElement("div");

Expand Down
Loading
Loading