-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
97 lines (93 loc) · 2.19 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
<div id="vue-app">
<div id="app" :class="{'styled': styled}">
<div class="navbar"><h1>List of Enabled Addons</h1></div>
<div class="app">
<div v-for="addonId in addonIds" class="addon-body">
<div class="addon-topbar">
<span class="addon-name">{{ addonId}}</span>
</div>
</div>
</div>
</div>
<label>Styling <input type="checkbox" v-model="styled" /></label>
</div>
<style>
@import url("https://fonts.googleapis.com/css2?family=Sora:wght@100;200;300;400;500;600;700;800&display=swap");
body {
padding: 0;
margin: 0;
}
#app.styled {
font-family: "Sora", sans-serif;
background: #222;
padding: 0;
margin: 0;
color: #fff;
font-size: 12px;
}
.app.styled {
overflow-y: auto;
padding: 20px;
padding-top: 10px;
scrollbar-width: thin;
scrollbar-color: var(--gray-text) transparent;
height: 100vh;
background: #333;
}
.styled .navbar {
height: 60px;
background: #ff7b26;
color: #fff;
display: flex;
align-items: center;
padding: 0 14px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
user-select: none;
position: relative;
z-index: 10;
}
.styled h1 {
font-size: 18px;
margin: 0;
font-weight: 400;
}
.styled .addon-body {
margin: 10px;
background: #2a2a2a;
border: 1px solid #333;
border-radius: 4px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
}
.styled .addon-topbar {
height: 52px;
padding-inline-end: 10px;
display: flex;
align-items: center;
}
.styled .addon-name {
margin-inline-start: 10px;
font-weight: 400;
height: 100%;
display: flex;
align-items: center;
font-size: 12px;
}
</style>
<script type="module">
import getEnabledAddonIds from "./module.js";
window.vue = Vue.createApp({
data() {
return {
addonIds: [],
styled: true,
};
},
async mounted() {
this.addonIds = await getEnabledAddonIds(
new URLSearchParams(window.location.search).get("number"),
new URLSearchParams(window.location.search).get("version")
);
},
}).mount("#vue-app");
</script>