-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature flag, phone number issue, btn control updates, depreciation f…
…ix, other fixes Signed-off-by: Kial Jinnah <kialj876@gmail.com>
- Loading branch information
Showing
18 changed files
with
90 additions
and
422 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import type { ConnectBtnControl } from '#imports' | ||
|
||
export const useButtonControl = () => { | ||
const route = useRoute() | ||
|
||
function setButtonControl (buttonControl: ConnectBtnControl) { | ||
route.meta.buttonControl = buttonControl | ||
} | ||
|
||
function getButtonControl (): ConnectBtnControl { | ||
return route.meta.buttonControl as ConnectBtnControl | ||
} | ||
|
||
function handleButtonLoading (reset: boolean, buttonGrp?: 'left' | 'right', buttonIndex?: number) { | ||
// set button control for loading / disabling buttons on submit or save or reset to default | ||
const updateButtonGrp = (buttonArray: ConnectBtnControlItem[], grp: 'left' | 'right') => { | ||
for (const [index, element] of buttonArray.entries()) { | ||
if (reset) { | ||
element.disabled = false | ||
element.loading = false | ||
} else { | ||
element.loading = (grp === buttonGrp) && index === buttonIndex | ||
element.disabled = !element.loading | ||
} | ||
} | ||
} | ||
const buttonControl = getButtonControl() | ||
// update left buttons with loading / disabled as required | ||
updateButtonGrp(buttonControl.leftButtons, 'left') | ||
// update right buttons with loading / disabled as required | ||
updateButtonGrp(buttonControl.rightButtons, 'right') | ||
} | ||
|
||
return { | ||
getButtonControl, | ||
setButtonControl, | ||
handleButtonLoading | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Empty file.
121 changes: 0 additions & 121 deletions
121
strr-host-pm-web/app/components/connect/form/phoneNumber/CountryCode.vue
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.