Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REWORK: Expert Mode #1786

Merged
merged 4 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp

// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"Vue.volar"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": []
}
21 changes: 19 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
{
"nuxt.isNuxtApp": false
}
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"editor.tabSize": 2,
"editor.detectIndentation": false,
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"nuxt.isNuxtApp": false,
"vue.features.codeActions.enable": false,
"vue.codeActions.enabled": false,
"vetur.format.enable": false,
"[vue]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"vue3snippets.enable-compile-vue-file-on-did-save-code": true,
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingEmptyBraces": false,
"typescript.format.insertSpaceAfterOpeningAndBeforeClosingEmptyBraces": false
}
25 changes: 25 additions & 0 deletions .vscode/snippets.code-snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
// Place your ethereum-node workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Placeholders with the same ids are connected.
// Example:
// "Print to console": {
// "scope": "javascript,typescript",
// "prefix": "log",
// "body": [
// "console.log('$1');",
// "$2"
// ],
// "description": "Log output to console"
// }

"Import ControlService": {
"scope": "javascript,typescript,vue",
"prefix": "ics",
"body": ["import ControlService from '@/store/ControlService';", "$2"],
"description": "Import ControlService"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
</div>
<SyncCarousel
v-if="isSyncingActived && (client.category === 'execution' || client.category === 'consensus')"
:properties="properties"
:cat="client.category"
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
:main-title="`${client.name} - ${client.category}`"
:client="client"
:sub-title="`${$t('editModals.switchClient')}`"
:message-text="`${$t('editModals.selectClientToReplace')} ${client.name}.`"
:message-text="`${$t('editModals.selectClient')} ${client.name}.`"
:confirm-text="`${$t('editModals.confirm')}`"
:click-outside-text="`${$t('editModals.clckOutside')}`"
@close-window="closeWindow"
Expand All @@ -18,6 +18,9 @@
import { ref } from "vue";
import CustomModal from "./CustomModal.vue";
import SwitchContent from "./SwitchContent";
import { useClickInstall } from "@/store/clickInstallation";

const installStore = useClickInstall();

//Props & Emits
const props = defineProps({
Expand All @@ -39,6 +42,8 @@ const emit = defineEmits(["closeWindow", "switchConfirm"]);
//Methods

const switchConfirm = () => {
properties.value.checkPointSyncUrl = installStore.checkPointSync;
installStore.checkPointSync = "";
emit("switchConfirm", properties.value);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,9 @@ export default {
if (patternIndex === -1 || !validator.yaml) {
continue;
}
const pattern = validator.expertOptions[patternIndex].pattern;
const match = [...validator.yaml.match(new RegExp(pattern))][2];
const command = validator.expertOptions[patternIndex].commands[0];
const result = validator.yaml.match(new RegExp(`${command}[:=]?([\\S*]+)`));
const match = result ? result[result.length - 1] : "";
if (match) {
const address = match;
addresses.push({
Expand All @@ -364,11 +365,6 @@ export default {
icon: validator.sIcon,
serviceID: validator.config.serviceID,
});
} else {
console.error(
"Could not find default-fee-recipient address in the service YAML for validator:",
validator.name
);
}
}
const notSetAddresses = addresses.filter(
Expand Down
Loading