Skip to content

Commit ce9eb01

Browse files
chore: wip
1 parent ddebbfe commit ce9eb01

File tree

13 files changed

+18
-18
lines changed

13 files changed

+18
-18
lines changed

storage/framework/core/components/modal/src/App.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,8 @@ defineCustomElement({
4040
<Transitions />
4141
</main>
4242

43-
4443
<Transition name="fade" appear>
45-
<Modal :visible="visible" @close="handleClose" class="bg-gray-500 bg-opacity-75 transition-opacity">
44+
<Modal :visible="visible" class="bg-gray-500 bg-opacity-75 transition-opacity" @close="handleClose">
4645
<template #closeButton />
4746
<template #header>
4847
<h1> Hello Detail</h1>

storage/framework/core/components/modal/src/components/Modal.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ defineCustomElement({
3434
shadow: true,
3535
})
3636
</script>
37+
3738
<template>
3839
<div v-if="props.visible" class="fixed inset-0 z-10 w-screen overflow-y-auto">
3940
<div

storage/framework/core/components/modal/src/components/Options.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ async function handleCopyCode() {
139139
</div>
140140

141141
<Transition name="fade" appear>
142-
<Modal :visible="visible" @close="handleClose" class="bg-gray-500 bg-opacity-70 transition-opacity">
142+
<Modal :visible="visible" class="bg-gray-500 bg-opacity-70 transition-opacity" @close="handleClose">
143143
<template v-if="currentAction === 'close'" #closeButton />
144144
<template v-if="currentAction === 'header'" #header>
145145
<h1 class="text-lg font-semibold">

storage/framework/core/components/modal/src/components/Transitions.vue

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,11 @@ const transitionList = ref<Transition[]>(['fade', 'pop', 'fadeInRightBig', 'jack
88
const showCheckIcon = ref(false)
99
const visible = ref(false)
1010
11-
1211
function handleClose() {
1312
visible.value = false
1413
}
1514
1615
const styleCode = computed(() => {
17-
1816
let style = `
1917
.fade-enter-active,
2018
.fade-leave-active {
@@ -95,7 +93,8 @@ const styleCode = computed(() => {
9593
opacity: 0;
9694
transform: translateX(100%);
9795
}
98-
`}
96+
`
97+
}
9998
10099
if (currentTransition.value === 'pop') {
101100
style = `
@@ -165,7 +164,6 @@ const styleCode = computed(() => {
165164
return style
166165
})
167166
168-
169167
const renderedCode = computed(() => {
170168
return `
171169
<template>
@@ -242,7 +240,6 @@ async function handleCopyCode() {
242240
</button>
243241
</div>
244242

245-
246243
<Transition name="modal-overlay" appear>
247244
<div v-if="visible" class="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity" aria-hidden="true" @click.self="handleClose" />
248245
</Transition>

storage/framework/core/orm/src/utils.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,10 +210,12 @@ export function getHiddenAttributes(attributes: Attributes | undefined): string[
210210
})
211211
}
212212

213-
export function getFillableAttributes(attributes: Attributes | undefined): string[] {
213+
export function getFillableAttributes(attributes: Attributes | undefined, otherModelRelations: RelationConfig[]): string[] {
214214
if (attributes === undefined)
215215
return ['stripe_id', 'two_factor_secret', 'public_key']
216216

217+
const foreignKeys = otherModelRelations.map(otherModelRelation => otherModelRelation.foreignKey)
218+
217219
return [
218220
...Object.keys(attributes)
219221
.filter((key) => {
@@ -226,6 +228,7 @@ export function getFillableAttributes(attributes: Attributes | undefined): strin
226228
'stripe_id',
227229
'public_key',
228230
'two_factor_secret',
231+
...foreignKeys,
229232
]
230233
}
231234

@@ -1369,7 +1372,7 @@ export async function generateModelString(
13691372
`
13701373

13711374
const hidden = JSON.stringify(getHiddenAttributes(model.attributes))
1372-
const fillable = JSON.stringify(getFillableAttributes(model.attributes))
1375+
const fillable = JSON.stringify(getFillableAttributes(model.attributes, otherModelRelations))
13731376

13741377
return `import type { Generated, Insertable, Selectable, Updateable } from 'kysely'
13751378
import { manageCharge, manageCheckout, manageCustomer, managePaymentMethod, manageSubscription, managePrice, type Stripe } from '@stacksjs/payments'

storage/framework/core/search-engine/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const setTotalHits: ComputedRef = computed(() => table.setTotalHits)
3232
export const sort: ComputedRef = computed(() => table.sort)
3333
export const sorts: ComputedRef = computed(() => table.sorts)
3434

35-
export function client(): string {
35+
function client(): string {
3636
// if (searchEngine.driver === 'meilisearch')
3737
// return meilisearch
3838
return 'wip-search-me'

storage/framework/orm/src/models/AccessToken.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ interface QueryOptions {
5353

5454
export class AccessTokenModel {
5555
private hidden = []
56-
private fillable = ['stripe_id', 'public_key', 'two_factor_secret']
56+
private fillable = ['stripe_id', 'public_key', 'two_factor_secret', 'team_id']
5757
private softDeletes = false
5858
protected query: any
5959
protected hasSelect: boolean

storage/framework/orm/src/models/Deployment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ interface QueryOptions {
5656

5757
export class DeploymentModel {
5858
private hidden = []
59-
private fillable = ['stripe_id', 'public_key', 'two_factor_secret']
59+
private fillable = ['stripe_id', 'public_key', 'two_factor_secret', 'user_id']
6060
private softDeletes = false
6161
protected query: any
6262
protected hasSelect: boolean

storage/framework/orm/src/models/Post.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ interface QueryOptions {
5151

5252
export class PostModel {
5353
private hidden = []
54-
private fillable = ['stripe_id', 'public_key', 'two_factor_secret']
54+
private fillable = ['stripe_id', 'public_key', 'two_factor_secret', 'user_id']
5555
private softDeletes = false
5656
protected query: any
5757
protected hasSelect: boolean

storage/framework/orm/src/models/Subscriber.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ interface QueryOptions {
4949

5050
export class SubscriberModel {
5151
private hidden = []
52-
private fillable = ['stripe_id', 'public_key', 'two_factor_secret']
52+
private fillable = ['stripe_id', 'public_key', 'two_factor_secret', 'user_id']
5353
private softDeletes = false
5454
protected query: any
5555
protected hasSelect: boolean

0 commit comments

Comments
 (0)