-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
34 changed files
with
201 additions
and
139 deletions.
There are no files selected for viewing
Empty file.
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,6 @@ | ||
export function getOwner(context) { | ||
console.log('getOwner', context); | ||
} | ||
export function setOwner(context, owner) { | ||
console.log('setOwner', context, owner); | ||
} |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
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,3 @@ | ||
export function isHTMLSafe() { | ||
return true; | ||
} |
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,3 @@ | ||
export function registerWaiter() { | ||
console.log('registerWaiter'); | ||
} |
Empty file.
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,5 @@ | ||
export function precompileTemplate() { | ||
return null; | ||
} | ||
|
||
export type PrecompiledTemplate = unknown; |
Empty file.
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,5 @@ | ||
export function createCache() { | ||
|
||
} | ||
export function getValue() { | ||
} |
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,2 @@ | ||
export const IS_NODE = false; | ||
export const module = globalThis; |
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 |
---|---|---|
@@ -1,15 +1,15 @@ | ||
import and from 'ember-truth-helpers/addon/helpers/and.js'; | ||
import eq from 'ember-truth-helpers/addon/helpers/equal.js'; | ||
import or from 'ember-truth-helpers/addon/helpers/or.js'; | ||
import not from 'ember-truth-helpers/addon/helpers/not.js'; | ||
import notEq from 'ember-truth-helpers/addon/helpers/not-equal.js'; | ||
// import and from 'ember-truth-helpers/addon/helpers/and.js'; | ||
// import eq from 'ember-truth-helpers/addon/helpers/equal.js'; | ||
// import or from 'ember-truth-helpers/addon/helpers/or.js'; | ||
// import not from 'ember-truth-helpers/addon/helpers/not.js'; | ||
// import notEq from 'ember-truth-helpers/addon/helpers/not-equal.js'; | ||
|
||
const registry = { | ||
'helper:and': and, | ||
'helper:eq': eq, | ||
'helper:or': or, | ||
'helper:not': not, | ||
'helper:not-eq': notEq, | ||
}; | ||
// const registry = { | ||
// 'helper:and': and, | ||
// 'helper:eq': eq, | ||
// 'helper:or': or, | ||
// 'helper:not': not, | ||
// 'helper:not-eq': notEq, | ||
// }; | ||
|
||
export default registry; | ||
// export default registry; |
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
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 |
---|---|---|
@@ -1,18 +1,18 @@ | ||
import type Application from '@ember/application'; | ||
// import type Application from '@ember/application'; | ||
|
||
function initializeStore(application: Application) { | ||
application.registerOptionsForType('serializer', { singleton: false }); | ||
application.registerOptionsForType('adapter', { singleton: false }); | ||
} | ||
// function initializeStore(application: Application) { | ||
// application.registerOptionsForType('serializer', { singleton: false }); | ||
// application.registerOptionsForType('adapter', { singleton: false }); | ||
// } | ||
|
||
function setupContainer(application: Application) { | ||
initializeStore(application); | ||
} | ||
// function setupContainer(application: Application) { | ||
// initializeStore(application); | ||
// } | ||
|
||
/* | ||
This code initializes EmberData in an Ember application. | ||
*/ | ||
export default { | ||
name: 'ember-data', | ||
initialize: setupContainer, | ||
}; | ||
// /* | ||
// This code initializes EmberData in an Ember application. | ||
// */ | ||
// export default { | ||
// name: 'ember-data', | ||
// initialize: setupContainer, | ||
// }; |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import Model, { attr, belongsTo, hasMany } from '@ember-data/model'; | ||
// import Model, { attr, belongsTo, hasMany } from '@ember-data/model'; | ||
|
||
export default class PersonModel extends Model { | ||
@attr name; | ||
@belongsTo('pet', { inverse: 'owner', async: false }) dog; | ||
@hasMany('person', { inverse: 'friends', async: false }) friends; | ||
} | ||
// export default class PersonModel extends Model { | ||
// @attr name; | ||
// @belongsTo('pet', { inverse: 'owner', async: false }) dog; | ||
// @hasMany('person', { inverse: 'friends', async: false }) friends; | ||
// } |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import Model, { attr, belongsTo } from '@ember-data/model'; | ||
// import Model, { attr, belongsTo } from '@ember-data/model'; | ||
|
||
export default class PetModel extends Model { | ||
@attr name; | ||
@belongsTo('person', { inverse: 'dog', async: false }) owner; | ||
} | ||
// export default class PetModel extends Model { | ||
// @attr name; | ||
// @belongsTo('person', { inverse: 'dog', async: false }) owner; | ||
// } |
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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import Route from '@ember/routing/route'; | ||
import { service } from '@ember/service'; | ||
import SessionService from 'ember-simple-auth/addon/services/session'; | ||
// import SessionService from 'ember-simple-auth/addon/services/session'; | ||
|
||
export default class LoginRoute extends Route { | ||
@service session: SessionService; | ||
// @service session: SessionService; | ||
|
||
beforeModel() { | ||
this.session.prohibitAuthentication('main'); | ||
// this.session.prohibitAuthentication('main'); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,20 +1,20 @@ | ||
import Route from '@ember/routing/route'; | ||
import type Transition from '@ember/routing/transition'; | ||
import { service } from '@ember/service'; | ||
import SessionService from 'ember-simple-auth/addon/services/session'; | ||
import StoreService from '@/services/store'; | ||
// import SessionService from 'ember-simple-auth/addon/services/session'; | ||
// import StoreService from '@/services/store'; | ||
|
||
export default class ProfileRoute extends Route { | ||
@service session: SessionService; | ||
@service store: StoreService; | ||
// @service session: SessionService; | ||
// @service store: StoreService; | ||
|
||
beforeModel(transition: Transition) { | ||
this.session.requireAuthentication(transition, 'login'); | ||
// this.session.requireAuthentication(transition, 'login'); | ||
} | ||
|
||
model() { | ||
const model = this.session.data.authenticated; | ||
const user = this.store.peekRecord('person', model.id); | ||
return user ?? this.store.createRecord('person', model); | ||
// const model = this.session.data.authenticated; | ||
// const user = this.store.peekRecord('person', model.id); | ||
// return user ?? this.store.createRecord('person', model); | ||
} | ||
} |
Oops, something went wrong.