add github badge onto web version

This commit is contained in:
InsanusMokrassar 2021-03-02 17:19:17 +06:00
parent 603da9a021
commit 25767eecb2
3 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,18 @@
package dev.inmo.kmppscriptbuilder.desktop.utils
import java.awt.Desktop
import java.lang.Exception
import java.net.URI
fun openLink(link: String): Boolean {
val desktop = if (Desktop.isDesktopSupported()) Desktop.getDesktop() else null
if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE)) {
try {
desktop.browse(URI(link))
return true
} catch (e: Exception) {
e.printStackTrace()
}
}
return false
}

View File

@ -6,10 +6,18 @@ import androidx.compose.foundation.layout.*
import androidx.compose.material.*
import androidx.compose.runtime.*
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.asImageBitmap
import androidx.compose.ui.platform.DesktopPlatform
import androidx.compose.ui.res.loadSvgResource
import androidx.compose.ui.res.svgResource
import androidx.compose.ui.unit.Density
import androidx.compose.ui.unit.dp
import dev.inmo.kmppscriptbuilder.core.models.Config
import dev.inmo.kmppscriptbuilder.desktop.utils.*
import dev.inmo.micro_utils.coroutines.safelyWithoutExceptions
import java.awt.Desktop
import java.lang.Exception
import java.net.URL
class BuilderView : View() {
private val projectTypeView = ProjectTypeView()

View File

@ -10,6 +10,7 @@
<nav class="uk-navbar-container" uk-navbar>
<div class="uk-navbar-left">
<div class="uk-padding-small uk-text-lead">Kotlin Publication Scripts Builder</div>
<div class="uk-padding-small"><a href="https://github.com/InsanusMokrassar/KotlinPublicationScriptsBuilder"><img src="https://img.shields.io/github/stars/InsanusMokrassar/KotlinPublicationScriptsBuilder?label=Github&style=plastic"/></a></div>
</div>
<div class="uk-navbar-right">
<ul class="uk-navbar-nav">