File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ using Ivy . Helpers ;
12using Ivy . Docs . Shared . Middleware ;
23using Ivy . Docs . Shared . Services ;
34
@@ -23,19 +24,7 @@ public static async Task RunAsync(ServerArgs? args = null)
2324 server . Services . AddHttpClient < IvyDocsQuestionsClient > ( ) ;
2425 server . Services . AddTransient < IIvyDocsQuestionsClient > ( sp => sp . GetRequiredService < IvyDocsQuestionsClient > ( ) ) ;
2526
26- var version = typeof ( Server ) . Assembly . GetName ( ) . Version ! . ToString ( ) . EatRight ( ".0" ) ;
27-
28- // For staging deployments (version = "0"): show build date from DLL timestamp
29- string versionLabel ;
30- if ( version == "0" )
31- {
32- var buildDate = DateTime . UtcNow . ToString ( "MMM d · HH:mm UTC" ) ;
33- versionLabel = $ "Deployed { buildDate } ";
34- }
35- else
36- {
37- versionLabel = $ "Version { version } ";
38- }
27+ var versionLabel = ServerVersionHelper . GetVersionLabel ( ) ;
3928
4029 server . SetMetaTitle ( $ "Ivy Docs { versionLabel } ") ;
4130
Original file line number Diff line number Diff line change 11using Microsoft . Extensions . DependencyInjection ;
2+ using Ivy . Helpers ;
23using Ivy . Samples . Shared . Helpers ;
34using Ivy . Samples . Shared . Apps . Demos ;
45using Microsoft . Extensions . AI ;
@@ -16,19 +17,7 @@ public static async Task RunAsync(ServerArgs? args = null)
1617 server . UseHotReload ( ) ;
1718 server . AddAppsFromAssembly ( typeof ( SamplesServer ) . Assembly ) ;
1819
19- var version = typeof ( Server ) . Assembly . GetName ( ) . Version ! . ToString ( ) . EatRight ( ".0" ) ;
20-
21- // For staging deployments (version = "0"): show build date from DLL timestamp
22- string versionLabel ;
23- if ( version == "0" )
24- {
25- var buildDate = DateTime . UtcNow . ToString ( "MMM d · HH:mm UTC" ) ;
26- versionLabel = $ "Deployed { buildDate } ";
27- }
28- else
29- {
30- versionLabel = $ "Version { version } ";
31- }
20+ var versionLabel = ServerVersionHelper . GetVersionLabel ( ) ;
3221
3322 server . SetMetaTitle ( $ "Ivy Samples { versionLabel } ") ;
3423
Original file line number Diff line number Diff line change 1+ using System . Runtime . CompilerServices ;
2+
3+ [ assembly: InternalsVisibleTo ( "Ivy.Samples.Shared" ) ]
4+ [ assembly: InternalsVisibleTo ( "Ivy.Docs.Shared" ) ]
5+
6+ namespace Ivy . Helpers ;
7+
8+ internal static class ServerVersionHelper
9+ {
10+ /// <summary>
11+ /// Returns a display label for the server version.
12+ /// On staging builds (assembly version = "0"), returns "Deployed MMM d · HH:mm UTC"
13+ /// using the current startup time. On release builds, returns "Version X.Y.Z".
14+ /// </summary>
15+ internal static string GetVersionLabel ( )
16+ {
17+ var version = typeof ( Server ) . Assembly . GetName ( ) . Version ! . ToString ( ) . EatRight ( ".0" ) ;
18+
19+ if ( version == "0" )
20+ {
21+ var deployedAt = DateTime . UtcNow . ToString ( "MMM d · HH:mm UTC" ) ;
22+ return $ "Deployed { deployedAt } ";
23+ }
24+
25+ return $ "Version { version } ";
26+ }
27+ }
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ export const TabsLayoutWidget = ({
2424 selectedIndex,
2525 removeParentPadding = false ,
2626 variant = "Content" ,
27- padding = "4,4,4,4" ,
27+ padding,
2828 width = "Full" ,
2929 addButtonText,
3030} : TabsLayoutWidgetProps ) => {
Original file line number Diff line number Diff line change @@ -70,11 +70,11 @@ const TerminalWidget = ({
7070 < div className = "flex" >
7171 < div className = "w-8 flex-shrink-0 relative flex items-start mt-1" >
7272 { line . isCommand ? (
73- < span className = "text-primary select-none pointer-events-none w-full text-center leading-none -mt-0.5" >
73+ < span className = "text-ivy-green select-none pointer-events-none w-full text-center leading-none -mt-0.5" >
7474 { ">" }
7575 </ span >
7676 ) : (
77- < span className = "text-primary select-none pointer-events-none w-full text-center leading-none" >
77+ < span className = "text-ivy-green select-none pointer-events-none w-full text-center leading-none" >
7878 { " " }
7979 </ span >
8080 ) }
You can’t perform that action at this time.
0 commit comments