Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22.13.0
cache: 'npm'
cache-dependency-path: 'web/package-lock.json'
- name: Set up Go
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22.13.0
cache: 'npm'
cache-dependency-path: 'web/package-lock.json'
- name: Set up Go
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ test_configs/
.DS_Store
/vendor

.next-dev

dist/
out/

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Stage 1: Build the Next.js frontend
FROM node:20-alpine AS web-builder
FROM node:22.13.0-alpine AS web-builder
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY web/package.json web/package-lock.json ./web/
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1342,7 +1342,7 @@ Contributions are welcome! Please feel free to submit a Pull Request.

Requirements:

- Node.js `18.19.0` or higher
- Node.js `22.13.0` or higher
- Go `1.17` or higher

The frontend project is built with [Next.js](https://nextjs.org/) and [daisyUI](https://daisyui.com/). To start the development environment, run:
Expand Down
2 changes: 1 addition & 1 deletion README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -1340,7 +1340,7 @@ nssm remove YOURSERVICENAME

要求:

- Node.js `18.19.0` 或更高版本
- Node.js `22.13.0` 或更高版本
- Go `1.17` 或更高版本

前端项目使用 [Next.js](https://nextjs.org/) 和 [daisyUI](https://daisyui.com/) 构建。要启动开发环境,运行:
Expand Down
Binary file modified assets/snapshots/web-panel.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion internal/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
log "github.com/sirupsen/logrus"
)

//go:embed out/*
//go:embed all:out
var embeddedFiles embed.FS

type Server struct {
Expand Down
4 changes: 2 additions & 2 deletions web/api/logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export interface LogEntry {
timestamp: string;
level: string;
message: string;
fields?: { [key: string]: any };
fields?: Record<string, unknown>;
}

export interface LogsResponse {
Expand Down Expand Up @@ -82,4 +82,4 @@ export async function get_log_levels(credentials: string): Promise<string[]> {
}

return [];
}
}
6 changes: 4 additions & 2 deletions web/api/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ export interface MultiProviderConfig {
};
}

export type ProviderConfig = MultiProviderConfig[string];

export async function get_provider_settings(credentials: string): Promise<ProviderSetting[]> {
if (credentials) {
const resp = await fetch(get_api_server() + '/api/v1/provider/settings', {
Expand Down Expand Up @@ -122,7 +124,7 @@ export async function update_multi_providers(credentials: string, providers: Mul
return false;
}

export async function add_provider_config(credentials: string, providerName: string, config: any): Promise<boolean> {
export async function add_provider_config(credentials: string, providerName: string, config: ProviderConfig): Promise<boolean> {
if (credentials) {
const resp = await fetch(get_api_server() + `/api/v1/providers/${providerName}`, {
method: 'PUT',
Expand Down Expand Up @@ -156,4 +158,4 @@ export async function delete_provider_config(credentials: string, providerName:
}

return false;
}
}
27 changes: 18 additions & 9 deletions web/app/domains/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ import React, { useContext, useEffect } from 'react';
import { useRouter } from 'next/navigation';
import { CommonContext } from '@/components/user';
import { DomainControl } from '@/components/domain-control';
import { ToastContainer } from 'react-toastify';
import { get_info } from '@/api/info';
import 'react-toastify/dist/ReactToastify.css';
import { MultiProviderControl } from '@/components/multi-provider-control';

export default function Domains() {
Expand All @@ -27,13 +25,24 @@ export default function Domains() {
}, [setCurrentPage, credentials, saveVersion, router]);

return (
<main className="flex min-h-screen flex-col items-center justify-start pt-10 max-w-screen-xl">
<ToastContainer />
<div className="flex flex-col items-center w-full bg-base-100 p-10">
<MultiProviderControl />
<div className="divider"></div>
<DomainControl />
<main className="page-wrap">
<div className="page-shell">
<section className="page-hero page-hero-compact">
<div className="eyebrow">
<span className="inline-block h-2 w-2 rounded-full bg-violet-400" />
Configuration
</div>
<h1 className="page-title">Organize provider credentials and managed domains.</h1>
</section>

<section className="section-shell">
<MultiProviderControl />
</section>

<section className="section-shell">
<DomainControl />
</section>
</div>
</main>
);
};
};
Loading
Loading