feat: merge static version with latest and add license

BREAKING CHANGE: Now only one tag will be published: `latest`. This tag will include both the standard and latest version
This commit is contained in:
Joxit
2021-03-31 07:10:50 +02:00
parent 7d095916db
commit 1173453f72
24 changed files with 151 additions and 288 deletions

View File

@@ -18,7 +18,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<header>
<material-navbar>
<div class="logo">Docker Registry UI</div>
<dialogs-menu on-notify="{ notifySnackbar }" on-server-change="{ onServerChange }"></dialogs-menu>
<dialogs-menu if="{props.singleRegistry !== 'true'}" on-notify="{ notifySnackbar }"
on-server-change="{ onServerChange }"></dialogs-menu>
</material-navbar>
</header>
<main>
@@ -66,7 +67,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
import TagHistory from './tag-history/tag-history.riot';
import DialogsMenu from './dialogs/dialogs-menu.riot';
import {
stripHttps
stripHttps,
getRegistryServers
} from '../scripts/utils';
import router from '../scripts/router';
@@ -84,8 +86,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
state.snackbarMessage = undefined;
},
onBeforeMount(props) {
this.state.registryUrl = props.registryUrl || (window.location.origin + window.location.pathname.replace(/\/+$/,
''));
// props.singleRegistry === 'true' means old static version
this.state.registryUrl = props.registryUrl ||
(props.singleRegistry === 'true' ? undefined : (router.getUrlQueryParam() || getRegistryServers(0))) ||
(window.location.origin + window.location.pathname.replace(/\/+$/, ''));
this.state.name = props.name || stripHttps(props.registryUrl);
this.state.catalogElementsLimit = props.catalogElementsLimit || 100000;
this.state.pullUrl = this.pullUrl(this.state.registryUrl, props.pullUrl);