feat: add versioning support for assets and update version to 1.0.0
Deploy / deploy (push) Successful in 12s
Deploy / deploy (push) Successful in 12s
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { APP_VERSION } from '../config/version';
|
||||
|
||||
export default function AboutMe() {
|
||||
return (
|
||||
<div
|
||||
@@ -134,7 +136,7 @@ export default function AboutMe() {
|
||||
Signed Identity
|
||||
</span>
|
||||
<a
|
||||
href="/pgp.asc"
|
||||
href={`/pgp.asc?v=${APP_VERSION}`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
style={{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import './MenuBar.css';
|
||||
import { APP_VERSION } from '../../config/version';
|
||||
|
||||
const MENU_ITEMS = ['encrypt', 'sign', 'verify', 'wipe', 'about'];
|
||||
const BOOT_AT = Date.now();
|
||||
@@ -19,7 +20,7 @@ export default function MenuBar() {
|
||||
return (
|
||||
<div className="menubar">
|
||||
<div className="menubar-left">
|
||||
<span className="menubar-logo">[ MingdaOS ]</span>
|
||||
<span className="menubar-logo">[ MingdaOS v{APP_VERSION} ]</span>
|
||||
{MENU_ITEMS.map(item => (
|
||||
<span key={item} className="menubar-item">{item}</span>
|
||||
))}
|
||||
|
||||
+3
-2
@@ -7,6 +7,7 @@ import Alfred from '../apps/Alfred';
|
||||
import Chengyu from '../apps/Chengyu';
|
||||
import Poker from '../apps/Poker';
|
||||
import Trash from '../apps/Trash';
|
||||
import { withVersion } from './version';
|
||||
|
||||
export const APPS: AppConfig[] = [
|
||||
{
|
||||
@@ -94,7 +95,7 @@ export const APPS: AppConfig[] = [
|
||||
title: 'Collab',
|
||||
emoji: '',
|
||||
iconGradient: 'linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02))',
|
||||
iconImage: '/docnest-icon-32.png',
|
||||
iconImage: withVersion('/docnest-icon-32.png'),
|
||||
defaultSize: { width: 400, height: 360 },
|
||||
defaultPosition: { x: 0, y: 0 },
|
||||
component: Links,
|
||||
@@ -120,5 +121,5 @@ export const WALLPAPERS = [
|
||||
// Solid dark — flat and minimal
|
||||
`linear-gradient(135deg, #050510 0%, #080818 100%)`,
|
||||
// Pixel city — neon cityscape
|
||||
`url(/wallpaper-city.png)`,
|
||||
`url(${withVersion('/wallpaper-city.png')})`,
|
||||
];
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
export const APP_VERSION = '1.0.0';
|
||||
|
||||
export function withVersion(url: string): string {
|
||||
return url.includes('?') ? `${url}&v=${APP_VERSION}` : `${url}?v=${APP_VERSION}`;
|
||||
}
|
||||
Reference in New Issue
Block a user