code refactor
This commit is contained in:
+2
-2
@@ -8,7 +8,7 @@ module.exports = {
|
|||||||
'plugin:vue/vue3-essential'
|
'plugin:vue/vue3-essential'
|
||||||
],
|
],
|
||||||
'rules': {
|
'rules': {
|
||||||
"vue/multi-word-component-names": "off",
|
'vue/multi-word-component-names': 'off',
|
||||||
"vue/no-use-v-if-with-v-for": "off"
|
'vue/no-use-v-if-with-v-for': 'off'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,22 +11,22 @@
|
|||||||
</div>
|
</div>
|
||||||
</f7-toolbar>
|
</f7-toolbar>
|
||||||
<f7-page-content>
|
<f7-page-content>
|
||||||
<VueDatePicker inline enable-seconds
|
<vue-date-picker inline enable-seconds
|
||||||
auto-apply month-name-format="long"
|
auto-apply month-name-format="long"
|
||||||
class="justify-content-center"
|
class="justify-content-center"
|
||||||
:dark="isDarkMode"
|
:dark="isDarkMode"
|
||||||
:week-start="firstDayOfWeek"
|
:week-start="firstDayOfWeek"
|
||||||
:year-range="yearRange"
|
:year-range="yearRange"
|
||||||
:day-names="dayNames"
|
:day-names="dayNames"
|
||||||
:is24="is24Hour"
|
:is24="is24Hour"
|
||||||
v-model="dateTime">
|
v-model="dateTime">
|
||||||
<template #month="{ text }">
|
<template #month="{ text }">
|
||||||
{{ $t(`datetime.${text}.short`) }}
|
{{ $t(`datetime.${text}.short`) }}
|
||||||
</template>
|
</template>
|
||||||
<template #month-overlay-value="{ text }">
|
<template #month-overlay-value="{ text }">
|
||||||
{{ $t(`datetime.${text}.short`) }}
|
{{ $t(`datetime.${text}.short`) }}
|
||||||
</template>
|
</template>
|
||||||
</VueDatePicker>
|
</vue-date-picker>
|
||||||
</f7-page-content>
|
</f7-page-content>
|
||||||
</f7-sheet>
|
</f7-sheet>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
v-if="enableCopy"
|
v-if="enableCopy"
|
||||||
></f7-link>
|
></f7-link>
|
||||||
</p>
|
</p>
|
||||||
<textarea class="information-content full-line" :rows="rowCount" :value="information"></textarea>
|
<textarea class="information-content full-line" readonly="readonly" :rows="rowCount" :value="information"></textarea>
|
||||||
<div class="margin-top text-align-center">
|
<div class="margin-top text-align-center">
|
||||||
<f7-link @click="cancel" :text="$t('Close')"></f7-link>
|
<f7-link @click="cancel" :text="$t('Close')"></f7-link>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -17,12 +17,12 @@
|
|||||||
</f7-list>
|
</f7-list>
|
||||||
<f7-list dividers no-hairlines class="no-margin-top no-margin-bottom" v-else-if="items && items.length && !noAvailableTag">
|
<f7-list dividers no-hairlines class="no-margin-top no-margin-bottom" v-else-if="items && items.length && !noAvailableTag">
|
||||||
<f7-list-item checkbox
|
<f7-list-item checkbox
|
||||||
v-show="!item.hidden"
|
|
||||||
:class="isChecked(item.id) ? 'list-item-selected' : ''"
|
:class="isChecked(item.id) ? 'list-item-selected' : ''"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
:checked="isChecked(item.id)"
|
:checked="isChecked(item.id)"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
v-for="item in items"
|
v-for="item in items"
|
||||||
|
v-show="!item.hidden"
|
||||||
@change="changeItemSelection">
|
@change="changeItemSelection">
|
||||||
<template #title>
|
<template #title>
|
||||||
<f7-block class="no-padding no-margin">
|
<f7-block class="no-padding no-margin">
|
||||||
|
|||||||
@@ -593,5 +593,6 @@ const allAvailableTimezones = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
all: allAvailableTimezones
|
all: allAvailableTimezones,
|
||||||
|
utcTimezoneName: 'Etc/GMT'
|
||||||
};
|
};
|
||||||
|
|||||||
+4
-4
@@ -1,7 +1,7 @@
|
|||||||
import { defaultLanguage, allLanguages } from '../locales/index.js';
|
import { defaultLanguage, allLanguages } from '../locales/index.js';
|
||||||
import timezone from "../consts/timezone.js";
|
import timezone from "../consts/timezone.js";
|
||||||
import currency from "../consts/currency.js";
|
import currency from "../consts/currency.js";
|
||||||
import settings from "./settings";
|
import settings from "./settings.js";
|
||||||
import utils from './utils.js';
|
import utils from './utils.js';
|
||||||
|
|
||||||
const apiNotFoundErrorCode = 100001;
|
const apiNotFoundErrorCode = 100001;
|
||||||
@@ -259,7 +259,7 @@ export function getAllTimezones(includeSystemDefault, translateFn) {
|
|||||||
for (let i = 0; i < allTimezones.length; i++) {
|
for (let i = 0; i < allTimezones.length; i++) {
|
||||||
allTimezoneInfos.push({
|
allTimezoneInfos.push({
|
||||||
name: allTimezones[i].timezoneName,
|
name: allTimezones[i].timezoneName,
|
||||||
utcOffset: (allTimezones[i].timezoneName !== 'Etc/GMT' ? utils.getTimezoneOffset(allTimezones[i].timezoneName) : ''),
|
utcOffset: (allTimezones[i].timezoneName !== timezone.utcTimezoneName ? utils.getTimezoneOffset(allTimezones[i].timezoneName) : ''),
|
||||||
utcOffsetMinutes: utils.getTimezoneOffsetMinutes(allTimezones[i].timezoneName),
|
utcOffsetMinutes: utils.getTimezoneOffsetMinutes(allTimezones[i].timezoneName),
|
||||||
displayName: translateFn(`timezone.${allTimezones[i].displayName}`)
|
displayName: translateFn(`timezone.${allTimezones[i].displayName}`)
|
||||||
});
|
});
|
||||||
@@ -274,7 +274,7 @@ export function getAllTimezones(includeSystemDefault, translateFn) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
allTimezoneInfos.sort(function(c1, c2){
|
allTimezoneInfos.sort(function(c1, c2) {
|
||||||
const utcOffset1 = parseInt(c1.utcOffset.replace(':', ''));
|
const utcOffset1 = parseInt(c1.utcOffset.replace(':', ''));
|
||||||
const utcOffset2 = parseInt(c2.utcOffset.replace(':', ''));
|
const utcOffset2 = parseInt(c2.utcOffset.replace(':', ''));
|
||||||
|
|
||||||
@@ -303,7 +303,7 @@ export function getAllCurrencies(translateFn) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
allCurrencies.sort(function(c1, c2){
|
allCurrencies.sort(function(c1, c2) {
|
||||||
return c1.displayName.localeCompare(c2.displayName);
|
return c1.displayName.localeCompare(c2.displayName);
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
availableExchangeRates.sort(function(c1, c2){
|
availableExchangeRates.sort(function(c1, c2) {
|
||||||
return c1.currencyDisplayName.localeCompare(c2.currencyDisplayName);
|
return c1.currencyDisplayName.localeCompare(c2.currencyDisplayName);
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,6 @@
|
|||||||
<f7-list strong inset dividers sortable class="tag-item-list margin-top"
|
<f7-list strong inset dividers sortable class="tag-item-list margin-top"
|
||||||
:sortable-enabled="sortable" @sortable:sort="onSort"
|
:sortable-enabled="sortable" @sortable:sort="onSort"
|
||||||
v-if="!loading">
|
v-if="!loading">
|
||||||
|
|
||||||
<f7-list-item swipeout
|
<f7-list-item swipeout
|
||||||
:id="getTagDomId(tag)"
|
:id="getTagDomId(tag)"
|
||||||
:key="tag.id"
|
:key="tag.id"
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
v-model:show="showInputPasscodeSheetForEnable"
|
v-model:show="showInputPasscodeSheetForEnable"
|
||||||
v-model="currentPasscodeForEnable"
|
v-model="currentPasscodeForEnable"
|
||||||
@passcode:confirm="enableConfirm">
|
@passcode:confirm="enableConfirm">
|
||||||
<div class="col-100 text-align-center">
|
<div class="text-align-center">
|
||||||
<img alt="qrcode" class="img-qrcode" :src="new2FAQRCode" />
|
<img alt="qrcode" class="img-qrcode" :src="new2FAQRCode" />
|
||||||
</div>
|
</div>
|
||||||
</passcode-input-sheet>
|
</passcode-input-sheet>
|
||||||
|
|||||||
Reference in New Issue
Block a user