luci-theme-*: set mediaurlbase if it is the first time to be installed
authorChen Minqiang <ptpt52@gmail.com>
Fri, 3 Apr 2020 10:10:04 +0000 (18:10 +0800)
committerJo-Philipp Wich <jo@mein.io>
Thu, 7 May 2020 17:40:49 +0000 (19:40 +0200)
commit7a47df9f07846903fc1dd6bbec7d3c079d13f679
tree5a8539f4647d43800c9f154e604497af8249a01a
parent9518d7f8c135b5a0fc310127732ecaf6d55d6db8
luci-theme-*: set mediaurlbase if it is the first time to be installed

If we build multi-themes into firmware, each of them set itself
to be the default theme, what theme should it be?

To make it clear, we only set mediaurlbase if the theme is the
first time to be installed/built-in.

This resolve the issue that theme always change to somewhat default
after upgrading the firmware even with a config-keep-upgrade

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
(backported from commit fc150636b9393e31aa7d5a8d8320b111476ba2f1)
themes/luci-theme-bootstrap/root/etc/uci-defaults/30_luci-theme-bootstrap
themes/luci-theme-material/root/etc/uci-defaults/30_luci-theme-material
themes/luci-theme-openwrt/root/etc/uci-defaults/30_luci-theme-openwrt
themes/luci-theme-rosy/root/etc/uci-defaults/30_luci-theme-rosy