forked from Mirrors/elk
feat(settings): add reset form
This commit is contained in:
parent
5dffd380b0
commit
7bc9f390db
2 changed files with 17 additions and 8 deletions
|
@ -59,6 +59,7 @@
|
||||||
"publish": "Publish!",
|
"publish": "Publish!",
|
||||||
"reply": "Reply",
|
"reply": "Reply",
|
||||||
"reply_count": "{0}",
|
"reply_count": "{0}",
|
||||||
|
"reset": "Reset",
|
||||||
"save": "Save",
|
"save": "Save",
|
||||||
"save_changes": "Save changes",
|
"save_changes": "Save changes",
|
||||||
"sign_in": "Sign in",
|
"sign_in": "Sign in",
|
||||||
|
|
|
@ -129,22 +129,30 @@ const { submit, submitting } = submitter(async ({ dirtyFields }) => {
|
||||||
<SettingsProfileMetadata v-if="isHydrated" v-model:form="form" />
|
<SettingsProfileMetadata v-if="isHydrated" v-model:form="form" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- submit -->
|
<!-- actions -->
|
||||||
<div text-right>
|
<div flex="~ gap2" justify-end>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
btn-text text-sm
|
||||||
|
flex gap-x-2 items-center
|
||||||
|
text-red
|
||||||
|
@click="reset()"
|
||||||
|
>
|
||||||
|
<div aria-hidden="true" i-ri:eraser-line />
|
||||||
|
{{ $t('action.reset') }}
|
||||||
|
</button>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
btn-solid rounded-full text-sm
|
btn-solid rounded-full text-sm
|
||||||
flex-inline gap-x-2 items-center
|
flex gap-x-2 items-center
|
||||||
:disabled="submitting || !isCanSubmit"
|
:disabled="submitting || !isCanSubmit"
|
||||||
>
|
>
|
||||||
<span
|
<div
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
inline-block
|
|
||||||
:class="submitting ? 'i-ri:loader-2-fill animate animate-spin' : 'i-ri:save-line'"
|
:class="submitting ? 'i-ri:loader-2-fill animate animate-spin' : 'i-ri:save-line'"
|
||||||
/>
|
/>
|
||||||
<span>
|
{{ $t('action.save') }}
|
||||||
{{ $t('action.save') }}
|
|
||||||
</span>
|
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue