mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-05-19 06:11:43 -04:00
minor screen reader improvements
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<p align="center">
|
||||
<a href="https://pocketbase.io" target="_blank" rel="noopener">
|
||||
<img src="https://i.imgur.com/3FTfaXH.png" alt="PocketBase - open source backend in 1 file" />
|
||||
<img src="https://i.imgur.com/aCBbjKx.png" alt="PocketBase - open source backend in 1 file" />
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import{t as e}from"./expandInfo-DGS0CLSa.js";import{t as n}from"./fieldsInfo-Bz62125-.js";import{t as r}from"./filterSyntax-UQrUrYb5.js";function i(i){let a=app.utils.getApiExampleURL(),o=i.listRule===null,s={collectionId:i.id,collectionName:i.name},c=[{title:200,value:JSON.stringify({page:1,perPage:30,totalPages:1,totalItems:2,items:[Object.assign(s,app.utils.getDummyFieldsData(i)),Object.assign(s,app.utils.getDummyFieldsData(i))]},null,2)},{title:400,value:`
|
||||
import{t as e}from"./expandInfo-DGS0CLSa.js";import{t as n}from"./fieldsInfo-Bz62125-.js";import{t as r}from"./filterSyntax-Df6AnI5x.js";function i(i){let a=app.utils.getApiExampleURL(),o=i.listRule===null,s={collectionId:i.id,collectionName:i.name},c=[{title:200,value:JSON.stringify({page:1,perPage:30,totalPages:1,totalItems:2,items:[Object.assign(s,app.utils.getDummyFieldsData(i)),Object.assign(s,app.utils.getDummyFieldsData(i))]},null,2)},{title:400,value:`
|
||||
{
|
||||
"status": 400,
|
||||
"message": "Something went wrong while processing your request.",
|
||||
1
ui/dist/assets/filterSyntax-Df6AnI5x.js
vendored
Normal file
1
ui/dist/assets/filterSyntax-Df6AnI5x.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
function e(){let e=store({show:!1});return t.div({className:`filter-details m-t-10`},t.button({type:`button`,className:`btn secondary sm`,onclick:()=>e.show=!e.show},()=>e.show?[t.span({className:`txt`},`Hide details`),t.i({className:`ri-arrow-up-s-line`,ariaHidden:!0})]:[t.span({className:`txt`},`Show details`),t.i({className:`ri-arrow-down-s-line`,ariaHidden:!0})]),app.components.slide(()=>e.show,t.div({className:`block p-t-5`},t.p(null,`The filter syntax follows the format `,t.code(null,t.span({className:`txt-success`},`OPERAND`),t.span({className:`txt-danger`},` OPERATOR `),t.span({className:`txt-success`},`OPERAND`)),`, where:`),t.ul(null,t.li(null,t.span({className:`txt-code txt-success`},`OPERAND`),` could be any of the above field literal, function, string (single or double quoted), number, null, true, false`),t.li(null,t.span({className:`txt-code txt-danger`},`OPERATOR`),` is one of:`,t.ul(null,t.li(null,t.code({className:`filter-op`},`=`),` Equal`),t.li(null,t.code({className:`filter-op`},`!=`),` Not equal`),t.li(null,t.code({className:`filter-op`},`>`),` Greater than`),t.li(null,t.code({className:`filter-op`},`>=`),` Greater than or equal`),t.li(null,t.code({className:`filter-op`},`<`),` Less than`),t.li(null,t.code({className:`filter-op`},`<=`),` Less than or equal`),t.li(null,t.code({className:`filter-op`},`~`),` Like/Contains`,t.div({className:`txt-sm txt-hint`},t.em(null,`(auto wraps the right string OPERAND in a "%" for wildcard match if not explicitly set)`))),t.li(null,t.code({className:`filter-op`},`!~`),` NOT Like/Contains`,t.div({className:`txt-sm txt-hint`},t.em(null,`(auto wraps the right string OPERAND in a "%" for wildcard match if not explicitly set)`))),t.li(null,t.code({className:`filter-op`},`?=`),t.span({className:`txt-hint`},` Any/At-least-one-of`),` Equal`),t.li(null,t.code({className:`filter-op`},`?!=`),t.span({className:`txt-hint`},` Any/At-least-one-of`),` Not equal`),t.li(null,t.code({className:`filter-op`},`?>`),t.span({className:`txt-hint`},` Any/At-least-one-of`),` Greater than`),t.li(null,t.code({className:`filter-op`},`?>=`),t.span({className:`txt-hint`},` Any/At-least-one-of`),` Greater than or equal`),t.li(null,t.code({className:`filter-op`},`?<`),t.span({className:`txt-hint`},` Any/At-least-one-of`),` Less than`),t.li(null,t.code({className:`filter-op`},`?<=`),t.span({className:`txt-hint`},` Any/At-least-one-of`),` Less than or equal`),t.li(null,t.code({className:`filter-op`},`?~`),t.span({className:`txt-hint`},` Any/At-least-one-of`),` Like/Contains`,t.div({className:`txt-sm txt-hint`},t.em(null,`(auto wraps the right string OPERAND in a "%" for wildcard match if not explicitly set)`))),t.li(null,t.code({className:`filter-op`},`?!~`),t.span({className:`txt-hint`},` Any/At-least-one-of`),` NOT Like/Contains`,t.div({className:`txt-sm txt-hint`},t.em(null,`(auto wraps the right string OPERAND in a "%" for wildcard match if not explicitly set)`)))),t.p(null,`To group and combine several expressions you could use brackets `,t.code(null,`(...)`),`, `,t.code(null,`&&`),`, (AND) and `,t.code(null,`||`),` (OR) tokens.`))))))}export{e as t};
|
||||
1
ui/dist/assets/filterSyntax-UQrUrYb5.js
vendored
1
ui/dist/assets/filterSyntax-UQrUrYb5.js
vendored
@@ -1 +0,0 @@
|
||||
function e(){let e=store({show:!1});return t.div({className:`filter-details m-t-10`},t.button({type:`button`,className:`btn secondary sm`,onclick:()=>e.show=!e.show},()=>e.show?[t.span({className:`txt`},`Hide details`),t.i({className:`ri-arrow-up-s-line`})]:[t.span({className:`txt`},`Show details`),t.i({className:`ri-arrow-down-s-line`})]),app.components.slide(()=>e.show,t.div({className:`block p-t-5`},t.p(null,`The filter syntax follows the format `,t.code(null,t.span({className:`txt-success`},`OPERAND`),t.span({className:`txt-danger`},` OPERATOR `),t.span({className:`txt-success`},`OPERAND`)),`, where:`),t.ul(null,t.li(null,t.span({className:`txt-code txt-success`},`OPERAND`),` could be any of the above field literal, function, string (single or double quoted), number, null, true, false`),t.li(null,t.span({className:`txt-code txt-danger`},`OPERATOR`),` is one of:`,t.ul(null,t.li(null,t.code({className:`filter-op`},`=`),` Equal`),t.li(null,t.code({className:`filter-op`},`!=`),` Not equal`),t.li(null,t.code({className:`filter-op`},`>`),` Greater than`),t.li(null,t.code({className:`filter-op`},`>=`),` Greater than or equal`),t.li(null,t.code({className:`filter-op`},`<`),` Less than`),t.li(null,t.code({className:`filter-op`},`<=`),` Less than or equal`),t.li(null,t.code({className:`filter-op`},`~`),` Like/Contains`,t.div({className:`txt-sm txt-hint`},t.em(null,`(auto wraps the right string OPERAND in a "%" for wildcard match if not explicitly set)`))),t.li(null,t.code({className:`filter-op`},`!~`),` NOT Like/Contains`,t.div({className:`txt-sm txt-hint`},t.em(null,`(auto wraps the right string OPERAND in a "%" for wildcard match if not explicitly set)`))),t.li(null,t.code({className:`filter-op`},`?=`),t.span({className:`txt-hint`},` Any/At-least-one-of`),` Equal`),t.li(null,t.code({className:`filter-op`},`?!=`),t.span({className:`txt-hint`},` Any/At-least-one-of`),` Not equal`),t.li(null,t.code({className:`filter-op`},`?>`),t.span({className:`txt-hint`},` Any/At-least-one-of`),` Greater than`),t.li(null,t.code({className:`filter-op`},`?>=`),t.span({className:`txt-hint`},` Any/At-least-one-of`),` Greater than or equal`),t.li(null,t.code({className:`filter-op`},`?<`),t.span({className:`txt-hint`},` Any/At-least-one-of`),` Less than`),t.li(null,t.code({className:`filter-op`},`?<=`),t.span({className:`txt-hint`},` Any/At-least-one-of`),` Less than or equal`),t.li(null,t.code({className:`filter-op`},`?~`),t.span({className:`txt-hint`},` Any/At-least-one-of`),` Like/Contains`,t.div({className:`txt-sm txt-hint`},t.em(null,`(auto wraps the right string OPERAND in a "%" for wildcard match if not explicitly set)`))),t.li(null,t.code({className:`filter-op`},`?!~`),t.span({className:`txt-hint`},` Any/At-least-one-of`),` NOT Like/Contains`,t.div({className:`txt-sm txt-hint`},t.em(null,`(auto wraps the right string OPERAND in a "%" for wildcard match if not explicitly set)`)))),t.p(null,`To group and combine several expressions you could use brackets `,t.code(null,`(...)`),`, `,t.code(null,`&&`),`, (AND) and `,t.code(null,`||`),` (OR) tokens.`))))))}export{e as t};
|
||||
81
ui/dist/assets/index-CZaohvip.js
vendored
Normal file
81
ui/dist/assets/index-CZaohvip.js
vendored
Normal file
File diff suppressed because one or more lines are too long
81
ui/dist/assets/index-CZmartev.js
vendored
81
ui/dist/assets/index-CZmartev.js
vendored
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{i as e,t as n}from"./pocketbase.es-B_4DUNUU.js";function r(r){let i=r.params?.token||``,a=e(i);if(!a.newEmail||!a.collectionId){app.toasts.error(`Invalid or expired email change token.`),window.location.hash=`#/`;return}app.store.title=`Confirm email change`;let o=store({password:``,isSubmitting:!1,isSuccess:!1,showPassword:!1});async function s(){if(o.isSubmitting)return;o.isSubmitting=!0;let e=new n(app.pb.baseURL);try{await e.collection(a.collectionId).confirmEmailChange(i,o.password),o.isSuccess=!0}catch(e){app.checkApiError(e),o.isSuccess=!1}o.isSubmitting=!1}return t.div({pbEvent:`pageConfirmEmailChange`,className:`wrapper sm m-auto p-b-base`},t.header({className:`txt-center m-b-base`},t.img({className:`main-logo`,src:()=>app.store.mainLogo,ariaHidden:!0,alt:`App logo`}),t.h5({className:`m-t-10`},()=>app.store.title)),()=>o.isSuccess?t.div({pbEvent:`confirmEmailChangeAlert`,className:`alert success txt-center`},t.p(null,`The email was successfully changed.`),t.p(null,`You can go back and sign in with your new email address.`)):t.form({pbEvent:`confirmEmailChangeForm`,className:`grid confirm-email-change-form`,onsubmit:e=>{e.preventDefault(),s()}},t.div({className:`col-12`},t.div({className:`content txt-center m-b-sm`},`Type your password to confirm changing your email address to `,t.strong(null,a.newEmail),`:`),t.div({className:`fields`},t.div({className:`field`},t.label({htmlFor:`password_confirm`},`Password`),t.input({id:`password_confirm`,name:`password`,required:!0,autofocus:!0,type:()=>o.showPassword?`text`:`password`,value:()=>o.password,oninput:e=>o.password=e.target.value})),t.div({className:`field addon`},t.button({type:`button`,tabIndex:-1,className:`btn sm transparent secondary circle tooltip-right`,ariaDescription:app.attrs.tooltip(()=>o.showPassword?`Hide password`:`Show password`),onclick:()=>o.showPassword=!o.showPassword},t.i({className:()=>o.showPassword?`ri-eye-off-line`:`ri-eye-line`}))))),t.div({className:`col-12`},t.button({className:()=>`btn lg block ${o.isSubmitting?`loading`:``}`,disabled:()=>o.isSubmitting},t.span({className:`txt`},`Confirm new email`)))))}export{r as pageConfirmEmailChange};
|
||||
import{i as e,t as n}from"./pocketbase.es-B_4DUNUU.js";function r(r){let i=r.params?.token||``,a=e(i);if(!a.newEmail||!a.collectionId){app.toasts.error(`Invalid or expired email change token.`),window.location.hash=`#/`;return}app.store.title=`Confirm email change`;let o=store({password:``,isSubmitting:!1,isSuccess:!1,showPassword:!1});async function s(){if(o.isSubmitting)return;o.isSubmitting=!0;let e=new n(app.pb.baseURL);try{await e.collection(a.collectionId).confirmEmailChange(i,o.password),o.isSuccess=!0}catch(e){app.checkApiError(e),o.isSuccess=!1}o.isSubmitting=!1}return t.div({pbEvent:`pageConfirmEmailChange`,className:`wrapper sm m-auto p-b-base`},t.header({className:`txt-center m-b-base`},t.img({className:`main-logo`,src:()=>app.store.mainLogo,ariaHidden:!0,alt:`App logo`}),t.h5({className:`m-t-10`},()=>app.store.title)),()=>o.isSuccess?t.div({pbEvent:`confirmEmailChangeAlert`,className:`alert success txt-center`},t.p(null,`The email was successfully changed.`),t.p(null,`You can go back and sign in with your new email address.`)):t.form({pbEvent:`confirmEmailChangeForm`,className:`grid confirm-email-change-form`,onsubmit:e=>{e.preventDefault(),s()}},t.div({className:`col-12`},t.div({className:`content txt-center m-b-sm`},`Type your password to confirm changing your email address to `,t.strong(null,a.newEmail),`:`),t.div({className:`fields`},t.div({className:`field`},t.label({htmlFor:`password_confirm`},`Password`),t.input({id:`password_confirm`,name:`password`,required:!0,autofocus:!0,type:()=>o.showPassword?`text`:`password`,value:()=>o.password,oninput:e=>o.password=e.target.value})),t.div({className:`field addon`},t.button({type:`button`,tabIndex:-1,className:`btn sm transparent secondary circle tooltip-right`,ariaLabel:app.attrs.tooltip(()=>o.showPassword?`Hide password`:`Show password`),onclick:()=>o.showPassword=!o.showPassword},t.i({className:()=>o.showPassword?`ri-eye-off-line`:`ri-eye-line`,ariaHidden:!0}))))),t.div({className:`col-12`},t.button({className:()=>`btn lg block ${o.isSubmitting?`loading`:``}`,disabled:()=>o.isSubmitting},t.span({className:`txt`},`Confirm new email`)))))}export{r as pageConfirmEmailChange};
|
||||
@@ -1 +1 @@
|
||||
import{i as e,t as n}from"./pocketbase.es-B_4DUNUU.js";function r(r){let i=r.params?.token||``,a=e(i);if(!a.email||!a.collectionId){app.toasts.error(`Invalid or expired password reset token.`),window.location.hash=`#/`;return}app.store.title=`Confirm password reset`;let o=store({newPassword:``,newPasswordConfirm:``,showNewPassword:!1,showNewPasswordConfirm:!1,isSubmitting:!1,isSuccess:!1});async function s(){if(o.isSubmitting)return;o.isSubmitting=!0;let e=new n(app.pb.baseURL);try{await e.collection(a.collectionId).confirmPasswordReset(i,o.newPassword,o.newPasswordConfirm),o.isSuccess=!0}catch(e){app.checkApiError(e)}o.isSubmitting=!1}return t.div({pbEvent:`pageConfirmPasswordReset`,className:`wrapper sm m-auto p-b-base`},t.header({className:`txt-center m-b-base`},t.img({className:`main-logo`,src:()=>app.store.mainLogo,ariaHidden:!0,alt:`App logo`}),t.h5({className:`m-t-10`},()=>app.store.title)),()=>o.isSuccess?t.div({pbEvent:`confirmPasswordResetAlert`,className:`alert success txt-center`},t.p(null,`The password was successfully changed.`),t.p(null,`You can go back to sign in with your new password.`)):t.form({pbEvent:`confirmPasswordResetForm`,className:`grid confirm-password-reset-form`,onsubmit:e=>{e.preventDefault(),s()}},t.div({className:`col-12`},t.div({className:`content txt-center m-b-sm`},`Type your new password for `,t.strong(null,a.email),`:`),t.div({className:`fields`},t.div({className:`field`},t.label({htmlFor:`newPassword`},`New password`),t.input({id:`newPassword`,name:`password`,required:!0,autofocus:!0,autocomplete:`new-password`,type:()=>o.showNewPassword?`text`:`password`,value:()=>o.newPassword,oninput:e=>o.newPassword=e.target.value})),t.div({className:`field addon`},t.button({type:`button`,tabIndex:-1,className:`btn sm transparent secondary circle tooltip-right`,ariaDescription:app.attrs.tooltip(()=>o.showNewPassword?`Hide password`:`Show password`),onclick:()=>o.showNewPassword=!o.showNewPassword},t.i({className:()=>o.showNewPassword?`ri-eye-off-line`:`ri-eye-line`}))))),t.div({className:`col-12`},t.div({className:`fields`},t.div({className:`field`},t.label({htmlFor:`newPasswordConfirm`},`New password confirm`),t.input({id:`newPasswordConfirm`,name:`passwordConfirm`,required:!0,autocomplete:`new-password`,type:()=>o.showNewPasswordConfirm?`text`:`password`,value:()=>o.newPasswordConfirm,oninput:e=>o.newPasswordConfirm=e.target.value})),t.div({className:`field addon`},t.button({type:`button`,tabIndex:-1,className:`btn sm transparent secondary circle tooltip-right`,ariaDescription:app.attrs.tooltip(()=>o.showNewPasswordConfirm?`Hide password`:`Show password`),onclick:()=>o.showNewPasswordConfirm=!o.showNewPasswordConfirm},t.i({className:()=>o.showNewPasswordConfirm?`ri-eye-off-line`:`ri-eye-line`}))))),t.div({className:`col-12`},t.button({className:()=>`btn lg block ${o.isSubmitting?`loading`:``}`,disabled:()=>o.isSubmitting},t.span({className:`txt`},`Set new password`)))))}export{r as pageConfirmPasswordReset};
|
||||
import{i as e,t as n}from"./pocketbase.es-B_4DUNUU.js";function r(r){let i=r.params?.token||``,a=e(i);if(!a.email||!a.collectionId){app.toasts.error(`Invalid or expired password reset token.`),window.location.hash=`#/`;return}app.store.title=`Confirm password reset`;let o=store({newPassword:``,newPasswordConfirm:``,showNewPassword:!1,showNewPasswordConfirm:!1,isSubmitting:!1,isSuccess:!1});async function s(){if(o.isSubmitting)return;o.isSubmitting=!0;let e=new n(app.pb.baseURL);try{await e.collection(a.collectionId).confirmPasswordReset(i,o.newPassword,o.newPasswordConfirm),o.isSuccess=!0}catch(e){app.checkApiError(e)}o.isSubmitting=!1}return t.div({pbEvent:`pageConfirmPasswordReset`,className:`wrapper sm m-auto p-b-base`},t.header({className:`txt-center m-b-base`},t.img({className:`main-logo`,src:()=>app.store.mainLogo,ariaHidden:!0,alt:`App logo`}),t.h5({className:`m-t-10`},()=>app.store.title)),()=>o.isSuccess?t.div({pbEvent:`confirmPasswordResetAlert`,className:`alert success txt-center`},t.p(null,`The password was successfully changed.`),t.p(null,`You can go back to sign in with your new password.`)):t.form({pbEvent:`confirmPasswordResetForm`,className:`grid confirm-password-reset-form`,onsubmit:e=>{e.preventDefault(),s()}},t.div({className:`col-12`},t.div({className:`content txt-center m-b-sm`},`Type your new password for `,t.strong(null,a.email),`:`),t.div({className:`fields`},t.div({className:`field`},t.label({htmlFor:`newPassword`},`New password`),t.input({id:`newPassword`,name:`password`,required:!0,autofocus:!0,autocomplete:`new-password`,type:()=>o.showNewPassword?`text`:`password`,value:()=>o.newPassword,oninput:e=>o.newPassword=e.target.value})),t.div({className:`field addon`},t.button({type:`button`,tabIndex:-1,className:`btn sm transparent secondary circle tooltip-right`,ariaLabel:app.attrs.tooltip(()=>o.showNewPassword?`Hide password`:`Show password`),onclick:()=>o.showNewPassword=!o.showNewPassword},t.i({className:()=>o.showNewPassword?`ri-eye-off-line`:`ri-eye-line`,ariaHidden:!0}))))),t.div({className:`col-12`},t.div({className:`fields`},t.div({className:`field`},t.label({htmlFor:`newPasswordConfirm`},`New password confirm`),t.input({id:`newPasswordConfirm`,name:`passwordConfirm`,required:!0,autocomplete:`new-password`,type:()=>o.showNewPasswordConfirm?`text`:`password`,value:()=>o.newPasswordConfirm,oninput:e=>o.newPasswordConfirm=e.target.value})),t.div({className:`field addon`},t.button({type:`button`,tabIndex:-1,className:`btn sm transparent secondary circle tooltip-right`,ariaLabel:app.attrs.tooltip(()=>o.showNewPasswordConfirm?`Hide password`:`Show password`),onclick:()=>o.showNewPasswordConfirm=!o.showNewPasswordConfirm},t.i({className:()=>o.showNewPasswordConfirm?`ri-eye-off-line`:`ri-eye-line`,ariaHidden:!0}))))),t.div({className:`col-12`},t.button({className:()=>`btn lg block ${o.isSubmitting?`loading`:``}`,disabled:()=>o.isSubmitting},t.span({className:`txt`},`Set new password`)))))}export{r as pageConfirmPasswordReset};
|
||||
@@ -1 +1 @@
|
||||
import{a as e,i as n}from"./pocketbase.es-B_4DUNUU.js";function r(r){let i=r.params?.token||``;if(n(i).type!=`auth`||e(i)){app.toasts.error(`The installer token is invalid or has expired.`),window.location.hash=`#/`;return}app.store.title=`Setup your PocketBase instance`;let a=store({email:``,password:``,passwordConfirm:``,showPassword:!1,showPasswordConfirm:!1,isSubmitting:!1,isUploading:!1,get isBusy(){return a.isSubmitting||a.isUploading}});async function o(){if(!a.isBusy){a.isSubmitting=!0;try{await app.pb.collection(`_superusers`).create({email:a.email,password:a.password,passwordConfirm:a.passwordConfirm},{headers:{Authorization:i}}),await app.pb.collection(`_superusers`).authWithPassword(a.email,a.password),window.location.hash=`#/`}catch(e){app.checkApiError(e)}a.isSubmitting=!1}}let s=`backupFileInput`;function c(){let e=document.getElementById(s);e&&(e.value=``)}function l(e){e&&app.modals.confirm(t.h6(null,`Note that we don't perform validations for the uploaded backup files. Proceed with caution and only if you trust the file source.\n\nDo you really want to upload and initialize "${e.name}"?`),()=>{u(e)},()=>{c()})}async function u(e){if(!(!e||a.isBusy)){a.isUploading=!0;try{await app.pb.backups.upload({file:e},{headers:{Authorization:i}}),await app.pb.backups.restore(e.name,{headers:{Authorization:i}}),app.toasts.info(`Please wait while extracting the uploaded archive!`),await new Promise(e=>setTimeout(e,3e3)),window.location.href=`#/`}catch(e){app.checkApiError(e)}c(),a.isUploading=!1}}return t.div({pbEvent:`pageInstaller`,className:`wrapper sm m-auto p-b-base`},t.header({className:`txt-center m-b-base`},t.img({className:`main-logo`,src:()=>app.store.mainLogo,ariaHidden:!0,alt:`App logo`}),t.h5({className:`m-t-10`},()=>app.store.title)),t.form({pbEvent:`installerForm`,className:`grid installer-form`,onsubmit:e=>{e.preventDefault(),o(a)}},t.div({className:`col-12 txt-center`},`Create your first superuser account in order to continue:`),t.div({className:`col-12`},t.div({className:`field`},t.label({htmlFor:`superuser_email`},`Email`),t.input({id:`superuser_email`,name:`email`,type:`email`,required:!0,autofocus:!0,autocomplete:`off`,disabled:()=>a.isBusy,value:()=>a.email,oninput:e=>a.email=e.target.value}))),t.div({className:`col-12`},t.div({className:`fields`},t.div({className:`field`},t.label({htmlFor:`superuser_password`},`Password`),t.input({id:`superuser_password`,name:`password`,min:10,required:!0,disabled:()=>a.isBusy,type:()=>a.showPassword?`text`:`password`,value:()=>a.password,oninput:e=>a.password=e.target.value})),t.div({className:`field addon`},t.button({type:`button`,tabIndex:-1,className:`btn sm transparent secondary circle tooltip-right`,ariaDescription:app.attrs.tooltip(()=>a.showPassword?`Hide password`:`Show password`),onclick:()=>a.showPassword=!a.showPassword},t.i({className:()=>a.showPassword?`ri-eye-off-line`:`ri-eye-line`})))),t.div({className:`field-help`},`Recommended at least 10 characters.`)),t.div({className:`col-12`},t.div({className:`fields`},t.div({className:`field`},t.label({htmlFor:`superuser_password_confirm`},`Password confirm`),t.input({id:`superuser_password_confirm`,name:`passwordConfirm`,required:!0,disabled:()=>a.isBusy,type:()=>a.showPasswordConfirm?`text`:`password`,value:()=>a.passwordConfirm,oninput:e=>a.passwordConfirm=e.target.value})),t.div({className:`field addon`},t.button({type:`button`,tabIndex:-1,className:`btn sm transparent secondary circle tooltip-right`,ariaDescription:app.attrs.tooltip(()=>a.showPasswordConfirm?`Hide password`:`Show password`),onclick:()=>a.showPasswordConfirm=!a.showPasswordConfirm},t.i({className:()=>a.showPasswordConfirm?`ri-eye-off-line`:`ri-eye-line`}))))),t.div({className:`col-12`},t.button({className:()=>`btn lg next block ${a.isSubmitting?`loading`:``}`,disabled:()=>a.isBusy},t.span({className:`txt`},`Create superuser and login`),t.i({className:`ri-arrow-right-line`})))),t.hr(),t.label({htmlFor:s,className:()=>`btn secondary transparent lg block ${a.isBusy?`disabled`:``} ${a.isUploading?`loading`:``}`},t.i({className:`ri-upload-cloud-line`}),t.span({className:`txt`},`Or initialize from backup`)),t.input({id:s,type:`file`,className:`hidden`,accept:`.zip`,onchange:e=>{l(e.target?.files?.[0])}}))}export{r as pageInstaller};
|
||||
import{a as e,i as n}from"./pocketbase.es-B_4DUNUU.js";function r(r){let i=r.params?.token||``;if(n(i).type!=`auth`||e(i)){app.toasts.error(`The installer token is invalid or has expired.`),window.location.hash=`#/`;return}app.store.title=`Setup your PocketBase instance`;let a=store({email:``,password:``,passwordConfirm:``,showPassword:!1,showPasswordConfirm:!1,isSubmitting:!1,isUploading:!1,get isBusy(){return a.isSubmitting||a.isUploading}});async function o(){if(!a.isBusy){a.isSubmitting=!0;try{await app.pb.collection(`_superusers`).create({email:a.email,password:a.password,passwordConfirm:a.passwordConfirm},{headers:{Authorization:i}}),await app.pb.collection(`_superusers`).authWithPassword(a.email,a.password),window.location.hash=`#/`}catch(e){app.checkApiError(e)}a.isSubmitting=!1}}let s=`backupFileInput`;function c(){let e=document.getElementById(s);e&&(e.value=``)}function l(e){e&&app.modals.confirm(t.h6(null,`Note that we don't perform validations for the uploaded backup files. Proceed with caution and only if you trust the file source.\n\nDo you really want to upload and initialize "${e.name}"?`),()=>{u(e)},()=>{c()})}async function u(e){if(!(!e||a.isBusy)){a.isUploading=!0;try{await app.pb.backups.upload({file:e},{headers:{Authorization:i}}),await app.pb.backups.restore(e.name,{headers:{Authorization:i}}),app.toasts.info(`Please wait while extracting the uploaded archive!`),await new Promise(e=>setTimeout(e,3e3)),window.location.href=`#/`}catch(e){app.checkApiError(e)}c(),a.isUploading=!1}}return t.div({pbEvent:`pageInstaller`,className:`wrapper sm m-auto p-b-base`},t.header({className:`txt-center m-b-base`},t.img({className:`main-logo`,src:()=>app.store.mainLogo,ariaHidden:!0,alt:`App logo`}),t.h5({className:`m-t-10`},()=>app.store.title)),t.form({pbEvent:`installerForm`,className:`grid installer-form`,onsubmit:e=>{e.preventDefault(),o(a)}},t.div({className:`col-12 txt-center`},`Create your first superuser account in order to continue:`),t.div({className:`col-12`},t.div({className:`field`},t.label({htmlFor:`superuser_email`},`Email`),t.input({id:`superuser_email`,name:`email`,type:`email`,required:!0,autofocus:!0,autocomplete:`off`,disabled:()=>a.isBusy,value:()=>a.email,oninput:e=>a.email=e.target.value}))),t.div({className:`col-12`},t.div({className:`fields`},t.div({className:`field`},t.label({htmlFor:`superuser_password`},`Password`),t.input({id:`superuser_password`,name:`password`,min:10,required:!0,disabled:()=>a.isBusy,type:()=>a.showPassword?`text`:`password`,value:()=>a.password,oninput:e=>a.password=e.target.value})),t.div({className:`field addon`},t.button({type:`button`,tabIndex:-1,className:`btn sm transparent secondary circle tooltip-right`,ariaLabel:app.attrs.tooltip(()=>a.showPassword?`Hide password`:`Show password`),onclick:()=>a.showPassword=!a.showPassword},t.i({className:()=>a.showPassword?`ri-eye-off-line`:`ri-eye-line`,ariaHidden:!0})))),t.div({className:`field-help`},`Recommended at least 10 characters.`)),t.div({className:`col-12`},t.div({className:`fields`},t.div({className:`field`},t.label({htmlFor:`superuser_password_confirm`},`Password confirm`),t.input({id:`superuser_password_confirm`,name:`passwordConfirm`,required:!0,disabled:()=>a.isBusy,type:()=>a.showPasswordConfirm?`text`:`password`,value:()=>a.passwordConfirm,oninput:e=>a.passwordConfirm=e.target.value})),t.div({className:`field addon`},t.button({type:`button`,tabIndex:-1,className:`btn sm transparent secondary circle tooltip-right`,ariaLabel:app.attrs.tooltip(()=>a.showPasswordConfirm?`Hide password`:`Show password`),onclick:()=>a.showPasswordConfirm=!a.showPasswordConfirm},t.i({className:()=>a.showPasswordConfirm?`ri-eye-off-line`:`ri-eye-line`,ariaHidden:!0}))))),t.div({className:`col-12`},t.button({className:()=>`btn lg next block ${a.isSubmitting?`loading`:``}`,disabled:()=>a.isBusy},t.span({className:`txt`},`Create superuser and login`),t.i({className:`ri-arrow-right-line`,ariaHidden:!0})))),t.hr(),t.label({htmlFor:s,className:()=>`btn secondary transparent lg block ${a.isBusy?`disabled`:``} ${a.isUploading?`loading`:``}`},t.i({className:`ri-upload-cloud-line`,ariaHidden:!0}),t.span({className:`txt`},`Or initialize from backup`)),t.input({id:s,type:`file`,className:`hidden`,accept:`.zip`,onchange:e=>{l(e.target?.files?.[0])}}))}export{r as pageInstaller};
|
||||
@@ -1 +1 @@
|
||||
function e(e){app.store.title=`Forgotten superuser password`;let n=store({email:``,isSubmitting:!1,success:!1});async function r(){if(!n.isSubmitting){n.isSubmitting=!0;try{await app.pb.collection(`_superusers`).requestPasswordReset(n.email),n.success=!0}catch(e){app.checkApiError(e)}n.isSubmitting=!1}}return t.div({pbEvent:`pageSuperuserPasswordReset`,className:`wrapper sm m-auto p-b-base`},t.header({className:`txt-center m-b-base`},t.img({className:`main-logo`,src:()=>app.store.mainLogo,ariaHidden:!0,alt:`App logo`}),t.h5({className:`m-t-10`},()=>app.store.title)),()=>n.success?t.div({pbEvent:`superuserPasswordResetAlert`,className:`alert success txt-center`},t.p(null,`Check `,t.strong(null,n.email),` for the recovery link!`)):t.form({pbEvent:`superuserPasswordResetForm`,className:`grid request-password-reset-form`,onsubmit:e=>{e.preventDefault(),r()}},t.div({className:`col-12`},t.div({className:`content txt-center m-b-sm`},t.p(null,`Enter the email associated with your account and we'll send you a recovery link:`)),t.div({className:`field`},t.label({htmlFor:`password_reset_email`},`Email`),t.input({id:`password_reset_email`,name:`email`,type:`email`,required:!0,autofocus:!0,value:()=>n.email,oninput:e=>n.email=e.target.value}))),t.div({className:`col-12`},t.button({className:()=>`btn lg block ${n.isSubmitting?`loading`:``}`,disabled:()=>n.isSubmitting},t.i({className:`ri-mail-send-line`}),t.span({className:`txt`},`Send recovery link`)))),t.div({className:`block m-t-sm txt-center`},t.a({href:`#/login`,className:`link-hint`},`Back to login`)))}export{e as pageRequestSuperuserPasswordReset};
|
||||
function e(e){app.store.title=`Forgotten superuser password`;let n=store({email:``,isSubmitting:!1,success:!1});async function r(){if(!n.isSubmitting){n.isSubmitting=!0;try{await app.pb.collection(`_superusers`).requestPasswordReset(n.email),n.success=!0}catch(e){app.checkApiError(e)}n.isSubmitting=!1}}return t.div({pbEvent:`pageSuperuserPasswordReset`,className:`wrapper sm m-auto p-b-base`},t.header({className:`txt-center m-b-base`},t.img({className:`main-logo`,src:()=>app.store.mainLogo,ariaHidden:!0,alt:`App logo`}),t.h5({className:`m-t-10`},()=>app.store.title)),()=>n.success?t.div({pbEvent:`superuserPasswordResetAlert`,className:`alert success txt-center`},t.p(null,`Check `,t.strong(null,n.email),` for the recovery link!`)):t.form({pbEvent:`superuserPasswordResetForm`,className:`grid request-password-reset-form`,onsubmit:e=>{e.preventDefault(),r()}},t.div({className:`col-12`},t.div({className:`content txt-center m-b-sm`},t.p(null,`Enter the email associated with your account and we'll send you a recovery link:`)),t.div({className:`field`},t.label({htmlFor:`password_reset_email`},`Email`),t.input({id:`password_reset_email`,name:`email`,type:`email`,required:!0,autofocus:!0,value:()=>n.email,oninput:e=>n.email=e.target.value}))),t.div({className:`col-12`},t.button({className:()=>`btn lg block ${n.isSubmitting?`loading`:``}`,disabled:()=>n.isSubmitting},t.i({className:`ri-mail-send-line`,ariaHidden:!0}),t.span({className:`txt`},`Send recovery link`)))),t.div({className:`block m-t-sm txt-center`},t.a({href:`#/login`,className:`link-hint`},`Back to login`)))}export{e as pageRequestSuperuserPasswordReset};
|
||||
2
ui/dist/index.html
vendored
2
ui/dist/index.html
vendored
@@ -13,7 +13,7 @@
|
||||
|
||||
<!-- prism -->
|
||||
<script src="./libs/prism/prism.js" data-manual></script>
|
||||
<script type="module" crossorigin src="./assets/index-CZmartev.js"></script>
|
||||
<script type="module" crossorigin src="./assets/index-CZaohvip.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="./assets/pocketbase.es-B_4DUNUU.js">
|
||||
<link rel="stylesheet" crossorigin href="./assets/index-CCCeZnET.css">
|
||||
</head>
|
||||
|
||||
@@ -15,13 +15,13 @@ export function filterSyntax() {
|
||||
if (data.show) {
|
||||
return [
|
||||
t.span({ className: "txt" }, "Hide details"),
|
||||
t.i({ className: "ri-arrow-up-s-line" }),
|
||||
t.i({ className: "ri-arrow-up-s-line", ariaHidden: true }),
|
||||
];
|
||||
}
|
||||
|
||||
return [
|
||||
t.span({ className: "txt" }, "Show details"),
|
||||
t.i({ className: "ri-arrow-down-s-line" }),
|
||||
t.i({ className: "ri-arrow-down-s-line", ariaHidden: true }),
|
||||
];
|
||||
},
|
||||
),
|
||||
|
||||
@@ -101,13 +101,14 @@ export function pageConfirmEmailChange(route) {
|
||||
type: "button",
|
||||
tabIndex: -1,
|
||||
className: "btn sm transparent secondary circle tooltip-right",
|
||||
ariaDescription: app.attrs.tooltip(() =>
|
||||
ariaLabel: app.attrs.tooltip(() =>
|
||||
data.showPassword ? "Hide password" : "Show password"
|
||||
),
|
||||
onclick: () => (data.showPassword = !data.showPassword),
|
||||
},
|
||||
t.i({
|
||||
className: () => (data.showPassword ? "ri-eye-off-line" : "ri-eye-line"),
|
||||
ariaHidden: true,
|
||||
}),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -103,13 +103,14 @@ export function pageConfirmPasswordReset(route) {
|
||||
type: "button",
|
||||
tabIndex: -1,
|
||||
className: "btn sm transparent secondary circle tooltip-right",
|
||||
ariaDescription: app.attrs.tooltip(() =>
|
||||
ariaLabel: app.attrs.tooltip(() =>
|
||||
data.showNewPassword ? "Hide password" : "Show password"
|
||||
),
|
||||
onclick: () => (data.showNewPassword = !data.showNewPassword),
|
||||
},
|
||||
t.i({
|
||||
className: () => (data.showNewPassword ? "ri-eye-off-line" : "ri-eye-line"),
|
||||
ariaHidden: true,
|
||||
}),
|
||||
),
|
||||
),
|
||||
@@ -139,13 +140,14 @@ export function pageConfirmPasswordReset(route) {
|
||||
type: "button",
|
||||
tabIndex: -1,
|
||||
className: "btn sm transparent secondary circle tooltip-right",
|
||||
ariaDescription: app.attrs.tooltip(() =>
|
||||
ariaLabel: app.attrs.tooltip(() =>
|
||||
data.showNewPasswordConfirm ? "Hide password" : "Show password"
|
||||
),
|
||||
onclick: () => (data.showNewPasswordConfirm = !data.showNewPasswordConfirm),
|
||||
},
|
||||
t.i({
|
||||
className: () => (data.showNewPasswordConfirm ? "ri-eye-off-line" : "ri-eye-line"),
|
||||
ariaHidden: true,
|
||||
}),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -180,13 +180,14 @@ export function pageInstaller(route) {
|
||||
type: "button",
|
||||
tabIndex: -1,
|
||||
className: "btn sm transparent secondary circle tooltip-right",
|
||||
ariaDescription: app.attrs.tooltip(() =>
|
||||
ariaLabel: app.attrs.tooltip(() =>
|
||||
data.showPassword ? "Hide password" : "Show password"
|
||||
),
|
||||
onclick: () => (data.showPassword = !data.showPassword),
|
||||
},
|
||||
t.i({
|
||||
className: () => (data.showPassword ? "ri-eye-off-line" : "ri-eye-line"),
|
||||
ariaHidden: true,
|
||||
}),
|
||||
),
|
||||
),
|
||||
@@ -217,13 +218,14 @@ export function pageInstaller(route) {
|
||||
type: "button",
|
||||
tabIndex: -1,
|
||||
className: "btn sm transparent secondary circle tooltip-right",
|
||||
ariaDescription: app.attrs.tooltip(() =>
|
||||
ariaLabel: app.attrs.tooltip(() =>
|
||||
data.showPasswordConfirm ? "Hide password" : "Show password"
|
||||
),
|
||||
onclick: () => (data.showPasswordConfirm = !data.showPasswordConfirm),
|
||||
},
|
||||
t.i({
|
||||
className: () => (data.showPasswordConfirm ? "ri-eye-off-line" : "ri-eye-line"),
|
||||
ariaHidden: true,
|
||||
}),
|
||||
),
|
||||
),
|
||||
@@ -237,7 +239,7 @@ export function pageInstaller(route) {
|
||||
disabled: () => data.isBusy,
|
||||
},
|
||||
t.span({ className: "txt" }, "Create superuser and login"),
|
||||
t.i({ className: "ri-arrow-right-line" }),
|
||||
t.i({ className: "ri-arrow-right-line", ariaHidden: true }),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -250,7 +252,7 @@ export function pageInstaller(route) {
|
||||
data.isUploading ? "loading" : ""
|
||||
}`,
|
||||
},
|
||||
t.i({ className: "ri-upload-cloud-line" }),
|
||||
t.i({ className: "ri-upload-cloud-line", ariaHidden: true }),
|
||||
t.span({ className: "txt" }, "Or initialize from backup"),
|
||||
),
|
||||
t.input({
|
||||
|
||||
@@ -78,7 +78,7 @@ export function pageRequestSuperuserPasswordReset(route) {
|
||||
className: () => `btn lg block ${data.isSubmitting ? "loading" : ""}`,
|
||||
disabled: () => data.isSubmitting,
|
||||
},
|
||||
t.i({ className: "ri-mail-send-line" }),
|
||||
t.i({ className: "ri-mail-send-line", ariaHidden: true }),
|
||||
t.span({ className: "txt" }, "Send recovery link"),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -187,13 +187,12 @@ function authWithPasswordForm(data) {
|
||||
type: "button",
|
||||
tabIndex: -1,
|
||||
className: "btn sm transparent secondary circle tooltip-right",
|
||||
ariaDescription: app.attrs.tooltip(() =>
|
||||
data.showPassword ? "Hide password" : "Show password"
|
||||
),
|
||||
ariaLabel: app.attrs.tooltip(() => data.showPassword ? "Hide password" : "Show password"),
|
||||
onclick: () => (data.showPassword = !data.showPassword),
|
||||
},
|
||||
t.i({
|
||||
className: () => (data.showPassword ? "ri-eye-off-line" : "ri-eye-line"),
|
||||
ariaHidden: true,
|
||||
}),
|
||||
),
|
||||
),
|
||||
@@ -215,7 +214,7 @@ function authWithPasswordForm(data) {
|
||||
disabled: () => data.isPasswordAuthSubmitting,
|
||||
},
|
||||
t.span({ className: "txt" }, () => (data.totalSteps > 1 ? "Next" : "Login")),
|
||||
t.i({ className: "ri-arrow-right-line" }),
|
||||
t.i({ className: "ri-arrow-right-line", ariaHidden: true }),
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -282,7 +281,7 @@ function requestOTPForm(data) {
|
||||
className: () => `btn lg block ${data.isOTPRequestSubmitting ? "loading" : ""}`,
|
||||
disabled: () => data.isOTPRequestSubmitting,
|
||||
},
|
||||
t.i({ className: "ri-mail-send-line" }),
|
||||
t.i({ className: "ri-mail-send-line", ariaHidden: true }),
|
||||
t.span({ className: "txt" }, "Send OTP"),
|
||||
),
|
||||
),
|
||||
@@ -378,9 +377,7 @@ function authWithOTPForm(data) {
|
||||
type: "button",
|
||||
tabIndex: -1,
|
||||
className: "btn sm transparent secondary circle tooltip-right",
|
||||
ariaDescription: app.attrs.tooltip(() =>
|
||||
data.showPassword ? "Hide password" : "Show password"
|
||||
),
|
||||
ariaLabel: app.attrs.tooltip(() => data.showPassword ? "Hide password" : "Show password"),
|
||||
onclick: () => (data.showPassword = !data.showPassword),
|
||||
},
|
||||
t.i({
|
||||
@@ -398,7 +395,7 @@ function authWithOTPForm(data) {
|
||||
disabled: () => data.isOTPAuthSubmitting,
|
||||
},
|
||||
t.span({ className: "txt" }, "Login"),
|
||||
t.i({ className: "ri-arrow-right-line" }),
|
||||
t.i({ className: "ri-arrow-right-line", ariaHidden: true }),
|
||||
),
|
||||
t.div(
|
||||
{ className: "block m-t-sm txt-center" },
|
||||
|
||||
@@ -47,7 +47,7 @@ export function appHeader() {
|
||||
},
|
||||
() => {
|
||||
if (link.icon) {
|
||||
return t.i({ className: link.icon });
|
||||
return t.i({ className: link.icon, ariaHidden: true });
|
||||
}
|
||||
},
|
||||
t.span({ className: "txt" }, () => link.label),
|
||||
@@ -63,7 +63,7 @@ export function appHeader() {
|
||||
"html-popovertarget": "logged-user-dropdown",
|
||||
},
|
||||
t.span({ className: "superuser-name txt-ellipsis" }, () => app.store.superuser?.email),
|
||||
t.i({ className: "ri-arrow-drop-down-line" }),
|
||||
t.i({ className: "ri-arrow-drop-down-line", ariaHidden: true }),
|
||||
),
|
||||
t.div(
|
||||
{
|
||||
|
||||
@@ -105,7 +105,7 @@ window.app.components.colorPicker = function(propsArg = {}) {
|
||||
className: "link-hint predefined-colors-btn",
|
||||
"html-popovertarget": uniqueId + "predefined-colors-dropdown",
|
||||
},
|
||||
t.i({ className: "ri-arrow-down-s-line", roleHidden: true }),
|
||||
t.i({ className: "ri-arrow-down-s-line", ariaHidden: true }),
|
||||
),
|
||||
t.div(
|
||||
{
|
||||
|
||||
@@ -53,6 +53,7 @@ window.app.components.copyButton = function(textOrFunc, ...children) {
|
||||
},
|
||||
t.i({
|
||||
hidden: children?.length,
|
||||
ariaHidden: true,
|
||||
className: () => `copy-icon ${data.active ? "ri-check-double-line" : "ri-file-copy-line"}`,
|
||||
}),
|
||||
...children,
|
||||
|
||||
@@ -25,7 +25,7 @@ window.app.components.credits = function() {
|
||||
},
|
||||
() => {
|
||||
if (link.icon) {
|
||||
return t.i({ className: link.icon });
|
||||
return t.i({ className: link.icon, ariaHidden: true });
|
||||
}
|
||||
},
|
||||
t.span({ className: "txt" }, () => link.label),
|
||||
|
||||
@@ -335,6 +335,7 @@ window.app.components.erd = function(propsArg = {}) {
|
||||
"html-data-field-name": () => field.name,
|
||||
},
|
||||
t.i({
|
||||
ariaHidden: true,
|
||||
title: () => field.type,
|
||||
className: () =>
|
||||
`field-icon ${
|
||||
|
||||
@@ -243,7 +243,7 @@ window.app.components.fieldSettings = function(data, settingsArg = {}) {
|
||||
}
|
||||
},
|
||||
},
|
||||
t.i({ className: "ri-settings-3-line" }),
|
||||
t.i({ className: "ri-settings-3-line", ariaHidden: true }),
|
||||
),
|
||||
t.button(
|
||||
{
|
||||
@@ -251,9 +251,9 @@ window.app.components.fieldSettings = function(data, settingsArg = {}) {
|
||||
className: "btn sm circle transparent warning",
|
||||
hidden: () => !data.field[toDeleteProp],
|
||||
onclick: () => delete data.field[toDeleteProp],
|
||||
ariaDescription: app.attrs.tooltip("Restore"),
|
||||
ariaLabel: app.attrs.tooltip("Restore"),
|
||||
},
|
||||
t.i({ className: "ri-restart-line" }),
|
||||
t.i({ className: "ri-restart-line", ariaHidden: true }),
|
||||
),
|
||||
),
|
||||
(el) => {
|
||||
@@ -334,6 +334,7 @@ window.app.components.fieldSettings = function(data, settingsArg = {}) {
|
||||
{
|
||||
hidden: () => !settings.showDuplicate && (!settings.showRemove || data.field.system),
|
||||
type: "button",
|
||||
title: "More options",
|
||||
className: "btn sm circle transparent secondary more-btn m-l-auto",
|
||||
"html-popovertarget": uniqueId + "_options_dropdown",
|
||||
},
|
||||
|
||||
@@ -251,7 +251,7 @@ function initSearch(selectFunc = null) {
|
||||
title: "Clear search",
|
||||
onclick: () => reset(),
|
||||
},
|
||||
t.i({ className: "ri-close-line" }),
|
||||
t.i({ className: "ri-close-line", ariaHidden: true }),
|
||||
);
|
||||
}
|
||||
}),
|
||||
|
||||
@@ -37,7 +37,7 @@ window.app.components.refreshButton = function(propsArg = {}) {
|
||||
hidden: () => props.hidden,
|
||||
inert: () => props.inert,
|
||||
type: "button",
|
||||
ariaDescription: app.attrs.tooltip(() => props.tooltip),
|
||||
ariaLabel: app.attrs.tooltip(() => props.tooltip),
|
||||
disabled: () => props.disabled,
|
||||
className: () => props.className,
|
||||
onunmount: () => {
|
||||
@@ -64,7 +64,7 @@ window.app.components.refreshButton = function(propsArg = {}) {
|
||||
}, 500);
|
||||
},
|
||||
},
|
||||
t.i({ className: "ri-refresh-line" }),
|
||||
t.i({ className: "ri-refresh-line", ariaHidden: true }),
|
||||
);
|
||||
|
||||
return btn;
|
||||
|
||||
@@ -111,13 +111,13 @@ window.app.components.s3Test = function(propsArg = {}) {
|
||||
|
||||
if (data.hasError) {
|
||||
return [
|
||||
t.i({ className: "ri-error-warning-line txt-warning" }),
|
||||
t.i({ className: "ri-error-warning-line txt-warning", ariaHidden: true }),
|
||||
t.span({ className: "txt" }, "Failed to establish S3 connection"),
|
||||
];
|
||||
}
|
||||
|
||||
return [
|
||||
t.i({ className: "ri-checkbox-circle-line txt-success" }),
|
||||
t.i({ className: "ri-checkbox-circle-line txt-success", ariaHidden: true }),
|
||||
t.span({ className: "txt" }, "S3 connected successfully"),
|
||||
];
|
||||
},
|
||||
|
||||
@@ -116,6 +116,7 @@ window.app.components.searchHistoryButton = function(propsArg = {}) {
|
||||
{
|
||||
role: "button",
|
||||
className: "remove-btn link-hint m-l-auto p-l-5 p-r-5",
|
||||
title: "Clear",
|
||||
onauxclick: (e) => {
|
||||
e.stopPropagation();
|
||||
return false;
|
||||
@@ -126,7 +127,7 @@ window.app.components.searchHistoryButton = function(propsArg = {}) {
|
||||
return false;
|
||||
},
|
||||
},
|
||||
t.i({ className: "ri-close-line" }),
|
||||
t.i({ className: "ri-close-line", ariaHidden: true }),
|
||||
),
|
||||
);
|
||||
});
|
||||
@@ -140,14 +141,15 @@ window.app.components.searchHistoryButton = function(propsArg = {}) {
|
||||
hidden: () => props.hidden,
|
||||
inert: () => props.inert,
|
||||
type: "button",
|
||||
title: "Search history",
|
||||
className: () => props.btnClassName,
|
||||
"html-popovertarget": uniqueId,
|
||||
onunmount: () => {
|
||||
watchers?.forEach((w) => w?.unwatch());
|
||||
},
|
||||
},
|
||||
t.i({ className: "ri-search-line" }),
|
||||
t.i({ className: "ri-arrow-drop-down-line" }),
|
||||
t.i({ className: "ri-search-line", ariaHidden: true }),
|
||||
t.i({ className: "ri-arrow-drop-down-line", ariaHidden: true }),
|
||||
dropdown,
|
||||
);
|
||||
};
|
||||
|
||||
@@ -194,10 +194,11 @@ window.app.components.select = function(propsArg = {}) {
|
||||
t.button(
|
||||
{
|
||||
type: "button",
|
||||
title: "Clear",
|
||||
className: "btn sm secondary transparent circle",
|
||||
onclick: () => clearSearch(true),
|
||||
},
|
||||
t.i({ className: "ri-close-line" }),
|
||||
t.i({ className: "ri-close-line", ariaHidden: true }),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -248,7 +249,7 @@ window.app.components.select = function(propsArg = {}) {
|
||||
tabIndex: -1,
|
||||
role: "button",
|
||||
className: "ri-close-line link-hint btn-option-unset",
|
||||
ariaDescription: app.attrs.tooltip("Unset", "left"),
|
||||
ariaLabel: app.attrs.tooltip("Unset", "left"),
|
||||
onclick: () => {
|
||||
toggle(opt);
|
||||
return false;
|
||||
|
||||
@@ -137,7 +137,7 @@ function addToast(textOrElem, options = {}) {
|
||||
title: "Clear",
|
||||
onclick: () => removeToast(toastRef),
|
||||
},
|
||||
t.i({ className: "ri-close-line" }),
|
||||
t.i({ className: "ri-close-line", ariaHidden: true }),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
const tolerance = 5;
|
||||
|
||||
const tooltip = t.div({
|
||||
ariaHidden: true,
|
||||
popover: "manual",
|
||||
className: "pb-tooltip",
|
||||
});
|
||||
|
||||
@@ -77,7 +77,10 @@ window.app.components.uploadedFileThumb = function(propsArg = {}) {
|
||||
});
|
||||
}
|
||||
|
||||
return t.i({ className: app.utils.fileTypeIcons[fileType] || "ri-file-line" });
|
||||
return t.i({
|
||||
className: app.utils.fileTypeIcons[fileType] || "ri-file-line",
|
||||
ariaHidden: true,
|
||||
});
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
@@ -58,7 +58,7 @@ window.app.components.addCollectionFieldButton = function(collection) {
|
||||
className: "btn block outline",
|
||||
"html-popovertarget": uniqueId + "_dropdown",
|
||||
},
|
||||
t.i({ className: "ri-add-line" }),
|
||||
t.i({ className: "ri-add-line", ariaHidden: true }),
|
||||
t.span({ className: "txt" }, "New field"),
|
||||
),
|
||||
t.div(
|
||||
@@ -91,7 +91,7 @@ window.app.components.addCollectionFieldButton = function(collection) {
|
||||
addNewField(type);
|
||||
},
|
||||
},
|
||||
t.i({ className: def.icon || app.utils.fallbackFieldIcon }),
|
||||
t.i({ className: def.icon || app.utils.fallbackFieldIcon, ariaHidden: true }),
|
||||
t.span({ className: "txt" }, def.label || type),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -198,7 +198,7 @@ window.app.modals.openCollectionChangesConfirmation = async function(
|
||||
{ className: "list-item" },
|
||||
"Renamed collection ",
|
||||
t.strong({ className: "label warning" }, oldCollection?.name),
|
||||
t.i({ className: "ri-arrow-right-line txt-sm" }),
|
||||
t.i({ className: "ri-arrow-right-line txt-sm", ariaHidden: true }),
|
||||
t.strong({ className: "label success" }, newCollection?.name || "N/A"),
|
||||
),
|
||||
);
|
||||
@@ -218,7 +218,7 @@ window.app.modals.openCollectionChangesConfirmation = async function(
|
||||
{ className: "list-item" },
|
||||
"Renamed field ",
|
||||
t.strong({ className: "label warning" }, oldField?.name),
|
||||
t.i({ className: "ri-arrow-right-line txt-sm" }),
|
||||
t.i({ className: "ri-arrow-right-line txt-sm", ariaHidden: true }),
|
||||
t.strong({ className: "label success" }, newField.name || "N/A"),
|
||||
);
|
||||
});
|
||||
@@ -316,7 +316,7 @@ window.app.modals.openCollectionChangesConfirmation = async function(
|
||||
oidc.name,
|
||||
" host ",
|
||||
t.strong({ className: "label warning" }, oidc.oldHost),
|
||||
t.i({ className: "ri-arrow-right-line txt-sm" }),
|
||||
t.i({ className: "ri-arrow-right-line txt-sm", ariaHidden: true }),
|
||||
t.strong({ className: "label success" }, oidc.newHost),
|
||||
t.br(),
|
||||
t.span(
|
||||
|
||||
@@ -73,7 +73,7 @@ export function collectionFieldsTab(upsertData) {
|
||||
className: "label handle",
|
||||
onclick: () => app.modals.openIndexUpsert(upsertData.collection),
|
||||
},
|
||||
t.i({ className: "ri-add-line" }),
|
||||
t.i({ className: "ri-add-line", ariaHidden: true }),
|
||||
t.span({ className: "txt" }, "New index"),
|
||||
);
|
||||
},
|
||||
|
||||
@@ -201,6 +201,7 @@ export function collectionRulesTab(upsertData) {
|
||||
},
|
||||
t.span({ className: "txt" }, "Additional auth collection rules"),
|
||||
t.i({
|
||||
ariaHidden: true,
|
||||
className: () => (local.showAuthRules ? "ri-arrow-drop-up-line" : "ri-arrow-drop-down-line"),
|
||||
}),
|
||||
),
|
||||
|
||||
@@ -381,9 +381,10 @@ function collectionUpsertModal(rawCollection, modalSettings) {
|
||||
{
|
||||
type: "button",
|
||||
className: "btn sm circle transparent",
|
||||
title: "More options",
|
||||
"html-popovertarget": uniqueId + "modal-header-dropdown",
|
||||
},
|
||||
t.i({ className: "ri-more-line" }),
|
||||
t.i({ className: "ri-more-line", ariaHidden: true }),
|
||||
),
|
||||
t.div(
|
||||
{
|
||||
@@ -403,7 +404,7 @@ function collectionUpsertModal(rawCollection, modalSettings) {
|
||||
app.toasts.success("Collection copied to clipboard!");
|
||||
},
|
||||
},
|
||||
t.i({ className: "ri-braces-line" }),
|
||||
t.i({ className: "ri-braces-line", ariaHidden: true }),
|
||||
t.span({ className: "txt" }, "Copy JSON"),
|
||||
),
|
||||
t.button(
|
||||
@@ -425,7 +426,7 @@ function collectionUpsertModal(rawCollection, modalSettings) {
|
||||
}
|
||||
},
|
||||
},
|
||||
t.i({ className: "ri-file-copy-line" }),
|
||||
t.i({ className: "ri-file-copy-line", ariaHidden: true }),
|
||||
t.span({ className: "txt" }, "Duplicate"),
|
||||
),
|
||||
t.hr(),
|
||||
@@ -497,6 +498,7 @@ function collectionUpsertModal(rawCollection, modalSettings) {
|
||||
),
|
||||
t.i({
|
||||
hidden: () => !data.isNew,
|
||||
ariaHidden: true,
|
||||
className: "ri-arrow-drop-down-line m-l-auto",
|
||||
}),
|
||||
),
|
||||
@@ -524,6 +526,7 @@ function collectionUpsertModal(rawCollection, modalSettings) {
|
||||
},
|
||||
},
|
||||
t.i({
|
||||
ariaHidden: true,
|
||||
className: app.collectionTypes[opt.value]?.icon
|
||||
|| app.utils.fallbackCollectionIcon,
|
||||
}),
|
||||
@@ -606,11 +609,12 @@ function collectionUpsertModal(rawCollection, modalSettings) {
|
||||
t.button(
|
||||
{
|
||||
type: "button",
|
||||
title: "Save options",
|
||||
className: () => `btn p-5`,
|
||||
disabled: () => !data.canSave,
|
||||
"html-popovertarget": uniqueId + "save_options",
|
||||
},
|
||||
t.i({ className: "ri-arrow-up-s-line" }),
|
||||
t.i({ className: "ri-arrow-up-s-line", ariaHidden: true }),
|
||||
),
|
||||
t.div(
|
||||
{ id: uniqueId + "save_options", className: "dropdown nowrap", popover: "auto" },
|
||||
@@ -801,7 +805,7 @@ function truncateDropdownItem(data, modalSettings) {
|
||||
);
|
||||
},
|
||||
},
|
||||
t.i({ className: "ri-eraser-line" }),
|
||||
t.i({ className: "ri-eraser-line", ariaHidden: true }),
|
||||
t.span({ className: "txt" }, "Truncate"),
|
||||
);
|
||||
}
|
||||
@@ -907,7 +911,7 @@ function deleteDropdownItem(data, modalSettings) {
|
||||
);
|
||||
},
|
||||
},
|
||||
t.i({ className: "ri-delete-bin-7-line" }),
|
||||
t.i({ className: "ri-delete-bin-7-line", ariaHidden: true }),
|
||||
t.span({ className: "txt" }, "Delete"),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ export function collectionViewQueryTab(upsertData) {
|
||||
className: "query-state",
|
||||
ariaDescription: app.attrs.tooltip("Invalid query", "left"),
|
||||
},
|
||||
t.i({ className: "ri-error-warning-fill txt-danger" }),
|
||||
t.i({ className: "ri-error-warning-fill txt-danger", ariaHidden: true }),
|
||||
),
|
||||
t.span(
|
||||
{
|
||||
@@ -152,7 +152,7 @@ export function collectionViewQueryTab(upsertData) {
|
||||
className: "query-state",
|
||||
ariaDescription: app.attrs.tooltip("Valid query", "left"),
|
||||
},
|
||||
t.i({ className: "ri-checkbox-circle-fill txt-success" }),
|
||||
t.i({ className: "ri-checkbox-circle-fill txt-success", ariaHidden: true }),
|
||||
),
|
||||
),
|
||||
app.components.codeEditor({
|
||||
|
||||
@@ -79,9 +79,10 @@ function collectionsOverviewModal(settings = {}) {
|
||||
{
|
||||
type: "button",
|
||||
className: "btn sm secondary transparent circle modal-close-btn",
|
||||
title: "Close",
|
||||
onclick: () => app.modals.close(modal),
|
||||
},
|
||||
t.i({ className: "ri-close-line" }),
|
||||
t.i({ className: "ri-close-line", ariaHidden: true }),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -228,6 +229,7 @@ function rules(data) {
|
||||
t.div(
|
||||
{ className: "inline-flex gap-10" },
|
||||
t.i({
|
||||
ariaHidden: true,
|
||||
className: () =>
|
||||
app.collectionTypes[collection.type]?.icon
|
||||
|| app.utils.fallbackCollectionIcon,
|
||||
|
||||
@@ -191,7 +191,7 @@ export function collectionsSidebar() {
|
||||
});
|
||||
},
|
||||
},
|
||||
t.i({ className: "ri-add-line" }),
|
||||
t.i({ className: "ri-add-line", ariaHidden: true }),
|
||||
t.span({ textContent: "New collection" }),
|
||||
),
|
||||
),
|
||||
@@ -210,7 +210,10 @@ function collectionItem(collection, data) {
|
||||
title: () => collection.name,
|
||||
onclick: () => app.store.activeCollection = collection.name,
|
||||
},
|
||||
t.i({ className: () => app.collectionTypes[collection.type]?.icon || app.utils.fallbackCollectionIcon }),
|
||||
t.i({
|
||||
className: () => app.collectionTypes[collection.type]?.icon || app.utils.fallbackCollectionIcon,
|
||||
ariaHidden: true,
|
||||
}),
|
||||
t.span({ className: "txt" }, () => collection.name),
|
||||
() => {
|
||||
if (
|
||||
|
||||
@@ -50,7 +50,7 @@ export function emailTemplateAccordion(collection, key, propsArg = {}) {
|
||||
},
|
||||
t.summary(
|
||||
null,
|
||||
t.i({ className: "ri-draft-line" }),
|
||||
t.i({ className: "ri-draft-line", ariaHidden: true }),
|
||||
t.span({ className: "txt", textContent: () => props.title }),
|
||||
() => {
|
||||
if (!app.utils.getByPath(app.store.errors, key)) {
|
||||
@@ -58,6 +58,7 @@ export function emailTemplateAccordion(collection, key, propsArg = {}) {
|
||||
}
|
||||
|
||||
return t.i({
|
||||
ariaHidden: true,
|
||||
className: "ri-error-warning-fill txt-danger m-l-auto",
|
||||
ariaDescription: app.attrs.tooltip("Has errors", "left"),
|
||||
});
|
||||
|
||||
@@ -247,7 +247,7 @@ function indexUpsertModal(collection, index = "", settings = {}) {
|
||||
hidden: () => data.isNew,
|
||||
type: "button",
|
||||
className: () => "btn sm circle transparent secondary",
|
||||
ariaDescription: app.attrs.tooltip("Delete index", "left"),
|
||||
ariaLabel: app.attrs.tooltip("Delete index", "left"),
|
||||
onclick: () => {
|
||||
app.modals.confirm(
|
||||
"Do you really want to remove the selected index from the collection?",
|
||||
@@ -255,7 +255,7 @@ function indexUpsertModal(collection, index = "", settings = {}) {
|
||||
);
|
||||
},
|
||||
},
|
||||
t.i({ className: "ri-delete-bin-7-line" }),
|
||||
t.i({ className: "ri-delete-bin-7-line", ariaHidden: true }),
|
||||
),
|
||||
t.button(
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@ export function mfaAccordion(collection) {
|
||||
},
|
||||
t.summary(
|
||||
null,
|
||||
t.i({ className: "ri-shield-check-line" }),
|
||||
t.i({ className: "ri-shield-check-line", ariaHidden: true }),
|
||||
t.span({ className: "txt", textContent: "Multi-factor authentication (MFA)" }),
|
||||
t.span({
|
||||
className: () => `label m-l-auto ${data.config.enabled ? "success" : ""}`,
|
||||
|
||||
@@ -19,7 +19,7 @@ window.app.oauth2.apple = function(providerInfo, namePrefix, data) {
|
||||
});
|
||||
},
|
||||
},
|
||||
t.i({ className: "ri-key-line" }),
|
||||
t.i({ className: "ri-key-line", ariaHidden: true }),
|
||||
t.span({ className: "txt" }, "Generate secret"),
|
||||
),
|
||||
);
|
||||
@@ -226,7 +226,7 @@ function appleSecretGeneratorModal(modalSettings = {}) {
|
||||
type: "submit",
|
||||
className: "btn expanded",
|
||||
},
|
||||
t.i({ className: "ri-key-line" }),
|
||||
t.i({ className: "ri-key-line", ariaHidden: true }),
|
||||
t.span({ className: "txt" }, "Generate secret"),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -149,7 +149,6 @@ window.app.oauth2.oidc = function(providerInfo, namePrefix, data) {
|
||||
{ htmlFor: uniqueId + ".extra.jwksURL" },
|
||||
t.span({ className: "txt" }, "JWKS verification URL"),
|
||||
t.i({
|
||||
ariaHidden: true,
|
||||
className: "ri-information-line link-hint",
|
||||
ariaDescription: app.attrs.tooltip(
|
||||
"URL to the public token verification keys.",
|
||||
@@ -176,7 +175,6 @@ window.app.oauth2.oidc = function(providerInfo, namePrefix, data) {
|
||||
{ htmlFor: uniqueId + ".extra.issuers" },
|
||||
t.span({ className: "txt" }, "Issuers"),
|
||||
t.i({
|
||||
ariaHidden: true,
|
||||
className: "ri-information-line link-hint",
|
||||
ariaDescription: app.attrs.tooltip(
|
||||
"Comma separated list of accepted values for the iss token claim validation.",
|
||||
@@ -221,7 +219,6 @@ window.app.oauth2.oidc = function(providerInfo, namePrefix, data) {
|
||||
t.span({ className: "txt", textContent: "Support PKCE" }),
|
||||
t.i({
|
||||
className: "ri-information-line link-hint",
|
||||
ariaHidden: true,
|
||||
ariaDescription: app.attrs.tooltip(
|
||||
"Usually it should be safe to be always enabled as most providers will just ignore the extra query parameters if they don't support PKCE.",
|
||||
),
|
||||
|
||||
@@ -52,7 +52,7 @@ export function oauth2Accordion(collection) {
|
||||
},
|
||||
t.summary(
|
||||
null,
|
||||
t.i({ className: "ri-profile-line" }),
|
||||
t.i({ className: "ri-profile-line", ariaHidden: true }),
|
||||
t.span({ className: "txt", textContent: "OAuth2" }),
|
||||
t.span({
|
||||
className: () => `label m-l-auto ${data.config.enabled ? "success" : ""}`,
|
||||
@@ -118,7 +118,7 @@ export function oauth2Accordion(collection) {
|
||||
});
|
||||
}
|
||||
|
||||
return t.i({ className: app.utils.fallbackProviderIcon });
|
||||
return t.i({ className: app.utils.fallbackProviderIcon, ariaHidden: true });
|
||||
},
|
||||
),
|
||||
t.div(
|
||||
@@ -133,11 +133,12 @@ export function oauth2Accordion(collection) {
|
||||
{ className: "actions" },
|
||||
t.button(
|
||||
{
|
||||
"type": "button",
|
||||
"className": "btn secondary transparent sm circle",
|
||||
type: "button",
|
||||
title: "Options",
|
||||
className: "btn secondary transparent sm circle",
|
||||
"html-popovertarget": providerId + "dropdown",
|
||||
},
|
||||
t.i({ className: "ri-more-2-line" }),
|
||||
t.i({ className: "ri-more-2-line", ariaHidden: true }),
|
||||
),
|
||||
t.div(
|
||||
{
|
||||
@@ -217,7 +218,7 @@ export function oauth2Accordion(collection) {
|
||||
});
|
||||
},
|
||||
},
|
||||
t.i({ className: "ri-add-line" }),
|
||||
t.i({ className: "ri-add-line", ariaHidden: true }),
|
||||
t.span({ className: "txt " }, "Add provider"),
|
||||
),
|
||||
),
|
||||
@@ -232,6 +233,7 @@ export function oauth2Accordion(collection) {
|
||||
t.span({ className: "txt" }, "Optional users create fields mapping"),
|
||||
t.i({
|
||||
className: () => (data.showMapping ? "ri-arrow-drop-up-line" : "ri-arrow-drop-down-line"),
|
||||
ariaHidden: true,
|
||||
}),
|
||||
),
|
||||
app.components.slide(
|
||||
|
||||
@@ -23,7 +23,7 @@ export function otpAccordion(collection) {
|
||||
},
|
||||
t.summary(
|
||||
null,
|
||||
t.i({ className: "ri-time-line" }),
|
||||
t.i({ className: "ri-time-line", ariaHidden: true }),
|
||||
t.span({ className: "txt", textContent: "One-time password (OTP)" }),
|
||||
t.span({
|
||||
className: () => `label m-l-auto ${data.config.enabled ? "success" : ""}`,
|
||||
|
||||
@@ -216,7 +216,7 @@ export function pageCollections(route) {
|
||||
{
|
||||
type: "button",
|
||||
className: "btn circle transparent secondary tooltip-bottom btn-collection-settings",
|
||||
ariaDescription: app.attrs.tooltip("Collection settings"),
|
||||
ariaLabel: app.attrs.tooltip("Collection settings"),
|
||||
onclick: () => {
|
||||
app.modals.openCollectionUpsert(app.store.activeCollection, {
|
||||
ontruncate: () => refreshRecordsList(),
|
||||
@@ -231,7 +231,7 @@ export function pageCollections(route) {
|
||||
});
|
||||
},
|
||||
},
|
||||
t.i({ className: "ri-settings-3-line" }),
|
||||
t.i({ className: "ri-settings-3-line", ariaHidden: true }),
|
||||
),
|
||||
app.components.refreshButton({
|
||||
onclick: () => refreshRecordsList(),
|
||||
@@ -249,7 +249,7 @@ export function pageCollections(route) {
|
||||
className: "btn outline api-preview-btn",
|
||||
onclick: () => app.modals.openApiPreview(app.store.activeCollection),
|
||||
},
|
||||
t.i({ className: "ri-code-s-slash-line" }),
|
||||
t.i({ className: "ri-code-s-slash-line", ariaHidden: true }),
|
||||
t.span({ className: "txt", textContent: "API preview" }),
|
||||
),
|
||||
() => {
|
||||
@@ -263,7 +263,7 @@ export function pageCollections(route) {
|
||||
className: "btn new-record-btn",
|
||||
onclick: () => app.modals.openRecordUpsert(app.store.activeCollection),
|
||||
},
|
||||
t.i({ className: "ri-add-line" }),
|
||||
t.i({ className: "ri-add-line", ariaHidden: true }),
|
||||
t.span({ className: "txt", textContent: "New Record" }),
|
||||
);
|
||||
},
|
||||
|
||||
@@ -45,7 +45,7 @@ export function passwordAuthAccordion(collection) {
|
||||
},
|
||||
t.summary(
|
||||
null,
|
||||
t.i({ className: "ri-lock-password-line" }),
|
||||
t.i({ className: "ri-lock-password-line", ariaHidden: true }),
|
||||
t.span({ className: "txt", textContent: "Identity/Password" }),
|
||||
t.span({
|
||||
className: () => `label m-l-auto ${data.config.enabled ? "success" : ""}`,
|
||||
|
||||
@@ -144,7 +144,7 @@ function providerPickerModal(settings = {}) {
|
||||
});
|
||||
}
|
||||
|
||||
return t.i({ className: app.utils.fallbackProviderIcon });
|
||||
return t.i({ className: app.utils.fallbackProviderIcon, ariaHidden: true });
|
||||
},
|
||||
),
|
||||
t.div(
|
||||
|
||||
@@ -94,7 +94,7 @@ function providerSettingsModal(providerConfig, settings) {
|
||||
});
|
||||
}
|
||||
|
||||
return t.i({ className: app.utils.fallbackProviderIcon });
|
||||
return t.i({ className: app.utils.fallbackProviderIcon, ariaHidden: true });
|
||||
},
|
||||
),
|
||||
t.h6(
|
||||
|
||||
@@ -29,7 +29,7 @@ export function tokenOptionsAccordion(collection) {
|
||||
},
|
||||
t.summary(
|
||||
null,
|
||||
t.i({ className: "ri-key-2-line" }),
|
||||
t.i({ className: "ri-key-2-line", ariaHidden: true }),
|
||||
t.span({ className: "txt", textContent: "Token options (invalidate, duration)" }),
|
||||
),
|
||||
t.div({ className: "grid sm" }, () => {
|
||||
|
||||
@@ -13,7 +13,7 @@ export function input(props) {
|
||||
{ className: "field" },
|
||||
t.label(
|
||||
{ htmlFor: uniqueId },
|
||||
t.i({ className: app.fieldTypes.date.icon }),
|
||||
t.i({ className: app.fieldTypes.date.icon, ariaHidden: true }),
|
||||
t.span({ className: "txt" }, () => props.field.name),
|
||||
),
|
||||
t.input({
|
||||
|
||||
@@ -33,7 +33,7 @@ export function input(props) {
|
||||
{ className: "field" },
|
||||
t.label(
|
||||
{ htmlFor: uniqueId },
|
||||
t.i({ className: app.fieldTypes.editor.icon }),
|
||||
t.i({ className: app.fieldTypes.editor.icon, ariaHidden: true }),
|
||||
t.span({ className: "txt" }, () => props.field.name),
|
||||
),
|
||||
() => local.lazyEditor,
|
||||
|
||||
@@ -13,7 +13,7 @@ export function input(props) {
|
||||
{ className: "field" },
|
||||
t.label(
|
||||
{ htmlFor: uniqueId },
|
||||
t.i({ className: app.fieldTypes.email.icon }),
|
||||
t.i({ className: app.fieldTypes.email.icon, ariaHidden: true }),
|
||||
t.span({ className: "txt" }, () => props.field.name),
|
||||
),
|
||||
t.input({
|
||||
|
||||
@@ -126,7 +126,7 @@ export function input(props) {
|
||||
{ className: () => `field ${props.field.required ? "required" : ""}` },
|
||||
t.label(
|
||||
{ htmlFor: uniqueId },
|
||||
t.i({ className: app.fieldTypes.file.icon }),
|
||||
t.i({ className: app.fieldTypes.file.icon, ariaHidden: true }),
|
||||
t.span({ className: "txt" }, () => props.field.name),
|
||||
),
|
||||
fileInput,
|
||||
@@ -204,11 +204,11 @@ export function input(props) {
|
||||
{
|
||||
type: "button",
|
||||
className: "btn sm secondary transparent circle",
|
||||
ariaDescription: app.attrs.tooltip("Remove file"),
|
||||
ariaLabel: app.attrs.tooltip("Remove file"),
|
||||
hidden: () => isDeleted(nameOrFile),
|
||||
onclick: () => toDelete(nameOrFile),
|
||||
},
|
||||
t.i({ className: "ri-close-line" }),
|
||||
t.i({ className: "ri-close-line", ariaHidden: true }),
|
||||
),
|
||||
t.button(
|
||||
{
|
||||
@@ -240,7 +240,7 @@ export function input(props) {
|
||||
document.activeElement?.blur();
|
||||
},
|
||||
},
|
||||
t.i({ className: "ri-upload-cloud-line" }),
|
||||
t.i({ className: "ri-upload-cloud-line", ariaHidden: true }),
|
||||
t.span({ className: "txt" }, "Upload or drop new file"),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -17,7 +17,7 @@ export function input(data) {
|
||||
{ className: () => `field-list ${data.field.required ? "required" : ""}` },
|
||||
t.label(
|
||||
{ htmlFor: uniqueId },
|
||||
t.i({ className: app.fieldTypes.geoPoint.icon }),
|
||||
t.i({ className: app.fieldTypes.geoPoint.icon, ariaHidden: true }),
|
||||
t.span({ className: "txt" }, () => data.field.name),
|
||||
),
|
||||
t.div(
|
||||
|
||||
@@ -71,7 +71,7 @@ export function input(props) {
|
||||
},
|
||||
t.label(
|
||||
{ htmlFor: uniqueId },
|
||||
t.i({ className: app.fieldTypes.json.icon }),
|
||||
t.i({ className: app.fieldTypes.json.icon, ariaHidden: true }),
|
||||
t.span({ className: "txt" }, () => props.field.name),
|
||||
t.span(
|
||||
{
|
||||
@@ -79,7 +79,7 @@ export function input(props) {
|
||||
className: "json-state",
|
||||
ariaDescription: app.attrs.tooltip("Invalid JSON", "left"),
|
||||
},
|
||||
t.i({ className: "ri-error-warning-fill txt-danger" }),
|
||||
t.i({ className: "ri-error-warning-fill txt-danger", ariaHidden: true }),
|
||||
),
|
||||
t.span(
|
||||
{
|
||||
@@ -87,7 +87,7 @@ export function input(props) {
|
||||
className: "json-state",
|
||||
ariaDescription: app.attrs.tooltip("Valid JSON", "left"),
|
||||
},
|
||||
t.i({ className: "ri-checkbox-circle-fill txt-success" }),
|
||||
t.i({ className: "ri-checkbox-circle-fill txt-success", ariaHidden: true }),
|
||||
),
|
||||
),
|
||||
app.components.codeEditor({
|
||||
|
||||
@@ -65,6 +65,7 @@ export function settings(data) {
|
||||
t.span({ className: "txt" }, "String value normalizations"),
|
||||
t.i({
|
||||
className: () => (local.showInfo ? "ri-arrow-up-s-line" : "ri-arrow-down-s-line"),
|
||||
ariaHidden: true,
|
||||
}),
|
||||
),
|
||||
app.components.slide(
|
||||
|
||||
@@ -13,7 +13,7 @@ export function input(props) {
|
||||
{ className: "field" },
|
||||
t.label(
|
||||
{ htmlFor: uniqueId },
|
||||
t.i({ className: app.fieldTypes.number.icon }),
|
||||
t.i({ className: app.fieldTypes.number.icon, ariaHidden: true }),
|
||||
t.span({ className: "txt" }, () => props.field.name),
|
||||
),
|
||||
t.input({
|
||||
|
||||
@@ -107,7 +107,7 @@ export function input(props) {
|
||||
{ className: () => `field ${props.field.required ? "required" : ""}` },
|
||||
t.label(
|
||||
{ htmlFor: uniqueId },
|
||||
t.i({ className: app.fieldTypes.relation.icon }),
|
||||
t.i({ className: app.fieldTypes.relation.icon, ariaHidden: true }),
|
||||
t.span({ className: "txt" }, () => props.field.name),
|
||||
),
|
||||
t.output(
|
||||
@@ -150,10 +150,10 @@ export function input(props) {
|
||||
t.button(
|
||||
{
|
||||
className: "btn sm secondary transparent circle",
|
||||
ariaDescription: app.attrs.tooltip("Remove"),
|
||||
ariaLabel: app.attrs.tooltip("Remove"),
|
||||
onclick: () => remove(record.id),
|
||||
},
|
||||
t.i({ className: "ri-close-line" }),
|
||||
t.i({ className: "ri-close-line", ariaHidden: true }),
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -181,7 +181,7 @@ export function input(props) {
|
||||
});
|
||||
},
|
||||
},
|
||||
t.i({ className: "ri-magic-line" }),
|
||||
t.i({ className: "ri-magic-line", ariaHidden: true }),
|
||||
t.span({ className: "txt" }, "Open records picker"),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -71,7 +71,7 @@ export function settings(props) {
|
||||
});
|
||||
},
|
||||
},
|
||||
t.i({ className: "ri-add-line" }),
|
||||
t.i({ className: "ri-add-line", ariaHidden: true }),
|
||||
t.span({ className: "txt" }, "New collection"),
|
||||
),
|
||||
];
|
||||
|
||||
@@ -13,7 +13,7 @@ export function input(data) {
|
||||
{ className: "field" },
|
||||
t.label(
|
||||
{ htmlFor: uniqueId },
|
||||
t.i({ className: app.fieldTypes.select.icon }),
|
||||
t.i({ className: app.fieldTypes.select.icon, ariaHidden: true }),
|
||||
t.span({ className: "txt" }, () => data.field.name),
|
||||
),
|
||||
app.components.select({
|
||||
|
||||
@@ -28,6 +28,7 @@ export function input(props) {
|
||||
t.label(
|
||||
{ htmlFor: uniqueId },
|
||||
t.i({
|
||||
ariaHidden: true,
|
||||
className: () => (props.field.primaryKey ? "ri-key-line" : app.fieldTypes.text.icon),
|
||||
}),
|
||||
t.span({ className: "txt" }, () => props.field.name),
|
||||
|
||||
@@ -13,7 +13,7 @@ export function input(props) {
|
||||
{ className: "field" },
|
||||
t.label(
|
||||
{ htmlFor: uniqueId },
|
||||
t.i({ className: app.fieldTypes.url.icon }),
|
||||
t.i({ className: app.fieldTypes.url.icon, ariaHidden: true }),
|
||||
t.span({ className: "txt" }, () => props.field.name),
|
||||
),
|
||||
t.input({
|
||||
|
||||
@@ -119,10 +119,11 @@ function logPreviewModal(logIdOrModel, settings) {
|
||||
t.h5(null, "Log details"),
|
||||
t.button(
|
||||
{
|
||||
"className": "btn sm circle transparent m-l-auto",
|
||||
className: "btn sm circle transparent m-l-auto",
|
||||
title: "More options",
|
||||
"html-popovertarget": "log-meta-dropdown",
|
||||
},
|
||||
t.i({ className: "ri-more-line" }),
|
||||
t.i({ className: "ri-more-line", ariaHidden: true }),
|
||||
),
|
||||
t.div({ id: "log-meta-dropdown", className: "dropdown", popover: "auto" }, (el) => {
|
||||
return t.button(
|
||||
@@ -133,7 +134,7 @@ function logPreviewModal(logIdOrModel, settings) {
|
||||
el.hidePopover();
|
||||
},
|
||||
},
|
||||
t.i({ className: "ri-braces-line" }),
|
||||
t.i({ className: "ri-braces-line", ariaHidden: true }),
|
||||
t.span({ className: "txt" }, "Copy JSON"),
|
||||
);
|
||||
}),
|
||||
@@ -266,7 +267,7 @@ function logPreviewModal(logIdOrModel, settings) {
|
||||
className: "btn",
|
||||
onclick: () => downloadJSON(data.log),
|
||||
},
|
||||
t.i({ className: "ri-download-line" }),
|
||||
t.i({ className: "ri-download-line", ariaHidden: true }),
|
||||
t.span({ className: "txt" }, "Download JSON"),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -237,7 +237,7 @@ export function logsList(logsSettings) {
|
||||
{ className: "col-field-name-level" },
|
||||
t.div(
|
||||
{ className: "inline-flex gap-5" },
|
||||
t.i({ className: "ri-bookmark-line" }),
|
||||
t.i({ className: "ri-bookmark-line", ariaHidden: true }),
|
||||
t.span({ textContent: "Level" }),
|
||||
),
|
||||
),
|
||||
@@ -245,7 +245,7 @@ export function logsList(logsSettings) {
|
||||
{ className: "col-field-name-message" },
|
||||
t.div(
|
||||
{ className: "inline-flex gap-5" },
|
||||
t.i({ className: "ri-file-list-2-line" }),
|
||||
t.i({ className: "ri-file-list-2-line", ariaHidden: true }),
|
||||
t.span({ textContent: "Message" }),
|
||||
),
|
||||
),
|
||||
@@ -253,7 +253,7 @@ export function logsList(logsSettings) {
|
||||
{ className: "col-field-type-date col-field-name-created" },
|
||||
t.div(
|
||||
{ className: "inline-flex gap-5" },
|
||||
t.i({ className: "ri-calendar-line" }),
|
||||
t.i({ className: "ri-calendar-line", ariaHidden: true }),
|
||||
t.span({ textContent: "Created" }),
|
||||
),
|
||||
),
|
||||
@@ -406,7 +406,7 @@ export function logsList(logsSettings) {
|
||||
),
|
||||
t.td(
|
||||
{ className: "col-meta" },
|
||||
t.i({ className: "ri-arrow-right-line" }),
|
||||
t.i({ className: "ri-arrow-right-line", ariaHidden: true }),
|
||||
),
|
||||
];
|
||||
},
|
||||
@@ -459,7 +459,7 @@ export function logsList(logsSettings) {
|
||||
className: "btn sm pill",
|
||||
onclick: () => downloadSelected(),
|
||||
},
|
||||
t.i({ className: "ri-download-line" }),
|
||||
t.i({ className: "ri-download-line", ariaHidden: true }),
|
||||
t.span({ className: "txt" }, "JSON"),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -108,13 +108,13 @@ export function pageLogs(route) {
|
||||
t.button(
|
||||
{
|
||||
className: "btn circle transparent secondary tooltip-right",
|
||||
ariaDescription: app.attrs.tooltip("Logs settings"),
|
||||
ariaLabel: app.attrs.tooltip("Logs settings"),
|
||||
onclick: () =>
|
||||
app.modals.openLogsSettings({
|
||||
onsave: () => refreshLogsList(),
|
||||
}),
|
||||
},
|
||||
t.i({ className: "ri-settings-3-line" }),
|
||||
t.i({ className: "ri-settings-3-line", ariaHidden: true }),
|
||||
),
|
||||
app.components.refreshButton({
|
||||
onclick: refreshLogsList,
|
||||
|
||||
@@ -249,7 +249,7 @@ function recordFilePickerModal(settings = defaultSettings) {
|
||||
{ className: "txt-lg collection-name m-r-auto" },
|
||||
() => data.activeCollection?.name || "Select collection",
|
||||
),
|
||||
t.i({ className: "ri-arrow-drop-down-line" }),
|
||||
t.i({ className: "ri-arrow-drop-down-line", ariaHidden: true }),
|
||||
),
|
||||
t.div(
|
||||
{ id: "collections_dropdown" + uniqueId, className: "dropdown", popover: "hint" },
|
||||
@@ -281,10 +281,10 @@ function recordFilePickerModal(settings = defaultSettings) {
|
||||
{
|
||||
type: "button",
|
||||
className: "btn circle transparent",
|
||||
ariaDescription: app.attrs.tooltip("Add new record"),
|
||||
ariaLabel: app.attrs.tooltip("Add new record"),
|
||||
onclick: () => app.modals.openRecordUpsert(data.activeCollection),
|
||||
},
|
||||
t.i({ className: "ri-add-line txt-hint" }),
|
||||
t.i({ className: "ri-add-line txt-hint", ariaHidden: true }),
|
||||
),
|
||||
),
|
||||
t.div(
|
||||
@@ -323,7 +323,10 @@ function recordFilePickerModal(settings = defaultSettings) {
|
||||
|
||||
const ftype = app.utils.getFileType(name);
|
||||
|
||||
return t.i({ className: app.utils.fileTypeIcons[ftype] || "ri-file-line" });
|
||||
return t.i({
|
||||
className: app.utils.fileTypeIcons[ftype] || "ri-file-line",
|
||||
ariaHidden: true,
|
||||
});
|
||||
},
|
||||
),
|
||||
);
|
||||
|
||||
@@ -143,7 +143,7 @@ window.app.components.recordFileThumb = function(propsArg = {}) {
|
||||
return img;
|
||||
}
|
||||
|
||||
return t.i({ className: app.utils.fileTypeIcons[data.fileType] || "ri-file-line" });
|
||||
return t.i({ className: app.utils.fileTypeIcons[data.fileType] || "ri-file-line", ariaHidden: true });
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
@@ -144,10 +144,11 @@ function recordPreviewModal(rawRecord, modalSettings) {
|
||||
),
|
||||
t.button(
|
||||
{
|
||||
"className": "btn sm circle transparent m-l-auto",
|
||||
title: "More options",
|
||||
className: "btn sm circle transparent m-l-auto",
|
||||
"html-popovertarget": uniqueId + "preview-dropdown",
|
||||
},
|
||||
t.i({ className: "ri-more-line" }),
|
||||
t.i({ className: "ri-more-line", ariaHidden: true }),
|
||||
),
|
||||
t.div({ id: uniqueId + "preview-dropdown", className: "dropdown", popover: "auto" }, (el) => {
|
||||
return t.button(
|
||||
@@ -158,7 +159,7 @@ function recordPreviewModal(rawRecord, modalSettings) {
|
||||
el.hidePopover();
|
||||
},
|
||||
},
|
||||
t.i({ className: "ri-braces-line" }),
|
||||
t.i({ className: "ri-braces-line", ariaHidden: true }),
|
||||
t.span({ className: "txt" }, "Copy JSON"),
|
||||
);
|
||||
}),
|
||||
@@ -236,7 +237,7 @@ function recordPreviewModal(rawRecord, modalSettings) {
|
||||
className: "btn",
|
||||
onclick: () => downloadJSON(data.record),
|
||||
},
|
||||
t.i({ className: "ri-download-line" }),
|
||||
t.i({ className: "ri-download-line", ariaHidden: true }),
|
||||
t.span({ className: "txt" }, "Download JSON"),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -175,7 +175,7 @@ const showRecordSummaryDropdownNoDelay = function(target, record) {
|
||||
},
|
||||
},
|
||||
t.span({ className: "txt" }, "Edit relation record"),
|
||||
t.i({ className: "ri-external-link-line" }),
|
||||
t.i({ className: "ri-external-link-line", ariaHidden: true }),
|
||||
),
|
||||
t.button(
|
||||
{
|
||||
|
||||
@@ -418,12 +418,12 @@ function recordUpsertModal(collection, rawRecord, modalSettings) {
|
||||
{
|
||||
type: "button",
|
||||
className: "btn sm secondary transparent circle m-l-auto",
|
||||
ariaDescription: app.attrs.tooltip("Discard draft", "left"),
|
||||
ariaLabel: app.attrs.tooltip("Discard draft", "left"),
|
||||
onclick: () => {
|
||||
deleteDraft();
|
||||
},
|
||||
},
|
||||
t.i({ className: "ri-close-line" }),
|
||||
t.i({ className: "ri-close-line", ariaHidden: true }),
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -539,7 +539,7 @@ function recordUpsertModal(collection, rawRecord, modalSettings) {
|
||||
disabled: () => data.isFormDisabled,
|
||||
onclick: () => data.isLocked = false,
|
||||
},
|
||||
t.i({ className: "ri-lock-unlock-line" }),
|
||||
t.i({ className: "ri-lock-unlock-line", ariaHidden: true }),
|
||||
t.span({ className: "txt" }, "Unlock to save"),
|
||||
),
|
||||
t.div(
|
||||
@@ -560,10 +560,11 @@ function recordUpsertModal(collection, rawRecord, modalSettings) {
|
||||
{
|
||||
type: "button",
|
||||
className: () => `btn p-5`,
|
||||
title: "Save options",
|
||||
disabled: () => data.isLocked || data.isFormDisabled,
|
||||
"html-popovertarget": uniqueId + "save_options",
|
||||
},
|
||||
t.i({ className: "ri-arrow-up-s-line" }),
|
||||
t.i({ className: "ri-arrow-up-s-line", ariaHidden: true }),
|
||||
),
|
||||
t.div(
|
||||
{ id: uniqueId + "save_options", className: "dropdown nowrap", popover: "auto" },
|
||||
@@ -693,10 +694,11 @@ function recordUpsertModal(collection, rawRecord, modalSettings) {
|
||||
{
|
||||
type: "button",
|
||||
className: "btn sm circle transparent",
|
||||
title: "More options",
|
||||
disabled: () => data.isLoading,
|
||||
"html-popovertarget": uniqueId + "modal-header-dropdown",
|
||||
},
|
||||
t.i({ className: "ri-more-line" }),
|
||||
t.i({ className: "ri-more-line", ariaHidden: true }),
|
||||
),
|
||||
t.div(
|
||||
{
|
||||
@@ -742,7 +744,7 @@ function recordUpsertModal(collection, rawRecord, modalSettings) {
|
||||
copyJSON(data.originalRecord);
|
||||
},
|
||||
},
|
||||
t.i({ className: "ri-braces-line" }),
|
||||
t.i({ className: "ri-braces-line", ariaHidden: true }),
|
||||
t.span({ className: "txt" }, "Copy JSON"),
|
||||
),
|
||||
() => {
|
||||
@@ -770,7 +772,7 @@ function recordUpsertModal(collection, rawRecord, modalSettings) {
|
||||
}
|
||||
},
|
||||
},
|
||||
t.i({ className: "ri-file-copy-line" }),
|
||||
t.i({ className: "ri-file-copy-line", ariaHidden: true }),
|
||||
t.span({ className: "txt" }, "Duplicate"),
|
||||
),
|
||||
t.hr(),
|
||||
@@ -902,7 +904,7 @@ function resetTokenKeyDropdownItem(collection, data, modalSettings) {
|
||||
);
|
||||
},
|
||||
},
|
||||
t.i({ className: "ri-reset-left-line" }),
|
||||
t.i({ className: "ri-reset-left-line", ariaHidden: true }),
|
||||
t.span({ className: "txt" }, "Reset issued tokens"),
|
||||
);
|
||||
}
|
||||
@@ -947,7 +949,7 @@ function sendPasswordResetEmailDropdownItem(collection, data, modalSettings) {
|
||||
);
|
||||
},
|
||||
},
|
||||
t.i({ className: "ri-mail-lock-line" }),
|
||||
t.i({ className: "ri-mail-lock-line", ariaHidden: true }),
|
||||
t.span({ className: "txt" }, "Send password reset email"),
|
||||
);
|
||||
}
|
||||
@@ -992,7 +994,7 @@ function sendVerificationDropdownItem(collection, data, modalSettings) {
|
||||
);
|
||||
},
|
||||
},
|
||||
t.i({ className: "ri-mail-check-line" }),
|
||||
t.i({ className: "ri-mail-check-line", ariaHidden: true }),
|
||||
t.span({ className: "txt" }, "Send verification email"),
|
||||
);
|
||||
}
|
||||
@@ -1007,7 +1009,7 @@ function impersonateDropdownItem(collection, data, modalSettings) {
|
||||
app.modals.openRecordImpersontate(data.originalRecord);
|
||||
},
|
||||
},
|
||||
t.i({ className: "ri-id-card-line" }),
|
||||
t.i({ className: "ri-id-card-line", ariaHidden: true }),
|
||||
t.span({ className: "txt" }, "Impersonate"),
|
||||
);
|
||||
}
|
||||
@@ -1055,7 +1057,7 @@ function deleteDropdownItem(collection, data, modalSettings) {
|
||||
);
|
||||
},
|
||||
},
|
||||
t.i({ className: "ri-delete-bin-7-line" }),
|
||||
t.i({ className: "ri-delete-bin-7-line", ariaHidden: true }),
|
||||
t.span({ className: "txt" }, "Delete"),
|
||||
);
|
||||
}
|
||||
@@ -1080,7 +1082,7 @@ function authFieldEmail(collection, data) {
|
||||
{ className: "field" },
|
||||
t.label(
|
||||
{ htmlFor: uniqueId },
|
||||
t.i({ className: app.fieldTypes.email.icon }),
|
||||
t.i({ className: app.fieldTypes.email.icon, ariaHidden: true }),
|
||||
t.span({ className: "txt" }, () => emailField.name),
|
||||
),
|
||||
t.input({
|
||||
@@ -1232,7 +1234,7 @@ function authFieldPassword(collection, data) {
|
||||
{ className: "field" },
|
||||
t.label(
|
||||
{ htmlFor: uniqueId + "_password" },
|
||||
t.i({ className: "ri-lock-line" }),
|
||||
t.i({ className: "ri-lock-line", ariaHidden: true }),
|
||||
t.span({ className: "txt" }, "Password"),
|
||||
),
|
||||
t.input({
|
||||
@@ -1258,7 +1260,7 @@ function authFieldPassword(collection, data) {
|
||||
{ className: "field" },
|
||||
t.label(
|
||||
{ htmlFor: uniqueId + "_password_confirm" },
|
||||
t.i({ className: "ri-lock-line" }),
|
||||
t.i({ className: "ri-lock-line", ariaHidden: true }),
|
||||
t.span({ className: "txt" }, "Confirm"),
|
||||
),
|
||||
t.input({
|
||||
@@ -1397,7 +1399,7 @@ function authProvidersTab(collection, data) {
|
||||
});
|
||||
}
|
||||
|
||||
return t.i({ className: app.utils.fallbackProviderIcon });
|
||||
return t.i({ className: app.utils.fallbackProviderIcon, ariaHidden: true });
|
||||
},
|
||||
),
|
||||
t.div(
|
||||
@@ -1414,10 +1416,10 @@ function authProvidersTab(collection, data) {
|
||||
{
|
||||
type: "button",
|
||||
className: "btn sm secondary transparent circle",
|
||||
ariaDescription: app.attrs.tooltip("Unlink", "left"),
|
||||
ariaLabel: app.attrs.tooltip("Unlink", "left"),
|
||||
onclick: () => confirmAndUnlink(externalAuth),
|
||||
},
|
||||
t.i({ className: "ri-close-line" }),
|
||||
t.i({ className: "ri-close-line", ariaHidden: true }),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -421,6 +421,7 @@ window.app.components.recordsList = function(propsArg = {}) {
|
||||
t.div(
|
||||
{ className: "inline-flex gap-5" },
|
||||
t.i({
|
||||
ariaHidden: true,
|
||||
className: () => {
|
||||
if (field.primaryKey) {
|
||||
return "ri-key-line";
|
||||
@@ -586,7 +587,10 @@ window.app.components.recordsList = function(propsArg = {}) {
|
||||
return columns;
|
||||
},
|
||||
// columns,
|
||||
t.td({ className: "col-meta" }, t.i({ className: "ri-arrow-right-line m-r-10" })),
|
||||
t.td(
|
||||
{ className: "col-meta" },
|
||||
t.i({ className: "ri-arrow-right-line m-r-10", ariaHidden: true }),
|
||||
),
|
||||
);
|
||||
});
|
||||
},
|
||||
@@ -644,7 +648,7 @@ window.app.components.recordsList = function(propsArg = {}) {
|
||||
);
|
||||
},
|
||||
},
|
||||
t.i({ className: "ri-delete-bin-7-line" }),
|
||||
t.i({ className: "ri-delete-bin-7-line", ariaHidden: true }),
|
||||
t.span({ className: "txt" }, "Delete"),
|
||||
);
|
||||
},
|
||||
@@ -654,7 +658,7 @@ window.app.components.recordsList = function(propsArg = {}) {
|
||||
className: "btn sm pill",
|
||||
onclick: () => downloadSelected(),
|
||||
},
|
||||
t.i({ className: "ri-download-line" }),
|
||||
t.i({ className: "ri-download-line", ariaHidden: true }),
|
||||
t.span({ className: "txt" }, "JSON"),
|
||||
),
|
||||
),
|
||||
@@ -726,10 +730,11 @@ function columnsDropdown(props, data) {
|
||||
{
|
||||
hidden: () => props.collection?.fields.length <= 1,
|
||||
type: "button",
|
||||
title: "Toggle columns",
|
||||
className: "btn sm secondary transparent circle",
|
||||
popoverTargetElement: dropdown,
|
||||
},
|
||||
t.i({ className: "ri-more-2-line" }),
|
||||
t.i({ className: "ri-more-2-line", ariaHidden: true }),
|
||||
dropdown,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -297,12 +297,12 @@ function recordsPickerModal(settings = defaultSettings) {
|
||||
{
|
||||
type: "button",
|
||||
className: "btn circle transparent",
|
||||
ariaDescription: app.attrs.tooltip("Add new record"),
|
||||
ariaLabel: app.attrs.tooltip("Add new record"),
|
||||
onclick: () => {
|
||||
app.modals.openRecordUpsert(data.collection);
|
||||
},
|
||||
},
|
||||
t.i({ className: "ri-add-line txt-hint" }),
|
||||
t.i({ className: "ri-add-line txt-hint", ariaHidden: true }),
|
||||
),
|
||||
),
|
||||
t.div(
|
||||
@@ -329,6 +329,7 @@ function recordsPickerModal(settings = defaultSettings) {
|
||||
t.span(
|
||||
{ className: "state-icon" },
|
||||
t.i({
|
||||
ariaHidden: true,
|
||||
className: () =>
|
||||
isSelected(record)
|
||||
? "ri-checkbox-circle-fill txt-success"
|
||||
@@ -342,13 +343,13 @@ function recordsPickerModal(settings = defaultSettings) {
|
||||
t.button(
|
||||
{
|
||||
className: "btn sm secondary transparent circle",
|
||||
ariaDescription: app.attrs.tooltip("Edit"),
|
||||
ariaLabel: app.attrs.tooltip("Edit"),
|
||||
onclick: (e) => {
|
||||
e.stopPropagation();
|
||||
app.modals.openRecordUpsert(data.collection, record);
|
||||
},
|
||||
},
|
||||
t.i({ className: "ri-pencil-line" }),
|
||||
t.i({ className: "ri-pencil-line", ariaHidden: true }),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -7,7 +7,7 @@ export function batchAccordion(pageData) {
|
||||
},
|
||||
t.summary(
|
||||
null,
|
||||
t.i({ className: "ri-archive-stack-line" }),
|
||||
t.i({ className: "ri-archive-stack-line", ariaHidden: true }),
|
||||
t.span({ className: "txt" }, "Batch API"),
|
||||
t.div({ className: "flex-fill" }),
|
||||
() => {
|
||||
|
||||
@@ -179,7 +179,9 @@ export function pageApplicationSettings() {
|
||||
t.span({ className: "txt" }, "Hide/Lock collection and record controls"),
|
||||
t.i({
|
||||
className: "ri-information-line link-hint",
|
||||
ariaDescription: app.attrs.tooltip("To prevent accidental changes when in production environment, collections create and update buttons will be hidden.\nRecords update will also require an extra unlock step before save.")
|
||||
ariaDescription: app.attrs.tooltip(
|
||||
"To prevent accidental changes when in production environment, collections create and update buttons will be hidden.\nRecords update will also require an extra unlock step before save.",
|
||||
),
|
||||
}),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -214,7 +214,7 @@ export function rateLimitAccordion(pageData) {
|
||||
},
|
||||
t.summary(
|
||||
null,
|
||||
t.i({ className: "ri-pulse-fill" }),
|
||||
t.i({ className: "ri-pulse-fill", ariaHidden: true }),
|
||||
t.span({ className: "txt" }, "Rate limiting"),
|
||||
t.div({ className: "flex-fill" }),
|
||||
() => {
|
||||
@@ -397,7 +397,7 @@ export function rateLimitAccordion(pageData) {
|
||||
className: "btn secondary sm",
|
||||
onclick: () => newRule(),
|
||||
},
|
||||
t.i({ className: "ri-add-line" }),
|
||||
t.i({ className: "ri-add-line", ariaHidden: true }),
|
||||
t.span({ className: "txt" }, "Add rate limit rule"),
|
||||
),
|
||||
t.button(
|
||||
|
||||
@@ -52,7 +52,7 @@ export function trustedProxyAccordion(pageData) {
|
||||
},
|
||||
t.summary(
|
||||
null,
|
||||
t.i({ className: "ri-route-line" }),
|
||||
t.i({ className: "ri-route-line", ariaHidden: true }),
|
||||
t.span({ className: "txt" }, "User IP proxy headers"),
|
||||
() => {
|
||||
if (proxyInfo.isLoading) {
|
||||
|
||||
@@ -74,7 +74,7 @@ export function backupUploadButton(onSuccess = null) {
|
||||
t.button(
|
||||
{
|
||||
type: "button",
|
||||
ariaDescription: app.attrs.tooltip("Upload backup"),
|
||||
ariaLabel: app.attrs.tooltip("Upload backup"),
|
||||
className: () => `btn sm transparent secondary circle ${data.isUploading ? "loading" : ""}`,
|
||||
disabled: () => data.isUploading,
|
||||
onclick: () => fileInput?.click(),
|
||||
@@ -82,7 +82,7 @@ export function backupUploadButton(onSuccess = null) {
|
||||
app.pb.cancelRequest(uniqueId);
|
||||
},
|
||||
},
|
||||
t.i({ className: "ri-upload-cloud-line" }),
|
||||
t.i({ className: "ri-upload-cloud-line", ariaHidden: true }),
|
||||
),
|
||||
fileInput,
|
||||
);
|
||||
|
||||
@@ -108,6 +108,7 @@ export function backupsForm(propsArg = {}) {
|
||||
t.span({ className: "txt" }, "Backup options"),
|
||||
t.i({
|
||||
className: () => (data.showForm ? "ri-arrow-up-s-line" : "ri-arrow-down-s-line"),
|
||||
ariaHidden: true,
|
||||
}),
|
||||
),
|
||||
app.components.slide(
|
||||
@@ -177,7 +178,7 @@ export function backupsForm(propsArg = {}) {
|
||||
"html-popovertarget": "cron-presets-dropdown",
|
||||
},
|
||||
t.span({ className: "txt" }, "Presets"),
|
||||
t.i({ className: "ri-arrow-drop-down-line" }),
|
||||
t.i({ className: "ri-arrow-drop-down-line", ariaHidden: true }),
|
||||
),
|
||||
t.div(
|
||||
{
|
||||
|
||||
@@ -133,7 +133,7 @@ export function backupsList(propsArg = {}) {
|
||||
return data.backups.map((backup) => {
|
||||
return t.div(
|
||||
{ className: () => `list-item ${data.isLoading ? "faded" : ""}` },
|
||||
t.i({ className: "ri-folder-zip-line" }),
|
||||
t.i({ className: "ri-folder-zip-line", ariaHidden: true }),
|
||||
t.div(
|
||||
{ className: "content" },
|
||||
t.span({
|
||||
@@ -156,7 +156,7 @@ export function backupsList(propsArg = {}) {
|
||||
t.button(
|
||||
{
|
||||
type: "button",
|
||||
ariaDescription: app.attrs.tooltip("Download"),
|
||||
ariaLabel: app.attrs.tooltip("Download"),
|
||||
className: () =>
|
||||
`btn sm circle secondary transparent ${
|
||||
data.isDownloading[backup.key] ? "loading" : ""
|
||||
@@ -164,22 +164,22 @@ export function backupsList(propsArg = {}) {
|
||||
disabled: () => data.isDeleting[backup.key] || data.isDownloading[backup.key],
|
||||
onclick: () => downloadBackup(backup.key),
|
||||
},
|
||||
t.i({ className: "ri-download-line" }),
|
||||
t.i({ className: "ri-download-line", ariaHidden: true }),
|
||||
),
|
||||
t.button(
|
||||
{
|
||||
type: "button",
|
||||
ariaDescription: app.attrs.tooltip("Restore"),
|
||||
ariaLabel: app.attrs.tooltip("Restore"),
|
||||
className: () => `btn sm circle secondary transparent`,
|
||||
disabled: () => data.isDeleting[backup.key] || data.isDownloading[backup.key],
|
||||
onclick: () => openBackupRestoreModal(backup.key),
|
||||
},
|
||||
t.i({ className: "ri-restart-line" }),
|
||||
t.i({ className: "ri-restart-line", ariaHidden: true }),
|
||||
),
|
||||
t.button(
|
||||
{
|
||||
type: "button",
|
||||
ariaDescription: app.attrs.tooltip("Delete"),
|
||||
ariaLabel: app.attrs.tooltip("Delete"),
|
||||
className: () =>
|
||||
`btn sm circle secondary transparent ${
|
||||
data.isDeleting[backup.key] ? "loading" : ""
|
||||
@@ -187,7 +187,7 @@ export function backupsList(propsArg = {}) {
|
||||
disabled: () => data.isDeleting[backup.key] || data.isDownloading[backup.key],
|
||||
onclick: () => confirmBackupDelete(backup.key),
|
||||
},
|
||||
t.i({ className: "ri-delete-bin-7-line" }),
|
||||
t.i({ className: "ri-delete-bin-7-line", ariaHidden: true }),
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -209,7 +209,7 @@ export function backupsList(propsArg = {}) {
|
||||
() => {
|
||||
if (data.canBackup) {
|
||||
return [
|
||||
t.i({ className: "ri-play-circle-line" }),
|
||||
t.i({ className: "ri-play-circle-line", ariaHidden: true }),
|
||||
t.span({ className: "txt" }, "Initialize new backup"),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -97,13 +97,13 @@ export function cronsList(propsArg = {}) {
|
||||
t.button(
|
||||
{
|
||||
type: "button",
|
||||
ariaDescription: app.attrs.tooltip("Run"),
|
||||
ariaLabel: app.attrs.tooltip("Run"),
|
||||
className: () =>
|
||||
`btn sm circle secondary transparent ${data.isRunning[cron.id] ? "loading" : ""}`,
|
||||
disabled: () => data.isRunning[cron.id],
|
||||
onclick: () => runCron(cron.id),
|
||||
},
|
||||
t.i({ className: "ri-play-large-line" }),
|
||||
t.i({ className: "ri-play-large-line", ariaHidden: true }),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -195,7 +195,7 @@ function mailTestModal(preselectedCollectionIdOrName = "", template = "") {
|
||||
className: () => `btn expanded ${data.isSending ? "loading" : ""}`,
|
||||
disabled: () => data.isSending || !data.canSubmit,
|
||||
},
|
||||
t.i({ className: "ri-mail-send-line" }),
|
||||
t.i({ className: "ri-mail-send-line", ariaHidden: true }),
|
||||
t.span({ className: "txt" }, "Send"),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -370,7 +370,7 @@ export function pageMailSettings(route) {
|
||||
className: () => `btn expanded outline`,
|
||||
onclick: () => app.modals.openMailTest(),
|
||||
},
|
||||
t.i({ className: "ri-mail-check-line" }),
|
||||
t.i({ className: "ri-mail-check-line", ariaHidden: true }),
|
||||
t.span({ className: "txt" }, "Send test email"),
|
||||
);
|
||||
},
|
||||
|
||||
@@ -35,7 +35,7 @@ export function settingsSidebar() {
|
||||
},
|
||||
() => {
|
||||
if (link.icon) {
|
||||
return t.i({ className: link.icon });
|
||||
return t.i({ className: link.icon, ariaHidden: true });
|
||||
}
|
||||
},
|
||||
t.span({ className: "txt" }, () => link.label),
|
||||
|
||||
@@ -132,6 +132,7 @@ export function collectionsDiffTable(propsArg = {}) {
|
||||
}),
|
||||
t.i({
|
||||
className: "ri-arrow-right-line txt-sm",
|
||||
ariaHidden: true,
|
||||
}),
|
||||
];
|
||||
},
|
||||
|
||||
@@ -179,7 +179,7 @@ export function pageExportCollections(route) {
|
||||
{ className: "col-lg-12 txt-right" },
|
||||
t.button(
|
||||
{ className: "btn", onclick: download },
|
||||
t.i({ className: "ri-download-line" }),
|
||||
t.i({ className: "ri-download-line", ariaHidden: true }),
|
||||
t.span({ className: "txt" }, "Download as JSON"),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -446,6 +446,7 @@ export function pageImportCollections(route) {
|
||||
}),
|
||||
t.i({
|
||||
className: "ri-arrow-right-line txt-sm",
|
||||
ariaHidden: true,
|
||||
}),
|
||||
];
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user