Sale Djenic b3f8af8e06 refactor(@desktop/general): qml code referring to the old code base commented out
Qml code referring to the old code base commented out, but not deleted,
due to easier refactoring the rest of the app.
2022-02-01 11:42:42 +01:00

78 lines
2.4 KiB
QML

pragma Singleton
import QtQuick 2.13
import utils 1.0
QtObject {
id: root
// Not Refactored Yet
// property string activeChannelName: chatsModel.channelView.activeChannel.name
// Not Refactored Yet
// property var currentNetwork: profileModel.network.current
property bool currentTabConnected: false
function getUrlFromUserInput(input) {
// Not Refactored Yet
// return utilsModel.urlFromUserInput(input)
}
function getAscii2Hex(input) {
// Not Refactored Yet
// return utilsModel.ascii2Hex(input)
}
function getHex2Ascii(input) {
// Not Refactored Yet
// return utilsModel.hex2Ascii(input)
}
function getWei2Eth(wei,decimals) {
// Not Refactored Yet
// return utilsModel.wei2Eth(wei,decimals)
}
function generateIdenticon(pk) {
// Not Refactored Yet
// return utilsModel.generateIdenticon(pk)
}
function get0xFormedUrl(browserExplorer, url) {
var tempUrl = ""
switch (browserExplorer) {
case Constants.browserEthereumExplorerEtherscan:
if (url.length > 42) {
tempUrl = "https://etherscan.io/tx/" + url; break;
} else {
tempUrl = "https://etherscan.io/address/" + url; break;
}
case Constants.browserEthereumExplorerEthplorer:
if (url.length > 42) {
tempUrl = "https://ethplorer.io/tx/" + url; break;
} else {
tempUrl = "https://ethplorer.io/address/" + url; break;
}
case Constants.browserEthereumExplorerBlockchair:
if (url.length > 42) {
tempUrl = "https://blockchair.com/ethereum/transaction/" + url; break;
} else {
tempUrl = "https://blockchair.com/ethereum/address/" + url; break;
}
}
return tempUrl
}
function getFormedUrl(shouldShowBrowserSearchEngine, url) {
var tempUrl = ""
switch (localAccountSensitiveSettings.shouldShowBrowserSearchEngine) {
case Constants.browserSearchEngineGoogle: tempUrl = "https://www.google.com/search?q=" + url; break;
case Constants.browserSearchEngineYahoo: tempUrl = "https://search.yahoo.com/search?p=" + url; break;
case Constants.browserSearchEngineDuckDuckGo: tempUrl = "https://duckduckgo.com/?q=" + url; break;
}
return tempUrl
}
}