-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* hosts drafts Signed-off-by: Kial Jinnah <[email protected]> * feature flag, phone number issue, btn control updates, depreciation fix, other fixes Signed-off-by: Kial Jinnah <[email protected]> * added delete draft call Signed-off-by: Kial Jinnah <[email protected]> * fix for base-web ci? Signed-off-by: Kial Jinnah <[email protected]> * Update for PR comment Signed-off-by: Kial Jinnah <[email protected]> * cleanup Signed-off-by: Kial Jinnah <[email protected]> --------- Signed-off-by: Kial Jinnah <[email protected]>
- Loading branch information
Showing
20 changed files
with
237 additions
and
465 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
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 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 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
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
Oops, something went wrong.