Change timezone input to select in Settings.vue

This commit is contained in:
Milos Holba
2021-01-05 11:40:05 +01:00
parent a100671cc0
commit ba28ac6184
6 changed files with 188 additions and 30 deletions

View File

@@ -44,7 +44,7 @@
"/chunks/plan-settings.js": "/chunks/plan-settings.js?id=e608674e1719be65fe6f",
"/chunks/plan-subscribers.js": "/chunks/plan-subscribers.js?id=8655313c7b71b1019c8f",
"/chunks/plans.js": "/chunks/plans.js?id=d6d92de642403caa999b",
"/chunks/profile.js": "/chunks/profile.js?id=23c87f7bf1499e72b353",
"/chunks/profile.js": "/chunks/profile.js?id=015a2fcbaf2946f7eb11",
"/chunks/profile~chunks/settings-password.js": "/chunks/profile~chunks/settings-password.js?id=f9e2ea1515204b5c63b6",
"/chunks/purchase-code.js": "/chunks/purchase-code.js?id=91a470e84a34587f3944",
"/chunks/settings.js": "/chunks/settings.js?id=87d29c7fd4e0e6f1a3bd",
@@ -75,8 +75,37 @@
"/chunks/user-storage.js": "/chunks/user-storage.js?id=5cfec8a8f8a8aef24ef2",
"/chunks/user-subscription.js": "/chunks/user-subscription.js?id=34603496ceacb8bd2da3",
"/chunks/users.js": "/chunks/users.js?id=6e68cb068f69fba3199c",
"/chunks/profile.bbedc649c9557c611540.hot-update.js": "/chunks/profile.bbedc649c9557c611540.hot-update.js",
"/chunks/profile.f7f0ad1144c4a00d179b.hot-update.js": "/chunks/profile.f7f0ad1144c4a00d179b.hot-update.js",
"/chunks/profile.b44a1841612eeeeddbbb.hot-update.js": "/chunks/profile.b44a1841612eeeeddbbb.hot-update.js",
"/chunks/profile.262502d6c340ecff7f8b.hot-update.js": "/chunks/profile.262502d6c340ecff7f8b.hot-update.js"
"/chunks/profile.48e4d5c4c778d047693b.hot-update.js": "/chunks/profile.48e4d5c4c778d047693b.hot-update.js",
"/chunks/profile.cf35785b076d2ea8bf59.hot-update.js": "/chunks/profile.cf35785b076d2ea8bf59.hot-update.js",
"/chunks/profile.f2bdfd9a65568dca5f65.hot-update.js": "/chunks/profile.f2bdfd9a65568dca5f65.hot-update.js",
"/chunks/profile.4281151680b57b017d09.hot-update.js": "/chunks/profile.4281151680b57b017d09.hot-update.js",
"/chunks/profile.b0da8d0c2aebcdc9a15b.hot-update.js": "/chunks/profile.b0da8d0c2aebcdc9a15b.hot-update.js",
"/chunks/profile.0cde8b34baad98d1eddf.hot-update.js": "/chunks/profile.0cde8b34baad98d1eddf.hot-update.js",
"/chunks/profile.8bf98609e94b605774ed.hot-update.js": "/chunks/profile.8bf98609e94b605774ed.hot-update.js",
"/chunks/profile.ea11c5762ac710f99855.hot-update.js": "/chunks/profile.ea11c5762ac710f99855.hot-update.js",
"/chunks/profile.6f39169aa82eaf172f07.hot-update.js": "/chunks/profile.6f39169aa82eaf172f07.hot-update.js",
"/chunks/profile.749c8df3990b8146a27f.hot-update.js": "/chunks/profile.749c8df3990b8146a27f.hot-update.js",
"/chunks/profile.d23c566cc2d84f35d01e.hot-update.js": "/chunks/profile.d23c566cc2d84f35d01e.hot-update.js",
"/chunks/profile.913083302dce6860cea2.hot-update.js": "/chunks/profile.913083302dce6860cea2.hot-update.js",
"/chunks/profile.2e1b5ab5c9a2289a0ab9.hot-update.js": "/chunks/profile.2e1b5ab5c9a2289a0ab9.hot-update.js",
"/chunks/profile.f3655d3d3e0d0345044b.hot-update.js": "/chunks/profile.f3655d3d3e0d0345044b.hot-update.js",
"/chunks/profile.8d71d69db264c4930f61.hot-update.js": "/chunks/profile.8d71d69db264c4930f61.hot-update.js",
"/chunks/profile.4a76781d8cd65ca01ad5.hot-update.js": "/chunks/profile.4a76781d8cd65ca01ad5.hot-update.js",
"/chunks/profile.aebb498400de6f657dd9.hot-update.js": "/chunks/profile.aebb498400de6f657dd9.hot-update.js",
"/chunks/profile.575719f7c08ec40a0beb.hot-update.js": "/chunks/profile.575719f7c08ec40a0beb.hot-update.js",
"/chunks/profile.7ddb05f4a448a2e0ada7.hot-update.js": "/chunks/profile.7ddb05f4a448a2e0ada7.hot-update.js",
"/chunks/profile.f22b089608a126873345.hot-update.js": "/chunks/profile.f22b089608a126873345.hot-update.js",
"/chunks/profile.ccdadf038bc7b9809093.hot-update.js": "/chunks/profile.ccdadf038bc7b9809093.hot-update.js",
"/chunks/profile.8968ca0391d2ffdd3f7d.hot-update.js": "/chunks/profile.8968ca0391d2ffdd3f7d.hot-update.js",
"/chunks/profile.2984a400ad28091d27f0.hot-update.js": "/chunks/profile.2984a400ad28091d27f0.hot-update.js",
"/chunks/profile.28f64ac138e75f4aee02.hot-update.js": "/chunks/profile.28f64ac138e75f4aee02.hot-update.js",
"/chunks/profile.711fb4c234c4dcef1916.hot-update.js": "/chunks/profile.711fb4c234c4dcef1916.hot-update.js",
"/chunks/profile.d5977267dfceca8b2e60.hot-update.js": "/chunks/profile.d5977267dfceca8b2e60.hot-update.js",
"/js/main.7f9c080317d86905d411.hot-update.js": "/js/main.7f9c080317d86905d411.hot-update.js",
"/js/main.b744b01553b04c6b839f.hot-update.js": "/js/main.b744b01553b04c6b839f.hot-update.js",
"/chunks/profile.fc55c80000f813c649df.hot-update.js": "/chunks/profile.fc55c80000f813c649df.hot-update.js",
"/js/main.403a2bf36e663ed79525.hot-update.js": "/js/main.403a2bf36e663ed79525.hot-update.js",
"/js/main.dd946068d5b6a91a1045.hot-update.js": "/js/main.dd946068d5b6a91a1045.hot-update.js",
"/chunks/profile.192f673895b9befd2bcc.hot-update.js": "/chunks/profile.192f673895b9befd2bcc.hot-update.js",
"/js/main.3def6113de0b8b6f628b.hot-update.js": "/js/main.3def6113de0b8b6f628b.hot-update.js"
}

View File

@@ -803,7 +803,9 @@
"state": "州",
"state_plac": "输入您的帐单状态",
"title_account": "帐户信息",
"title_billing": "账单信息"
"title_billing": "账单信息",
"timezone": "Timezone",
"timezone_plac" : "Select your timezone"
},
"user_subscription": {
"billed": "开票",

View File

@@ -805,7 +805,9 @@
"state": "State",
"state_plac": "Type your billing state",
"title_account": "Account Information",
"title_billing": "Billing Information"
"title_billing": "Billing Information",
"timezone": "Timezone",
"timezone_plac" : "Select your timezone"
},
"user_subscription": {
"billed": "Billed",

View File

@@ -805,7 +805,9 @@
"state": "Štát",
"state_plac": "Zadajte Štát",
"title_account": "informácie o účte",
"title_billing": "Fakturačné údaje"
"title_billing": "Fakturačné údaje",
"timezone": "Časové pásmo",
"timezone_plac" : "Vyberte svoje časové pásmo"
},
"user_subscription": {
"billed": "Ůčtované",

View File

@@ -839,6 +839,132 @@ const defaultState = {
value: 'ZMW',
},
],
timezones : [
{
value: "-12.0",
label: "(GMT -12:00) Eniwetok, Kwajalein"
},
{
value: "-11.0",
label: "(GMT -11:00) Midway Island, Samoa"
},
{
value: "-10.0",
label: "(GMT -10:00) Hawaii"
},
{
value: "-9.0",
label: "(GMT -9:00) Alaska"
},
{
value: "-8.0",
label: "(GMT -8:00) Pacific Time (US & Canada)"
},
{
value: "-7.0",
label: "(GMT -7:00) Mountain Time (US & Canada)"
},
{
value: "-6.0",
label: "(GMT -6:00) Central Time (US & Canada), Mexico City"
},
{
value: "-5.0",
label: "(GMT -5:00) Eastern Time (US & Canada), Bogota, Lima"
},
{
value: "-4.0",
label: "(GMT -4:00) Atlantic Time (Canada), Caracas, La Paz"
},
{
value: "-3.5",
label: "(GMT -3:30) Newfoundland"
},
{
value: "-3.0",
label: "(GMT -3:00) Brazil, Buenos Aires, Georgetown"
},
{
value: "-2.0",
label: "(GMT -2:00) Mid-Atlantic"
},
{
value: "-1.0",
label: "(GMT -1:00) Azores, Cape Verde Islands"
},
{
value: "0.0",
label: "(GMT) Western Europe Time, London, Lisbon, Casablanca"
},
{
value: "1.0",
label: "(GMT +1:00) Brussels, Copenhagen, Madrid, Paris"
},
{
value: "2.0",
label: "(GMT +2:00) Kaliningrad, South Africa"
},
{
value: "3.0",
label: "(GMT +3:00) Baghdad, Riyadh, Moscow, St. Petersburg"
},
{
value: "3.5",
label: "(GMT +3:30) Tehran"
},
{
value: "4.0",
label: "(GMT +4:00) Abu Dhabi, Muscat, Baku, Tbilisi"
},
{
value: "4.5",
label: "(GMT +4:30) Kabul"
},
{
value: "5.0",
label: "(GMT +5:00) Ekaterinburg, Islamabad, Karachi, Tashkent"
},
{
value: "5.5",
label: "(GMT +5:30) Bombay, Calcutta, Madras, New Delhi"
},
{
value: "5.75",
label: "(GMT +5:45) Kathmandu"
},
{
value: "6.0",
label: "(GMT +6:00) Almaty, Dhaka, Colombo"
},
{
value: "7.0",
label: "(GMT +7:00) Bangkok, Hanoi, Jakarta"
},
{
value: "8.0",
label: "(GMT +8:00) Beijing, Perth, Singapore, Hong Kong"
},
{
value: "9.0",
label: "(GMT +9:00) Tokyo, Seoul, Osaka, Sapporo, Yakutsk"
},
{
value: "9.5",
label: "(GMT +9:30) Adelaide, Darwin"
},
{
value: "10.0",
label: "(GMT +10:00) Eastern Australia, Guam, Vladivostok"
},
{
value: "11.0",
label: "(GMT +11:00) Magadan, Solomon Islands, New Caledonia"
},
{
value: "12.0",
label: "(GMT +12:00) Auckland, Wellington, Fiji, Kamchatka"
}
]
}
const actions = {
changePreviewType: ({commit, state}, preview) => {
@@ -906,6 +1032,7 @@ const getters = {
requestedPlan: state => state.requestedPlan,
currencyList: state => state.currencyList,
countries: state => state.countries,
timezones: state=> state.timezones,
api: state => state.config.api,
config: state => state.config,
index: state => state.index,

View File

@@ -25,6 +25,23 @@
</div>
</div>
</PageTabGroup>
<PageTabGroup v-if="userInfo">
<div class="form block-form">
<FormLabel>{{$t('user_settings.timezone')}}</FormLabel>
<div class="block-wrapper">
<label>GMT:</label>
<div class="input-wrapper">
<SelectInput @input="$updateText('/user/relationships/settings', 'timezone', userTimezone)"
v-model="userTimezone"
:default="userTimezone"
:options="timezones"
:placeholder="$t('user_settings.timezone_plac')"/>
</div>
</div>
</div>
</PageTabGroup>
<PageTabGroup v-if="config.isSaaS && billingInfo">
<div class="form block-form">
<FormLabel>{{ $t('user_settings.title_billing') }}</FormLabel>
@@ -105,27 +122,6 @@
</div>
</div>
</PageTabGroup>
<PageTabGroup v-if="userInfo">
<div class="form block-form">
<FormLabel>Timezone</FormLabel>
<div class="block-wrapper">
<label>GMT:</label>
<div class="input-wrapper">
<input @change="$updateText('/user/relationships/settings', 'timezone', userTimezone)"
v-model="userTimezone"
placeholder="Type your GMT"
type="number"
max='30'
min='-30'
/>
<small class="input-help">
Set your timezone by type the hours of your GMT : 1, -5, 1.5
</small>
</div>
</div>
</div>
</PageTabGroup>
</PageTab>
</template>
@@ -162,7 +158,7 @@
PageTab,
},
computed: {
...mapGetters(['config', 'countries']),
...mapGetters(['config', 'countries', 'timezones']),
},
data() {
return {