{/* Language Selection */}
@@ -103,6 +107,18 @@ const ThemeSettings: React.FC = ({ settings, onUpdateSetting
+ {/* Motto Input */}
+
diff --git a/src/constants.ts b/src/constants.ts
index 67ad75e..fef36ee 100644
--- a/src/constants.ts
+++ b/src/constants.ts
@@ -16,33 +16,16 @@ export const DEFAULT_BACKGROUND_IMAGE = "https://picsum.photos/1920/1080?graysca
export const PRESET_WALLPAPERS: PresetWallpaper[] = [
{
- name: 'Default',
+ name: 'Bench',
type: 'image',
- url: 'https://tc-new.z.wiki/autoupload/f/JPb3wcBYRgvdgjBZlDTRdWSEpzNQ5XwArLwhNo1hcymyl5f0KlZfm6UsKj-HyTuv/20250828/JmPj/3840X2160/light-background.png/webp'
+ url: '/wallpapers/bench-9964046.jpg',
+ thumbnail: '/wallpapers/bench-9964046.jpg'
},
{
- name: 'Mountains',
+ name: 'People',
type: 'image',
- url: 'https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?auto=format&fit=crop&w=1920&q=80',
- thumbnail: 'https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?auto=format&fit=crop&w=200&q=60'
- },
- {
- name: 'Nebula',
- type: 'image',
- url: 'https://images.unsplash.com/photo-1462331940025-496dfbfc7564?auto=format&fit=crop&w=1920&q=80',
- thumbnail: 'https://images.unsplash.com/photo-1462331940025-496dfbfc7564?auto=format&fit=crop&w=200&q=60'
- },
- {
- name: 'City',
- type: 'image',
- url: 'https://images.unsplash.com/photo-1477959858617-67f85cf4f1df?auto=format&fit=crop&w=1920&q=80',
- thumbnail: 'https://images.unsplash.com/photo-1477959858617-67f85cf4f1df?auto=format&fit=crop&w=200&q=60'
- },
- {
- name: 'Rain',
- type: 'video',
- url: 'https://assets.mixkit.co/videos/preview/mixkit-rain-falling-on-the-window-glass-1634-large.mp4',
- thumbnail: 'https://images.unsplash.com/photo-1515694346937-94d85e41e6f0?auto=format&fit=crop&w=200&q=60'
+ url: '/wallpapers/people-10019345.jpg',
+ thumbnail: '/wallpapers/people-10019345.jpg'
}
];
diff --git a/src/i18n/locales/en.ts b/src/i18n/locales/en.ts
index 77c39e9..9d009a5 100644
--- a/src/i18n/locales/en.ts
+++ b/src/i18n/locales/en.ts
@@ -8,6 +8,8 @@ export const en: Translation = {
// Theme Settings
themeColor: 'Theme Color',
+ motto: 'Motto',
+ enterMotto: 'Enter your motto...',
showSeconds: 'Show Seconds',
use24HourFormat: '24-Hour Format',
maskBlurEffect: 'Mask Blur Effect',
diff --git a/src/i18n/locales/zh.ts b/src/i18n/locales/zh.ts
index b88f6fa..acb11f0 100644
--- a/src/i18n/locales/zh.ts
+++ b/src/i18n/locales/zh.ts
@@ -8,6 +8,8 @@ export const zh: Translation = {
// Theme Settings
themeColor: '主题颜色',
+ motto: '座右铭',
+ enterMotto: '输入您的座右铭...',
showSeconds: '显示秒数',
use24HourFormat: '24小时制',
maskBlurEffect: '遮罩层毛玻璃',
diff --git a/src/i18n/types.ts b/src/i18n/types.ts
index 30d348e..4a4fff7 100644
--- a/src/i18n/types.ts
+++ b/src/i18n/types.ts
@@ -8,6 +8,8 @@ export interface Translation {
// Theme Settings
themeColor: string;
+ motto: string;
+ enterMotto: string;
showSeconds: string;
use24HourFormat: string;
maskBlurEffect: string;
diff --git a/src/index.tsx b/src/index.tsx
index 1fad6cc..9883829 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -3,6 +3,12 @@ import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import { ToastProvider } from './context/ToastContext';
+import { registerSW } from 'virtual:pwa-register';
+
+// Register PWA Service Worker only if not running as an extension
+if (!window.location.protocol.includes('chrome-extension')) {
+ registerSW({ immediate: true });
+}
const rootElement = document.getElementById('root');
if (!rootElement) {
diff --git a/src/types.ts b/src/types.ts
index 7fd9607..69b2b3a 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -38,6 +38,7 @@ export interface UserSettings {
enableSearchHistory: boolean;
searchHistory: string[];
language: Language;
+ motto: string;
}
export type SettingsSection = 'general' | 'wallpaper' | 'search';
diff --git a/src/vite-env.d.ts b/src/vite-env.d.ts
new file mode 100644
index 0000000..64251fb
--- /dev/null
+++ b/src/vite-env.d.ts
@@ -0,0 +1,2 @@
+///
+///
diff --git a/vite.config.ts b/vite.config.ts
index 34304c5..d756d7f 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -1,6 +1,7 @@
import path from 'path';
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
+import { VitePWA } from 'vite-plugin-pwa';
export default defineConfig({
server: {
@@ -15,7 +16,27 @@ export default defineConfig({
}
}
},
- plugins: [react()],
+ plugins: [
+ react(),
+ VitePWA({
+ injectRegister: null,
+ registerType: 'autoUpdate',
+ includeAssets: ['favicon.ico', 'apple-touch-icon.png', 'masked-icon.svg', 'wallpapers/*'],
+ manifest: {
+ name: 'AeroStart',
+ short_name: 'AeroStart',
+ description: 'A beautiful, fast, and customizable start page for your browser.',
+ theme_color: '#000000',
+ icons: [
+ {
+ src: 'favicon.ico',
+ sizes: '64x64 32x32 24x24 16x16',
+ type: 'image/x-icon'
+ }
+ ]
+ }
+ })
+ ],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),