mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
refactor(editor): Apply Prettier (no-changelog) (#4920)
* ⚡ Adjust `format` script * 🔥 Remove exemption for `editor-ui` * 🎨 Prettify * 👕 Fix lint
This commit is contained in:
@@ -4,18 +4,18 @@ import { VIEWS } from '@/constants';
|
||||
import mixins from 'vue-typed-mixins';
|
||||
|
||||
export const genericHelpers = mixins(showMessage).extend({
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
loadingService: null as any | null, // tslint:disable-line:no-any
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
isReadOnly (): boolean {
|
||||
isReadOnly(): boolean {
|
||||
return ![VIEWS.WORKFLOW, VIEWS.NEW_WORKFLOW].includes(this.$route.name as VIEWS);
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
displayTimer (msPassed: number, showMs = false): string {
|
||||
displayTimer(msPassed: number, showMs = false): string {
|
||||
if (msPassed < 60000) {
|
||||
if (!showMs) {
|
||||
return `${Math.floor(msPassed / 1000)} ${this.$locale.baseText('genericHelpers.sec')}`;
|
||||
@@ -26,11 +26,11 @@ export const genericHelpers = mixins(showMessage).extend({
|
||||
|
||||
const secondsPassed = Math.floor(msPassed / 1000);
|
||||
const minutesPassed = Math.floor(secondsPassed / 60);
|
||||
const secondsLeft = (secondsPassed - (minutesPassed * 60)).toString().padStart(2, '0');
|
||||
const secondsLeft = (secondsPassed - minutesPassed * 60).toString().padStart(2, '0');
|
||||
|
||||
return `${minutesPassed}:${secondsLeft} ${this.$locale.baseText('genericHelpers.min')}`;
|
||||
},
|
||||
editAllowedCheck (): boolean {
|
||||
editAllowedCheck(): boolean {
|
||||
if (this.isReadOnly) {
|
||||
this.$showMessage({
|
||||
// title: 'Workflow can not be changed!',
|
||||
@@ -45,25 +45,23 @@ export const genericHelpers = mixins(showMessage).extend({
|
||||
return true;
|
||||
},
|
||||
|
||||
startLoading (text?: string) {
|
||||
startLoading(text?: string) {
|
||||
if (this.loadingService !== null) {
|
||||
return;
|
||||
}
|
||||
|
||||
// @ts-ignore
|
||||
this.loadingService = this.$loading(
|
||||
{
|
||||
lock: true,
|
||||
text: text || this.$locale.baseText('genericHelpers.loading'),
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(255, 255, 255, 0.8)',
|
||||
},
|
||||
);
|
||||
this.loadingService = this.$loading({
|
||||
lock: true,
|
||||
text: text || this.$locale.baseText('genericHelpers.loading'),
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(255, 255, 255, 0.8)',
|
||||
});
|
||||
},
|
||||
setLoadingText (text: string) {
|
||||
setLoadingText(text: string) {
|
||||
this.loadingService.text = text;
|
||||
},
|
||||
stopLoading () {
|
||||
stopLoading() {
|
||||
if (this.loadingService !== null) {
|
||||
this.loadingService.close();
|
||||
this.loadingService = null;
|
||||
|
||||
Reference in New Issue
Block a user