-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
74 lines (74 loc) · 3.15 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<html>
<head>
<script src="https://unpkg.com/@microsoft/mgt/dist/bundle/mgt-loader.js"></script>
<link rel="stylesheet" href="https://unpkg.com/@n8d/htwoo-core/dist/css/htwoo.min.css">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<mgt-msal2-provider client-id="d43f076b-c6a6-4805-97be-f9ef969241c0" authority="https://login.microsoftonline.com/M365x61791022.onmicrosoft.com"></mgt-msal2-provider>
<mgt-login></mgt-login>
<mgt-file-list>
<template>
<h1>My files</h1>
<div class="hoo-cardgrid">
<div data-for="file in files" class="hoo-doccard" data-props="{{@click: openFile}}">
<div class="hoo-cardimage">
<div data-if="file.folder"><img src="./folder.jpg" alt=""></div>
<mgt-get data-if="!file.folder" resource="/drives/{{file.parentReference.driveId}}/items/{{file.id}}/thumbnails/0/c320x180_crop/content" type="image" cache-enabled="true">
<template data-type="loading">
<div class="hoo-ph-squared"></div>
</template>
<template data-type="error">
<img src="./otter.jpg" alt="">
</template>
<template data-type="no-data">
<img src="./otter.jpg" alt="">
</template>
<template data-type="default">
<img src="{{image}}" width="320" height="180" alt="">
</template>
</mgt-get>
</div>
<div class="hoo-cardlocation">
<mgt-get resource="/drives/{{file.parentReference.driveId}}" cache-enabled="true">
<template data-type="loading">
<div class="hoo-ph-row"></div>
</template>
<template data-type="error">
<div class="hoo-ph-row"></div>
</template>
<template data-type="default">
{{name}}
</template>
</mgt-get>
</div>
<div class="hoo-cardtitle">{{file.name}}</div>
<div class="hoo-cardfooter">
<div class="hoo-avatar">
<mgt-get resource="/users/{{file.lastModifiedBy.user.id}}/photo/$value" type="image" cache-enabled="true">
<template data-type="loading">
<div class="hoo-ph-circle"></div>
</template>
<template data-type="no-data">
<div class="hoo-ph-circle hoo-avatar-img"></div>
</template>
<template data-type="default">
<img src="{{image}}" alt="" class="hoo-avatar-img" loading="lazy">
</template>
</mgt-get>
</div>
<div class="hoo-cardfooter-data">
<div class="hoo-cardfooter-name">{{file.lastModifiedBy.user.displayName}}</div>
<div class="hoo-cardfooter-modified">{{formatDate(file.lastModifiedDateTime)}}</div>
</div>
</div>
</div>
</div>
<button class="hoo-button-primary" data-props="{{@click: loadMore}}">
<div class="hoo-button-label">Load more</div>
</button>
</template>
</mgt-file-list>
<script src="script.js"></script>
</body>
</html>