Fix app info fields order
This commit is contained in:
1 parent
9ae8601a32
commit
89034378fb
3 files changed
+66
-27
No files matched your search
@@ -3,16 +3,40 @@
|
||||
|
||||
export let visibility: boolean;
|
||||
|
||||
const displayNames = {
|
||||
app_version: "Playlet App Version",
|
||||
lib_version: "Playlet Library Version",
|
||||
lib_version_latest: "Playlet Library Latest Version",
|
||||
lib_url: "Playlet Library URL",
|
||||
lib_url_type: "Playlet Library URL Type",
|
||||
git_commit_hash: "Playlet Git Commit Hash",
|
||||
lib_git_commit_hash: "Playlet Library Git Commit Hash",
|
||||
id: "App ID",
|
||||
};
|
||||
const displayNames = [
|
||||
{
|
||||
key: "app_version",
|
||||
displayText: "Playlet App Version",
|
||||
},
|
||||
{
|
||||
key: "lib_version",
|
||||
displayText: "Playlet Library Version",
|
||||
},
|
||||
{
|
||||
key: "lib_version_latest",
|
||||
displayText: "Playlet Library Latest Version",
|
||||
},
|
||||
{
|
||||
key: "lib_url",
|
||||
displayText: "Playlet Library URL",
|
||||
},
|
||||
{
|
||||
key: "lib_url_type",
|
||||
displayText: "Playlet Library URL Type",
|
||||
},
|
||||
{
|
||||
key: "app_git_commit_hash",
|
||||
displayText: "Playlet App Git Commit Hash",
|
||||
},
|
||||
{
|
||||
key: "lib_git_commit_hash",
|
||||
displayText: "Playlet Library Git Commit Hash",
|
||||
},
|
||||
{
|
||||
key: "id",
|
||||
displayText: "App ID",
|
||||
},
|
||||
];
|
||||
|
||||
function transformValue(key, value) {
|
||||
switch (key) {
|
||||
@@ -110,10 +134,10 @@ ${JSON.stringify(preferencesInfo, null, 2)}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{#each Object.entries(displayNames) as [key, value]}
|
||||
{#each displayNames as item}
|
||||
<tr>
|
||||
<td>{value}</td>
|
||||
<td>{@html transformValue(key, appInfo[key])}</td>
|
||||
<td>{item.displayText}</td>
|
||||
<td>{@html transformValue(item.key, appInfo[item.key])}</td>
|
||||
</tr>
|
||||
{/each}
|
||||
</tbody>
|
||||
|
||||
Reference in new issue
Block a user