Change blog avatar from control panel
This commit is contained in:
parent
a758f2ff03
commit
280e9c604e
|
@ -631,6 +631,28 @@ function irc_set_global_password {
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function change_blog_avatar {
|
||||||
|
data=$(tempfile 2>/dev/null)
|
||||||
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
|
dialog --title $"Change blog avatar" \
|
||||||
|
--backtitle $"Freedombone Control Panel" \
|
||||||
|
--inputbox $"Enter a URL for an image. It should be approximately a square image." 8 75 2>$data
|
||||||
|
sel=$?
|
||||||
|
case $sel in
|
||||||
|
0)
|
||||||
|
IMAGE_URL=$(<$data)
|
||||||
|
if [ ${#IMAGE_URL} -gt 5 ]; then
|
||||||
|
clear
|
||||||
|
${PROJECT_NAME}-blog -a $IMAGE_URL
|
||||||
|
if [ "$?" = "0" ]; then
|
||||||
|
dialog --title $"Change blog avatar" \
|
||||||
|
--msgbox $"Your blog avatar has been changed" 6 40
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
function change_ssh_public_key {
|
function change_ssh_public_key {
|
||||||
select_user
|
select_user
|
||||||
if [ ! $SELECTED_USERNAME ]; then
|
if [ ! $SELECTED_USERNAME ]; then
|
||||||
|
@ -1808,7 +1830,7 @@ function menu_top_level {
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
dialog --backtitle $"Freedombone Control Panel" \
|
dialog --backtitle $"Freedombone Control Panel" \
|
||||||
--title $"Control Panel" \
|
--title $"Control Panel" \
|
||||||
--radiolist $"Choose an operation:" 27 70 20 \
|
--radiolist $"Choose an operation:" 28 70 21 \
|
||||||
1 $"About this system" off \
|
1 $"About this system" off \
|
||||||
2 $"Backup and Restore" off \
|
2 $"Backup and Restore" off \
|
||||||
3 $"Reset Tripwire" off \
|
3 $"Reset Tripwire" off \
|
||||||
|
@ -1822,13 +1844,14 @@ function menu_top_level {
|
||||||
11 $"Hubzilla" off \
|
11 $"Hubzilla" off \
|
||||||
12 $"Media menu" off \
|
12 $"Media menu" off \
|
||||||
13 $"IRC menu" off \
|
13 $"IRC menu" off \
|
||||||
14 $"Change the name of this system" off \
|
14 $"Change your blog avatar" off \
|
||||||
15 $"Set the TLS date/time source" off \
|
15 $"Change the name of this system" off \
|
||||||
16 $"Set a static local IP address" off \
|
16 $"Set the TLS date/time source" off \
|
||||||
17 $"Check for updates" off \
|
17 $"Set a static local IP address" off \
|
||||||
18 $"Power off the system" off \
|
18 $"Check for updates" off \
|
||||||
19 $"Restart the system" off \
|
19 $"Power off the system" off \
|
||||||
20 $"Exit" on 2> $data
|
20 $"Restart the system" off \
|
||||||
|
21 $"Exit" on 2> $data
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
1) exit 1;;
|
1) exit 1;;
|
||||||
|
@ -1848,13 +1871,14 @@ function menu_top_level {
|
||||||
11) menu_hubzilla;;
|
11) menu_hubzilla;;
|
||||||
12) menu_media;;
|
12) menu_media;;
|
||||||
13) menu_irc;;
|
13) menu_irc;;
|
||||||
14) change_system_name;;
|
14) change_blog_avatar;;
|
||||||
15) set_tls_time_source;;
|
15) change_system_name;;
|
||||||
16) set_static_IP;;
|
16) set_tls_time_source;;
|
||||||
17) check_for_updates;;
|
17) set_static_IP;;
|
||||||
18) shut_down_system;;
|
18) check_for_updates;;
|
||||||
19) restart_system;;
|
19) shut_down_system;;
|
||||||
20) break;;
|
20) restart_system;;
|
||||||
|
21) break;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue