Skip to content

Commit af30bac

Browse files
bits
1 parent 2c705ef commit af30bac

File tree

1 file changed

+26
-9
lines changed
  • src/devcontainers/base/src/.devcontainer/nhsnotify

1 file changed

+26
-9
lines changed

src/devcontainers/base/src/.devcontainer/nhsnotify/welcome.sh

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ animate_border() {
2929
local width=80
3030
local chars="▓▒░ ░▒▓"
3131

32-
for frame in {1..3}; do
32+
for frame in {1..10}; do
3333
printf "\r${CYAN}"
3434
for (( i=0; i<width; i++ )); do
3535
printf "%s" "${chars:$((($i + $frame) % 7)):1}"
@@ -40,6 +40,23 @@ animate_border() {
4040
echo
4141
}
4242

43+
# Function to display animated loading bar
44+
# Usage: loading_bar "Loading message..."
45+
loading_bar() {
46+
local message="$1"
47+
local bar_length=${2:-50} # Default to 50 chars if not specified
48+
local delay=${3:-0.02} # Default to 0.02s delay if not specified
49+
50+
echo -e "${YELLOW}${BOLD}${message}${NC}"
51+
printf "${CYAN}["
52+
for i in $(seq 1 $bar_length); do
53+
printf "${GREEN}${NC}"
54+
sleep $delay
55+
done
56+
echo -e "${CYAN}]${NC}"
57+
echo
58+
}
59+
4360
# Function to get weather and display ASCII art
4461
show_weather() {
4562
local location="${WEATHER_LOCATION}"
@@ -368,15 +385,10 @@ echo "
368385
"
369386
echo -e "${NC}"
370387

388+
animate_border
389+
371390
# Animated loading bar
372-
echo -e "${YELLOW}${BOLD}Initializing NHS Notify Development Environment...${NC}"
373-
echo -e "${CYAN}["
374-
for i in {1..50}; do
375-
printf "${GREEN}${NC}"
376-
sleep 0.02
377-
done
378-
echo -e "${CYAN}]${NC}"
379-
echo
391+
loading_bar "Initializing NHS Notify Development Environment..."
380392

381393
# System info with style
382394
container_info=(
@@ -391,6 +403,7 @@ container_info=(
391403
draw_box "${PURPLE}${BOLD}" "${BOLD}${WHITE}CONTAINER INFORMATION${NC}" 80 "${container_info[@]}"
392404
echo
393405

406+
loading_bar "Getting weather..."
394407
# Show weather
395408
show_weather
396409

@@ -538,6 +551,8 @@ random_quote=${quotes[$RANDOM % ${#quotes[@]}]}
538551
echo -e "${ITALIC}${BLUE}💭 ${random_quote}${NC}"
539552
echo
540553

554+
loading_bar "Getting achievements..."
555+
541556
# Fun Achievement System
542557
echo -e "${YELLOW}${BOLD}🏆 DEVELOPER ACHIEVEMENTS UNLOCKED${NC}"
543558

@@ -572,6 +587,8 @@ fi
572587
achievements+=("🎯 Environment Expert - NHS Notify devcontainer loaded!")
573588
achievements+=("⚡ Multi-language Master - Node.js, Python, Go & Ruby ready!")
574589

590+
591+
575592
# Display random achievements (max 3)
576593
if [ ${#achievements[@]} -gt 0 ]; then
577594
# Shuffle and take up to 3 achievements

0 commit comments

Comments
 (0)