修复在新设备上死循环的bug

master
yutent 2023-09-11 14:30:27 +08:00
parent 1760fbd212
commit 842793ff79
3 changed files with 7 additions and 2 deletions

View File

@ -4,7 +4,7 @@ if [ -d unpack ]; then
sudo rm -rf unpack
fi
version="3.0.2"
version="3.0.3"
mkdir -p unpack/DEBIAN
@ -26,6 +26,7 @@ sed -i "s/{{size}}/${_size}/" DEBIAN/control
sed -i "s/{{version}}/${version}/" DEBIAN/control
cd ..
sudo chown -R root:root unpack/
dpkg-deb -b unpack/ "hosts-switch-${version}.deb"
sudo rm -rf unpack

View File

@ -13,8 +13,12 @@ APP_ID = 'fun.wkit.hosts-switch'
__dir__ = os.path.dirname(os.path.realpath(__file__))
web_root = os.path.join(__dir__, './webapp')
home_dir = os.getenv('HOME'),
config_dir = os.path.join(os.getenv('HOME'), '.config/hosts-switch'),
if not os.path.isdir(config_dir):
os.mkdir(config_dir)
class Application(Gtk.Application):

View File

@ -101,7 +101,7 @@ class Sidebar extends Component {
toggleDomain(ev, name) {
let { HOST_DATA, records } = this.$store
name = name || ev.currentTarget.dataset.name
name = name ?? ev.currentTarget.dataset.name
this.$store.activeDomain = name
this.$store.records = records = (HOST_DATA[name] || []).sort((a, b) =>