Skip to content

Commit 2ec6d5c

Browse files
committed
Merge branch 'develop' into custom/HIO687AS
# Conflicts: # shared/styles/application.scss
2 parents d886f22 + 965e4c7 commit 2ec6d5c

File tree

8 files changed

+38
-31
lines changed

8 files changed

+38
-31
lines changed

apps/concierge/src/app/signage/signage-state.service.ts

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import {
2323
removeSystem,
2424
SignageMedia,
2525
SignagePlaylist,
26+
token,
2627
updateSignageMedia,
2728
updateSignagePlaylist,
2829
updateSignagePlaylistMedia,
@@ -45,6 +46,7 @@ import {
4546
} from 'rxjs/operators';
4647

4748
import { MatDialog } from '@angular/material/dialog';
49+
import { SignedRequest } from '@placeos/cloud-uploads';
4850
import { openConfirmModal } from '@placeos/components';
4951
import { SignageApprovePlaylistModalComponent } from './signage-approve-playlist-modal.component';
5052
import { SignageDisplayModalComponent } from './signage-display-modal.component';
@@ -385,22 +387,26 @@ export class SignageStateService extends AsyncHandler {
385387
new Promise<{ id: string; link: string }>((resolve, reject) => {
386388
let state = null;
387389
let resolved = false;
390+
388391
this.subscription(
389392
`upload-${id}`,
390393
this._uploads.upload_list.subscribe(
391394
(list) => {
392-
console.log('Upload List:', list);
393-
state = list.find(
394-
(s) => s.upload?.id === id || s.id,
395-
);
396-
if (state && state.link) {
395+
console.log('Upload List:', list, id);
396+
state = list.find((s) => id === s.id);
397+
if (
398+
state &&
399+
(state.link || state.progress >= 100)
400+
) {
397401
resolved = true;
402+
const uid =
403+
state.upload_id || state.upload?.id || id;
404+
const url = `/api/engine/v2/uploads/${encodeURIComponent(
405+
uid,
406+
)}/url`;
398407
resolve({
399-
id:
400-
state.upload_id ||
401-
state.upload?.id ||
402-
id,
403-
link: state.link,
408+
id: uid,
409+
link: state.link || url,
404410
});
405411
this.unsub(`upload-${id}`);
406412
}
@@ -417,6 +423,7 @@ export class SignageStateService extends AsyncHandler {
417423
720,
418424
).catch(() => null);
419425
const media_id = await this._uploads.uploadFileWithPermissions(file);
426+
SignedRequest.setToken(token());
420427
const media = await uploadDetails(media_id);
421428
let thumbnail = null;
422429
if (thumbnail_image) {

apps/stagehand/src/app/alerts.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,14 +346,14 @@ import { SidebarComponent } from './ui/sidebar.component';
346346
</ng-template>
347347
<ng-template #actions_template let-row="row">
348348
<div class="flex space-x-2 p-2">
349-
{{ backoffice_link | json }}
350349
<a
351350
icon
352351
matRipple
353352
[href]="
354353
(backoffice_link() || '/backoffice/') +
355354
'#/systems/' +
356-
row.location
355+
row.location +
356+
'/modules'
357357
"
358358
target="_blank"
359359
ref="noopener noreferrer"

apps/stagehand/src/app/remote-support.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,8 @@ function contains(str: string, substr: string) {
371371
[href]="
372372
(backoffice_link() || '/backoffice/') +
373373
'#/systems/' +
374-
row.id
374+
row.id +
375+
'/modules'
375376
"
376377
target="_blank"
377378
ref="noopener noreferrer"
@@ -636,6 +637,7 @@ export class RemoteSupportComponent extends AsyncHandler implements OnInit {
636637
}
637638

638639
public setNextBooking(space: Space, event: CalendarEvent) {
640+
console.log('Next:', space, event);
639641
const current = this.next();
640642
if (!event && current[space.id]) {
641643
delete current[space.id];

libs/common/src/lib/uploads.service.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -213,16 +213,14 @@ export class UploadsService extends AsyncHandler {
213213
upload_details.upload_id = (
214214
upload as any
215215
)._request.upload_id;
216-
217216
console.log('Upload:', state, upload_list);
218217
if (upload.access_url) {
219-
upload_details.link = !pub
220-
? `${
221-
location.origin
222-
}/api/engine/v2/uploads/${encodeURIComponent(
223-
upload_details.upload_id || upload.id,
224-
)}/url`
225-
: upload.access_url;
218+
const local_url = `${
219+
location.origin
220+
}/api/engine/v2/uploads/${encodeURIComponent(
221+
upload_details.upload_id || upload.id,
222+
)}/url`;
223+
upload_details.link = local_url;
226224
}
227225
upload_details.progress = state.progress;
228226
observer.next(upload_details);

libs/components/src/lib/binding.directive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export class BindingDirective<T = any>
105105
this.subscription(
106106
'on_changes',
107107
binding.bindThenSubscribe((value) => {
108-
if (value == null) return;
108+
// if (value == null) return;
109109
setTimeout(() => {
110110
this._binding = false;
111111
this.clearTimeout('bound');

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"@nx/playwright": "21.2.0",
7474
"@nx/web": "21.2.0",
7575
"@nx/workspace": "21.2.0",
76-
"@placeos/cloud-uploads": "^1.0.6",
76+
"@placeos/cloud-uploads": "^1.0.10",
7777
"@placeos/svg-viewer": "^1.0.5",
7878
"@placeos/ts-client": "^4.5.0",
7979
"@playwright/test": "^1.49.0",

shared/styles/application.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@
3636
--neutral-content: hsl(0, 0%, 100%); /* White content on grey background */
3737

3838
/* Base */
39-
--base-100: oklch(98.4% 0.003 247.858); /* Near White */
40-
--base-200: oklch(92.9% 0.013 255.508); /* Light Grey */
41-
--base-300: oklch(86.9% 0.022 252.894); /* Mid Grey */
42-
--base-400: oklch(55.4% 0.046 257.417); /* Mid Grey */
39+
--base-100: hsl(0, 0%, 98.5%); /* Near White */
40+
--base-200: hsl(49, 2%, 92%); /* Light Grey */
41+
--base-300: hsl(56, 5%, 71%); /* Mid Grey */
42+
--base-400: hsl(58, 7%, 55%); /* Mid Grey */
4343
--base-content: hsl(0, 0%, 0%); /* Black content on white background */
4444

4545
/* Info */

0 commit comments

Comments
 (0)