Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V1.3.0 #145

Merged
merged 4 commits into from
Jun 26, 2024
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
6 changes: 6 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
VITE_APP_NAME="Reforge"
VITE_ENABLE_PWA=true
VITE_THEME_ACCENT_COLOR='#18181b'
VITE_THEME_SIDEBAR_LAYOUT='top' # mix | top | side
VITE_SHOW_BREADCRUMB=false
VITE_BACKEND_API_URL=https://reqres.in/api
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,10 @@ dist-ssr
*.njsproj
*.sln
*.sw?

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ Settings including app name, theme color, meta tags, etc. can be controlled from
//config.ts
const CONFIG = {
appName: 'Reforge',
helpLink: 'https://github.com/arifszn/reforge',
enablePWA: true,
theme: {
accentColor: '#818cf8',
Expand Down
15 changes: 8 additions & 7 deletions config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
//config.ts
import { loadEnv } from 'vite';

process.env = { ...process.env, ...loadEnv('all', process.cwd()) };

enum LayoutType {
MIX = 'mix',
Expand All @@ -7,13 +9,12 @@ enum LayoutType {
}

const CONFIG = {
appName: 'Reforge',
helpLink: 'https://github.com/arifszn/reforge',
enablePWA: true,
appName: process.env.VITE_APP_NAME || 'Reforge',
enablePWA: process.env.VITE_ENABLE_PWA !== 'false',
theme: {
accentColor: '#818cf8',
sidebarLayout: LayoutType.MIX,
showBreadcrumb: true,
accentColor: process.env.VITE_THEME_ACCENT_COLOR || '#18181b',
sidebarLayout: process.env.VITE_THEME_SIDEBAR_LAYOUT || LayoutType.TOP,
showBreadcrumb: process.env.VITE_SHOW_BREADCRUMB === 'true',
},
metaTags: {
title: 'Reforge',
Expand Down
5 changes: 0 additions & 5 deletions global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ declare const CONFIG: {
*/
appName: string;

/**
* Help link at the navbar
*/
helpLink: string;

/**
* Enable Progressive Web App
*/
Expand Down
Loading
Loading