@asd20/ui 3.2.845 → 3.2.847
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 +1 -1
- package/src/components/molecules/Asd20Card/index.vue +1 -1
- package/src/components/organisms/Asd20PageHeader/index.vue +12 -6
- package/src/components/templates/Asd20ClubsTemplate/index.vue +1 -1
- package/src/data/messages/stories.json +1 -1
- package/src/mixins/userProfileMixin.js +29 -0
package/package.json
CHANGED
|
@@ -242,23 +242,29 @@ export default {
|
|
|
242
242
|
goBack() {
|
|
243
243
|
if (typeof window === 'undefined') return
|
|
244
244
|
const currentLocation = window.location.href
|
|
245
|
+
const currentURL = new URL(window.location.href)
|
|
246
|
+
|
|
245
247
|
if (
|
|
246
248
|
currentLocation.includes('schools') ||
|
|
247
249
|
currentLocation.includes('8080')
|
|
248
250
|
) {
|
|
249
|
-
const currentURL = new URL(window.location.href)
|
|
250
251
|
this.returnURL = currentURL.origin
|
|
251
252
|
return
|
|
252
253
|
}
|
|
253
|
-
|
|
254
|
+
|
|
255
|
+
if (document.referrer.includes('/auth/callback')) {
|
|
256
|
+
this.returnURL = currentURL.origin
|
|
257
|
+
return
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
if (
|
|
261
|
+
document.referrer.startsWith('http') ||
|
|
262
|
+
document.referrer.startsWith('/')
|
|
263
|
+
) {
|
|
254
264
|
this.returnURL = document.referrer
|
|
255
265
|
} else {
|
|
256
|
-
const currentURL = new URL(window.location.href)
|
|
257
266
|
this.returnURL = currentURL.origin
|
|
258
267
|
}
|
|
259
|
-
// window.history.back()
|
|
260
|
-
// const url = window.location.href
|
|
261
|
-
// return url.slice(0, url.lastIndexOf('/'))
|
|
262
268
|
},
|
|
263
269
|
truncatedDescription(description) {
|
|
264
270
|
return truncate(description, { length: 60, separator: /,? +/ })
|
|
@@ -759,7 +759,7 @@
|
|
|
759
759
|
"channels": ["News & Stories"],
|
|
760
760
|
"audiences": [],
|
|
761
761
|
"ownerOrganizationId": "26eaf390-d8ab-11e9-a3a8-5de5bba4f125",
|
|
762
|
-
"images": "[]",
|
|
762
|
+
"images": "[{\"files\":[{\"url\":\"https://asd20websitestorage.blob.core.windows.net/website-files/message-images//thumbnail-md/Screen Shot 2020-06-29 at 8.08.34 AM_250x250.jpg\",\"name\":\"thumbnail-md\",\"width\":250,\"height\":250,\"filename\":\"Screen Shot 2020-06-29 at 8.08.34 AM_250x250.jpg\",\"filepath\":\"message-images//thumbnail-md/Screen Shot 2020-06-29 at 8.08.34 AM_250x250.jpg\",\"filesize\":18750},{\"url\":\"https://asd20websitestorage.blob.core.windows.net/website-files/message-images//thumbnail-sm/Screen Shot 2020-06-29 at 8.08.34 AM_100x100.jpg\",\"name\":\"thumbnail-sm\",\"width\":100,\"height\":100,\"filename\":\"Screen Shot 2020-06-29 at 8.08.34 AM_100x100.jpg\",\"filepath\":\"message-images//thumbnail-sm/Screen Shot 2020-06-29 at 8.08.34 AM_100x100.jpg\",\"filesize\":4884},{\"url\":\"https://asd20websitestorage.blob.core.windows.net/website-files/message-images//thumbnail-xs/Screen Shot 2020-06-29 at 8.08.34 AM_50x50.jpg\",\"name\":\"thumbnail-xs\",\"width\":50,\"height\":50,\"filename\":\"Screen Shot 2020-06-29 at 8.08.34 AM_50x50.jpg\",\"filepath\":\"message-images//thumbnail-xs/Screen Shot 2020-06-29 at 8.08.34 AM_50x50.jpg\",\"filesize\":1840},{\"url\":\"https://asd20websitestorage.blob.core.windows.net/website-files/message-images//banner/Screen Shot 2020-06-29 at 8.08.34 AM_800x300.jpg\",\"name\":\"banner\",\"width\":800,\"height\":300,\"filename\":\"Screen Shot 2020-06-29 at 8.08.34 AM_800x300.jpg\",\"filepath\":\"message-images//banner/Screen Shot 2020-06-29 at 8.08.34 AM_800x300.jpg\",\"filesize\":54628},{\"url\":\"https://asd20websitestorage.blob.core.windows.net/website-files/message-images//full/Screen Shot 2020-06-29 at 8.08.34 AM_1200x800.jpg\",\"name\":\"full\",\"width\":1200,\"height\":800,\"filename\":\"Screen Shot 2020-06-29 at 8.08.34 AM_1200x800.jpg\",\"filepath\":\"message-images//full/Screen Shot 2020-06-29 at 8.08.34 AM_1200x800.jpg\",\"filesize\":142032}],\"isCover\":true,\"metadata\":{\"alt\":\"A Pine Creek High School Graduate looking very self-assured.\"}}]",
|
|
763
763
|
"videos": "[{\"id\":\"0ol7e2ASbIk\",\"embedUrl\":\"https://www.youtube.com/embed/0ol7e2ASbIk\",\"watchUrl\":\"https://www.youtube.com/watch?v=0ol7e2ASbIk\",\"coverImageUrl\":\"https://img.youtube.com/vi/0ol7e2ASbIk/0.jpg\"}]",
|
|
764
764
|
"translations": "null",
|
|
765
765
|
"callsToAction": "null",
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import globalpropmixinfactory from '.'
|
|
2
|
+
|
|
3
|
+
// Create a mixin to access user profile
|
|
4
|
+
const userProfileMixin = globalpropmixinfactory('userProfile', {
|
|
5
|
+
type: Object,
|
|
6
|
+
default: () => ({}),
|
|
7
|
+
})
|
|
8
|
+
|
|
9
|
+
// In your component
|
|
10
|
+
export default {
|
|
11
|
+
mixins: [userProfileMixin],
|
|
12
|
+
computed: {
|
|
13
|
+
userDisplayName() {
|
|
14
|
+
return this._userProfile.displayName || ''
|
|
15
|
+
},
|
|
16
|
+
userGivenName() {
|
|
17
|
+
return this._userProfile.givenName || ''
|
|
18
|
+
},
|
|
19
|
+
userJobTitle() {
|
|
20
|
+
return this._userProfile.jobTitle || ''
|
|
21
|
+
},
|
|
22
|
+
userOfficeLocation() {
|
|
23
|
+
return this._userProfile.officeLocation || ''
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
// mounted() {
|
|
27
|
+
// console.log('User Profile:', this._userProfile)
|
|
28
|
+
// },
|
|
29
|
+
}
|