Skip to content

Commit

Permalink
馃寛 style: warning on settings page
Browse files Browse the repository at this point in the history
  • Loading branch information
shurco committed Sep 4, 2023
1 parent 917da9c commit e8d29a2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
3 changes: 1 addition & 2 deletions web/admin/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>litecart</title>
</head>

Expand Down
20 changes: 17 additions & 3 deletions web/admin/src/pages/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,15 @@
<hr class="mt-5" />
</div>


<div class="mt-5">
<h2 class="mb-5">Stripe</h2>

<div class="flex items-center justify-between bg-red-600 px-2 py-3 text-white mb-5" v-if="!stripe.secret_key">
<p class="text-sm font-medium">
This section is required!
</p>
</div>

<Form @submit="updateSetting('stripe')" v-slot="{ errors }">
<div class="flex">
<div class="pr-3">
Expand Down Expand Up @@ -111,7 +117,8 @@
https://dribbble.com/
</div>
<div>
<FormInput v-model.trim="social.dribbble" :error="errors.social_dribbble" rules="alpha_num" class="w-48" id="social_dribbble" type="text" title="Dribbble" ico="dribbble" />
<FormInput v-model.trim="social.dribbble" :error="errors.social_dribbble" rules="alpha_num" class="w-48" id="social_dribbble" type="text" title="Dribbble"
ico="dribbble" />
</div>
</div>
<div class="flex mt-5">
Expand All @@ -131,6 +138,13 @@

<div class="mt-5">
<h2 class="mb-5">Mail</h2>

<div class="flex items-center justify-between bg-red-600 px-2 py-3 text-white mb-5" v-if="!mail.smtp_host || !mail.smtp_port || !mail.smtp_username || !mail.smtp_password">
<p class="text-sm font-medium">
This section is required!
</p>
</div>

<Form @submit="updateSetting('mail')" v-slot="{ errors }">
<div class="flex">
<div class="pr-3">
Expand Down Expand Up @@ -270,7 +284,7 @@ const updateSetting = async (section) => {
text: data.message,
type: "success",
}, 4000)
}else{
} else {
notify({
group: "bottom",
title: "Error",
Expand Down

0 comments on commit e8d29a2

Please sign in to comment.