Skip to content

Commit

Permalink
🔖 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
loicngr committed Feb 9, 2024
1 parent 15bb71b commit 617da44
Show file tree
Hide file tree
Showing 14 changed files with 102 additions and 47 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "kdrive-notes",
"version": "0.0.8",
"version": "1.0.0",
"description": "A kDrive notes app",
"productName": "kDrive notes app",
"productName": "kDrive notes",
"author": "loicngr <[email protected]>",
"scripts": {
"lint": "eslint --ext .js,.ts,.vue ./",
Expand Down
21 changes: 20 additions & 1 deletion quasar.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,25 @@ const {
configure,
} = require('quasar/wrappers')
const path = require('path')
const cp = require('child_process')

const gitExec = (cmd, fallback) =>
process.env.NODE_ENV === 'test'
? fallback
: (
() => {
try {
return cp.execSync(`git ${cmd}`, { cwd: '.' })
.toString().replace(/(\r\n|\n|\r)/gm, '')
} catch (e) {
return fallback
}
}
)()

module.exports = configure(function (ctx) {
const GIT_TAG = gitExec('describe --abbrev=0 --tags', '0.0.1')

module.exports = configure(function (/* ctx */) {
return {
eslint: {
// fix: true,
Expand Down Expand Up @@ -212,6 +229,8 @@ module.exports = configure(function (/* ctx */) {
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-capacitor-apps/configuring-capacitor
capacitor: {
hideSplashscreen: true,
version: GIT_TAG,
capacitorCliPreparationParams: [ 'sync', ctx.targetName ],
},

// Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-electron-apps/configuring-electron
Expand Down
4 changes: 2 additions & 2 deletions src-capacitor/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
applicationId "fr.zkf.kdrive_notes"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
versionCode 10000
versionName "1.0.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
aaptOptions {
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
Expand Down
1 change: 1 addition & 0 deletions src-capacitor/android/app/capacitor.build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ android {
apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
dependencies {
implementation project(':capacitor-app')
implementation project(':capacitor-splash-screen')

}

Expand Down
4 changes: 2 additions & 2 deletions src-capacitor/android/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<resources>
<string name="app_name">kDrive notes app</string>
<string name="title_activity_main">kDrive notes app</string>
<string name="app_name">kDrive notes</string>
<string name="title_activity_main">kDrive notes</string>
<string name="package_name">fr.zkf.kdrive_notes</string>
<string name="custom_url_scheme">fr.zkf.kdrive_notes</string>
</resources>
3 changes: 3 additions & 0 deletions src-capacitor/android/capacitor.settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/

include ':capacitor-app'
project(':capacitor-app').projectDir = new File('../node_modules/@capacitor/app/android')

include ':capacitor-splash-screen'
project(':capacitor-splash-screen').projectDir = new File('../node_modules/@capacitor/splash-screen/android')
5 changes: 2 additions & 3 deletions src-capacitor/capacitor.config.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"appId": "fr.zkf.kdrive_notes",
"appName": "kDrive notes app",
"appName": "kDrive notes",
"webDir": "www",
"server": {
"androidScheme": "https",
"url": "http://192.168.10.112:9500"
"androidScheme": "https"
}
}
49 changes: 29 additions & 20 deletions src-capacitor/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions src-capacitor/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"name": "kdrive-notes",
"version": "0.0.8",
"version": "1.0.0",
"description": "A kDrive notes app",
"author": "loicngr <[email protected]>",
"private": true,
"dependencies": {
"@capacitor/android": "^5.6.0",
"@capacitor/android": "^5.7.0",
"@capacitor/app": "^5.0.0",
"@capacitor/cli": "^5.0.0",
"@capacitor/core": "^5.0.0"
"@capacitor/core": "^5.0.0",
"@capacitor/splash-screen": "^5.0.0"
}
}
}
13 changes: 7 additions & 6 deletions src/components/SettingsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -208,19 +208,20 @@ function testGooglePlayConsole () {
title: `WebDAV server`,
message: `Custom WebDAV server for google test`,
prompt: {
model: cloneDeep(webdav.value.customServer ?? ''),
model: cloneDeep(webDAV.value.customServer ?? ''),
type: 'text',
required: true,
},
cancel: true,
persistent: true,
}).onOk((data) => {
if (typeof data === 'string' && data.startsWith('https://')) {
webdav.value.customServer = data.trim()
return
}
const v: string = (data ?? '').trim()
webDAV.value.customServer = undefined
if (v.startsWith('https://')) {
webDAV.value.customServer = v
} else {
webDAV.value.customServer = undefined
}
})
}
Expand Down
19 changes: 14 additions & 5 deletions src/pages/IndexPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ const localReady = ref(false)
const {
ready,
filePath,
firstLaunch,
api,
} = storeToRefs(mainStore)
Expand Down Expand Up @@ -110,12 +111,20 @@ async function dialogRedirectErrorFolder () {
}
async function dialogRedirectErrorSettings () {
Notify.create({
message: `Server error, please check your settings`,
type: 'negative',
timeout: 7000,
})
if (!firstLaunch.value) {
Notify.create({
message: `Server error, please check your settings`,
type: 'negative',
timeout: 7000,
})
} else {
Notify.create({
message: `Welcome, please complete the requested fields`,
timeout: 6000,
})
}
firstLaunch.value = false
void router.push({
name: ROUTER_SETTINGS_NAME,
})
Expand Down
11 changes: 11 additions & 0 deletions src/stores/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ interface State {
client?: WebDAVClient
filePath: string
api?: WebDAVApi
firstLaunch: boolean
}

export const useMainStore = defineStore({
id: 'main',

state: (): State => ({
firstLaunch: true,
ready: false,
client: undefined,
filePath: '/notes.json',
Expand Down Expand Up @@ -82,4 +84,13 @@ export const useMainStore = defineStore({
return false
},
},

persist: {
enabled: true,
strategies: [
{
paths: ['firstLaunch'],
},
],
},
})
2 changes: 2 additions & 0 deletions src/stores/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { nextTick } from 'vue'
import { useSettingsStore } from 'stores/settings'
import { localStorageResolve } from 'src/utils/storage'
import { type StateStorage } from 'src/interfaces/state'
import { useMainStore } from 'stores/main'

export const useStorageStore = defineStore({
id: 'storage',
Expand All @@ -18,6 +19,7 @@ export const useStorageStore = defineStore({
actions: {
initStorePromises () {
const stores = [
useMainStore(),
useSettingsStore(),
]

Expand Down

0 comments on commit 617da44

Please sign in to comment.