@mythpe/quasar-ui-qui 0.0.99 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mythpe/quasar-ui-qui",
3
- "version": "0.0.99",
3
+ "version": "0.1.0",
4
4
  "description": "MyTh Quasar UI Kit App Extension",
5
5
  "author": {
6
6
  "name": "MyTh Ahmed Faiz",
@@ -223,26 +223,18 @@ export const useMyth = () => {
223
223
  * Copy text
224
224
  * @param text
225
225
  */
226
- const copyText = async (text: string | any) => copyToClipboard(text)
226
+ const copyText = async (text: string | any) => copyToClipboard(text).then(() => alertSuccess(__('messages.text_copied')))
227
227
 
228
- const quasarNotifyOptions = (opts: QNotifyCreateOptions | string): QNotifyCreateOptions => {
229
- return {
230
- badgeColor: 'primary',
231
- progress: !0,
232
- ...pluginOptions.value.notify as any,
233
- message: typeof opts === 'string' ? opts : opts.message,
234
- ...(typeof opts !== 'string' ? opts : {})
235
- }
236
- }
237
- const alertMessage = (opts: Vue3MAlertMessageOptions): Vue3MAlertMessage => {
238
- return q.notify(quasarNotifyOptions(opts))
239
- }
240
- const alertSuccess = (message: string) => {
241
- return alertMessage({ type: 'positive', message })
242
- }
243
- const alertError = (message: string) => {
244
- return alertMessage({ type: 'negative', message })
245
- }
228
+ const quasarNotifyOptions = (opts: QNotifyCreateOptions | string): QNotifyCreateOptions => ({
229
+ badgeColor: 'primary',
230
+ progress: !0,
231
+ ...pluginOptions.value.notify as any,
232
+ message: typeof opts === 'string' ? __(opts) : __(opts.message),
233
+ ...(typeof opts !== 'string' ? opts : {})
234
+ })
235
+ const alertMessage = (opts: Vue3MAlertMessageOptions): Vue3MAlertMessage => q.notify(quasarNotifyOptions(opts))
236
+ const alertSuccess = (message: string) => alertMessage({ type: 'positive', message })
237
+ const alertError = (message: string) => alertMessage({ type: 'negative', message })
246
238
  const confirmMessage = (message?: string, title?: string, opts?: Partial<QDialogOptions> & Partial<QDialogProps>): Vue3MConfirmMessage => {
247
239
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
248
240
  // @ts-ignore