Skip to content

Commit 399bd13

Browse files
committed
Update to krypciak/nax-ccuilib v1.3.1
1 parent 9bdf1c1 commit 399bd13

4 files changed

Lines changed: 11 additions & 15 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"fuzzysort": "^2.0.4",
2525
"jszip": "^3.10.1",
2626
"marked": "=12.0.2",
27-
"nax-ccuilib": "github:naxane/nax-ccuilib",
27+
"nax-ccuilib": "github:krypciak/nax-ccuilib",
2828
"prettier": "3.2.4",
2929
"rimraf": "^3.0.2",
3030
"typescript": "^5.4.5",

pnpm-lock.yaml

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
onlyBuiltDependencies:
2+
- esbuild

src/gui/repo-add.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,6 @@ declare global {
2525
}
2626
}
2727

28-
function setText(f: nax.ccuilib.InputField, text: string) {
29-
f.textChild.setText(text)
30-
f.value = text.split('')
31-
f.updateCursorPos(text.length)
32-
}
33-
3428
/* https://www.freecodecamp.org/news/check-if-a-javascript-string-is-a-url/ */
3529
function isValidUrl(urlString: string) {
3630
var urlPattern = new RegExp(
@@ -160,7 +154,7 @@ modmanager.gui.RepoAddPopup = ig.GuiElementBase.extend({
160154
const urlField = this.urlFields[i]
161155
const dbName = dbNames[i]
162156
const db = ModDB.databases[dbName]
163-
setText(urlField, ModDB.minifyRepoURL(db.url))
157+
urlField.setText?.(ModDB.minifyRepoURL(db.url))
164158
this.isOkTexts[i].setText(this.getTextOk())
165159
}
166160
},
@@ -180,7 +174,7 @@ modmanager.gui.RepoAddPopup = ig.GuiElementBase.extend({
180174
const urlField = this.urlFields[i]
181175
const url = urlField.getValueAsString()
182176
if (url) ModDB.addDatabase(new ModDB(url))
183-
setText(urlField, '')
177+
urlField.setText('')
184178
this.isOkTexts[i].setText('')
185179
}
186180
ModDB.saveDatabases()

0 commit comments

Comments
 (0)