Compare commits
No commits in common. "9bd958ef24727fdfd7c8f31909e8a6a89459d0ab" and "23b68d9e192c08462cb1fd35dc7a280baf4f6a0d" have entirely different histories.
9bd958ef24
...
23b68d9e19
|
@ -3,12 +3,6 @@ name: Release Linux App
|
||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
types: [ published ]
|
types: [ published ]
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
tag:
|
|
||||||
description: 'Version tag'
|
|
||||||
required: true
|
|
||||||
default: '1.0.0'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
|
@ -33,13 +27,8 @@ jobs:
|
||||||
id: normalise_version
|
id: normalise_version
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
if [ "${{ github.event.release.tag_name }}" == "" ]; then
|
version=$(echo ${{ github.event.release.tag_name }} | sed -e 's/v//g')
|
||||||
version=$(echo ${{ github.event.inputs.tag }} | sed -e 's/v//g')
|
echo "version=$version" >> "$GITHUB_OUTPUT"
|
||||||
echo "version=$version" >> "$GITHUB_OUTPUT"
|
|
||||||
else
|
|
||||||
version=$(echo ${{ github.event.release.tag_name }} | sed -e 's/v//g')
|
|
||||||
echo "version=$version" >> "$GITHUB_OUTPUT"
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Setup Go
|
- name: Setup Go
|
||||||
uses: actions/setup-go@v4
|
uses: actions/setup-go@v4
|
||||||
|
@ -76,7 +65,7 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
CGO_ENABLED=1 wails build -platform ${{ matrix.platform }} \
|
CGO_ENABLED=1 wails build -platform ${{ matrix.platform }} \
|
||||||
-ldflags "-X main.version=v${{ steps.normalise_version.outputs.version }} -X main.gaMeasurementID=${{ secrets.GA_MEASUREMENT_ID }} -X main.gaSecretKey=${{ secrets.LINUX_GA_SECRET }}" \
|
-ldflags "-X main.version=${{ github.event.release.tag_name }} -X main.gaMeasurementID=${{ secrets.GA_MEASUREMENT_ID }} -X main.gaSecretKey=${{ secrets.LINUX_GA_SECRET }}" \
|
||||||
-o tiny-rdm
|
-o tiny-rdm
|
||||||
|
|
||||||
- name: Setup control template
|
- name: Setup control template
|
||||||
|
@ -116,6 +105,5 @@ jobs:
|
||||||
- name: Upload release asset
|
- name: Upload release asset
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
tag_name: v${{ steps.normalise_version.outputs.version }}
|
|
||||||
files: ./build/linux/tiny-rdm_${{ steps.normalise_version.outputs.version }}_${{ steps.normalise_platform.outputs.tag }}.deb
|
files: ./build/linux/tiny-rdm_${{ steps.normalise_version.outputs.version }}_${{ steps.normalise_platform.outputs.tag }}.deb
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
|
@ -3,12 +3,6 @@ name: Release macOS App
|
||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
types: [ published ]
|
types: [ published ]
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
tag:
|
|
||||||
description: 'Version tag'
|
|
||||||
required: true
|
|
||||||
default: '1.0.0'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
|
@ -35,13 +29,8 @@ jobs:
|
||||||
id: normalise_version
|
id: normalise_version
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
if [ "${{ github.event.release.tag_name }}" == "" ]; then
|
version=$(echo ${{ github.event.release.tag_name }} | sed -e 's/v//g')
|
||||||
version=$(echo ${{ github.event.inputs.tag }} | sed -e 's/v//g')
|
echo "version=$version" >> "$GITHUB_OUTPUT"
|
||||||
echo "version=$version" >> "$GITHUB_OUTPUT"
|
|
||||||
else
|
|
||||||
version=$(echo ${{ github.event.release.tag_name }} | sed -e 's/v//g')
|
|
||||||
echo "version=$version" >> "$GITHUB_OUTPUT"
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Setup Go
|
- name: Setup Go
|
||||||
uses: actions/setup-go@v4
|
uses: actions/setup-go@v4
|
||||||
|
@ -127,6 +116,5 @@ jobs:
|
||||||
- name: Upload release asset (DMG Package)
|
- name: Upload release asset (DMG Package)
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
tag_name: v${{ steps.normalise_version.outputs.version }}
|
|
||||||
files: ./build/bin/TinyRDM_${{ steps.normalise_version.outputs.version }}_${{ steps.normalise_platform.outputs.tag }}.dmg
|
files: ./build/bin/TinyRDM_${{ steps.normalise_version.outputs.version }}_${{ steps.normalise_platform.outputs.tag }}.dmg
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
|
@ -3,12 +3,6 @@ name: Release Windows App
|
||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
types: [ published ]
|
types: [ published ]
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
tag:
|
|
||||||
description: 'Version tag'
|
|
||||||
required: true
|
|
||||||
default: '1.0.0'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
|
@ -31,23 +25,16 @@ jobs:
|
||||||
echo "tag=$tag" >> "$GITHUB_OUTPUT"
|
echo "tag=$tag" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Normalise platform name
|
- name: Normalise platform name
|
||||||
id: normalise_platform_name
|
id: platform_name
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: tag=$(echo ${{ matrix.platform }} | sed -e 's/\//_/g')
|
||||||
pname=$(echo ${{ matrix.platform }} | sed -e 's/\//_/g')
|
|
||||||
echo "pname=$pname" >> "$GITHUB_OUTPUT"
|
|
||||||
|
|
||||||
- name: Normalise version tag
|
- name: Normalise version tag
|
||||||
id: normalise_version
|
id: normalise_version
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
if [ "${{ github.event.release.tag_name }}" == "" ]; then
|
version=$(echo ${{ github.event.release.tag_name }} | sed -e 's/v//g')
|
||||||
version=$(echo ${{ github.event.inputs.tag }} | sed -e 's/v//g')
|
echo "version=$version" >> "$GITHUB_OUTPUT"
|
||||||
echo "version=$version" >> "$GITHUB_OUTPUT"
|
|
||||||
else
|
|
||||||
version=$(echo ${{ github.event.release.tag_name }} | sed -e 's/v//g')
|
|
||||||
echo "version=$version" >> "$GITHUB_OUTPUT"
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Setup Go
|
- name: Setup Go
|
||||||
uses: actions/setup-go@v4
|
uses: actions/setup-go@v4
|
||||||
|
@ -84,7 +71,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
CGO_ENABLED=1 wails build -clean -platform ${{ matrix.platform }} \
|
CGO_ENABLED=1 wails build -clean -platform ${{ matrix.platform }} \
|
||||||
-webview2 embed \
|
-webview2 embed \
|
||||||
-ldflags "-X main.version=v${{ steps.normalise_version.outputs.version }} -X main.gaMeasurementID=${{ secrets.GA_MEASUREMENT_ID }} -X main.gaSecretKey=${{ secrets.WINDOWS_GA_SECRET }}"
|
-ldflags "-X main.version=${{ github.event.release.tag_name }} -X main.gaMeasurementID=${{ secrets.GA_MEASUREMENT_ID }} -X main.gaSecretKey=${{ secrets.WINDOWS_GA_SECRET }}"
|
||||||
|
|
||||||
- name: Compress portable binary
|
- name: Compress portable binary
|
||||||
working-directory: ./build/bin
|
working-directory: ./build/bin
|
||||||
|
@ -93,7 +80,6 @@ jobs:
|
||||||
- name: Upload release asset (Portable)
|
- name: Upload release asset (Portable)
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
tag_name: v${{ steps.normalise_version.outputs.version }}
|
|
||||||
files: ./build/bin/TinyRDM_Portable_${{ steps.normalise_version.outputs.version }}_${{ steps.normalise_platform.outputs.tag }}.zip
|
files: ./build/bin/TinyRDM_Portable_${{ steps.normalise_version.outputs.version }}_${{ steps.normalise_platform.outputs.tag }}.zip
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
@ -102,7 +88,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
CGO_ENABLED=1 wails build -clean -platform ${{ matrix.platform }} \
|
CGO_ENABLED=1 wails build -clean -platform ${{ matrix.platform }} \
|
||||||
-nsis -webview2 embed \
|
-nsis -webview2 embed \
|
||||||
-ldflags "-X main.version=v${{ steps.normalise_version.outputs.version }}"
|
-ldflags "-X main.version=${{ github.event.release.tag_name }}"
|
||||||
|
|
||||||
- name: Codesign Windows NSIS installer
|
- name: Codesign Windows NSIS installer
|
||||||
working-directory: ./build/bin
|
working-directory: ./build/bin
|
||||||
|
@ -112,7 +98,7 @@ jobs:
|
||||||
Set-Content -Path certificate\certificate.txt -Value '${{ secrets.WIN_SIGNING_CERT }}'
|
Set-Content -Path certificate\certificate.txt -Value '${{ secrets.WIN_SIGNING_CERT }}'
|
||||||
certutil -decode certificate\certificate.txt certificate\certificate.pfx
|
certutil -decode certificate\certificate.txt certificate\certificate.pfx
|
||||||
echo "Signing TinyRDM installer"
|
echo "Signing TinyRDM installer"
|
||||||
& 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /fd sha256 /tr http://ts.ssl.com /f certificate\certificate.pfx /p '${{ secrets.WIN_SIGNING_CERT_PASSWORD }}' TinyRDM-${{ steps.normalise_platform_name.outputs.pname }}-installer.exe
|
& 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /fd sha256 /tr http://ts.ssl.com /f certificate\certificate.pfx /p '${{ secrets.WIN_SIGNING_CERT_PASSWORD }}' TinyRDM-${{ matrix.platform }}-installer.exe
|
||||||
|
|
||||||
- name: Rename installer
|
- name: Rename installer
|
||||||
working-directory: ./build/bin
|
working-directory: ./build/bin
|
||||||
|
@ -121,6 +107,5 @@ jobs:
|
||||||
- name: Upload release asset (Installer)
|
- name: Upload release asset (Installer)
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
tag_name: v${{ steps.normalise_version.outputs.version }}
|
|
||||||
files: ./build/bin/TinyRDM_Setup_${{ steps.normalise_version.outputs.version }}_${{ steps.normalise_platform.outputs.tag }}.exe
|
files: ./build/bin/TinyRDM_Setup_${{ steps.normalise_version.outputs.version }}_${{ steps.normalise_platform.outputs.tag }}.exe
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
|
@ -3,7 +3,6 @@ import { computed, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'
|
||||||
import * as monaco from 'monaco-editor'
|
import * as monaco from 'monaco-editor'
|
||||||
import usePreferencesStore from 'stores/preferences.js'
|
import usePreferencesStore from 'stores/preferences.js'
|
||||||
import { useThemeVars } from 'naive-ui'
|
import { useThemeVars } from 'naive-ui'
|
||||||
import { isEmpty } from 'lodash'
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
content: {
|
content: {
|
||||||
|
@ -23,14 +22,6 @@ const props = defineProps({
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
offsetKey: {
|
|
||||||
type: String,
|
|
||||||
default: '',
|
|
||||||
},
|
|
||||||
keepOffset: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const emit = defineEmits(['reset', 'input', 'save'])
|
const emit = defineEmits(['reset', 'input', 'save'])
|
||||||
|
@ -40,18 +31,6 @@ const themeVars = useThemeVars()
|
||||||
const editorRef = ref(null)
|
const editorRef = ref(null)
|
||||||
/** @type monaco.editor.IStandaloneCodeEditor */
|
/** @type monaco.editor.IStandaloneCodeEditor */
|
||||||
let editorNode = null
|
let editorNode = null
|
||||||
const scrollOffset = { top: 0, left: 0 }
|
|
||||||
|
|
||||||
const updateScroll = () => {
|
|
||||||
if (editorNode != null) {
|
|
||||||
if (props.keepOffset && !isEmpty(props.offsetKey)) {
|
|
||||||
editorNode.setScrollPosition({ scrollTop: scrollOffset.top, scrollLeft: scrollOffset.left })
|
|
||||||
} else {
|
|
||||||
// reset offset if not needed
|
|
||||||
editorNode.setScrollPosition({ scrollTop: 0, scrollLeft: 0 })
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const destroyEditor = () => {
|
const destroyEditor = () => {
|
||||||
if (editorNode != null && editorNode.dispose != null) {
|
if (editorNode != null && editorNode.dispose != null) {
|
||||||
|
@ -109,18 +88,6 @@ onMounted(async () => {
|
||||||
emit('save')
|
emit('save')
|
||||||
})
|
})
|
||||||
|
|
||||||
editorNode.onDidScrollChange((event) => {
|
|
||||||
// save scroll offset when changes, ie. content changes
|
|
||||||
if (props.keepOffset && !event.scrollHeightChanged) {
|
|
||||||
scrollOffset.top = event.scrollTop
|
|
||||||
scrollOffset.left = event.scrollLeft
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
editorNode.onDidLayoutChange((event) => {
|
|
||||||
updateScroll()
|
|
||||||
})
|
|
||||||
|
|
||||||
// editorNode.onDidChangeModelLanguageConfiguration(() => {
|
// editorNode.onDidChangeModelLanguageConfiguration(() => {
|
||||||
// editorNode?.getAction('editor.action.formatDocument')?.run()
|
// editorNode?.getAction('editor.action.formatDocument')?.run()
|
||||||
// })
|
// })
|
||||||
|
@ -139,19 +106,6 @@ watch(
|
||||||
if (editorNode != null) {
|
if (editorNode != null) {
|
||||||
editorNode.setValue(content)
|
editorNode.setValue(content)
|
||||||
await nextTick(() => emit('reset', content))
|
await nextTick(() => emit('reset', content))
|
||||||
updateScroll()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
)
|
|
||||||
|
|
||||||
watch(
|
|
||||||
() => props.offsetKey,
|
|
||||||
() => {
|
|
||||||
// reset scroll offset when key changed
|
|
||||||
if (editorNode != null) {
|
|
||||||
scrollOffset.top = 0
|
|
||||||
scrollOffset.left = 0
|
|
||||||
editorNode.setScrollPosition({ scrollTop: 0, scrollLeft: 0 })
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
|
@ -175,7 +175,6 @@ const onSave = () => {
|
||||||
:border="true"
|
:border="true"
|
||||||
:content="displayValue"
|
:content="displayValue"
|
||||||
:language="viewLanguage"
|
:language="viewLanguage"
|
||||||
:key-path="viewAs.field"
|
|
||||||
class="flex-item-expand"
|
class="flex-item-expand"
|
||||||
@input="onInput"
|
@input="onInput"
|
||||||
@reset="onInput"
|
@reset="onInput"
|
||||||
|
|
|
@ -149,8 +149,6 @@ defineExpose({
|
||||||
v-show="!props.loading"
|
v-show="!props.loading"
|
||||||
:content="displayValue"
|
:content="displayValue"
|
||||||
:loading="props.loading"
|
:loading="props.loading"
|
||||||
:offset-key="props.keyPath"
|
|
||||||
keep-offset
|
|
||||||
class="flex-item-expand"
|
class="flex-item-expand"
|
||||||
language="json"
|
language="json"
|
||||||
style="height: 100%"
|
style="height: 100%"
|
||||||
|
|
|
@ -204,8 +204,6 @@ defineExpose({
|
||||||
:content="displayValue"
|
:content="displayValue"
|
||||||
:language="viewLanguage"
|
:language="viewLanguage"
|
||||||
:loading="props.loading"
|
:loading="props.loading"
|
||||||
:offset-key="props.keyPath"
|
|
||||||
keep-offset
|
|
||||||
class="flex-item-expand"
|
class="flex-item-expand"
|
||||||
style="height: 100%"
|
style="height: 100%"
|
||||||
@input="onInput"
|
@input="onInput"
|
||||||
|
|
|
@ -93,14 +93,7 @@ watchEffect(() => {
|
||||||
const renderTypeLabel = (option) => {
|
const renderTypeLabel = (option) => {
|
||||||
return h(
|
return h(
|
||||||
NSpace,
|
NSpace,
|
||||||
{
|
{ align: 'center', inline: true, size: 3 },
|
||||||
align: 'center',
|
|
||||||
inline: true,
|
|
||||||
size: 3,
|
|
||||||
itemStyle: {
|
|
||||||
lineHeight: 'var(--n-blank-height)',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
default: () => [
|
default: () => [
|
||||||
h('div', {
|
h('div', {
|
||||||
|
|
Loading…
Reference in New Issue