195 lines
6.4 KiB
QML
195 lines
6.4 KiB
QML
import QtQuick
|
|
import QtQuick.Controls
|
|
import QtQuick.Layouts
|
|
import org.kde.kirigami as Kirigami
|
|
import org.kde.kcmutils as KCM
|
|
import org.kde.plasma.components as PlasmaComponents
|
|
|
|
KCM.SimpleKCM {
|
|
id: generalConfig
|
|
|
|
property alias cfg_RoutesAutoUp: enableRoutesUpdate.checked
|
|
property alias cfg_RoutesUpInt: routesUpdateInterval.value
|
|
property alias cfg_StatsAutoUp: enableStatsUpdate.checked
|
|
property alias cfg_StatsUpInt: statsUpdateInterval.value
|
|
property alias cfg_ProfileAutoUp: enableProfileUpdate.checked
|
|
property alias cfg_ProfileUpInt: profileUpdateInterval.value
|
|
|
|
property alias cfg_AutoPing: enablePing.checked
|
|
property alias cfg_AutoPingInt: pingInterval.value
|
|
property alias cfg_OnErrorRefresh: enableOnErrorRefresh.checked
|
|
|
|
property alias cfg_BIinit: showOnInitBI.checked
|
|
property alias cfg_BIrefresh: showRefreshBI.checked
|
|
property alias cfg_BIpostcountry: showPostCountryBI.checked
|
|
property alias cfg_BIpostshare: showSwitchShareBI.checked
|
|
property alias cfg_BIpostebalka: showSwitchEbalkaBI.checked
|
|
property alias cfg_BIdevicesupdate: showDevicesActionsBI.checked
|
|
property alias cfg_BIfeaturesupdate: showFeaturesActionsBI.checked
|
|
property alias cfg_BIpostfirewall: showFirewallActionsBI.checked
|
|
property alias cfg_BIautoupdate: showAutoUpdateBI.checked
|
|
|
|
property alias cfg_SBdisplay: showSB.checked
|
|
property alias cfg_ExtraLayout: showExtra.checked
|
|
property alias cfg_StringLayoutPlacement: extraInput.text
|
|
|
|
Kirigami.FormLayout {
|
|
id: form
|
|
|
|
Kirigami.Separator {
|
|
Kirigami.FormData.isSection: true
|
|
Kirigami.FormData.label: i18n("AutoUpdate content")
|
|
}
|
|
|
|
RowLayout {
|
|
Kirigami.FormData.label: i18n("Routes")
|
|
CheckBox {
|
|
id: enableRoutesUpdate
|
|
}
|
|
SpinBox {
|
|
id: routesUpdateInterval
|
|
enabled: enableRoutesUpdate.checked
|
|
from: 1
|
|
to: 1440
|
|
textFromValue: function(text) { return text + "m"; }
|
|
valueFromText: function(value) { return parseInt(value); }
|
|
}
|
|
}
|
|
RowLayout {
|
|
Kirigami.FormData.label: i18n("Stats")
|
|
CheckBox {
|
|
id: enableStatsUpdate
|
|
}
|
|
SpinBox {
|
|
id: statsUpdateInterval
|
|
enabled: enableStatsUpdate.checked
|
|
from: 1
|
|
to: 1440
|
|
textFromValue: function(text) { return text + "m"; }
|
|
valueFromText: function(value) { return parseInt(value); }
|
|
}
|
|
}
|
|
RowLayout {
|
|
Kirigami.FormData.label: i18n("Profile")
|
|
CheckBox {
|
|
id: enableProfileUpdate
|
|
}
|
|
SpinBox {
|
|
id: profileUpdateInterval
|
|
enabled: enableProfileUpdate.checked
|
|
from: 1
|
|
to: 1440
|
|
textFromValue: function(text) { return text + "m"; }
|
|
valueFromText: function(value) { return parseInt(value); }
|
|
}
|
|
}
|
|
RowLayout {
|
|
Kirigami.FormData.label: i18n("Ping")
|
|
enabled: false
|
|
CheckBox {
|
|
id: enablePing
|
|
}
|
|
SpinBox {
|
|
id: pingInterval
|
|
enabled: enablePing.checked
|
|
from: 5
|
|
to: 20
|
|
textFromValue: function(text) { return text + "s"; }
|
|
valueFromText: function(value) { return parseInt(value); }
|
|
}
|
|
}
|
|
RowLayout {
|
|
Kirigami.FormData.label: i18n("AutoRefresh on error")
|
|
CheckBox {
|
|
id: enableOnErrorRefresh
|
|
}
|
|
}
|
|
|
|
Kirigami.Separator {
|
|
Kirigami.FormData.isSection: true
|
|
Kirigami.FormData.label: i18n("Busy indicator")
|
|
}
|
|
|
|
CheckBox {
|
|
Kirigami.FormData.label: i18n("Show Busy indicator on actions:")
|
|
id: showOnInitBI
|
|
text: i18n("Plasmoid Init")
|
|
}
|
|
CheckBox {
|
|
id: showRefreshBI
|
|
text: i18n("Refresh button")
|
|
}
|
|
CheckBox {
|
|
id: showPostCountryBI
|
|
text: i18n("Select country")
|
|
}
|
|
CheckBox {
|
|
id: showSwitchShareBI
|
|
text: i18n("Switch Share")
|
|
}
|
|
CheckBox {
|
|
id: showSwitchEbalkaBI
|
|
text: i18n("Switch 80% loss")
|
|
}
|
|
CheckBox {
|
|
id: showDevicesActionsBI
|
|
text: i18n("Devices actions")
|
|
}
|
|
CheckBox {
|
|
id: showFeaturesActionsBI
|
|
text: i18n("Features actions")
|
|
}
|
|
CheckBox {
|
|
id: showFirewallActionsBI
|
|
text: i18n("Firewall actions")
|
|
}
|
|
CheckBox {
|
|
id: showAutoUpdateBI
|
|
text: i18n("AutoUpdate actions")
|
|
}
|
|
|
|
Kirigami.Separator {
|
|
Kirigami.FormData.isSection: true
|
|
Kirigami.FormData.label: i18n("Extra")
|
|
}
|
|
|
|
RowLayout {
|
|
Kirigami.FormData.label: i18n("Show scrollbars")
|
|
CheckBox {
|
|
id: showSB
|
|
}
|
|
Kirigami.ContextualHelpButton {
|
|
toolTipText: i18n(
|
|
"If true, scrollbars will be shown as needed"
|
|
)
|
|
}
|
|
}
|
|
RowLayout {
|
|
Kirigami.FormData.label: i18n("CompactRepresentation extra data display")
|
|
CheckBox {
|
|
id: showExtra
|
|
}
|
|
TextField {
|
|
id: extraInput
|
|
enabled: showExtra.checked
|
|
placeholderText: "meow_icon iflag_extra provider ..."
|
|
//bottomPadding: Kirigami.Units.gridUnit
|
|
wrapMode: Text.Wrap
|
|
}
|
|
}
|
|
PlasmaComponents.Label {
|
|
text: (
|
|
"meow_icon - plasmoid icon\n" +
|
|
"user - your username\n" +
|
|
"current_device - current device name\n" +
|
|
"current - current country code (US, FI etc.)\n" +
|
|
"provider - vpn provider (NORD, WARP etc.)\n" +
|
|
"ip - current device ip (MeowRelay local)\n" +
|
|
"iflag - current country flag\n" +
|
|
"iflag_extra - current country flag + country code (joined)\n" +
|
|
"any variable from main.qml (root section)"
|
|
)
|
|
opacity: 0.7
|
|
}
|
|
}
|
|
}
|