aboutsummaryrefslogtreecommitdiff
path: root/src/components/settings_modal/admin_tabs/frontends_tab.vue
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2023-03-29 00:58:07 +0300
committerHenry Jameson <me@hjkos.com>2023-03-29 00:58:07 +0300
commit7bb28bb23c61e2d648eecf5d59969d32631f78e8 (patch)
treebc566b7527207c2146f39a7be58485787d2b9966 /src/components/settings_modal/admin_tabs/frontends_tab.vue
parent3ac67ab7274c199766d026fcf168bd2a3d4e2692 (diff)
frontends tab initial implementation, now you can (re)install frontends! yay!
Diffstat (limited to 'src/components/settings_modal/admin_tabs/frontends_tab.vue')
-rw-r--r--src/components/settings_modal/admin_tabs/frontends_tab.vue72
1 files changed, 72 insertions, 0 deletions
diff --git a/src/components/settings_modal/admin_tabs/frontends_tab.vue b/src/components/settings_modal/admin_tabs/frontends_tab.vue
new file mode 100644
index 00000000..48649dfb
--- /dev/null
+++ b/src/components/settings_modal/admin_tabs/frontends_tab.vue
@@ -0,0 +1,72 @@
+<template>
+ <div class="frontends-tab" :label="$t('admin_dash.tabs.frontends')">
+ <div class="setting-item">
+ <h2>{{ $t('admin_dash.tabs.frontends') }}</h2>
+ <ul class="setting-list cards-list">
+ <li v-for="frontend in frontends" :key="frontend.name">
+ <strong>{{ frontend.name }}</strong>
+ <dl>
+ <dt>{{ $t('admin_dash.frontend.repository') }}</dt>
+ <dd><a :href="frontend.git">{{ frontend.git }}</a></dd>
+ <dt v-if="expertLevel">{{ $t('admin_dash.frontend.versions') }}</dt>
+ <dd v-if="expertLevel">{{ frontend.refs }}</dd>
+ <dt v-if="expertLevel">{{ $t('admin_dash.frontend.build_url') }}</dt>
+ <dd v-if="expertLevel">{{ frontend.build_url }}</dd>
+ </dl>
+ <div>
+ <span class="btn-group">
+ <button
+ class="button button-default btn"
+ type="button"
+ :title="$t('admin_dash.frontend.update')"
+ @click="update(frontend)"
+ >
+ {{
+ frontend.installed
+ ? $t('admin_dash.frontend.reinstall')
+ : $t('admin_dash.frontend.install')
+ }}
+ </button>
+ <Popover
+ v-if="frontend.refs.length > 1"
+ trigger="click"
+ class="button-dropdown"
+ placement="bottom"
+ >
+ <template #content>
+ <div class="dropdown-menu">
+ <button
+ v-for="ref in frontend.refs"
+ :key="ref"
+ class="button-default dropdown-item"
+ @click="update(frontend, ref)"
+ >
+ <i18n-t keypath="admin_dash.frontend.install_version">
+ <template #version>
+ <code>{{ ref }}</code>
+ </template>
+ </i18n-t>
+ </button>
+ </div>
+ </template>
+ <template #trigger>
+ <button
+ class="button button-default btn"
+ type="button"
+ :title="$t('admin_dash.frontend.update')"
+ >
+ <FAIcon icon="chevron-down" />
+ </button>
+ </template>
+ </Popover>
+ </span>
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+</template>
+
+<script src="./frontends_tab.js"></script>
+
+<style lang="scss" src="./frontends_tab.scss"></style>